lundi 9 mars 2015

Test Driven Development and magic numbers

I started programming using the TDD approach.


It seems to work very well especially to avoid initial design mistakes (you actually don't tackle the problem up-front and never design the entire system at the beginning but rather make a sort of "incremental design" laying down many tests, one after the another).


However I found a weird pattern arising that I should avoid (IMHO) when dealing with data parser: an increase need for magic numbers (i.e. mostly field offsets)


Maybe it's just a lack of experience in the refactoring phase?


Aucun commentaire:

Enregistrer un commentaire