CSE Roadmap

Core tier · about 3 hours · 6 parts

Part 1 of 6 · 1 min read

Why this page comes last in Level 5

In this module you will

  • Find the axes of change in a requirement and put each behind its own interface.
  • Answer a mid-round change request by naming the class that changes.
  • Spot common smells: type switches, duplication, feature envy and magic numbers.
  • Refactor in small steps with a test as a safety net.
  • Stop before the design becomes more general than the problem needs.

In most design rounds the interviewer adds a requirement part-way through. "Now students get a discount." "Now a second payment vendor is needed." This page shows how to answer, by designing so that changes land in one place, and by cleaning existing code safely. It draws on the ideas of Levels 2 to 5. The sources are "Clean Code" (CC) chapters 10 and 17 and "Clean Architecture" (CA). Code was compiled and run before it was written here. Numbers marked "made up" only show the idea.