DEV Community

Cover image for Follow up quesions for "TDD: The good, the bad, the ugly"
Alex Pushkarev
Alex Pushkarev

Posted on

Follow up quesions for "TDD: The good, the bad, the ugly"

It was a great privilege to present my talk at the "Agile, DevOps and testing: people, process and technology" conference.

I was giving a talk about TDD (full session description can be found here: https://sessionize.com/s/aqaguy/tdd-the-good-the-bad-and-the-ugly/48003)

Unfortunately I was overtime (I had to interrupt a session to check on my children which were about to wake up) and I want to answer some of the questions I didn't have a chance to answer at the session.

❓What are the project criteria to use TDD?
👉I honestly believe TDD can be used on any project and in any codebase. Just be realistic with your expectations.

❓What skills one need to use TDD?
👉 It's more about discipline and be willing to give it some time rather than skills. TDD is counter-intuitive (at first) but not really difficult. In fact, I would say it's actually easier and less skill demanding than the alternative!

❓What are the drawbacks of TDD?
👉 The biggest drawback from my standpoint is that TDD never guarantees ending up with optimal algorithm. Working, readable, but not usually optimal. Usually it's not a problem, sometime it is.

❓ Should all the code be written using TDD?
👉 I usually write around 95% of code using TDD, because I find it the most natural and enjoyable. However for some RnD stuff or throw-away experiment code it may be unnecessary overkill. In languages like F# or sometimes Python some people would prefure REPL (Read–eval–print loop) instead.

So you have any other questions? Please write in comments!

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more