5 ms·
Ask HN: How do you find a bug in a software?
Context: a system is divided into micro services.
- kjullien 8y agoWatch your logs ?
- aequitas 8y agoI'm a happy Sentry user, https://sentry.io https://sentry.io
- JeanMarcS 8y agoRun tests on each of the micro services and if they are all ok, test the next level and etc. That might be the downside of micro services : if all of them works well, but orchestrating them generates new bugs. Hard to find where it crashes.
- amriksohata 8y agoRarely find bugs via unit tests, apart from in complex logic
- valbaca 8y agotrue; unit tests will rarely find bugs, especially if you're writing the tests after the code. Unit tests are meant to ensure that when you add features, fix bugs, or refactor, that you don't break what's already working. If this means your unit tests don't catch bugs, then it could be that you're not introducing any! yay! But I have found that by forcing myself into TDD, I do find more cases than when I was writing tests after code. By writing the tests before I've begun the implementation, it forces you to think about preconditions, invariants, and postconditions in a more disciplined way.
- valbaca 8y agoBugs themselves are usually found QA, customers, logs, and/or metrics. To find where to fix it, logs, crash dumps (another kind of log), and/or isolation (going "down" the stack and checking along the way).