News for hackers. Stuff that matters.
Re:Ask HN: What's the largest amount of bad code you have ev... by danmaz74 on Wednesday November 14, 2018 @04:49AM (#18448694)
I beg to differ. Having to run the full test suite to catch significant errors is an indication that the software design isn't (very) modular, but it has nothing to do with unit tests. Unit tests do not replace service/integration/end to end tests, they only complement them - see the "test pyramid".

I think it's important to point this out, because one of the biggest mistakes I'm seeing developers do these days is relying too much on unit tests (especially on "behavior" tests using mocks) and not trying to catch problems at a higher level using higher level tests. Then the code gets deployed and - surprise surprise - all kinds of unforeseen errors come out.

Unit tests are useful, but they are, by definition, very limited in scope.

Re:Ask HN: What's the largest amount of bad code you have ev... by TickleSteve on Wednesday November 14, 2018 @07:10AM (#18449250)
(terminology nazi mode)

"... is an indication that the software design isn't (very) decoupled ".

You can be modular without being properly decoupled from the other modules.

Re:Ask HN: What's the largest amount of bad code you have ev... by danmaz74 on Wednesday November 14, 2018 @06:28PM (#18455266)
Hmmm... you have a point, but then, shouldn't it be "decoupled into modules"?
Re:Ask HN: What's the largest amount of bad code you have ev... by mdcb on Wednesday November 14, 2018 @12:18PM (#18451571)
But then are your modules really modular?
Re:Ask HN: What's the largest amount of bad code you have ev... by avisser on Wednesday November 14, 2018 @12:33PM (#18451739)
In a C/C++ world, a module is usually defined as a file/.dll/.so on disk. So highly-coupled modules are still modules.