Debugging AI-generated code is reported as a scored skill, and it's where calm people stand out.
The order is: reproduce, shrink, form one hypothesis, test it, fix the cause, and add a test.
Change one thing at a time. If you change three things and it works, you've learned nothing.
Say your hypothesis out loud before you test it. In an interview, that's the signal, even when the guess turns out wrong.
- What are the six steps of debugging?
- Reproduce, shrink, hypothesise, test, fix the cause, add a test.
- Why shrink the failing input?
- A small failing case shows the cause far faster, and it becomes your regression test.
- A model suggests a fix. What do you ask before accepting?
- Why it fixes the cause, and which input proves it.
- When an assistant goes in circles, what do you do?
- Stop it. Reproduce the bug yourself and give it the smallest failing case, or fix it by hand.