I appreciate Mr. Zakharchenko’s extensive critique of TDD even as I have some reservations regarding his language. He tried TDD. He thought about it

Software Design: Tidy First?

submited by
Style Pass
2024-04-02 12:00:07

I appreciate Mr. Zakharchenko’s extensive critique of TDD even as I have some reservations regarding his language. He tried TDD. He thought about it. He put his thoughts out there. He knew he was going to get a reaction & he did—300K views, 160 comments, 190 reposts, 1000 likes.

He describes his programming workflow, which he describes as Prototype→Iterate→Test. It doesn’t sound like a horrible workflow to me, aside from the inevitable temptation to skip testing. But his description of his workflow & his struggles with TDD make it sound to me like he is missing a skill, a skill that I & other folks who use TDD have taken for granted all these years.

Note that when I say he’s “missing a skill”, I don’t mean he’s a bad programmer. I’m missing loads of skills. Nobody, as Lee Trevino put it, has a full bag [of golf clubs]. There’s a thing that I do that, if he was able to do it, he wouldn’t talk about TDD the way he does. None of which is to imply that he should use TDD, or learn the skill I’m about to describe.

Thus, my experience of TDD is the opposite of his “you should know how the system behaves before even implementing it”. We all have some sense of how the system will behave when we’re “done” or we wouldn’t start. But using Behavioral Composition I explicitly don’t care how the whole system behaves in detail before I start. I gradually record my expectations piecemeal in the form of tests & satisfy those expectations piecemeal in the form of changes to the code.

Leave a Comment