Live data from Hacker News

TDD is dead. Long live testing.

david.heinemeierhansson.com

31–40 of 166 posts

Re: TDD is dead. Long live testing.

#31

I dislike mocks. I've never seen the point in testing code against an entirely fictional representation of the most complicated and slow part of the system, just because it happens to be more convenient. Of course it's more convenient. The only compelling reason I can see for mocks is when you've got code that hits external live-APIs that don't give you any real option for automated testing (E.G., reading from and po…

I find stubs occasionally useful. But I don't get mocks.

http://martinfowler.com/articles/mocksArentStubs.html

Re: TDD is dead. Long live testing.

#32

> Over the years, the test-first rhetoric got louder and angrier, though. More mean-spirited. Where are those mean TDD zealots? Can you point me at blog posts or mailing list messages displaying such behavior? I've never seen it personally. On the other hand, now and again a blog post like this comes up that's full of disdain towards the practice of testing first. I do TDD because it helps me get my work done. I'm ha…

If you were developing rails apps in the mid-late 2000s then you'd have known too many to count.

There was a period in time between 2005-2008 in Boston where if you didn't practice TDD you were persona non-grata.

I think interestingly enough, a good number of those people now have 10+ years experience programming and now understand what those of us who had 10 years experience at that point in time were trying to tell them.

Re: TDD is dead. Long live testing.

#34

This is a stunning opinion considering the fact that there are many Rails shops that can't turn around a build in less than an hour because you can't test models independently of the database.

Yeah. The hand-wavey reference to advances in parallelisation and cloud runner infrastructure doesn't adequately address the drawbacks of this "post-TDD" approach.

Re: TDD is dead. Long live testing.

#35
I think he's conflating the separate concepts of Test Driven Development and Unit Testing. They can be done independently of each other.

I agree that many other people also conflate them, and are zealots for (or against) them together, but they are still separate concepts.

He does make some good arguments against Unit Testing, but he makes none against TDD.

Re: TDD is dead. Long live testing.

#36
post #3

Perhaps design by contract is the way forwards? Explicit runtime validation of the flow of data through code at each step in the system. As a frontend developer, I have been moving towards a greater emphasis on functional & integration testing. We're also using scripter here, a test tool that actually compares screen caps with the actual on-screen state of our applications. So a purely visual approach. There's a wond…

"so many job specs specifically asking for "TDD"" - yes, but do you really want to work with fanatics anyway?

Re: TDD is dead. Long live testing.

#37
post #36
post #3

Perhaps design by contract is the way forwards? Explicit runtime validation of the flow of data through code at each step in the system. As a frontend developer, I have been moving towards a greater emphasis on functional & integration testing. We're also using scripter here, a test tool that actually compares screen caps with the actual on-screen state of our applications. So a purely visual approach. There's a wond…

"so many job specs specifically asking for "TDD"" - yes, but do you really want to work with fanatics anyway?

Job specs ask for a lot of things but in my experience it's often as much about what the company aspires to rather than what they're really doing. More often than not that will be dabbling more than fanaticism.

c.f. Agile, Kanban, BDD

Re: TDD is dead. Long live testing.

#38
post #34

This is a stunning opinion considering the fact that there are many Rails shops that can't turn around a build in less than an hour because you can't test models independently of the database.

Yeah. The hand-wavey reference to advances in parallelisation and cloud runner infrastructure doesn't adequately address the drawbacks of this "post-TDD" approach.

Sometimes I wonder whether the reason he doesn't like TDD is because he inadvertently made it difficult for himself and others in Rails.

This is the engineering form of confirmation bias. If you make something hard to do, it's hard to like it.

Re: TDD is dead. Long live testing.

#39
I think a big part of the TDD phenomenon happened when the "big name" rails consulting shops insisted on using it.

In consulting, I think this makes all the sense in the world.

a) When you hand off code, you can demonstrably prove what you handed off works. b) You can take the business objectives of whoever you are consulting for and translate those into high level tests, which helps you stay focused. c) You get to charge double what you'd normally have charged the client.

When running a in-house team at a startup none of those bullet points translate, and while TDD does offer other benefits, really at the early stages of the game every line of code you write needs to solve the problem you're trying to validate.

Re: TDD is dead. Long live testing.

#40
where is this Rails train going? it used to be cool, but it looks like it's heading towards the chasm now.

posts like this just encourage my opinion about the Merb merge with Rails being a disaster which helped Rails transform from "PHP in Ruby" to something beautiful to work with, while leading to self-destruction of Merb. Rails gained a lot of traction and is now abandoning any good decision Yehuda and other great developers made.

this post simply sums up to: "I don't know how to test-first Rails applications, and I've invented Rails. we're abandoning test-first." admitting you have a problem is a first step in fixing it, but this is not going to fix it in the long run.

Post reply on HN