Friday, March 18, 2011

Distracted

Well, I figured that it has been long enough since I last posted on here. It has now been a little under a year and I always think of this blog when I think about wanting to share my learnings of the day. I thought that the title of this post was fitting because it is the same as my last post and it is also what I feel like at the moment.

I have started to dive in, more seriously this time, to Game of Life. For those of you that don't know what this is, it is my pet project. As a summary to what the game is, it is like playing the board game Life with real people. Each year a student starts off setting up their life, and then as the years go by they try to become as prosperous as possible while having fun with their friends. It started off as a game that I played as part of a youth group growing up, then as I transitioned out of that life stage I began helping to staff the game, and finally I decided that the game would be better with a computer driving the back end of the game.

For that reason I decided to build the game using Ruby on Rails a language that I was and still am infatuated with because it is so inventive and fun. It truly is like crack for programmers. Anything that causes me to say, "I can't believe that I'm doing this again..." I find that Ruby and Rails has already addressed or solved for me.

Traditionally, this game is played at a church in La Canada in the Fall, so between those times I either forget about it completely, or try to make major overhauls in the structure. For this year, I decided that I was done with Rails 2.1.0 (the current version when I originally started). It was time to finally updated to the new version Rails 3.0.

I have found this to be a complicated, but intriguing migration. Coming from a Java background I initially threw caution to the wind and installed the 3.0 gem and figured that I would debug the issues as they showed up. However, Rails was never conceived with backwards compatibility in mind. They do keep a moderate amount of backwards compatibility, however, my application wouldn't have even worked on Rails 2.2 let alone 3.0. Needless to say, it didn't even function after the upgrade. I couldn't even really find a distinctive error to tell me what to change.

So then I decided to see what other people were doing and found that there is really quite a process to upgrading Rails. Every minor revision causes about 20% of Rails to change completely from what it was a minor revision before. Needless to say you need to approach it one minor revision at a time to have a hope of making it to the most current version.

So over the last couple of months (you can see how dedicated I am) I have been tackling it one minor revision at a time. First from 2.1.0 to 2.2, then 2.2 to 2.3, and now finally I'm tackling 2.3 to 3.0. I have been tracking the whole process here: http://www.shadowslab.com/wiki/display/GOL/Home if anyone is interested. Not much there yet, but I hope to begin using it more as I invest in this.

However, the guides that the kind people that make Rails put out are a cornucopia of links. I start in on one with the intention of learning about the release and find myself waist deep in amazing articles about not only Rails but amazing programming concepts. It is like having all of the Wikipedia content that I care about centralized on one page.

I can't resist finding out a little more about a new programming paradigm that they have implemented so I click the link and find myself a developer's blog post. From there he links off to the concept that started the paradigm and I find myself in the land of theory and it just goes from there. All of the sudden Firefox is filled with so many tabs that I'm starting to scroll on the tab bar to get back to where I was.

So tonight I started reading through the 3.0 release of Rails, then find a piece about how they are switching to Arel for all of the Active Record query generation, click the link which talks about what prompted Nick Kallen decided to create Arel, midway through reading about that he starts talking about how it is based on relational algebra which intrigues me for a bit, but finally I end up going for the article about closure under composition.

The example that he shows is pretty intriguing so I decide to learn more about it and end up at the online copy of the book that he raves about Structure and Interpretation of Computer Programs. Since I am a procedural programming type of guy I'm always intrigued by books about Lamda Calculus based languages or functional languages. Anyway, this book ties me up for the rest of the night.

I find myself at the end of the day wishing that I had another couple of hours to read through all of this, and only at step 3.5 of the Rails migration out of a total of 13 steps, but a lot more informed. I always get excited to find new and innovative thinkers in software engineering.

We'll see how far I get this weekend.