December 15, 2004

Book: Code Complete

This is good book for anyone who wants to become a professional in software. This book explains life cycle of programming, how to construct a good code & best practices while writing the code. (Update) Examples in this book are written considering C++/Java however common language specifications in C# automatically forces some of the practices mentioned in this book. If you are seasoned professional then it is worth to take a look at this book to crosscheck best practices for constructing the 'complete' code.

Key points learned:

  • Software's Primary Technical Imperative is managing complexity. This is greatly aided by a design focus on simplicity.
  • Simplicity is achieved in two general ways: minimizing the amount of essential complexity that anyone's brain has to deal with at any one time, and keeping accidental complexity from proliferating needlessly.
  • Design is heuristic. Dogmatic adherence to any single methodology hurts creativity and hurts your programs.
  • Good design is iterative; the more design possibilities you try, the better your final design will be.
  • Information hiding is a particularly valuable concept. Asking "What should I hide?" settles many difficult design issues.
  • Lots of useful, interesting information on design is available outside this book. The perspectives presented here are just the tip of the iceberg.
  • Class interfaces should provide a consistent abstraction. Many problems arise from violating this single principle.
  • A class interface should hide something—a system interface, a design decision, or an implementation detail.
  • Containment is usually preferable to inheritance unless you're modeling an "is a" relationship.
  • Inheritance is a useful tool, but it adds complexity, which is counter to Software's Primary Technical Imperative of managing complexity.
  • Classes are your primary tool for managing complexity. Give their design as much attention as needed to accomplish that objective.