TDD assuages ADD

Test Driven Development (TDD) helps with Attention Deficit Disorder (ADD). If you get distracted and forget what you were working on, just run the tests and see where they break. Then go from there.

I used to have a habit of making sure I left my code in a state where it would fail to compile before leaving for the night, so that when I came back I would remember what I was working on. Leaving the tests in a state where they fail to pass is another version of the same technique, except that it works over longer periods of time. Typically, I'll have to do three or four things to the code in order to get a test to pass. Whenever I finish one of those things, the code compiles successfully, even though I'm not done. That's where the tests come in handy, because they'll still be failing.

Another note: if you work in a cube farm, headphones can help you avoid getting distracted in the first place.

Followups to TDD assuages ADD:

Posted on August 13, 2003 04:44 PM | TrackBack
<< Previous | Main | Next >>

Comments
Post a comment









Remember info?




Prove you're human. Type "human":