Tictactoe

May 14, 2013

App Academy W1D2

Tic Tac Toe

Today was a pretty good day. Perhaps because the projects and the ideas were not as thorny and instead tested particular concepts that resonated more with me. The one I had the most trouble with was probably IO and gets.chomp, but we ended up using it so much when creating a Tic Tac Toe game that my concerns have melted away. My pair programming partner Brian was great to work with. He had a multitude of ideas and together we got through things with much progress and very little slog. He is a master with Hashes.

The Tic Tac Toe game I think is something very interesting. It was challenging and the way that we ended up creating it was not the way that I would have done it if I were doing it on my own. However the method was something that yielded to me much insight and I think that it might show up again in the future when I code programs.

Something that I think might have to think about is the fact that before some topics are formally introduced in the lectures or the reading, we see it popping up all over the solutions and the homework. There are some things that are tough to figure through without those concepts. It probably might make some sense to go and juggle the timing of when those are scheduled to hit the brain.

Top 5 things I learned today:

When initializing defaults and an options hash, you have to include a merge. Otherwise, someone can easily overwrite the preset defaults in the initialization

You can call +/- or * on a Fixnum

Hashes are faster than Arrays. We had originally set up an Array.member? in order to search for the presence of an item within the Array. That took a really long time so we refactored that code into a Hash where someone would simply search for the key and the value would be TRUE.

In a hash, you can ignore a member of a Key, Value pair by simply leaving an underscore

RPN Calculator was made infinitely easier with Objects and metaprogramming. A lot of the code I used when writing vanished away.

Other things that I think I think:

Things are different in Ruby when you do not have hierarchies or relations. When working on Tic Tac Toe, which was an intensive piece of work.

Garbage collection was an interesting concept and worth reading more about in the future. Had discussed it briefly during the Q&A section in the afternoon and found the topic interesting.

The Q&A room gets piping sweaty hot during the afternoon

There was a guy with the same name as mine who attended the program last year. I find that amusing.

Tiredness was less of an issue. Sleep really does wonders.