Teaching coding to adults and non-engineers: what actually works
By Lal Chand, founder of Codic Systems
Published Last updated 5 min read
I've taught coding to international students, and I've earned 21 five-star reviews doing it. A good share of my students were adults: career-changers, people who run their own business and want to understand their own website, and people who were told they were too old or not technical enough.
Some of what I believed before I taught was wrong. Here is what I've settled on.
Start from something they want
The usual advice is to learn the fundamentals first and build something later. For adults, I'd flip that. Someone with a job and a family has limited energy, and "learn about variables" doesn't survive a tired Tuesday evening.
"I want a page for my business that shows my prices" does.
So we start with that page. We build the smallest version that works, then we learn what we need to improve it. Variables, loops and functions arrive when the project needs them, and they make sense because the student can see the problem they solve.
This isn't a trick. It's what motivates people to keep going, and it's what they'll do for real once the lessons stop.
Keep the loop short
A beginner who spends an hour stuck and gets nothing on the screen learns that coding is a form of misery. A beginner who changes one line and sees the result learns that it's a conversation.
I keep each step small enough to finish in a few minutes: change this, refresh, what happened? Then change something else. The feedback needs to be quick and visible.
That is also why I like starting with HTML and CSS. You can see what you did. JavaScript comes after, once the student has seen the page respond to them.
Make them type it
Watching someone else code is not learning to code. It's like watching a cooking show and then being surprised that dinner is hard.
In the first lesson, I write a few lines in front of the student and then they type the same lines, saying aloud what each part does. In the next lesson I delete it all and they rebuild it from memory. I help when they're stuck, but only after they've tried. Then they extend it in some small way I didn't show them.
That sequence is much slower than a video course. It's also the only version that tells me whether they understood. If they can only follow along, they haven't learned it yet.
Explain why, more than once
Adults ask better questions than young students, and they ask them more often. "Why does it work like that?" is not a sign of slowness. It's the thing that makes the material stick.
I let them ask twice, three times, four times. When an explanation doesn't land, I try a different one: an analogy, then a diagram, then a smaller example. Sometimes the problem is vocabulary. Non-engineers often don't know what a word means, and are too polite to say so. I stop and define things more often than seems necessary.
Use AI as a tutor, not a shortcut
I introduce AI tools early now. The danger is real: a beginner can paste a prompt, get code back and have no idea why it works. But the benefit is also real.
I teach three kinds of question:
- "Explain this code line by line."
- "Why did my page break when I added this?"
- "Show me a different way to write this."
Those make the tool a patient tutor available at midnight. What I discourage is "write me a website", because the student ends with a result and no skill.
A good test: can the student explain the code the tool gave them? If not, they ask it to explain, and they don't move on until they can.
Follow a curriculum, but don't be a slave to it
For structure, I point students to MDN's Learn web development material. It's free, maintained and organised from getting started through HTML, CSS and JavaScript to more advanced topics. It also has exercises, which is what makes it better than just reading.
I use it as a map, not a script. If a student's project needs something earlier in the curriculum than they've reached, we go and get it.
Small wins count
I end every lesson with something that works, even if it is tiny. A page that loads, a button that responds, a line of text in the right colour. Adults who are learning around a job and a family will keep going if each session ends with proof that they moved forward, and they will quietly stop if it ends with a pile of unanswered questions. I would rather cover less ground and finish on a win.
What to do when they stall
Every student stalls. I used to treat it as a problem to fix quickly. Now I treat it as information.
Usually it's one of three things. The step was too large, so I make it smaller. They don't have a mental model for what's happening, so I draw one. Or they're discouraged, and need to see how far they've come. Looking at the first page they built in week one, next to what they can do now, helps more than any speech from me.
What I'd tell a new teacher
- Begin with the student's goal, not the syllabus.
- Make the feedback loop short and visible.
- Have them type, then rebuild from memory, then extend.
- Answer why, as many times as it takes.
- Teach them to use AI to understand, not to avoid understanding.
None of that is clever. It works because it treats an adult as someone who can learn, who needs a reason and who deserves an explanation.
Questions this article answers
Are adult beginners slower at learning to code?
In my experience they are usually more careful, not slower. They want to understand why something works before moving on, which feels slow at first and pays off later.
What should an adult beginner learn first?
HTML and CSS, then JavaScript, built around a small project they actually want. MDN's Learn web development curriculum is a free, well-structured path through those basics.
Should beginners use AI tools like ChatGPT or Claude?
Yes, as a tutor that explains code and answers why questions. No, as a machine that writes code they paste without understanding.
How do you stop beginners from just copying tutorials?
Have them rebuild what they just saw from memory, then change it in a way the tutorial did not cover. If they can only follow along, they have not learned it yet.
Do you need a computer science background to learn web development?
No. You need patience, a project and someone or something to ask when you are stuck. The fundamentals of HTML, CSS and JavaScript can be learned without a degree.