
Test Driven Development is helping the development effort to be aligned with the needs of the customers, but is it always good to be aligned with these needs? What about the risk of developing features that are too customized to local needs of a specific user, and not a general product solution that a software company should provide.
Why to be Aligned?
The concepts of alignment with the business are easy to understand, you want your product to be aligned with the business of your company (especially if all your business is building a software product) and of your customers (why else should they buy your product?).How to be Aligned?
The concepts of alignment is also very clear if you read any of the sources of agile development:Lean Software Development of Tom and Mary Poppendieck.
All you need to do is to work closely with your customer, preferably having them on the development site. Get their requirements from first hand, show them your progress on a daily (and even hourly) basis, modify your software according to their comments etc. But even if you are doing everything right, you might find yourself in an alignment trap (the term is taken from IT research done by Bain & Company)
What is the trap?
As you can see in the diagram above giving full control to the customers, you might find yourself implementing features that are either too small (not in the eyes of the specific customer you talk to, of course) or too complex technically. Having too many small features or not spending enough time to implement them correctly, leads directly to the alignment trap. If I had 1$ every time that I heard the sentence "I don't have time to write tests to the feature...", I would probably be able to buy many cups of coffee and pizza trays to the sleepless night trying to fix these features.
When to be Aligned?
Knowing when to be aligned is the crucial point to avoid the dangerous alignment trap. If you can't adopt changes quickly enough, if you are afraid of changing your code (as it might break), or if you have no ability to know if you are aligned with the market needs or not, then you are stuck in a classic alignment trap.Therefore you must build beforehand into your organization the following productivity components:
- Automatic Tests - you must be able to change your code with confidence.
- Refactoring Methods - you should be able to "pull up" and utilize other refactoring recipes to allow quick generalization of code and other structural cross module changes.
- Measurements - You have to be able to measure how much a feature is used, and how it is used.

