Software engineering blog of Clément Bouillier: March 2009

Friday, March 27, 2009

TDD meeting at Alt.NET France

On wednesday March, 25th, we have a meeting on TDD at Alt.NET France. It was animated by two Octo consultants, Frédéric Schäfer and Djamel Zouaoui. Again, we reach a new assistance record, around 30 people.

You can find a more detailed minutes I wrote in French on Alt.NET France site. I give here a quick synthesis of the conclusion I take from this meeting.

The presentation started with an overview on why testing or why not testing? The discussion raises a lot of stereotypes : "longer", "more expensive", "I'll make them later" (=never ;)) and so on...

Then we get to when testing is useful (and indeed more or less why) :
  • get code that just reveals developer intention (not more),
  • test at the right granularity,
  • protect yourself against inevitable application changes (regression),
  • loss of time in repetitive debugging and other test console applications which are not reusable.
Frédéric and Djamel presented some code samples around MasterMind game to underline how to apply TDD. Main points were :
  • make test first else you never will...
  • make simple test first, and increment complexity step by step,
  • don't try to conceptualize/develop the perfect thing on first try (let iterations drive you to the most accurate design),
  • use some UML diagrams to guide your global intention but do not lose yourself in details,
  • use the following virtuous circle : intention > test code (do not compile) > code to compile test code that fails the test (red test) > code that passes the test (green) > refactor (your code or your tests, not both in the same iteration)
  • write test correctly = AAA : Actor, Act, Assertions (be careful of tests without assertions)
  • a declared bug needs a test to ensure its correction
  • always run all the tests (which should be automatic and fast)
Finally, we get to deeper subjects, and I conclude that TDD is a practice that lead developers to a set of well-known and good design practices :
I was already convienced with TDD, but I think I get a more precise vision of it now. To conclude, I think TDD brings :
  • code documentation (executable specifications),
  • protection againts regressions and during refactoring,
  • accurate and flexible design for your code.
Thanks again to Octo company, Frédéric and Djamel for hosting and organizing this meeting.

Thursday, March 5, 2009

ALT.NET France is more and more active

I am pleased to participate to ALT.NET France since August 2008, it beguns a little bit earlier on the impulsion of some people that continue to spend time on this great technical social community : Robert Pickering, Julien Lavigne du Cadet, Gauthier Segay, Romain Verdier and more (do not offuscate if I forget some people :o))...

We start with a Google group list and some informal meetings once a month in a bar, and since november, we meet around a defined subject presented by one of the community members. You can find on several blogs some comments about these meetings.

We know reach another step, Julien has setup a new web site, it will (or have to and/or should) be updated by the community.

So enjoy and join us, even if you are not fluent in French, you will be able to share with us, we have several not french members.