Join a lesson Start a lesson
Blog

Coding

Teaching coding online: how to make students think, not copy

In online coding lessons, students easily copy code without understanding it. These activities get them reading, tracing and predicting before they type.

2 min read

Coding lessons online often turn into screen sharing: the teacher types, students copy, and nobody is sure what anyone understood. The fix is to spend more of the lesson on reading and reasoning about code, and less on typing it.

1. Predict the output first

Show a short piece of code and ask what it prints before anyone runs it. Take a few answers, then run it. When the prediction is wrong, students want to know why, and that is the best moment to explain.

2. Trace it on paper, or the board

A trace table, with a column for each variable and a row for each step, shows exactly how a loop changes things. Fill one in together, then let students trace the next loop on their own.

3. Find the bug

Give students code that almost works. Finding one wrong line teaches more about how code runs than writing ten correct ones from a template.

4. Draw it before you write it

A flowchart with decisions makes students plan the logic before worrying about syntax. It also works for students who are not yet confident with any one language.

5. Make the ideas behind computers visible

Binary and logic gates are easier to understand when students can change them and see the result: switch a bit and watch the number change, flip an input and watch a gate's output. Ask them to make a target number or a target output.

6. Write code together

A shared editor that everyone can type in turns "watch me" into "let's write it". Ask one student to start a function and another to finish it, and talk through each line as it appears.

7. Compare two answers

Most problems have more than one solution. Put two students' answers side by side and ask which is clearer, which is shorter and whether both are right. Students learn to read code critically, which is half of programming.

The short version

Predict, trace, debug, draw, and compare. When students spend the lesson reasoning about code, the typing takes care of itself.

See it on a real boardLesson Screen is a teaching whiteboard with these tools built in. Free to start, nothing to install.
See the coding whiteboard

More from the blog

Planning Read

Share a whiteboard to plan and work together

Not every board needs a class. Send a link and plan a lesson with a colleague, sketch an idea with your team or work through a problem with a friend, all on the same board, with no call to set up.

2 min read
Getting started Read

Use your iPad as a pen for online lessons

Teach from your computer and write on your iPad. Scan one code and your tablet becomes your pen in every lesson, with no second camera, no extra person and nothing to install.

2 min read
Getting started Read

Four ways to use Lesson Screen

Use the same board at the front of a classroom, in a live lesson, in a tutorial video, and under your school's own name. Here's how each one works.

5 min read
Tutorials Read

How to record a tutorial video from a whiteboard, in one take

A short teaching video doesn't need a studio. Plan it in parts, keep your notes beside the board, and record it with your camera in a corner.

3 min read
Planning Read

Teacher notes: plan what to say, right beside the board

A lesson plan in another window gets lost the moment you start teaching. Short notes next to the board keep you on track, live or on video.

2 min read
Planning Read

Stop rebuilding lessons: keep a library of your best boards

The warm-up that always works, the diagram you draw every term. Save your best boards once, keep them in folders, and start each lesson from a copy.

1 min read
Planning Read

Teach from the files you already have

Your best material is already a PDF, a slide deck, a spreadsheet or a photo of a page. Here's how to teach from each one online without remaking it.

2 min read
Planning Read

How to run a whole lesson from one PDF

You already have the worksheet. Here is how to turn a single PDF into a lesson with a warm-up, teaching, practice and a check at the end, without making slides.

2 min read
Science Read

Teaching science online: 7 ways to keep it hands-on

Science lessons rely on doing, not just listening. Seven ideas that bring readings, predictions and experiments into an online lesson, even without a lab.

2 min read
Tutoring Read

How to choose an online whiteboard for tutoring

Most online whiteboards were made for meetings or design teams. Here are the nine things that matter when the board is where your lessons happen.

2 min read
Music Read

Online music lessons: what to put on the whiteboard

Teaching music online is harder when the student can only hear you. Here is what a shared whiteboard adds to an online music lesson, and how to use it.

2 min read
Classroom Read

Why a video call isn't enough for an online lesson

Video calls were built for meetings, where one person talks. Lessons need students doing, showing and answering. Here's what a call doesn't give you.

2 min read
Planning Read

Planning homeschool lessons with an online whiteboard

Homeschooling means planning every subject yourself. A simple routine for planning, teaching and recording lessons without spending evenings on materials.

2 min read
Planning Read

Teaching online with a tablet and pencil: a simple setup

Handwriting is still the fastest way to explain maths, science and languages. A simple tablet and pencil setup, and the habits that make it feel natural.

2 min read
Classroom Read

Choosing a virtual classroom for your school: a checklist

A virtual classroom must work for a teacher with thirty students, a student on an old phone, and the school behind it. What to check before you choose.

1 min read
Classroom Read

Online lessons for young children: 8 tips that keep them with you

Young children can learn well online, but not in the same way as older students. These eight tips keep a lesson short, clear and full of things to do.

2 min read
Engagement Read

10 ways to keep students engaged in an online lesson

Attention drifts faster on a screen than in a room. These ten small habits bring students back, and keep them doing rather than watching.

2 min read
Classroom Read

Group work online that actually works

Breakout groups often turn into quiet rooms. With a clear task, a shared space and a timer, they can be the best part of the lesson.

1 min read
Maths Read

Teaching maths online: drawing, graphs and checking understanding

Maths is a drawing subject. Here's how to teach it online without losing the sketches, the working out and the moment you see a student get it.

1 min read
Tutoring Read

Your first online tutoring lesson: a checklist

New to tutoring online, or starting with a new student? This checklist covers the setup, the first ten minutes and what to do after.

1 min read
Planning Read

Use the worksheets you already have, online

You don't need to remake your lessons for the screen. Your worksheets, slides and textbook pages can work online, often better than on paper.

1 min read
Tutoring Read

Teaching adults online: what's different

Adult learners arrive with goals, busy lives and sometimes old worries about learning. A few changes make online lessons work far better for them.

1 min read
Assessment Read

Checking understanding without a test

You don't need a quiz at the end to know what landed. These quick checks show you, during the lesson, who's with you and who needs another go.

1 min read
Languages Read

Teaching a language online: speaking, listening and new words

Language lessons live or die on how much students speak. Here's how to keep online lessons full of talk, listening and words that stick.

1 min read
Engagement Read

Running a live quiz that actually teaches

Live quizzes are fun, but fun isn't the point. A few small choices turn a quiz from a game into one of the best teaching moments of the lesson.

1 min read
Classroom Read

Online lessons for teenagers: keeping them talking

Cameras off, one-word answers, silence after every question. Here's how to get teenagers involved in online lessons without forcing it.

1 min read