Graduate Program KB

Chapter 1 - Clean Code

  • Clean code should be easy to read, change and understand.
  • Good code should be like a story, have clear structure, easy to follow and satisfying to experience.
  • Messy Code => Impacts on productivity of developers because they spend more time figuring out what the code is doing.
  • Metaphor of building with broken windows:
    • 1 broken window will invite more vandalism over the next days.
    • If a developer sees a piece of dirty code they might think thats it's okay to implement it that way, and won't follow good practices. Then then next developer will have the same mindset and the effect snowballs.
  • Includes quotes and examples of famous software engineers on what clean code is about.
  • Boy scout rule: "Leave the campground cleaner than you found it."
  • The book will give you details of on how to write clean code but it won't make us write clean code, developers need to do it ourselves and become discplined.