re: What was your TDD aha moment? VIEW POST


I am also still waiting for the aha moment.

I do write a lot of tests for logic. And tests often do drive some changes to logic. For example, mapping out possible inputs and outputs makes me realize I forgot a case, or need to handle a specific one differently. But I use tests more as regression insurance, and typically write them after the fact.

Automated tests are still code, so they are only valuable if they are simple. Otherwise, tests could also have bugs. I draw the line at testing my tests. :-)

Ponder: if tests could be simple enough to not require tests, then why can't the code itself also be that simple?

code of conduct - report abuse