Last updated: May 31, 26 01:31 UTC | Permalink

9 - 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 Names and Indentations Wisely
  • Make Your Data Mean Something
  • One Method/One Job
  • Don’t Repeat Yourself
  • Identify and Use Good Abstractions

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:

  • Individual Project 2 Due Wednesday, May 20 by 6pm (EST)
  • Preliminary Project Plan Due May 22, 2026 by 6pm (ET)

Lecture Slides:

Activity (Optional)

Resources


© 2026 Adeel Bhutta. Released under the CC BY-SA license