News for hackers. Stuff that matters.
Re:Kent Beck: “I get paid for code that works, not for tests... by mistermann on Thursday December 08, 2016 @10:04AM (#13130677)
Just being the devil's advocate....

> With the manual approach you'd have to retest everything to have any real confidence.

This kind of implies that software development before "~tdd" was a complete disorganized gong show of quality especially where refactoring, but in fact that was not the case. There are ways of coding that are more conducive to quality than others.

> With the automated approach you just run a command.

Once you've written all that code, yes.

> if I didn't expect to have to ever change code, I wouldn't bother with it.

Usually you don't, in which case the extra effort on testing is wasted, usually.

Re:Kent Beck: “I get paid for code that works, not for tests... by nolemurs on Thursday December 08, 2016 @11:24AM (#13131393)
> This kind of implies that software development before "~tdd" was a complete disorganized gong show of quality especially where refactoring, but in fact that was not the case.

The question isn't "do we need to test." Testing can just take the form of running the code manually and making sure the output makes sense, but you do need to test.

The question is "do we test automatically or manually." It's the same question regardless of how good your practices are. Note that this is totally distinct from the question of whether or not to use TDD.

> Once you've written all that code, yes.

I've found that writing tests often doesn't take much longer than testing manually, and rarely takes longer than testing manually twice. Sure, if you obsessively try to test every possible case and input, you'll waste time, but well targeted testing doesn't have to be slow.

> Usually you don't, in which case the extra effort on testing is wasted, usually.

For non-trivial projects I have an average number of revisions per line of code much closer to 2 than to 1. Sure, some of the code only gets written once and never touched, but other code gets revised multiple times. If you're good at writing tests, the tests will focus on those often revised lines of code.

And, again, you have to compare the effort against the effort of manual testing, not against the effort of writing code you've never run and shipping it.

Re:Kent Beck: “I get paid for code that works, not for tests... by dpark on Thursday December 08, 2016 @11:15AM (#13131285)
You usually don't have to make changes to code once you've written it? The only time I ever find that true is when the code is throwaway (ad hoc data crunching for some purpose, scripts to automate some one time tedious process, practice projects just intense to learn a system, etc). I don't think I've ever written anything that was useful for more than, say, a week that didn't get changed later by myself or someone else.

The typical claim is that code maintenance is at least 10x as long as the initial write.