After practiced TDD for almost a month, I guess I began to understand why TDD can possibly generate the best suitable design, although there is no one actually did the design work. It is interesting that if something is not intended to be done but actually has been done finally. It means that the design is actually done gradually and silently during the TDD process.
I always wondering what actually happened leads to such a result. Then I guess I have found the answer from Darwin’s theory. Think about the various lives on the planet, there is no one who designed them, but they are just so reasonable and harmony with the environment.
Why? Natural selection!
Natural selection ensures a trend of the life evolution, which makes the life to be more and more suitable to the environment, by serious survival tests. Unsuitable life just died out, the remained are the suitable.
Comparing to natural selection, you can find the similar gene in TDD. They both got tests and the test result eliminates the unsuitable design, which actually drives the design more and more fit to the requirements in a most efficient way.