Hacker News new | ask | show | jobs
by jokethrowaway 1472 days ago
Unit tests are a relatively recent concept (last 15-10 years?).

I know plenty of old developers who crank out pretty awesome software without versioning and without any kind of automated testing.

For most applications (especially UIs or 2d / 3d rendered), I think there is a benefit in having a few well chosen tests but overall I think TDD does more harm than good.

I understand the mantra started in the web world, where your services needs to maintain the promised compatibility or someone else may get an error. A lot of other software can afford to be more flexible and the ability to break the API without having to fix hundreds of tests is invaluable.

Even in web services, I think the TDD religion guilt trips developers into writing more useless tests than they should.

2 comments

> Unit tests are a relatively recent concept (last 15-10 years?).

I was writing unit tests 20 years ago. I generally see SUnit considered as the birth of unit testing frameworks, and that's 30 year old art to solve something that was being done before anyway.

I guess one can say that Extreme Programming made it more popular in the mid 2000s, which is when relatively new languages started including built-in/standard unit testing libraries/frameworks/semantics (Python, Ruby, D...)

I was seeing Extreme programming being a thing and using DUnit for Delphi in the late 90's (possibly early 2000, but I left the Job I was using this for by mid 2000.)
> A lot of other software can afford to be more flexible and the ability to break the API without having to fix hundreds of tests

This is really question of good high level system design, so you don't need to change all code in case of small changes in overall behavior.

Other name of this is tight coupled vs loose coupled system.