AI coding assistants for learners
On this page 8 topics
Overview
Topics
- How LLMs work conceptually
- tokens and prediction
- hallucination
- asking good questions
- explaining errors
- never pasting secrets
- try-first learning rules
Learn first
50 min of reading · 2 h of practice (estimate)
Learning outcomes
- Explain at a conceptual level how a large language model produces text (tokens, next-token prediction, training data) and why that makes it fluent but not always correct.
- Recognize hallucinations: invented methods, wrong APIs, confident but incorrect explanations.
- Ask an assistant a good question: the goal, the code, the exact error, and what was already tried.
- Use an assistant to explain an error or a concept after trying first, and turn the answer into their own understanding.
- Follow safe-use rules: never paste passwords, keys, or personal data; follow course and employer policies.
Lessons
- 01What an AI coding assistant actually is11 min read
- 02Why assistants sound right and are sometimes wrong9 min read
- 03Asking good questions: goal, code, error, attempts9 min read
- 04Learning with AI without skipping the learning11 min read
- 05Demo: using an assistant to understand a stack trace, then checking it10 min read
Lab and exercises
Lab
BEG-056-LAB1 · Explain, don't copy
Outcomes: 1–5 · Time: ~1.5 h Use three bugs from the BEG-018-LAB1 bug hunt. For each:
- Write your own hypothesis first.
- Ask an assistant using goal, code, exact error, and what you tried (no secrets or personal data).
- Confirm or reject its answer with the debugger or a test.
- Record one case where the assistant was wrong or incomplete.
Acceptance: written log per bug with your hypothesis, the assistant's answer, and the evidence that settled it.
Exercises (assessment: short quiz plus the lab log)
| ID | Outcome | Task |
|---|---|---|
| BEG-056-EX01 | 1 | In five sentences, explain tokens, next-token prediction, and training data to a friend. |
| BEG-056-EX02 | 2 | Given three assistant answers (provided), mark which contain an invented method or wrong claim and show how you checked. |
| BEG-056-EX03 | 3 | Rewrite the weak question "my code doesn't work, help" as a question with goal, code, error, and attempts. |
| BEG-056-EX04 | 4 | After trying yourself, ask an assistant to explain one exception; then explain it back in your own words without looking. |
| BEG-056-EX05 | 5 | Mark each as safe or unsafe to paste: a stack trace, an API key, a customer email, a 10-line method. |
Show solutions
- EX01 The model is trained on large text and code; text is split into tokens; it predicts the next token repeatedly; so it is fluent but may be wrong.
- EX02 Verify by compiling, running, and reading the official documentation; invented methods are rejected by the compiler.
- EX03 For example: "Goal: sum the grades. Code: (method). Error: ArithmeticException at line 8. Tried: printed
count, it is 0." - EX04 Open-ended; a good answer states the cause, the line, and the fix in the learner's own words.
- EX05 Stack trace: usually safe if it contains no secrets (check first); API key: unsafe; customer email: unsafe (personal data); 10-line method: safe if it contains no secrets and policy allows it.
- Outcomes 1 and 5 are also covered by the quiz; outcome 2 by the lab record of a wrong answer.
Quiz
Outcomes: O1 how LLMs work · O2 hallucinations · O3 good questions · O4 learning with AI · O5 safe use.
A self-check for you: nothing is graded, saved or sent anywhere. Choose an answer, then check it. You can try again as often as you like.
Practical part
Lab log for three bugs, including one case where the assistant was wrong or incomplete, plus this quiz. Pass: quiz at least 8/10 and a log showing hypothesis, assistant answer, and settling evidence for each bug.
Common mistakes
Asking before trying; pasting whole projects without the error; trusting an answer because it is confident; pasting secrets into a chat.
Assessment
Short quiz on how LLMs work and safe use, plus the lab log.
Career relevance
The habit of verifying AI output is expected from the first day of a junior role; it deepens in JNR-055 and MID-072.