Skip to content

Using AI to learn

~8 min

In short

An AI assistant can explain a topic faster than most textbooks, and it is always available. The risk is that it also does the work for you, and you lose the skill that the course was meant to build. This page gives you a routine that keeps you doing the thinking: ask for an explanation, then rebuild the idea yourself, write your own attempt before asking for review, and never commit code you have not read. It ends with a weekly check you can run without any tool.

Why the routine matters

A randomized field study in Turkey gave high school students access to GPT-4 during practice sessions. One group had a plain chat interface. The other had a tutor version with prompts designed to protect learning. The students with the plain interface did much better on practice problems. On the exam, where they had no AI, the plain-interface group did worse than students who never had access. The tutor-style group scored about the same as the group with no AI (Bastani et al., 2025).

The study was about high school maths, ran for a short time, and measured only exam scores. It does not tell you how a university course will go. It does match a common experience: help that removes all the effort also removes the learning.

The loop: explain, then re-derive

Use this loop for any new idea, such as recursion, hashing, or binary search.

  1. Ask for an explanation. Ask for the idea in plain words and one small example. Ask the assistant to name the invariant or the rule that makes it work.
  2. Close the chat. Do not keep reading the explanation while you work.
  3. Re-derive it on paper or in a file. Write the function or the argument from memory. Use the example you were given, then change one input and predict the result before you run anything.
  4. Compare. Run your code. If it fails, read the error first, as covered in reading error messages. Only then go back to the assistant, and say what you tried.
  5. Try a variant. Change the problem slightly, for example from "find a value" to "find the first position where the value appears". If you can adapt the idea, you have it. If you cannot, go back to step 1 with a narrower question.

Write first, then ask for review

Do not ask an assistant to write your solution. Write your own attempt first, even if it is wrong. Then paste it with three things:

  • the exact input you used,
  • the output you got and the output you expected,
  • a request such as "point out the bug, do not rewrite the whole program".

This keeps the attempt yours and gives the assistant something specific to check. A review of your own code also teaches more than a finished answer, because you see the gap between what you meant and what you wrote.

Never paste code you have not read

If you cannot say what each line does in one sentence, do not add it to your project. Ask the assistant to explain it line by line, then check the explanation by running the code with a small input you choose. If the explanation and the behaviour disagree, believe the behaviour and ask again.

The same applies to libraries and commands. A command you copied from a chat and do not understand can delete files or change settings. Look up what it does in the official documentation before you run it.

Ask for hints, not answers

You can set the terms at the start of a session. Useful phrasings:

  • "Give me one hint, not code."
  • "Ask me questions that lead me to the answer."
  • "Tell me what is wrong with my reasoning. Do not fix it for me."

Assistants can be agreeable. A 2023 study of five AI assistants found that they consistently show sycophancy, and that human preference data appears to reward answers that agree with the user (arXiv:2310.13548). If you write "I think the answer is X", the reply may simply agree with you. Ask the question without your guess, or ask what is wrong with your guess.

The weekly check

Once a week, do this with every tool closed.

  1. Pick one topic you studied that week.
  2. Set a timer for 40 minutes.
  3. Write a small program that uses the topic. For example, after the expense tracker capstone, write a function that totals one category from a list of dictionaries.
  4. Run it on two inputs you made up.
  5. Write one line in a notes file: "Done alone" or "Needed help at step N", and what the help was.

If you cannot finish alone for two weeks in a row, slow down. Go back to the explain-then-re-derive loop on the topic, and do not move on to a new topic until one week passes with a clean result.

Try this

This week, complete the first two requirements of capstone 1 using only the explain-then-re-derive loop. Keep a log of each time you asked for help, what you asked, and whether you could rebuild the idea afterwards. At the end of the week, count the entries. The number is not a score. It shows you where you need more practice.

Sources