Open is a web application created by the West Side Story's Engineering and Development team. It's designed so that anybody, regardless of experience, can change properties of a webpage with ease.

Inputs for colors can be simple colors, like "red", "green", "white", etc. as well as hexadecimal colors for even more specificity.

Inputs for font faces can be "Helvetica", "Arial", "Times", and the like; these are basic webfonts.

Inputs for link formatting can include "underline", "line-through", or "overline".

If you have suggestions for fonts or additions to the list of properties, send us a personal email or talk to us in person.

WSS Engineering

A collection of stuff I think is cool.

I love what I do and I love making a difference through what I do. Seeing someone else smile because of something I did is my greatest goal.

Who am I?

I am Anthony Pizzimenti.

I'm a Java and web engineer from Iowa City, Iowa. For the last year, I've worked freelance, improving my skills in frontend and backend web development as well as software engineering. I now work for the West Side Story as a web developer, IT consultant, and podcast guy.

I don't have a lot of spare time, but when I do, I play ice hockey for the Varsity high school team (also, LGRW!). I like doing crossword puzzles and playing StarCraft II, probably my favorite video game of all time. I also enjoy playing recreational soccer (although I'll be trying out for the school team next year) with my friends and cooking. My friend Louis and I run a podcast called TechTalk, where we discuss recent news surrounding the technological news sphere as well as do a whole portion of the show dedicated to helping people troubleshoot their PC problems on reddit.

My Tools

Brackets, my HTML/CSS/JS editor. With a few added extensions, it (almost) becomes an IDE.
eclipse, my Java IDE. It's a great editor and not TOO too heavy. Easily my favorite feature is auto-building.
Not really a tool, per se, but Chrome is a great browser. I'll post a list of the extensions I use soon enough. Also, the devtools are great.
I use the command line for a lot of stuff. I use Git to organize and publish my work, and as I don't really like the desktop app, I use the command line. I also use SASS as a preprocessor, so I run SASS commands from the command line as well.

I'm Anthony Pizzimenti. I'm a Java and web engineer from Iowa City, Iowa. This is my blog about music, web and software engineering, robotics, dinner parties, and whatever else I can muster. This is the mobile version of the site, so if you want a better experience with more content, visit this page on a computer.

The Simple Blogger theme edited by Anthony Pizzimenti © 2014, 2015.
Full mobile version by Anthony Pizzimenti, © 2015

February 24, 2015

Coding

Intro


So I've been working really hard on schoolwork for the past couple days. Usually, my comp sci periods are used for other things like extra homework, browsing reddit, or writing blog posts. Recently, however, I've actually been doing work in the class. I'll show you a little of what I've been doing.


Unit 7 Assignment 1


This assignment, we were supposed to simulate the Game of Life using 2D arrays. The main issue was getting the neighbor counting method called neighbors() to work correctly, and then working out the changeCells() method to address all situations.

Here's the neighbors() method:

public int neighbors(int row, int col)
<>{
    int count=0;

    for(int i=row-1; i=row+1; i++)
    {
        for(int j=col-1; j=col+1; j++)
        {
            try
            {
                if(board[i][j].equals("*"))
                        count++;
            }
                
            catch(ArrayIndexOutOfBoundsException except_1)
            {
                continue;
            }
        }
    }
        
    if(board[row][col].equals("*"))
    {
        occupied = true;
        return count-1;
    }
        
    else
    {
        occupied = false;
        return count;
    }
} 

This wasn't too hard, but identifying and isolating the area which needed the try/catch block took a little thinking. Also, if the return count-1 isn't included, the whole game gets thrown off.

Then came the changeCells() method, which is the main driving force behind this project. It calls the neighbors() method to identify how many neighbors each individual cell has, and then, based on that number, either generates a new cell, keeps the current cell, or kills the current cell.  This process goes through the entirety of the 2D array until a new generation is created.

Here's the changeCells() method:

public void changeCells()
{
    String[][]temp = new String[6][6];
     
    for(int i=0; i<board.length; i++)
    {
         System.arraycopy(board[i],0,temp[i],0,board[0].length);
    }
     
    for(int j=0; j<6; j++)
    {
        for(int k=0; k<6; k++)
        {
            int num = neighbors(j,k);
             
            if(num==3 && occupied==false)
                 temp[j][k] = ("*");   
            else if((num<2 || num>3) && occupied==true)
                temp[j][k] = (" ");
        }
    }

    board = temp;
}

Making sure that each 'if' statement was correct was crucial, but they were spelled out quite reasonably in the project description.  This project was fun and a thinking challenge for a while not because of its complexity, but because of the variety of different (wrong) answers you can get while working on it.

Unit 7 Assignment 2


This one was a little more interesting. A class called electionResults needed to be created, and this class had a method called (ready for it?) electionResults() which has three parameters: the number of candidates, the number of precincts, and a 2D array associating the two (candidates = rows, precincts = columns). The voting results weren't generated randomly, but taken from text files. The totals per precinct and per candidate had to be totaled, and then a winner was determined based on the greatest percentage-getter out of each set of elections.

Everything else was nice, with just some simple sorting and formatting going on, but determining the winner efficiently was fun to think about.  Since the total votes of both the precinct and candidate types are stored in independent, short arrays, I opted to use the sequential search method because it'd make short work of the small arrays and could quickly identify the greatest number in the array to determine the winner.

This sequential search

int winner = 0;
int small = b[0];

for(int ex=0; ex<b.length; ex++)
{
    if(b[ex]>small)
  winner = (ex+1);
  else if(b[ex]==small)
winner = (ex+1);
}

addresses two conditions: the first is if a number is greater than the first number in the array (as defined by the variable small ) then the candidate equals the array position plus one. If the first number is the greatest, however, it also returns the position plus one.

These projects are fun to work on, and I thoroughly enjoy them. I like the thinking and the analysis, and sometimes just having the pleasure of saying "I did that - I did that" makes it that much better.