In searching for something yesterday I stumbled upon the resource page of ObjectMentor and found it a gold mine of information about software practices and systems. ObjectMentor is a company of industry experts and started in 1991 by Robert C. Martin. As a company they also helped define Extreme programming and helped form the Agile Alliance.
Luckily for us, ObjectMentor offers resources for use to look at the form of articles, books, downloads,etc. One might also assume that resources from them would be highly technical. That assumption would be incorrect.
Case and point, I highly recommend the articles in the craftman series. It’s written in the form of an apprentice programmer writing into their diary the conversions of the day between them and the journeyman programmer they paried with. I find myself learning the concepts the author is trying to instill, using a natural conversation between two people.
I personally re-thought my impression of test first in article The Craftsman #4: A Test of Patience. The article starts with the apprentice writing a very simple program and it conforms to the practices that the journeyman taught in articles #1,2,3. Then the apprentice starts to write the tests for it. The journeyman makes the apprentice delete the whole program. Which of course make the apprentice angry.
The article then proceeds to follow through writing the same program test first, then refactor until completion. The article does include the original program before testing, and includes the code until completion.
At the end of the article it shows, and instills, that testing first produces a leaner more pragmatic code base than writing the tests afterwards.
I would have included links to the mentioned articles but they open in pdf’s, so I chose not to. I highly recommend this site to everyone involved in software engineering.
Tags: agile, object orientated, resources, testing