Skip to content
Computer Science · Grade 12

Active learning ideas

Code Review and Best Practices

Students remember code standards and review practices best when they practice them hands-on. Active learning forces them to apply concepts immediately, turning abstract rules into concrete habits. These activities move students from listening to doing, which builds both technical and collaborative skills they will use in future team projects.

Ontario Curriculum ExpectationsCS.SE.12CS.PM.6
30–45 minPairs → Whole Class4 activities

Activity 01

Chalk Talk35 min · Pairs

Pair Review: Standards Checklist

Pairs exchange short programs and use a provided rubric to check for naming conventions, comments, and error handling. They note three strengths and two improvements, then meet to discuss feedback. Revise code based on peer input before submitting.

Explain the benefits of regular code reviews for software quality and team learning.

Facilitation TipDuring Pair Review, model how to balance finding issues with acknowledging strengths to set a constructive tone.

What to look forProvide students with two code snippets implementing the same simple function. Ask students to act as peer reviewers: identify at least two violations of common coding standards (e.g., naming, formatting) in one snippet and provide a constructive suggestion for improvement for each. They should also identify one strength of the other snippet.

UnderstandAnalyzeEvaluateSelf-AwarenessSelf-Management
Generate Complete Lesson

Activity 02

Chalk Talk45 min · Small Groups

Small Group: Guideline Design Lab

Groups brainstorm and draft five coding standards for a hypothetical app project, including style rules and documentation requirements. They present to the class for critique and vote on a class set. Refine based on feedback.

Critique a piece of code based on established coding standards and best practices.

Facilitation TipIn Guideline Design Lab, circulate and ask groups to explain how their chosen rules will prevent common problems they’ve seen.

What to look forPose the question: 'Imagine you are leading a new software project. What are the top three coding guidelines you would establish for your team, and why are these crucial for successful collaboration and code quality?' Facilitate a class discussion where students share and justify their choices.

UnderstandAnalyzeEvaluateSelf-AwarenessSelf-Management
Generate Complete Lesson

Activity 03

Chalk Talk40 min · Whole Class

Whole Class: Code Critique Gallery Walk

Display anonymized code samples around the room with standards posters. Students circulate, leaving sticky-note feedback on bugs and best practices. Debrief as a class to tally common issues and solutions.

Design a set of coding guidelines for a new software project.

Facilitation TipFor the Gallery Walk, place sticky notes on the wall so students can move and respond to each other’s critiques in real time.

What to look forAsk students to write down one benefit of having clear documentation for a software project and one potential consequence of lacking it. They should also list one specific type of information they would include in the documentation for a function they wrote.

UnderstandAnalyzeEvaluateSelf-AwarenessSelf-Management
Generate Complete Lesson

Activity 04

Chalk Talk30 min · Individual

Individual: Self-Review Portfolio

Students select past assignments, review against class standards, and document changes with before-after code and rationale. Share one revision in a quick gallery.

Explain the benefits of regular code reviews for software quality and team learning.

Facilitation TipFor Self-Review Portfolio, provide a short example of a complete review entry to anchor expectations.

What to look forProvide students with two code snippets implementing the same simple function. Ask students to act as peer reviewers: identify at least two violations of common coding standards (e.g., naming, formatting) in one snippet and provide a constructive suggestion for improvement for each. They should also identify one strength of the other snippet.

UnderstandAnalyzeEvaluateSelf-AwarenessSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Teach by doing first, then reflect. Start with a short demonstration of a code review in action, then let students practice immediately. Emphasize that feedback should be specific and kind, and that standards exist to help teams communicate, not to restrict creativity. Avoid turning review into a grading exercise—focus on growth and shared ownership of the codebase.

By the end of these activities, students will confidently critique code, justify design choices, and create their own review guidelines. Success looks like students giving specific, actionable feedback and revising their own work based on peer input. They will also articulate why standards matter beyond just passing automated checks.


Watch Out for These Misconceptions

  • During Pair Review, watch for students who assume syntax is the only issue to fix.

    Give each pair a checklist that includes design, readability, and naming standards to guide their feedback. Model examples of peer feedback that goes beyond syntax errors.

  • During Guideline Design Lab, listen for students saying standards limit creative solutions.

    Ask groups to brainstorm how their chosen rules actually enable creativity by reducing confusion in shared code. Have them test their rules on sample snippets to see the effect.

  • During Code Critique Gallery Walk, note if students skip documentation comments in their reviews.

    Include a prompt on each poster asking reviewers to comment on whether the code is self-documenting or needs additional explanation. Use this to highlight how undocumented logic affects understanding.


Methods used in this brief