GitHub Copilot AI workflow illustration

Chapter 14 / 17

An AI-assisted coding workflow

GitHub Copilot can suggest code, but the developer still chooses the goal, reads the suggestions, and tests the result.

Plan and ask

Start with a clear task. A developer can describe what they need and ask for ideas, then compare the suggestion with the project requirements.

Review and test

Suggested code might be wrong or unsafe. Read it, run existing tests, and check that it behaves as intended before sharing it.

Sam checks the helper's code

Sam was building a tiny quiz for coding club. He asked GitHub Copilot, an AI coding helper, for a way to shuffle the questions. The suggestion looked neat, and Sam was tempted to paste it in and declare himself a coding wizard.

Instead, he read each line, asked his mentor about one confusing part, and tried the quiz with a few questions. The shuffle repeated one question, so Sam fixed it and tested again. He learned that a helper can save time, but the coder must check the work.

A real-life example

A young coder might ask a coding helper to explain an unfamiliar line, then compare the explanation with the project and test what the code actually does.

Review a tiny program

  1. Write steps for a quiz that asks one question.
  2. Ask a friend to follow the steps exactly.
  3. Notice any confusing or missing instruction.
  4. Rewrite the steps and try them again.