I've had a crazy couple weeks. Two weeks ago was one of my good friend's bachelor party and last week was my sister's wedding. As I opened awakened my laptop from sleep mode on Saturday morning, I browsed to this site and realized that I had been neglecting development for a few weeks, the primary reason for such neglect was the fact that Rails 1.1.x hasn't hit the stable branch on Gentoo. Oh, but wait, did that really matter?
Well, not really. You see, I do all my web development on my laptop. At the press of a few keystrokes, I can replicate all my laptop code to the production website...oh how I love rsync and Textmate. I also use a hunk a burning software called Locomotive, which kindly bundles all the necessary packages (e.g., Ruby, Rails 1.1.x, RedCloth, etc) necessary for my web development into a single self-contained application.
So it was somewhat of a moral dilemma on Saturday. On one hand, I could go out and reap the wonderful rainy weather we had in Pittsburgh (unlikely) or alternatively, I could play geek for a few hours and be a little productive. So over the weekend I managed to write about 535 lines of code that focused on the unit/functional/integration testing baked into rails.
Not only do I feel a little more confident about the functionality of my site, but I even managed to track down about 5-10 bugs that managed to slither their way into my code. Until this point, I was using a very manual process...- Login
- Enter a blog title
- Enter a blog body
- Add some tags
- Repeat...
- Ahhhhh!!!
Yes, it was quite annoying and I decided that I had enough. Needless to say, I'm progressing smoothly with a cool 1066 of production code and 1067 (that's one more line, sorry had to do it) of test code scattered throughout my unit/functional/integration tests. Right now, I'm about 50% of the way through creating all the necessary tests for the register, blog, and login section. I'm starting to get the hang of it though, so I hope to charge through the rest over the next week or two as time allows.
I will say one thing though, baked in Rails testing rocks!!! I don't know how I wrote those previous websites without doing any real testing, there were probably bugs the size of elephants in that code. Hopefully I reduce them to miniature doxens in this new version of the website.


