Skip to content

What is the difference between software and code? More specifically, what are the different processes we should follow when writing software (as opposed to writing code)?

While code is typically short, isolated, and run once (e.g. code you might write for a script, or for an assignment), software is large, highly connected to other software, and longstanding. Primarily, these differences motivate a need to write code that is easy to evolve, maintain, and test. This chapter explores the we evaluate and write code that satisfies these criteria:

  1. Cost of Change: Why does cost of change matter? How do we maeasure it?
  2. Change Difficulty in Code: How do we identify the parts of code that lead to this cost of change?
  3. Refactoring: What process should we follow to improve our code?
  4. Testability: How do we write code that is easy to test?

We approach all of these topics under the philosophy of Analytical Code Design. Under this philosophy, the goal is to equip you to be able to make informed and measurable analyses of your code--to be able to consider two versions of code solving the same problem and articulate the tradeoffs between them.

Course reader licensed under CC BY-SA 3.0.