Hacker News new | ask | show | jobs
by marginalia_nu 1229 days ago
To be clear, I'm not saying you shouldn't have tests, but if you change your pom.xml and the code starts blowing up at runtime, your code is still brittle.

Code that isn't brittle wouldn't behave like that.

Tests allows you to catch it early, but with the platonic form of non-brittle code, you wouldn't need to run any other tests than the test that tests the module you just changed.

1 comments

That's a fair point! I guess it's a matter of what's under the hood vs how it appears on the outside. Code that is brittle in obvious ways is still better than code that is brittle in subtle ways and will break later. Code that doesn't have those issues in the first place is the best, of course.