Code Comprehension · The method · Lesson 7 of 8
Work with the AI, and check it
In the new round an AI assistant sits next to your code. Using it is allowed; trusting it blindly is what loses the round. When to ask, how to ask, and how to catch a confident wrong answer.
On this page
Your hypothesis first
Read the report and the code, and say what you think is happening, before you ask. Then the assistant’s answer is something you compare against, not something you follow. Ask first and its answer quietly becomes your hypothesis, and if it’s wrong you’ll spend ten minutes proving a guess you never made yourself.
Ask questions you can check
“Why is this broken?” gets a confident essay. A precise question gets an answer you can verify in a minute:
- “Can
channelsForchange the object stored in the cache?” - “What does this regex match for
a-b?” - “Write a test that calls
listOrdersfor page 1 and expects the newest order first.” - “List the edge cases for this function.”
Give it the file and the exact symptom, and ask for one thing at a time.
Check every answer against the code
Three questions before you act on anything it says:
- Is it real? Does the line, field or option it talks about exist, and does it do what it says?
- Does it explain the symptom, exactly? Its cause should produce what the report says, and nothing the report rules out. “A restart fixes it” rules out anything outside the process.
- Can I test it? Find the smallest run that would prove it right or wrong, and run it. If there isn’t one, it’s a guess.
What a confident wrong answer looks like
Every full round in this course has one, because the patterns repeat:
- A common cause, not this code’s cause. Sort order, units, time zones, the cache: it names what usually goes wrong without reading what’s there.
- Invented names. A field the data doesn’t have, an option the library doesn’t offer.
- A fix that hides the symptom. The screen looks right; the cause is still there.
- A “fix” to a line that was right. The worst kind: it breaks something that worked.
Saying “the assistant suggested X, but that doesn’t fit because Y, so let me check Z” is one of the strongest things you can say in this round.
Where it really helps
Explaining an unfamiliar API or a tricky line of syntax. Writing a test skeleton you then fill in. Listing edge cases you might have missed. Writing the boring part of a feature you’ve already designed. Keep the thinking yours: you should be able to explain every line you keep, because the interviewer will ask.
- Form your own hypothesis before you ask.
- Ask precise questions with answers you can check; one thing at a time.
- Check it: is it real, does it explain exactly this symptom, can I test it?
- Watch for common-cause guesses, invented names, symptom-hiding fixes and “fixes” to correct lines.
- Use it for explanations, tests, edge cases and boilerplate; only keep code you can explain.