As the tests become more specific, the production code becomes more generic
I only knew that Uncle Bob Martin has a blog just last year, 2016, (I think it was April) after a colleague posted a link of the blog post The Programmer’s Oath in out chat group at work.
I learned of the name Robert Martin from his book “Clean Code” which one of my co-workers made us read a few years ago. (I also read about his name and his books in John Sonmez’s blog and Scott Hanselman’s blog)
“Clean Code” was a very good book. I learned a lot from it.
I was not able to finish it (yet). But I’m going to buy a physical copy of that book a few days from now (when it’s price at bookdepository will hit the 45% discount again ) so I can finish it. I recently read someone who wrote that the last(?) chapter, the one with many examples, is the best part of the book. And I was not able to read that part yet.
Let’s get to the topic of this post
One of Uncle Bob’s latest blog posts on TDD, “TDD Harms Architecture”, has this statement.
As the tests get more specific, the production code gets more generic.
Then he added,
This is (to me) one of the most important revelations about TDD in the last 16 years.
This intrigued me!
What does Uncle Bob mean by that specific-generic thing?
I hoped Uncle Bob write more about that statement in his next blog posts.
. . .
It was posted last November 2010!!
So this idea is already in his head 10 years ago! (Or even many years before 2010!)
I do not yet know TDD by heart and I do not yet fully understand his statement that I quoted above. But if you also want to have an initial understanding of what Uncle Bob means, I think the Specific/Generic cycle post is a very good place to start.
I’m wondering… How many years would it take for a very good idea to become mainstream?
Any comments, even comments on my English grammar, will be greatly appreciated.