Review: Understanding the 4 Rules of Simple Design

Here are my thoughts on Understanding the 4 Rules of Simple Design by Corey Haines

Understanding the 4 Rules of Simple Design book cover

Recently I have been reading Corey Haines' book 'Understanding the 4 Rules of Simple Design' and I wanted to write up my thoughts on it.

As I am sure you have guessed from the title the book is about understanding the 4 rules of simple design. Four rules?!? What are these four rules I hear you say! These are the four rules as written down by Kent Beck in the late 90's that outline some fundemental concepts found in software design;

  1. Tests Pass
  2. Expresses Intent
  3. No Duplication
  4. Small

These rules are well known in the development community and have been written about in many amazing books before. Unlike other books that talk about good software design as a series of chapters this book kind of munges all the rules together and shows how following one rule can help expose when another one of the rules is being broken or bent. This fresh take on how to present this information was really enlightening for me.

Corey has focused on Conway's Game of Life as the sample problem and has chosen Ruby as the language of choice for code samples, as someone who has written Conway's Game of Life before and as someone who uses Ruby this made me very happy. Don't worry if you haven't heard of the Game of Life before, the concept is simple and well explained in the book. Likewise don't worry if you don't know any Ruby, the code samples are expressive and small.

Something that I feel is a major plus with the book is that it runs at less than 100 pages, which means it is a quick read and something you could easily come back to and re-read with little time investment.

The book ends by suggesting some more resources that would be worth while reading that either expand on some of the points raised in the book or talk about other approaches to techniques in the book.

One example of how this book's approach helped me better understand the 4 Rules is that conceptually I always imagined DRY code to not store duplicate lines of code, so generally if I saw duplication of that sort I would write a function or class, Corey's explaination of Naive Duplication really helped me grasp the true importance of DRY.

At $14.99 I feel this book is a steal and well worth taking the time to read and digest.


Recent posts View all

Ruby

Forcing a Rails database column to be not null

How you can force a table column to always have something in it with Rails

Writing Marketing

We've deleted an article's worth of unhelpful words

We've improved several pages across our site by removing words that add no value, and often detract from the article.