10/28/13

My First Date with Sinatra

My first date with Sinatra was a hot mess. And that damn tipped over rocks glass for error messages is enough to drive a girl to drink.

Overly excited about building a web app, due to having some cursory experience with a little front-end dev, I decided to approach the Sinatra tutorial with guns a blazin’ and follow the tutorial using Haml instead of ERB (short for "Embedded RuBy", not to be confused with "Epic Rap Battles"). I mean, how hard could it be? Talk about kicking my own ass… sheesh.

First and foremost, Ideabox introduced the use of forms, which I had zero experience with and found them to be a tiny beast of weirdness all their own. Then, layer on top of that translating ERB instructions from the tutorial real-time into Haml had me and the spilled glass of Jack w/ water and three ice-cubes (the real Sinatra's poison of choice) in lock step for the duration of the exercise. And I’m a vodka girl, so it wasn’t a pleasant experience, although spilling booze in any context is generally an unpleasant faux-pas.

So where did I end up? Well… I completed the project, so there is that, but I certainly wasn’t proud of it and absolutely none of it was test driven.

I did however, learn a lot. And the post exercise where we sat with Jeff and worked through how to approach testing with Ideabox was hugely beneficial. That said, I would most definitely repeat the exercise, with TDD first and foremost, as well hopefully having some time to add more extensions and make the front-end pretty. Another piece of good news is that re-writing the views in Haml was an extension, which I only learned after the fact, which was a nice surprise. This was the first project since the start of school that I was able to complete in its entirety with an extension. Kazaam!!

After the Sinatra shin-dig, we had our first “code retreat” at The Source in Denver. It was like speed-dating, but with code-pairing. And it was fantastic! All of my fellow students proved to be much better dates than Sinatra, if for no other reason than they didn’t keep spilling liquor on me. I especially enjoyed the Groundhog Day approach, where we kept repeating the same exercise over and over as we changed pairs. Even though the exercise was the same, the change in pairs and the application of learning from one session to the next really changed the dynamic of the exercise. Sometimes - I felt pretty stupid, but a lot of times, I actually contributed to the process of writing some code that worked. And that always feels great.