Live data from Hacker News

An External Replication on the Effects of Test-driven Development [pdf]

people.brunel.ac.uk

31–40 of 332 posts

Re: An External Replication on the Effects of Test-driven Development [pdf]

#31

As someone who uses unit tests to find bugs in my code, that I would never otherwise find, this is surprising.

That not TDD, though. It's more similar to test-after.

I think test after is a reasonable approach. I am constantly dealing with new code bases and in the interview process I am often asked about my philosophy about testing. My response is thatbtrsting occurs on two fronts from the top down ( functional UI tests) and from the bottom up (unit tests). When it comes to unit testing my approach is to focus on the hotspots. If something gives you trouble, or if you find a bug/ issue then wrap it in a unit test. That way you don't have to worry about it. Bugs tell you where the weak spots in your code base are. When they speak to you, listen and take some action. Otherwise, I feel like chasing blanket coverage is not worth the effort in most procure.

Re: An External Replication on the Effects of Test-driven Development [pdf]

#32
post #15

Earlier quoted context omitted.

No, that's the value of automated regression test. TDD is just one way to skin that particular cat.

And that test winds up in v0.1.1 of your software magically, or is it there because you put it in the work to add it up front?

You seem to be conflating the existence of unit tests with TDD.

Re: An External Replication on the Effects of Test-driven Development [pdf]

#33
post #15

Earlier quoted context omitted.

No, that's the value of automated regression test. TDD is just one way to skin that particular cat.

And that test winds up in v0.1.1 of your software magically, or is it there because you put it in the work to add it up front?

Nice work on the false dichotomy. :)

TDD has a very specific meaning. It means you write tests, then write code that passes those tests. That specific order. If you're not doing that, you're not actually adhering to the definition of TDD.

TLD could mean, for example, writing a module, class, or function with a defined interface that implements the contracts for that interface, then writing the suite of tests to validate that module, after which you move onto the next module.

Strangely enough, you can do that while you're developing the product without adhering to the process dictated by TDD.

Re: An External Replication on the Effects of Test-driven Development [pdf]

#34
post #18

As someone who uses unit tests to find bugs in my code, that I would never otherwise find, this is surprising.

It's not about TDD vs no tests. The article is about tests first or tests later.

And yet, that is not what the clickbait title implies.

Re: An External Replication on the Effects of Test-driven Development [pdf]

#35
The problem that I have with this article is how people will interpret the results. The test is comparing (presumably) Comp. Sci. graduate students who already know good design patterns, best practices, etc at a relatively high level to see if they are faster and more accurate by testing before vs. after writing the main code. (TDD vs. TLD)

That's all well and fine, and possibly completely accurate. However, many people's takeaway is going to be the out-of-context & incorrect title of this post. (It does not say TDD is worthless - it says it is essentially the same as TLD)

I've always looked at TDD as a tool to help push less experienced, less "educated" developers into 1) even using tests at any point of the development cycle, 2) creating tighter, cleaner and MORE TESTABLE code by the time they've reached the end of the cycle.

So, if your team is and always will be well-educated, experienced programmers who already understand how to always do everything correctly from the beginning, feel free to use either method.

Otherwise, I'd urge you to consider TDD.

Re: An External Replication on the Effects of Test-driven Development [pdf]

#36
post #34
post #18

Earlier quoted context omitted.

It's not about TDD vs no tests. The article is about tests first or tests later.

And yet, that is not what the clickbait title implies.

Only if you think unit testing necessarily requires TDD (which is defined as writing tests before writing the code that passes those tests).

It doesn't.

All the article says is TDD has little or not impact... it does not say unit testing as a practice has no impact.

Seems to be a common misunderstanding around here that you, too, have fallen victim to...

Re: An External Replication on the Effects of Test-driven Development [pdf]

#37
post #34
post #18

Earlier quoted context omitted.

It's not about TDD vs no tests. The article is about tests first or tests later.

And yet, that is not what the clickbait title implies.

That is a good point. The implication got me to click through to the article.

Re: An External Replication on the Effects of Test-driven Development [pdf]

#39
post #35

The problem that I have with this article is how people will interpret the results. The test is comparing (presumably) Comp. Sci. graduate students who already know good design patterns, best practices, etc at a relatively high level to see if they are faster and more accurate by testing before vs. after writing the main code. (TDD vs. TLD) That's all well and fine, and possibly completely accurate. However, many peo…

You clearly think very highly of CS grad students :)

I've met a few that couldn't code let alone write proper tests, even though their foci were not policy or say the lighter side of user experience.

Re: An External Replication on the Effects of Test-driven Development [pdf]

#40
post #35

The problem that I have with this article is how people will interpret the results. The test is comparing (presumably) Comp. Sci. graduate students who already know good design patterns, best practices, etc at a relatively high level to see if they are faster and more accurate by testing before vs. after writing the main code. (TDD vs. TLD) That's all well and fine, and possibly completely accurate. However, many peo…

You clearly think very highly of CS grad students :) I've met a few that couldn't code let alone write proper tests, even though their foci were not policy or say the lighter side of user experience.

Really? Almost all of the post-graduate CS students I've known are experienced people who went back to school because they were at the point where they needed to either move into management or become a very high-level expert.

That's only personal experience, however, and mostly out-of-date

That said, I would hope any of them would be a step up on the new programmers from the "churn 'em out" short courses many are forced to take as the only affordable way they have to get into the industry, but then are left with little knowledge beyond how to get the requirements fulfilled.

Post reply on HN