4 Comments

In my experience, it's not the fact that TDD is "unintuitive" that prevents people from doing it, it's that folks generally don't like to do things differently (especially if they've become competent or expert, and become a novice again) unless there's a compelling reason to do so. TDD is not a "quick win" where we can easily demonstrate its superiority.

Learning to ride a bicycle might be hard because it's unintuitive (though I don't think intuition is a useful term for that kind of learning as it relates to biologically primary learning), people try it and learn how to do it anyway because they _want_ to.

I'd also say that automated developer tests (first or last) are probably not "intuitive" to many, as they often didn't learn to write tests until after they were already capable of coding. So learning to write tests at all (instead of manually testing or sitting in the debugger) is unintuitive for them.

btw, I don't see the "test after" intuition coming from medical or cooking (it's an interesting analogy, but not one I have ever heard before). I see it as "that's how I've always done it", and it generally "works for me", and therefore it becomes part of their expertise (and then perhaps their identity).

Expand full comment

All great points, Ted! I love the point about how unintuitive writing tests are. I recently taught a coachee to write a test for a _manual_ test. This could be a good bridge for writing an automated test.

I've seen others experience homeostasis (good enough), preventing them from trying (not strong enough desire). I've not heard about the expert turns novice view. This is interesting!

We don't seem to share the experience of TDD's unintuitiveness. I felt this way during my first few years of practising TDD (sometimes, I still do, and many would tell me so). You might have heard TDD practitioners mention, "Ah, even I don't do TDD all the time". There's the oddness about it that we still haven't pinned down (I plan to tackle that in the next few essays).

P.S. On intuition/cooking/medical, you tend not to know where intuition comes from, i.e. why do I find the test last intuitive? I don't know. It feels natural (from past knowledge + experience). The problem is with the word "test".

Expand full comment

Well written article. I like it. There is also another angle one can take though, that my be easier for some to digest.

When we test something, or rather check something (the test is really just an automated checker), we need to know what we’re checking for. TDD is a way to define what we’re check for up front, in small incremental steps. In other words, it’s about defining what the code should do before we create the code that does it. From that viewpoint it may feel a bit more natural.

Expand full comment

Wow, thanks, Tomas, that's incredibly motivating!

On another angle, I agree. That's my next essay. It's great that you share a similar angle, as that's what's been making it intuitive for me.

Expand full comment