Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.32 KB

File metadata and controls

53 lines (31 loc) · 1.32 KB

Week 06 Friday: Refactor demonstration and code review

Learning objectives

  • Explain regression and review.
  • Apply today's ideas in a small Python program.
  • Inspect output and improve the program after a test run.

Concepts students must understand

  • regression
  • review
  • pull request
  • acceptance criteria

Detailed lesson content

Demonstrate before-and-after structure. Review for correctness, tests, names, documentation, and secrets. Feedback should name the effect and a concrete improvement.

Before coding, describe the input, processing, and output in ordinary language. Run the smallest possible version, then extend it one change at a time. Read the error message before asking for help.

Code example

# Review question: what behaviour proves this function correct?

Practical coding activity

Use the code review template with a peer.

Guided exercise

Fix one review finding and rerun tests.

Independent exercise

Submit the refactored, documented, tested application.

Expected output

A reviewer can clone, run, and test it.

Homework or assignment

Prepare a pull request description.

Recommended learning resources