3 ms·
Well, originally it was just a joke. But since we're going there: Needing to log at quite that level of detail worries me. It implies that non-deterministic be
by mumblemumble 6y ago
Well, originally it was just a joke. But since we're going there:
Needing to log at quite that level of detail worries me. It implies that non-deterministic behavior is pretty pervasive in the codebase. I'm generally a lot happier when the logging strategy on the happy path looks like:
1. Get all your I/O-type stuff handled before the call stack gets deep.
2. Log your inputs
3. Run the calculation
4. Log your outputs
If what happens in step 3 is deterministic, then it should always be possible to explain the output by looking at the input, and reading the code. And, if you've accomplished that, then it's straightforward to convert the logs into a test case.