# App Academy Diary, Week One

Author: Zack M. Davis
Originally published: 2013-09-16
Category: computing
Canonical URL: https://zackmdavis.net/blog/2013/Sep/app-academy-diary-week-one/

_Monday 16 September 2013_— For the next couple months, I'm going to be engrossed in an intensive web development course offered by [App Academy](http://www.appacademy.io/); it's pretty great! Part of the routine is to write end-of-day blogposts describing what we've learned; I guess we were "supposed" to start a Tumblr specifically for these, but that's dumb because I already have a blog, so I think I'll just put my updates here (updating the post throughout the week). Today was the first day! App Academy puts a lot of focus on _pair programming_: you have two people at a workstation; only the "driver" types, while the "navigator" offers direction (and then you switch roles). Today I was paired with [_Chris Evans_](https://github.com/lcevans), who is a nice guy who knows way more math than me! Today our task was a bunch of fairly straightfoward Ruby exercises: monkeypatch the Array class to do this-and-such, make a playable Tower of Hanoi game, that sort of thing. The most challenging one was part 15 of [Test First Ruby](http://testfirst.org/learn_ruby): write a method that accepts integers and returns a string describing the number in words (so _e.g._ 259123 becomes "two hundred fifty nine thousand one hundred twenty three"). Chris and I finished the most important stuff on time and started working on the bonus project about solving mazes, but we didn't get too far with that in the time remaining.

_Tuesday 17 September 2013_— Lecture/Q&A ran to 1035 today, which I thought was way too long, but at least I learned about how to use `#tap` to build up an array. Today I was paired with [_Josh Foster_](https://github.com/jdfoster4), who is a nice guy who has been working as a business analyst for a few years! We did some more Ruby exercises, still rather straightforward (I expect most of the value of the course to come in later weeks, as we learn about SQL, Rails, _&c._, of which I know almost nothing). Our tic-tac-toe game (with a dumb AI) took a while to debug.

_Wednesday 18 September 2013_— I was a few minutes late today because a train ahead of the train that I was on had mechanical troubles! Today I paired with [_Jen Hamon_](http://www.jhamon.com/), who is awesome and used to study geoscience! We implemented the guessing games [Mastermind](http://en.wikipedia.org/wiki/Mastermind_%28board_game%29) and Hangman, and then started working on A\* search (picking up with the code about mazes that I started with Chris on [Monday](#monday)), also taking a detour to investigate some curious behavior exhibited by Ruby hashes with arrays as keys.

_Friday 20 September 2013_— Yesterday's themes were Procs and recursion. I paired with [_Ben Hass_](http://benhass.com/); our most challenging exercise was Word Chains: find a way to mutate a dictionary word into another of the same length by changing one letter at a time, with all the intermediaries also being valid words (_e.g._, _duck_ to unprintable to _funk_ to _fund_). The prompt even included suggestions ("Grow a new set, `new_words`, by calling `adjacent_words` on each of the words in `current_words`," _&c._), but our implementation wasn't behaving quite right; the TA [_Flarnie Marchan_](http://flarnie.com/) pointed out that we were wrongfully discarding some of the discovered words (the idea of a _queue_ was mentioned). On the evening train, I thought more about this and realized that the problem is really just a standard breadth-first search; I rewrote a much cleaner Word Chains after I got home. Graph search (breadth- and depth-first) was also today's theme; I paired with [_Kenny Chandrasekera_](http://github.com/kchandrasekera). The first part of the day went smoothly, but we had more difficulty with the task of writing a better (in fact, unbeatable) AI for Tuesday's tic-tac-toe game. We first tried [negamax](http://en.wikipedia.org/wiki/Negamax), at my suggestion (I was familiar with the problem from having done basically the same thing in Python last year), but didn't get it right; then we switched to an approach involving building up the game tree explicitly, but didn't finish. (The entire tic-tac-toe program is such terrible code that I might just rewrite the whole thing this weekend.)
