The Psychology
of Coding & AI
Explore how apps are designed to hold attention, why people over-trust machines, how bias gets into AI, what helps people learn to code, and how to stay well online, with places to get help.
- 00First Principlesp.2
- 01Attention by designp.4
- 02Trusting machinesp.5
- 03Bias in, bias outp.6
- 04A coder’s mindsetp.7
- 05Wellbeing onlinep.8
- ✦Self-check · Make it · 5 Questions · Side Questp.9
You'll need: a notebook, your phone or tablet settings (with an adult), and a friend.
Principles
A first principle is a basic truth you can build on. The psychology of tech rests on four: design shapes behaviour, people treat machines like people, data carries human choices and mistakes are how coders learn.
What do I already know?
What is necessary?
Everything in this module is built from four bricks. Rate yourself on each one, then check the example to see if your rating holds up.
What is the objective?
By the end, you’ll be able to explain how design grabs attention, describe automation bias, explain how bias enters AI systems, use strategies for learning to code, and know where to get help online.
- 01Name 2 attention-grabbing designs.
- 02Explain automation bias.
- 03Describe a real bias study.
- 04Use 2 debugging strategies.
- 05Name 2 online help services.
- 06Audit your notifications.
The list on the left is ours. Now make it yours. What do you want out of this?
How much do you know about the psychology of coding and AI right now? Shade the boxes in pencil. You'll come back at the end (p.9) and shade it again in pen.
Why start this way? When you know what you already have (1), what you need (2) and where you're going (3), you learn faster and you notice the gaps. Every module on the Coding & AI Path starts with these same three questions.
Attention by design
Apps are designed by people who study attention.
Common features
- Notifications pull you back.
- Infinite scroll and autoplay remove stopping points.
- Variable rewards (sometimes a like, sometimes not) keep people checking.
- Streaks make you feel you’ll lose something if you stop.
Helpful or harmful?
Companies say these features help people find content they enjoy. Critics, some researchers and some governments say they can encourage overuse, especially for young people.
Research on harms is still debated; many experts agree that sleep, mood and focus are worth watching.
Change the defaults
Turning off non-essential notifications, using grey-scale mode, keeping phones out of bedrooms and setting app timers are simple ways to take control.
- Which app feature pulls you back most often?
- Who should be responsible for healthy app design?
Spot the hooks
Pick an app you use. List every feature that encourages you to keep going. Which could you turn off?Why are variable rewards so powerful?
Trusting machines
People often believe machines more than they should.
Trusting the computer
Automation bias is the tendency to accept a machine’s answer even when it’s wrong, like following a GPS onto a closed road.
A smooth, confident AI answer can make this worse.
Treating machines like people
In 1966, Joseph Weizenbaum built ELIZA, a simple chatbot that mostly repeated users’ words back as questions. Some users still felt it understood them.
Modern chatbots are far more capable, but they still don’t have feelings or friendships, even when they sound caring.
Use AI wisely
Treat AI answers as a first draft, not the final word. Ask “How could I check this?” and talk to real people, especially about health, safety or big decisions.
- Have you ever trusted a machine too much?
- Why might a friendly-sounding chatbot be easy to over-trust?
Trust test
Write 3 kinds of questions you would trust an AI tool with, and 3 you’d always check with a person or a reliable source.What is automation bias?
Bias in, bias out
AI can repeat and magnify human biases.
Gender Shades, 2018
Researchers Joy Buolamwini and Timnit Gebru tested commercial face-analysis systems that guessed gender from photos. Error rates were up to 34.7% for darker-skinned women but at most 0.8% for lighter-skinned men.
Buolamwini & Gebru, Gender Shades, 2018 (MIT Media Lab).
Human choices
- Data that leaves out or under-represents groups.
- Labels that carry people’s stereotypes.
- Goals that measure the wrong thing.
- Testing that checks only average accuracy.
Things can change
Several companies said they improved their systems after the study. Researchers continue to debate how to measure fairness, and different definitions can conflict.
- How could a company test whether its AI is fair?
- Who should check AI systems for bias?
Bias detective
Image search “scientist” or “nurse” with an adult. Who appears most? What might an AI trained on these images learn?Why isn’t average accuracy enough?
A coder’s mindset
Good coders aren’t people who never make mistakes.
What helps
- Growth mindset: skills grow with practice.
- Small steps: run code often, change one thing at a time.
- Read error messages: they usually say where to look.
- Pair programming: one types, one guides, then swap.
Everyone debugs
Professional programmers spend a lot of their time finding and fixing bugs. Frustration is normal; taking a break often helps you spot the problem.
“Rubber-duck debugging”: explain your code line by line to a toy duck. Saying it out loud reveals mistakes.
Who codes?
People of every background code. Ada Lovelace wrote what is often called the first published computer program in 1843, and many early programmers were women (see Lens 5).
- What do you do when you feel stuck on a problem?
- Why might explaining your code out loud help?
Bug diary
The next time code doesn’t work, write the error, what you tried and what fixed it. Do this for 3 bugs.Why change one thing at a time when debugging?
Wellbeing online
Online life is real life; help is available.
Know the signs
- Cyberbullying: repeated mean messages, posts or exclusion.
- Sextortion: someone threatens to share intimate images unless you pay or send more.
- Scams: urgent messages asking for passwords, gift cards or money.
If it happens: stop replying, don’t pay, save evidence, block and tell a trusted adult.
Getting help
People who are targeted are not to blame. In Canada, Cybertip.ca takes reports of online sexual exploitation, and NeedHelpNow.ca helps young people get images taken down.
Canadian Centre for Child Protection, checked October 2026.
You don’t have to cope alone
Talk to a trusted adult. Kids Help Phone: 1-800-668-6868 or text CONNECT to 686868. Call or text 988 for suicide crisis support. Alberta Mental Health Help Line: 1-877-303-2642. In danger? Call 911.
Checked October 2026.
- Who would you tell if something online upset you?
- How can friends help each other stay safe online?
Safety plan
Write who you’d tell, what you’d save and where you’d report if something online made you feel unsafe.Should you pay someone threatening to share an image?
Quick self-check
Six questions, covering every stop. Show your thinking. Answers are upside down at the bottom; no peeking till you're done.
1 · Name 2 attention-grabbing app features.
2 · What is automation bias?
3 · What did the Gender Shades study find?
4 · Name 2 ways bias gets into AI.
5 · What is rubber-duck debugging?
6 · Name 2 places to get help online.
Re-shade your knowledge meter
How much do you know about the psychology of coding and AI now? Flip back to p.3 and shade the meter again in pen (or shade this one). Did any of the four bricks on p.2 move from "Not yet" to "Got it"?
Notification audit
Measure and reduce the alerts that grab your attention.
1 · Plan
For 3 days, count your notifications. Then turn off the ones you don’t need and count again.
- Adult knows the plan
- Daily counts recorded
- Settings changed
- Mood and focus noted
2 · Counts
| Day | Notifications |
|---|---|
| Day 1 | |
| Day 2 | |
| Day 3 | |
| After changes | |
| Change % |
3 · Must-haves
- Kept safety alerts on
- Percent change calculated
- One habit kept
- Shared with family
4 · What I noticed
Keep emergency, family and school alerts on. Work with a parent or guardian when changing device settings.
5 Questions
I Still Have
This module didn't answer everything. Good. Write 5 new questions it didn't answer, one of each type below. There are no wrong questions, only ones nobody's asked yet.
★ Star the one question you'd most like answered. You'll need it on the next page.
1What I'll find out
Break your big question into 2 or 3 smaller ones you could actually answer.
2Where I'll look
3How I'll share it
Who I'll share it with:
Done by: