Skip to content
Coding · 1st Year

Active learning ideas

Writing Computer Programs

This final topic brings everything together as students write, test, and debug their own programs. They apply their knowledge of algorithms, variables, selection, and iteration to create a working piece of software. A major focus here is on 'debugging', the systematic process of finding and fixing errors.

NCCA Curriculum SpecificationsNCCA Coding Strand 3: 3.9NCCA Coding Strand 3: 3.10
20–50 minPairs → Whole Class3 activities

Activity 01

Stations Rotation50 min · Small Groups

Stations Rotation: The Bug Hunt

Set up computers with simple programs that have one specific 'bug' (e.g., a missing variable or a wrong loop condition). Students rotate through the stations, identifying and fixing the bug at each one.

What is a bug?
RememberUnderstandApplyAnalyzeSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 02

Think-Pair-Share20 min · Pairs

Think-Pair-Share: Debugging Strategies

After a coding session, students share the 'best' bug they found and how they fixed it. They brainstorm a 'Top 5 Debugging Tips' list to keep on their desks for future projects.

How do we systematically test a programme?
UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

Activity 03

Gallery Walk45 min · Whole Class

Gallery Walk: Code Showcase

Students display their finished programs. Peers 'playtest' the software and leave constructive feedback on a 'Testing Log,' noting any bugs they found and what they enjoyed about the program.

Why is debugging a critical skill?
UnderstandApplyAnalyzeCreateRelationship SkillsSocial Awareness
Generate Complete Lesson

A few notes on teaching this unit


Watch Out for These Misconceptions

  • A 'bug' means you are bad at coding.

    Even professional developers spend half their time debugging. Reframing bugs as 'puzzles to solve' through a 'Bug of the Week' celebration helps build a growth mindset and reduces frustration.

  • If the program runs, it is 'correct'.

    A program might run but give the wrong answer (a logic error). Using 'test cases' with known inputs and outputs helps students see that 'working' means more than just 'not crashing'.


Methods used in this brief