Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Narrowing It Down: Binary Search, git bisect run and Delta Debugging
The fastest way to find a bug is to halve the range at every step: in code, across layers, over commits and in the input. git bisect run skips a broken commit with exit code 125 and finds the faulty refactoring among 31 commits in 7 tests; the ddmin algorithm shrinks a 5,000-line import file to 3 lines.
Reproducing the Bug: Minimal Repro, Environment Differences and a Failing Test First
You can't fix a bug you can't reproduce: get the right information from the reporter, check culture, time zone, configuration and version differences, reduce the bug to a minimal repro and write a failing xUnit test before the fix. With real outputs: 12,45 parsed as 1245 in a container and an order total bug reduced to two lines.
Debugging Is a Method: Observation, Hypothesis, Experiment and the 9 Rules
Debugging is done with a method, not with guesses: a loop of observation, testable hypothesis, prediction, experiment and conclusion. Starting from a 1 kuruş order total mismatch, we cover Agans' 9 rules, the cost of shotgun debugging and the debugging journal with real outputs.