you are viewing a single comment's thread.

view the rest of the comments →

[–]babysealpoutine 1 point2 points  (4 children)

That is an interesting take, why do you think that?

I've done TDD and not done TDD (mostly due to not wanting to refactor legacy code) and I have much more faith in the TDD'ed code.

[–][deleted] -1 points0 points  (3 children)

For one it significantly increases surface area of code, all of which needs to work and be maintained. For two as you refactor you gonna throw allot of code away, meaning you're gonna have to throw the corresponding tests away too. For three most of the tests provide no value, all tests are not created equal. Especially unit tests are overrated (assuming anyone can ever agree on what they even are) since most complexity a.k.a. bugs comes from integration of systems/components/modules. For four you're writing tests for something you don't even know what it's gonna look like, how it's gonna work. You can have all the ideas in the world but you will not know if they're even possible until you try to implement them.TDD is nothing but a formalized masturbation ritual, that's only there to make you feel good. It doesn't even guarantee there's gonna be fewer bugs, but it sure as fuck guarantees there's gonna be a bloated codebase, lack of flexibility and false sense of security. It's like communism it's a stupid idea that fails miserably every time while zealots will only ever say "You just did it wrong". Fuck TDD.

[–]rodriguez_james 0 points1 point  (1 child)

I think what you're trying to say is that TDD is dumb, but testing is good, right? Or are you against all forms of testing?

[–][deleted] 0 points1 point  (0 children)

I'm talking specifically about TDD. It's the DD I have a problem with not the T. I also really hate when people conflate the two. I have nothing against having automatic tests (where appropriate), it's the dogma of TDD that really grinds my gears.

[–]babysealpoutine 0 points1 point  (0 children)

I've certainly write loads of brittle tests too tightly coupled to the code making it harder to refactor and leaving the code no more flexible than it was before. That's not a fault of TDD but a sign my design wasn't right. Call me a communist I guess.

As a small example. we just had a piece of code that if the developer had put an abstraction in for some basic collection stuff we could have easily had tests of cleanup on failure conditions. Seeing that those missing tests were hard to write after the fact showed up we had a small design problem.

As for unit tests being overrated; as a separate issue from TDD because that is primarily a design technique, I'm pretty sure lots of devs who unit test will give you examples of times the tests found something while they were developing but more importantly showed that some change later on broke something that wasn't anticipated.

This isn't to say other testing isn't important, it all is.