Test-driven development: Write better code in less time by Evan Dorn
Channel: Los Angeles Ruby
Date: 2012-11-19

"I know I should write some tests, but I can't afford the time.  I have to get this feature out the door."   That's absolute crap, friends, and if you hear someone say it you should slap them.  Yes, tests provide a measure of code reliability at the apparent cost of extra work.  But 'tests' and test-driven development are not the same animal.   TDD (or BDD) is a process that will deliver not just superior code, but massive accrued time savings over the life of your project.   With experience, it will also provide immediate time savings in almost every case: when you're doing it right, it's usually faster to write the tests and the code than just the code.  I'll explain the difference, and walk through some concrete examples.

I'm a lifetime geek/hacker/engineer/scientist and obsessive creative, with a touch of evil capitalist.  A few years ago I left science for a while to turn my web development hobby into a career, and founded Logical Reality Design, Inc.  LRD is a webdev contracting firm with a distributed workforce of L.A. area locals.  We've done all sorts of work for all sorts of clients, but lately have specialized in startups, code rescue, and Ruby on Rails development.