Day[13] Sweet Revenge!

Tom taught unit testing today. You know the cruel tests that the Tech Elevator students are made to run at the end of every exercise which either ignite pure green ecstasy or the red shame of failure? Today I learned how to write them. Today the tables were turned. It was satisfying.

And quite useful.

I arrived in the morning and did some dry reading on the subject. Like, saltine-challenge dry. Honestly, I couldn’t get through it. And I’ve read The Financier, by Theodore Dreiser.

Tom’s lecture was considerably more interesting, but still sort of numbing. People that don’t usually lose focus were nodding their heads like dolls of a lazy puppeteer. I got a little drowsy myself. But things changed when we started the exercises.

First, I was reunited with New York Will. We dived back in to one of the pieces of software that we wrote together, this time to write a series of tests designed to smoke out the bugs. And, crazy enough, it worked. We made a list of things we had created that needed tested in green comments in the IDE. Next, we went about feeding the software problems and the numbers we expected to get back.

Once we figured out the syntax, two different bugs popped up that we were able to fix in seconds. Writing to command line, these same problems had eluded us for two days and would have been infuriatingly mysterious had we managed to sniff them out manually.

Despite the sleepy subject, there is a lot of power in unit testing and I plan to do it a lot going forward, especially on the fast-approaching Capstone project.

Leave a comment