๐๐ผ๐ ๐ง๐ผ ๐๐ฒ๐ฏ๐๐ด ๐๐ป๐๐๐ต๐ถ๐ป๐ด: ๐ ๐ฆ๐๐๐๐ฒ๐บ๐ฎ๐๐ถ๐ฐ ๐๐๐ถ๐ฑ๐ฒ
Debugging separates productive engineers from those who struggle.
Follow this repeatable process:
- Reproduce the issue.
- Narrow the search space.
- Form a hypothesis.
- Verify the fix.
First, get a reliable reproduction. No reproduction means no fix. Document the steps and environment. Match production settings.
Next, narrow the search. Use binary search. Disable half the system. Repeat. Use logs to see where behavior changes.
Write your hypothesis before changing code. Test it with a log or a test case. This stops random trial and error.
Fix the root cause with a small change. Do not refactor unrelated code. Add a regression test to stop the bug from returning.
Build systems easy to debug. Use good logging and automated tests.
Keep things simple. Complex solutions are hard to change. Ask: what is the simplest way to solve this?
Write decisions down. Use ADRs and RFCs. Documentation stops bottlenecks.
Keep teams small. 6 to 8 people works best.
For new engineers:
- Learn CPU and memory.
- Learn OS and networking.
- Read more code than you write.
- Write code easy to delete.
Try this:
- Read a codebase you do not know.
- Refactor one hard piece of code.
- Learn one technology outside your comfort zone.