Hands-On AI Coding for Beginners / Chapter 1 — What to Delegate and What Not To (lessons 1–5) / Lesson 1

What to Decide Before Letting AI Write Code

Time needed: about 5 min (estimate)

☆ Read later

You can try the opening of this lesson without an account.

What this course covers

Coding agents (tools that have AI write code for you) return working code when you give them instructions.

But deciding whether you can adopt what comes back as-is is always on the human side.

This course is 30 lessons for learning to make that call yourself.

We cover how to write instructions, how to set up your repository, how to read diffs, how to pin things down with tests, and where to draw the line on jobs you must not delegate.

We don't cover tool settings screens or where the buttons are.

Terminal

$ git --version git version 2.55.0 $ python3 -V Python 3.14.2 $ node -v v26.9.0

Learn the thinking, not the tool names

Claude Code, Cursor, GitHub Copilot: agent names and interfaces change within six months.

Meanwhile, the work patterns stay even when the tools change: "pass context," "read the diff," "pin it down with tests."

This course covers only the latter, and mentions tool-specific details in a sentence only when needed.

Whatever agent you use, the way in and the way out are the same.

The way in is the text you write and the contents of your repository; the way out is the diff.

If you can handle these two yourself, your way of working won't change when the tools do.

Plausible but wrong code

What's scary about generated code is that even when it's wrong, it looks right.

The following is a common shape for email validation, but it rejects many real, valid addresses.

Run it and see.

editor.py

Tab indents. To leave the editor, press Esc, then Tab.

Create a free account to keep reading

With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.

Report a problem with this lesson

Log in to send a report.

Keyboard shortcuts

Keys available in a lesson
KeyAction
[ or Alt + ←Go to the previous lesson
] or Alt + →Go to the next lesson
?Open this list
EscClose this list

The keys do not work while the cursor is in a code editor or an input field.