NSS Day 8, digital pet cemetery meets celebrity deathmatch

You read that right…


What do JavaScript objects, Mocha tests, and zombie monkeys have in common? Pet Sitter, the NSS week 2.3 project of the day. In what we can only assume is a classical example of “scope creep” what began as a humble project to help a pet sitter monitor their charges became an animal battle simulator in under 3 hours.

While I would love to focus on the monetary implications of a digital cock fighting ring, or “chicken boxing” as Sen. Elbert Guillory refers to it, we’ll save the entrepreneurship for another time. The real focus of today was Test Driven Development (TDD).

While it might seem a little strange at first, TDD is actually about the sanest methodology to approaching the act of programing I’ve seen yet. The core of the philosophy is simple: decide EXACTLY what your code is going to do and how you’re going to use it before you write a single line of actual code.

The benefits of this approach are two fold. First, writing the test first allows you to translate functional requirements into real code. Second, it allows you to ensure that any changes you make to one part of the code base don’t break another part of the code base.

Moving forward, I plan to live by the motto Red-Green-Refactor, and so should you.

P.S. You like the zombie monkey/celebrity deathmatch bait-and-switch?