Last updated: Mar 27, 24 18:05 UTC | Permalink

4 - Code-Level Design Principles

Learning Objectives:

This lecture is about writing code that other people will be able to understand, reuse, and modify. We’ve distilled this down to five general program-design princples which should be best practices for effective programmers:

  • Use Good Names
  • Make Your Data Mean Something
  • One Method/One Job
  • Don’t Repeat Yourself
  • Don’t Hardcode Things That Are Likely To Change

In this lecture, you will learn to:

  • Describe the purpose of our best practices for code-level design
  • List 5 principles for designing readable code, with examples
  • Identify some violations of the practices and suggest ways to mitigate them

Important Dates:

Lecture Slides:

Activity

  • Traffic Light Activity: (Handout)

Resources


© 2024 Jon Bell, Adeel Bhutta and Mitch Wand. Released under the CC BY-SA license