Debug <Best Pick>
| Type | Description | |------|-------------| | | Code violates language rules (e.g., missing semicolon). | | Runtime Errors | Code crashes during execution (e.g., division by zero). | | Logic Errors | Code runs but produces wrong results (e.g., off-by-one in loop). | | Concurrency Bugs | Issues from multiple threads accessing shared data (e.g., deadlock). | | Performance Bugs | Code works but is too slow or memory-intensive. |
Instead of small, accumulating fixes that create "code rot," ask the AI to rewrite a function based on the error. | Type | Description | |------|-------------| | |
Recognizing the emotional cycle of a bug can save you hours of frustration: | | Concurrency Bugs | Issues from multiple
Two threads access shared data at the "wrong" time. They are intermittent and nearly impossible to reproduce with a debugger (since breakpoints change timing). Recognizing the emotional cycle of a bug can
If a bug recently appeared, use a binary search approach to find the exact commit that introduced it. Check a version where the code worked. Check a version where it is broken. Narrow the range until the culprit is found. 📈 The Standard Debugging Process
Make the minimal necessary code change.