receiving-code-review
OBobra/superpowers298k2,631 new stars in the last 7 days
Systematic approach to diagnosing and fixing errors
A structured approach to finding and fixing bugs.
1. REPRODUCE → 2. ISOLATE → 3. DIAGNOSE → 4. FIX → 5. VERIFY
Never skip steps. Never guess-and-check repeatedly.
| Error type | Where to look |
|---|---|
| Compile error | The FIRST error (later ones are often cascading) |
| Segfault | Last function in the stack trace, check array bounds and null pointers |
| Python traceback | The innermost frame (bottom), but also check the middle for context |
| Wrong output | Diff expected vs actual: diff <(expected) <(actual) |
| Timeout/hang | Is it an infinite loop? Deadlock? I/O bound? Add a timer or counter |
fprintf(stderr, "reached checkpoint %d\n", __LINE__);print(f"DEBUG: {var=}", file=sys.stderr)OBobra/superpowers298k2,631 new stars in the last 7 days
OBobra/superpowers298k2,631 new stars in the last 7 days
OBobra/superpowers298k2,631 new stars in the last 7 days
MAmattpocock/skills288k10,178 new stars in the last 7 days
MAmattpocock/skills288k10,178 new stars in the last 7 days
MAmattpocock/skills288k10,178 new stars in the last 7 days