Fourth Day of the Craftsman Swap

Day Four of the Craftsmanship Swap:

Today started with Eric Smith and I working an iPhone version of Conway’s Game of Life trying to be as test first as possible. It was... Painful. I've been spoiled by my time with Ruby into expecting first class testing/mocking/stubbing. Even working with a guy who's given talks on how to test drive iPhone apps there was still a lot of wasted time scratching our heads, hand writing mocks/stubs, and f-ing around with clicking and dragging lines from one box to another.

We got interrupted mid-morning by some production issues in a large Rails application 8th Light maintains/ develops. We had to write a script to find some bad data and fix it so I got to use one of my favorite tricks to mark the progress of a long running process:

10.times do
sleep 1
print "."

If you don't put in the "STDOUT.flush" all the dots come out altogether at the end, but with the flush you get a nice dot to tell you every time you've completed one loop. Copy and paste the dots into TextMate and check the column number to know how many you've done for extra long processes.

After we straightened out the productions problems we had to go back to iPhone development. Sigh. We spent about 3-4 hours working on this application and we accomplished just about nothing. We were trying to get a button to repeatedly step forward the game using an NSTimer, but by the end of the day we were still having no luck. We did get the button to stop crashing the app altogether, so I guess that's something.

Btw, Eric's personal iPhone has a face plate that is 40% shattered.


Popular posts from this blog

Point Inside a Polygon in Ruby

What's a Good Flog Score?

SICP Wasn’t Written for You