News for hackers. Stuff that matters.
Re:Alan Kay and OO Programming by adwn on Tuesday May 21, 2019 @08:29AM (#19969491)
> Why next week?

I think pleasecalllater's point is that without unit tests, you'll spend a lot of time just pinpointing the bug, since it could be anywhere in your module (which unit tests would cover), not just at the interface to other modules (which integration tests cover).

Re:Alan Kay and OO Programming by Ace17 on Tuesday May 21, 2019 @09:33AM (#19969954)
If your tests:

- run fast (<10s)

- run on your local machine

- run on your local code (including uncomitted diffs)

... whether they're called "integration" or "unit" tests doesn't matter, as they will detect regressions at the earliest possible time.

Unit tests might guarantee smaller code search area (because maybe the failing test only executed 1% of the code), but if running "git stash" makes all the tests pass again, I have a pretty good confidence about where the error lies.

Re:Alan Kay and OO Programming by jondubois on Tuesday May 21, 2019 @09:02AM (#19969717)
That's not my experience. Usually it only takes me a few minutes to fix a bug once it has been caught by an integration test.
Re:Alan Kay and OO Programming by pleasecalllater on Tuesday May 21, 2019 @09:05AM (#19969739)
Depends on your system. Mine usually are huge. The integration test showing "this json reply is wrong" doesn't tell me anything else than I have to dig through all the layers.
Re:Alan Kay and OO Programming by jondubois on Tuesday May 21, 2019 @03:55PM (#19974223)
Maybe you should break up that large system into more manageable chunks (e.g. microservices, engines, ...) and integration test those individually.