Why TDD is hard to use?

Javier Lopez
5 min readAug 4, 2023

I love TDD now, but when I started practicing I thought this was not for me, the majority of people who hate TDD think as I thought at the beginning of my journey, what did I discover to continue?.

pixabay

I started practicing TDD because the company where I was working hired a Tech Coach. The person who hired him left the company the same day he started, so he didn’t know what to do.
So I knew him and we started working together, it was just luck for me, I was in the correct place at the correct moment.

I remembered him to push me to write tests firsts and to write code later to pass the tests, at the beginning I thought he was crazy.
It was really hard to think first on a test to demonstrate that my code would do what we wanted to do.
TDD basically was moving me from my comfort zone, I didn't like it because:

  • My ego, I know how to solve it, why I need to write a test to guide me?.
  • I usually broke a lot of things and make them to work later, I loved the feeling of the Eureka effect!!.
  • It’s harder to write the tests than to write the code.
  • I don’t know what means to solve the whole problem, I can understand it better while I’m writing it, breaking things.

My ego

--

--

Javier Lopez
Javier Lopez

Written by Javier Lopez

Principal Software Consultant at Thoughtworks

Responses (1)