Skip to main content


Showing posts from March, 2013

Documentation? You mean tests?

"I hate writing documentation!"
I've seen more than a few programmers say this.  To be honest, I've been guilty of saying it occasionally.  This post isn't about convincing you to like writing documentation.  I already wrote that post.  This post is about something I was talking to a coworker about just the other day.

Tests are documentation
I don't just mean that like when other programmers say it.  "Tests are one form of documentation."  This is much bigger than that.  When you test correctly and thoroughly, it's better than documentation.  That's when sh*t gets real.  I talked a bit about testing before, but what I said was only a piece of the whole.  Tests are the best form of documentation there is.  When you test code you don't understand, the test is a window into what you were thinking at the time.  It shows how the code works when it's done, but only by showing how you figured it out.  How many times have you looked at a pie…