Hacker News new | past | comments | ask | show | jobs | submit login
The Unreasonable Effectiveness of TDD (bignerdranch.com)
12 points by vanstee on April 1, 2013 | hide | past | favorite | 14 comments



Most pro-TDD articles I read take the perspective that people who don't agree with it just haven't tried it, or don't understand it enough yet, or things along those lines.

I'm curious to hear back from anyone who has bought into TDD full-bore and recognized all the benefits, but has instead decided to go back to test-last development (write the features, and then write tests purely for code coverage). If so, why?


I'm not one of the people you're looking for, but like so many things, a flexible mix based on the character of the work at hand is usually most effective. Sometimes (sometimes) you doodle to think, sometimes you code to think: how do you write a failing test for doodling?

FWIW I was writing what were effectively unit tests, and doing them essentially first or all but first, in the late eighties before (I think) TDD even had letters, but it didn't rule my life. I was chastised for being too new and not good enough to carve the whole monolith at one sitting. I did what I needed to anyway.


I'm one of those depending on the team I'm working on.

As a rule, if I would rather my colleague not to write code at all, I likely prefer them not to do TDD either.

Bad code is never fun to maintain. With bad TDD code, you just get twice as much per feature.


Such people, if they exist, are heretics and kulaks, enemies of responsible software development, and should be liquidated as a class.


Can we liquidate those responsible for the unfooable barness of baz while we're at it?


Resource Acquisition is Initialization, so just wait for current trends to go out of scope and you'll enjoy automatic, orderly and all but guaranteed destruction of kulaks and unfoobers.


No. The unfooable barness of baz is a Law of Nature.


Can't we just assimilate them?


Well I've had projects where I've written a lot of tests before really having the overall design right (without realizing it of course) and ended up wishing I'd waited a bit before writing the tests, because I had to redo a lot of them and it slowed down the process. Of course if you just do things right from the start this won't happen, but I often don't.


The original paper on Mathematics was able to appeal to a long history where mathematical advances led to new discoveries in science, particularly physics. This blog post simply borrows the phrase while failing to demonstrate any sort of effectiveness for TDD. How long must we endure programming cults with no science behind them?


> How long must we endure programming cults with no science behind them?

Until someone invents a cost-effective way to do science on programming techniques. I'm not holding my breath, because we're talking about workplace habits, communication through code, and team dynamics, which is an altogether different beast than mathematics or physics.


I'm personally interested in reading articles about TDD in the game development sphere. Such tests are much harder to write (I didn't say impossible!)


TDD aside, I'm personally interested in any testing approaches that apply to user interaction.


I'm doing a lot of that (UI testing) in my Let's Code Test-Driven JavaScript series (http://www.letscodejavascript.com, starting with episode 41). My next Lessons Learned video (#10, coming out this Friday) covers the underlying theory. There's a free trial if you want to check it out.

If you're more into Java, or then I also do a lot of test-driving of a Swing GUI in my original Let's Play TDD series (http://www.jamesshore.com/Blog/Lets-Play). It's a lot less polished than Let's Code TDJS, but it's free.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: