News for hackers. Stuff that matters.
Re:An External Replication on the Effects of Test-driven Dev... by tlarkworthy on Wednesday October 19, 2016 @01:29AM (#12741311)
It's a total waste of scientific resources to insist every study requires an army of test subjects, and the top statisticians of the times to apply the latest modeling, to work blind and replicated independently before publication.

There are limited resources to do research. You can get insights into how the world works much cheaper if you use critical thinking and facts outside the controls. Casually dismissing every study as irrelevant due to lack of rigor is wasteful.

Re:An External Replication on the Effects of Test-driven Dev... by jdlshore on Wednesday October 19, 2016 @01:42AM (#12741365)
If studies don't need to be rigorous, what's the point of doing them? Why not just write a persuasive essay instead? Is the format of a "study" just a rhetorical device, a glammed-up appeal to authority?

The whole point of careful statistics and well-designed experiments is so that we can learn whether a premise is true or not. Without rigor, we prove nothing; this study for example, neither proves NOR disproves anything about TDD in a professional setting. For us professionals, it's noise. Yet it's sitting at the #1 spot on HN, fulfilling people's preconceptions.

Also, the replication crisis [1] would disagree with you.

[1] https://en.wikipedia.org/wiki/Replication_crisis

Re:An External Replication on the Effects of Test-driven Dev... by beambot on Wednesday October 19, 2016 @02:15AM (#12741512)
> The whole point of careful statistics and well-designed experiments is so that we can learn whether a premise is true or not.

That's where you're wrong... even with "careful statistics", the point of sample-based studies is to disprove the null hypothesis with some confidence level. There is no requirement that it be 100% confident. In fact, with p<0.05, you might expect some small fraction of repeat experiments to show no significant effect.

(See, it's easy to get this wrong!)

Re:An External Replication on the Effects of Test-driven Dev... by adwn on Wednesday October 19, 2016 @03:19AM (#12741755)
Although I believe that you're technically correct, your objection does not refute jdlshore's central point.
Re:An External Replication on the Effects of Test-driven Dev... by beambot on Wednesday October 19, 2016 @04:37AM (#12742111)
Sure it does. In the social sciences (which includes questions about productivity a la TDD), there is no "proof" or "truth" in the mathematical sense. Results are based on statistical relevance subject to the sampling (and their biases).

This study is meaningful in that it provides some limited evidence. It's fine to question biases and confounding factors... but that doesn't change the relevance of their results, merely the scope. In this case, what the researchers actually found: "At <X> confidence interval, TDD doesn't work for white, male graduate students at <Y> University working on <Z> problem. Generalize at your own peril." But that's a shitty headline.

Re:An External Replication on the Effects of Test-driven Dev... by adwn on Wednesday October 19, 2016 @04:48AM (#12742170)
> Sure it does. In the social sciences (which includes questions about productivity a la TDD), there is no "proof" or "truth" in the mathematical sense.

Neither jdlshore nor I were talking about "proof" or "truth" in the mathematical sense.

> Results are based on statistical relevance subject to the sampling (and their biases).

The point was that this study doesn't have sufficient statistical relevance to give any evidence whether TDD is effective in general. It doesn't matter if this study gives any evidence whether TDD is effective when used by graduate students working on toy problems, because that was not the intention of the study (besides, nobody cares about this highly specific case).

Re:An External Replication on the Effects of Test-driven Dev... by beambot on Wednesday October 19, 2016 @02:39PM (#12746449)
> [...] whether TDD is effective in general.

If you read the actual article (even just the abstract), you would realize that evaluating TDD in a general professional settings was neither the goal nor the conclusion of the authors. You are arguing a straw man and hoping to make inferences that are unsupported by the paper's claims. The authors do a good job of scientific communication about their methods, results, and limitations. This is good practice for scientific communications. Don't think it's sufficiently generalizable? Fine, feel free to expand upon their work. That's how science functions.

("truth", "prove", and "rigor" were verbatim, primary components of jdlshore's comment. The two former words have very specific scientific meaning.)

Re:An External Replication on the Effects of Test-driven Dev... by hackuser on Wednesday October 19, 2016 @02:11AM (#12741492)
While I can see your point of view, perhaps that is an ideal and not a realistic view of how science actually works. Similarly, someone might have an ideal view of software development, but if they saw how it actually worked and read actual in-production code ... and I think that describes every profession.

Science does work pretty well; it predicts things with accuracy and reliability otherwise unknown by humanity (AFAIK). It's an interesting question: If not by hewing close to this ideal, how does it actually achieve results?

Re:An External Replication on the Effects of Test-driven Dev... by adwn on Wednesday October 19, 2016 @03:27AM (#12741799)
You're conflating the "hard" sciences (which rely on reproducible experiments to explore natural laws) with the "soft" sciences (which rely on studies to explore human behavior). The track record of the latter is significantly worse than that of the former. Software engineering, and by extension this study, falls firmly into the soft sciences territory.

You should be a lot more sceptical of supposed facts in soft sciences than in hard sciences. Not because of prejudice or arrogance, but because it's much harder to be reasonably certain about anything in a soft science than in a hard science.

Re:An External Replication on the Effects of Test-driven Dev... by hackuser on Wednesday October 19, 2016 @08:43AM (#12743211)
I know the differences you are referring to talking about. I mean all sciences, but really I mean that we need to hear from actual practitioners about how they really work.
Re:An External Replication on the Effects of Test-driven Dev... by vacri on Wednesday October 19, 2016 @02:03AM (#12741444)
Studies with small 'n' are feeder studies, exploring large amounts of problem space quickly. When patterns emerge, they can be retested or expanded upon.

Equating a somewhat flawed study to 'a persuasive essay' is wholly disingenuous. As is claiming n=20 to be 'tiny'. It's small, sure, but not ridiculously small.

This kind of study isn't a final nail in the coffin, but a data point to add to the discussion.

Re:An External Replication on the Effects of Test-driven Dev... by slavik81 on Wednesday October 19, 2016 @03:17AM (#12741745)
The use of students for this purpose reminds me of a story about a man who designs a flying machine.

After months of calculations and material research, he determines that only if he builds his machine out of birch will it be light enough to fly. According to his calculations, nothing else will work.

Days later, his best friend is visiting him in the hospital. He carries over a piece of the broken machine. With a puzzled look on his face, the friend asks, "Why did you build it out of pine when you knew you needed birch?"

"Because I didn't have any birch."

Re:An External Replication on the Effects of Test-driven Dev... by ChoHag on Wednesday October 19, 2016 @03:31AM (#12741815)
How short the internet's memory is.

Le mieux est l'ennemi du bien. It was right here not a couple of days ago.

Sheesh why do I bother?

Re:An External Replication on the Effects of Test-driven Dev... by ggus on Wednesday October 19, 2016 @04:05AM (#12741962)
the point is that the study appears flawed, so much that it is not even good. let alone perfect.
Re:An External Replication on the Effects of Test-driven Dev... by kriro on Wednesday October 19, 2016 @02:52AM (#12741642)
I'm not sure it's pure noise for professionals. These students eventually turn into professionals so there's probably some relationship (at least that would be my hypothesis).

Regarding the replication crisis...this is actually a replication and there's actually more replication for TDD than for most topics I read about.

Re:An External Replication on the Effects of Test-driven Dev... by avarun on Wednesday October 19, 2016 @03:00AM (#12741676)
Again, as a convenience sample with a tiny sample size, there's no conclusion we can even draw about students, let alone professionals.
Re:An External Replication on the Effects of Test-driven Dev... by SatvikBeri on Wednesday October 19, 2016 @02:06AM (#12741464)
There are really two types of studies: exploration and validation. Exploratory studies on small samples are still useful for refining hypotheses and figuring out whether they deserve more resources, but shouldn't be seen as significant evidence towards a conclusion–they are generally _less_ valid than opinions from people experienced in the field.

In contrast, validating studies _should_ have large enough sample sizes to be statistically significant, precommit to sharing results in order to avoid publication bias, have well-validated experimental designs, etc.

The problem is that these two are often conflated, so most people either blindly trust studies or put no faith in them whatsoever.

Re:An External Replication on the Effects of Test-driven Dev... by jaredklewis on Wednesday October 19, 2016 @01:44AM (#12741371)
Well, if we are discussing the allocation of resources, I for one would much prefer fewer, more rigorous studies than a large volume of studies with mediocre methodology and sample sizes. Such studies carry little more weight than one's own intuitions.

I do feel that small studies like this one serve a very important purpose: to let scientists hone their experiments. Most any large study should first be attempted as a small study to work out any kinks.

Re:An External Replication on the Effects of Test-driven Dev... by r00fus on Wednesday October 19, 2016 @01:39AM (#12741351)
Nobody needs an army of test subjects - just statistically valid numbers. But even with 20 test subjects the study fails at trying to make that 20 representative of any meaningful population.
Re:An External Replication on the Effects of Test-driven Dev... by vacri on Wednesday October 19, 2016 @02:04AM (#12741451)
Out of curiousity, how many subjects would you say are necessary to start being statistically valid?
Re:An External Replication on the Effects of Test-driven Dev... by jaggederest on Wednesday October 19, 2016 @03:03AM (#12741687)
Kind of the wrong question. It's more about qualitative sample selection and the expected effect size than it is the number of subjects.

Based on my admittedly poor understanding, I would expect to see a sample size of around 70 to have the power to detect a small effect in a single-tailed T test. I would also expect to have the samples selected and balanced carefully, preferably from the target group (i.e. experienced professional programmers in the language at hand)

From what I can tell, for an effect to be detected at least 80% of the time in a sample of 20 people, you'd need the effect to be >60%. I would definitely not expect that a short term project would show 60% improvement when employing similar levels of testing, changing only either before or after writing the code under test.

Re:An External Replication on the Effects of Test-driven Dev... by jacquesm on Wednesday October 19, 2016 @04:37AM (#12742107)
Especially not because the major benefit of TDD hits much later in the cycle, during refactoring a large chunk of code or when doing some major surgery on the whole project (and let's hope the tests are at the interface level).