News for hackers. Stuff that matters.
Re:Ask HN: How to avoid over-engineering software design for... by antris on Wednesday June 24, 2020 @04:12AM (#23625440)
TDD and unit tests aren't exactly the same thing. Also, not doing TDD doesn't mean that there's no automated testing. I prefer to write my code and then do a few end-to-end automated tests for the most important parts of the code to serve as a backup in case some change in the code causes massive failures. But TDD is overall tedious for (usually) little benefit when compared to a few well selected end-to-end tests. And unit testing is even less benefit for even more work, unless you are doing something very very specific.
Re:Ask HN: How to avoid over-engineering software design for... by 1337shadow on Wednesday June 24, 2020 @05:04AM (#23625769)
Interesting, in my experience TDD is easy (it's just that a specific mental process needs to happen, besides learning a xUnit API or something, and also experience tells how to know which tests to write and which not to write, so that maintaining the tests doesn't become a burden) and always provides better ROI on the long run.

With end-to-end tests such as when piloting a browser, it's not really easy to get things like tracebacks into the console output for example.

Re:Ask HN: How to avoid over-engineering software design for... by theshrike79 on Wednesday June 24, 2020 @05:06AM (#23625780)
Exactly, in the time it would take me to write a proper TDD suite, I've written a skeleton of a product from end to end and can start iterating over it.

If you're working on a very specific box that has well defined, well known inputs and outputs then TDD is an excellent tool.

But for anything with a non-specific "We'd like to do X and display the result on Y" it just gets in the way.

Re:Ask HN: How to avoid over-engineering software design for... by 1337shadow on Wednesday June 24, 2020 @06:34AM (#23626325)
I'd TDD that "do X results in Y" and then add an end to end that that verifies that "Y is displayed", unless that code that displays Y is too trivial then an end to end test might not even be necessary.