Skip to content
Ameen Abozaid
BEG-056

AI coding assistants for learners

  • 5 Lessons
  • 50 min of reading
  • 2 h practice (estimate)
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

  1. 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.
  2. Recognize hallucinations: invented methods, wrong APIs, confident but incorrect explanations.
  3. Ask an assistant a good question: the goal, the code, the exact error, and what was already tried.
  4. Use an assistant to explain an error or a concept after trying first, and turn the answer into their own understanding.
  5. Follow safe-use rules: never paste passwords, keys, or personal data; follow course and employer policies.

Lessons

  1. 01What an AI coding assistant actually is11 min read
  2. 02Why assistants sound right and are sometimes wrong9 min read
  3. 03Asking good questions: goal, code, error, attempts9 min read
  4. 04Learning with AI without skipping the learning11 min read
  5. 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:

  1. Write your own hypothesis first.
  2. Ask an assistant using goal, code, exact error, and what you tried (no secrets or personal data).
  3. Confirm or reject its answer with the debugger or a test.
  4. 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)

IDOutcomeTask
BEG-056-EX011In five sentences, explain tokens, next-token prediction, and training data to a friend.
BEG-056-EX022Given three assistant answers (provided), mark which contain an invented method or wrong claim and show how you checked.
BEG-056-EX033Rewrite the weak question "my code doesn't work, help" as a question with goal, code, error, and attempts.
BEG-056-EX044After trying yourself, ask an assistant to explain one exception; then explain it back in your own words without looking.
BEG-056-EX055Mark 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.

  1. 1An LLM produces text by:O1
  2. 2A token is:O1
  3. 3Why can an assistant be fluent but wrong?O1
  4. 4A hallucination is:O2
  5. 5The best way to check a suggested method exists:O2
  6. 6A good question includes:O3
  7. 7For the error part of your question, paste:O3
  8. 8Before asking, you should:O4
  9. 9After getting an answer, you should:O4
  10. 10Never paste into a chat:O5

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.

Type to search levels, phases, modules and lessons.