Understanding the Four Rules of Simple Design
Understanding the Four Rules of Simple Design (The Book, Single Copy License)
$17.99
Minimum price
$17.99
Suggested price
Understanding the Four Rules of Simple Design

Last updated on 2014-06-04

About the Book

Check out some feedback from readers.

Modern software development is a game of ever-increasing frequency of change. This is why it is imperative to build systems that are flexible and can adapt to changing requirements, both expected and (more often) unexpected. That is why I've written this book.

From 2009 to 2014, I traveled the world working with software developers, both individually and in teams, to improve their craft. Primarily, I did this through a training workshop format called coderetreat. Over those years, I had the opportunity to watch 1000's of pairs of programmers work on exactly the same system, Conway's Game of Life. As time progressed, I began to see patterns arise. I noticed common techniques and designs that spanned languages and companies and crossed national borders.

As co-founder and a facilitator of coderetreat workshops, I had the unique opportunity to provide feedback, both direct and through questions, on improving the act of writing adaptable, simple code. Through the day, we worked on improving our ability to make good choices around the minute-by-minute decisions made while writing code.

This book is about those things I learned from watching these 1000's of pairs working on the same problem. It contains a large part of the feedback that I provide during a typical coderetreat. The primary focus is on the thought process behind refactoring, and how that is influenced by the 4 rules of simple design.

This book is not about Conway's Game of Life. Instead, it uses its domain as a backdrop to discuss the thoughts and ideas behind the 4 rules of simple design. It focuses on the small decisions made while designing your code with the goal of building robust, adaptable codebases that can stand the test of time.

With forewords by Joe Rainsberger and Kent Beck.

Curious what the book is like?

I've put together a free downloadable sample of the book with one of the examples (having test names influence the api) and a section on the ping-pong pair-programming style.

  • Share this book

About the Author

Corey Haines
Corey Haines

I'm Corey Haines. I've been developing software professionally since 1995. I've also spent the past 10 years mentoring and training software developers around the world. I currently work at the CTO/Co-founder of Hearken.

I also love cats!

Packages

The Book, Single Copy License
  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$17.99
Minimum price
$17.99
Suggested price
The Book, 10-Copy License

Use this to purchase a licenses for 10 copies of the book at a discounted rate! Great for classes, workshops and companies.

  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$140.00
Minimum price
$155.00
Suggested price
The Book, 50-Copy License
  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$300.00
Minimum price
$300.00
Suggested price

Bundles that include this book

Working Effectively with Unit Tests
Understanding the Four Rules of Simple Design
2 Books
$32.98
Suggested Price
$24.99
Bundle Price

Table of Contents

    • Foreword: Kent Beck
    • Foreword: Joe Rainsberger
    • Acknowledgements
    • Introduction
    • This Book
      • Who It Is For
      • What It Is (And Isn’t) About
      • Format
      • Why Ruby?
  • Where do these thoughts come from?
      • Good Design?
      • Coderetreats
      • Conway’s Game of Life
      • 4 Rules of Simple Design
  • Examples
      • Test Names Should Influence Object’s API
      • Duplication of Knowledge about Topology
      • Behavior Attractors
      • Testing State vs Testing Behavior
      • Don’t Have Tests Depend on Previous Tests
      • Breaking Abstraction Level
      • Naive Duplication
      • Procedural Polymorphism
      • Making Assumptions About Usage
      • Unwrapping an Object
      • Inverted Composition as a Replacement for Inheritance
  • Other Good Stuff
    • Other Design Guidelines
    • Example constraints
    • Some Thoughts On Pair-Programming Styles
      • Driver-Navigator
      • Ping-Pong Pairing
      • Which Style Should You Choose?
    • Further Reading
      • 4 Rules of Simple Design
      • General Design
      • Testing
      • Other Things You Probably Should Most Definitely Read

Authors have earned$8,088,579writing, publishing and selling on Leanpub,
earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. Free App. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub