News for hackers. Stuff that matters.
Re:Ask HN: Concepts that clicked only years after you first ... by sanderjd on Sunday January 01, 2023 @02:55PM (#34210153)
I think in practice unit tests are both the most and least useful tests. Unit tests of code that just generates output as a function of input are the most useful, and unit tests of code that just glues together a bunch of side effects are the least useful. I like to find ways to structure things so that it is mostly comprised of the first kind of code, and has so little logic in the second kind of code that it's easy to justify not unit testing it.

There are no comments on this comment yet.