仕込まれた問題を直す
Draft: this lesson is an outline and will be expanded.
Real projects often come with problems you did not cause. In this lesson you receive a page with a deliberate fault, find out what is wrong, and ask the assistant to fix it. By the end you will have practised describing a symptom and judging whether a fix is correct.
The course supplies a small broken page for this lesson. It will be listed here when the lesson is finished. Download it into a new folder named planted-problem and open that folder in your assistant.
Describing a symptom
A symptom is what you see going wrong, such as “the About link opens a blank page” or “the picture does not appear”. Good symptom reports say three things:
- What you did.
- What you expected to happen.
- What happened instead, including any error text copied exactly.
What you will do
- Open the broken page in your browser and look for the fault. Do not look at the files yet.
- Write a three-part symptom report as described above.
- Paste the report into the assistant and ask:
Find the cause and explain it in plain words before you change anything. - Read the explanation. If it does not match what you saw, say so and ask again.
- Ask the assistant to make the smallest change that fixes the cause.
- Reload the page and check that the symptom is gone.
- Ask the assistant to list every file it changed, and read that list. A good fix touches few files.
- Commit in GitHub Desktop with a description of the fix.
Judging a fix
A fix is right when the symptom is gone, nothing else changed, and the explanation matches what you saw. A fix that removes the broken feature, or that rewrites the whole page, is a bad fix even if the symptom disappears.
Check yourself
- You wrote a three-part symptom report.
- The symptom is gone and the rest of the page is unchanged.
- You read the list of changed files before you committed.
What comes next
Go on to Check the site and save it, where you verify the whole site against your checklist.