4 ms·
A Longitudinal Cohort Study on the Retainment of Test-Driven Development
- gmiller123456 8y agoWhile I'm no advocate of TDD, I think they trivialized the arguments for it. They just measured "productivity" (number of tasks completed) and "quality" (number of tests that passed). The primary argument I've heard for TDD is modifying an existing system. You have a lot of tests that all successfully pass, so you can modify the system without fear of breaking it without knowing you did. Another reason is that the system becomes self documenting, making it easier to understand for people in the future. This study didn't really attempt to tackle those. Also, the tasks the programmers were assigned were tested for "quality" and completeness automatically. So it makes me think the tasks were of the type that favor being tested automatically, and thus biased towards benefiting from TDD.
- JoeAltmaier 8y agoUm, it had no effect on quality nor productivity. Yet they still recommend it? What koolaid have they drunk?
- cafard 8y agoOne does look for further indications of satire.
- currymj 8y agoIt could make sense. If I have to work on someone else’s code I’d much rather it have a suite of unit tests than not. Having (useful, properly done) tests is good, so TDD might be useful even if the quality of the code remains the same.
- codingdave 8y agoNo effect on external quality. But it does improve internal quality. Whether or not a study should make recommendations based on metrics they didn't measure sure seems like a valid question, though.
- iamleppert 8y agoPeople who write bad code also write bad tests. People who write good code write good tests, but you can argue that their code quality would be more or less the same without the tests. A far better use of time is to write better code and spend time improving the actual code along with human readable documentation about what said code is doing. I've removed and reduced 1000's of lines of code and their accompanying technical debt (tests) to reduce the system down into a manageable and fully readable system that is far superior to the old system with the exhaustive test suite and spent the rest of the time writing documentation on how the code works.
- RandallBrown 8y agoHow did you know that the code still worked after you refactored it? At the very least, the tests are a list of things the code should do.
- jazoom 8y agoTry it and see if it works?
- posixplz 8y agoWhat could possibly go wrong? If a refactor is sufficiently canonical that "try it" is acceptable, and you have little/no edge cases, then it should be trivial to write a good test for the same code. After all, what does a test do, besides "try it"?
- tempodox 8y ago> What koolaid have they drunk? The Cargo Cult Kool-Aid?
- Animats 8y ago"We conducted a (quantitative) longitudinal cohort study with 30 third year undergraduate students in Computer Science" No. Not only is it a college student based study, how do you do a "longitudinal study" in a short period of time?
- megaman22 8y agoTest-driven development never made a lot of sense to me. But I write code that deals with messy, poorly documented external real-time services that cannot be mocked without an absurd amount of effort. I try to pull out the bits of more pure code that I can and get that under test, but trying to go much further than that is counterproductive.