Code Isn't Working - Checklist
· One min read
The context: you've made a change, but the code isn't behaving as expected. Perhaps you fixed a bug, yet the buggy behavior persists.
I tend to go through this list in order, but it doesn't have to be strictly followed. For example, taking a break (the last item) is often the most effective first step.
- Review code changes: are there any syntax errors, parameter differences, or test setup issues?
- Examine logs: are any indicative logs missing or unexpected?
- Rerun impacted tests on the same or another machine: could this be a machine-dependent issue?
- Compare logs from successful and failed runs: what differences stand out?
- Check surrounding code: are any preconditions broken? Does execution order matter?
- Take a break, sleep on it, or discuss it.
That's it.