, 6 tweets, 2 min read
My Authors
Read all threads
I'm writing a thing about what it feels like to do TDD, in a kind of response to the articles and remarks by @jcoplien and @dhh and others. I agree, of course, that 100% line coverage, which you get for free with TDD, doesn't mean much in a theoretical sense.

1/6
Even 100% branch coverage doesn't mean much. While I don't subscribe to all the math in Cope's article, it's true that, theoretically, a program with high coverage can include plenty of errors.

What's interesting is that in practice, theory doesn't quite work.

2/6
If you TDD some little thing, making sure that every line of code you write is required by a meaningful test, and get it working, try this experiment.

Look at the code. Try to find places where a change to one or more lines will break the program but not break the tests.

3/6
I think you'll be surprised at how hard it is to find places where you can break the program and not break a test. And if you do find such a spot, ask yourself whether there is a sensible test that should have been written in the first place.

4/6
I took all those courses and learned all that theory too. And I've been writing real software for over a half century. Just as I've always found my way to the grocery store just fine, even though the traveling salesman problem is NP-complete, ...

5/6
... I've found that my TDD'd code works sooner and has far fewer defects than the code I just write and "debug".

YMMV. But if it seems interesting, maybe try it.

6/6
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Ron Jeffries

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!