Innovation at the museum
This chapter covers
- Reproducing a bug in code that involves primitive data types
- Reproducing a bug in code that involves aggregated data
- Replaying a scenario in the REPL
- Creating unit tests from bugs
When our programs donât behave as expected, we need to investigate the source code. The traditional tool for code investigation is the debugger. The debugger allows us to run the code, step by step, until we find the line that causes the bug. However, a debugger doesnât allow us to reproduce the scenario that causes the problem.
In DOP, we can capture the context of a scenario that causes a bug and replay it in a separate process like a REPL or a unit test. This allows us to benefit from a short feedback ...