// AI-Assisted Programming
Who used an AI tool to write code in the last week?
Who could explain every line it gave you?
// the gap between those two answers is this module
Not "how to use Copilot" — tools change every few months
How to direct an AI assistant, and how to judge what comes back
Prompting, retrieval, protocols, agents, deployment, review
The uncomfortable part. You are accountable for code you did not write. The assistant is fast; your name is on the commit.
// they don't trust it — and they ship it anyway
Industry surveys of varying rigour: read the direction, not the decimals.
No. Almost nobody does, and pretending otherwise is dishonest
But the review didn't disappear — it moved
From reading every line → to tests, types, and CI that must pass
From "looks right" → to "prove it behaves right"
The trade only works if the verification is real. Skip the tests and you have not moved up a level — you have just stopped checking.
The assistant gives you a 40-line function. It is character-for-character identical to one in a well-known open-source project, released under a licence that requires anything built on it to be open-sourced too.
You paste it into your employer's closed-source product.
A licence attaches to the code, not to whoever typed it. "The tool wrote it" is not a defence anyone has established
Word-for-word copies of well-known code are rare, but real. Most assistants can block suggestions that match public code — find out whether yours does
The law on training data is still being argued in court. Do not build your habits on how it comes out
Treat generated code as code of unknown origin: you can stand over it once you have read and tested it — or you cannot ship it.
It is not a text editor. It is closer to emailing the text to a company — read the data setting on the plan you use
Never in a prompt: credentials, other people's personal data, code you have no right to share. Whatever the plan says
Employer code goes only into the tool the employer licensed. A local model keeps everything on your machine — at a cost in capability
// nothing in this module ever needs a secret in a prompt
Vibe coding — prompt it, run it, ship it, barely read it
Comprehension debt — the future cost of understanding code a machine wrote and nobody read
Haunted codebase — a working system the team no longer understands
Context engineering — the shift from how you ask to what you put in front of the model
Spec-driven development — the backlash: write the spec, let the agent implement it
// half of these did not exist two years ago
// your lab group and room are on your timetable
Passwords are given out in this lecture, not published. If you miss them, email me — this deck is on a public site.
Nine small continuous assessments are 36% of the module. A missed one counts as zero, and each closes at the end of its week.
Multiple choice, sat in person in the lab slot
Drawn from the lectures and the labs of previous weeks
MCQ 1 covers weeks 1–6 · MCQ 2 covers weeks 8–11
To practise: use the practice app on the module site, or upload the week's material to a tool like NotebookLM and ask it to generate questions.
One per week, on the VLE, worth 4% each
Open all week — do it when it suits you
You may use AI tools
// the first one opens week 2
// nothing to install — Codespaces runs in a browser
Sign up for the GitHub Student Developer Pack — it is free and unlocks Copilot
Change your GitHub username to your actual name
Your GitHub account is the one an employer will look at. Start it as you mean to continue.
The one idea to keep: you don't have to read every line — but something has to check it, and if that something isn't a test, it's you.
Next week: what AI-assisted programming actually is — and the first lab.