SlideShare a Scribd company logo
Understanding the
Four Rules of Simple
Design
Lessons from watching thousands
of pairs work on Conway's Game
of Life by Corey Haines1
1
Buch bei Leanpub, Twitter
Focused on the almost continuous
decisions made around things
such as naming variables and
extracting methods
It's not about any particular
technique.
It's not about any particular
language.
It's about better design, not good
versus bad design.
Four Rules of Simple Design
1. Tests Pass
2. Expresses Intent
3. No Duplication (DRY)
4. Small
Don't Repeat Yourself
This rule isn't about code duplication; it is about knowledge
duplication:
Every piece of knowledge should have one and only one
representation.
— The Pragmatic Programmer2
2
http://pragprog.com/book/tpp/the-pragmatic-programmer
Small
• Any vestigial code that is no longer used?
• Any duplicate abstractions?
• Extracted too far?
Conway's Game of Life
1. If a living cell has less than two living neighbors, it will die.
2. If a living cell has two or three living neighbors, it stays alive.
3. If a living cell has more than three living neighbors, it will
die.
4. If a dead cell has exactly three living neighbors, it becomes
alive.

More Related Content

PDF
Global Day of Coderetreat 2013 Chennai - JUGChennai
PPTX
Legacy Coderetreat Bologna @ CodersTUG
PDF
JavaScript CodeRetreat
PDF
Coderetreat hosting training
PDF
Spark Your Legacy (Spark Summit 2016)
PPTX
Conway gameoflife
PDF
Coderetreat - What, Why and How
PDF
CodeRetreat
Global Day of Coderetreat 2013 Chennai - JUGChennai
Legacy Coderetreat Bologna @ CodersTUG
JavaScript CodeRetreat
Coderetreat hosting training
Spark Your Legacy (Spark Summit 2016)
Conway gameoflife
Coderetreat - What, Why and How
CodeRetreat

Viewers also liked (7)

PDF
JUGChennai UserGroup BestPractices
PDF
Milano Legacy Coderetreat 2013
PDF
ペアプロワークショップ
PDF
coderetreat
PDF
The Game Life Cycle & Game Analytics: What metrics matter when?
PDF
Global Day of Coderetreat'14 - Istanbul Event
PDF
Coderetreat - Practice to Master Your Crafts
JUGChennai UserGroup BestPractices
Milano Legacy Coderetreat 2013
ペアプロワークショップ
coderetreat
The Game Life Cycle & Game Analytics: What metrics matter when?
Global Day of Coderetreat'14 - Istanbul Event
Coderetreat - Practice to Master Your Crafts
Ad

More from Stefan Scheidt (10)

PDF
Kotlin DSLs
PDF
iOS Einstieg und Ausblick
PDF
iOS: Einstieg und Ausblick
PDF
Java script data binding mit jQuery Mobile
PDF
Test driven java script development
PDF
Fruehling fuers iPhone
PPTX
Maven 3 New Features
PPTX
Automatischer Build mit Maven
PDF
ipdc10: Spring Backends für iOS Apps
PDF
WJAX 2010: Spring Backends für iOS Apps
Kotlin DSLs
iOS Einstieg und Ausblick
iOS: Einstieg und Ausblick
Java script data binding mit jQuery Mobile
Test driven java script development
Fruehling fuers iPhone
Maven 3 New Features
Automatischer Build mit Maven
ipdc10: Spring Backends für iOS Apps
WJAX 2010: Spring Backends für iOS Apps
Ad

Recently uploaded (20)

PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
Time Tracking Features That Teams and Organizations Actually Need
PDF
Autodesk AutoCAD Crack Free Download 2025
PPTX
Custom Software Development Services.pptx.pptx
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
STL Containers in C++ : Sequence Container : Vector
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Types of Token_ From Utility to Security.pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
DNT Brochure 2025 – ISV Solutions @ D365
Time Tracking Features That Teams and Organizations Actually Need
Autodesk AutoCAD Crack Free Download 2025
Custom Software Development Services.pptx.pptx
Weekly report ppt - harsh dattuprasad patel.pptx
GSA Content Generator Crack (2025 Latest)
STL Containers in C++ : Sequence Container : Vector
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
How Tridens DevSecOps Ensures Compliance, Security, and Agility
Complete Guide to Website Development in Malaysia for SMEs
Designing Intelligence for the Shop Floor.pdf
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Computer Software and OS of computer science of grade 11.pptx
Types of Token_ From Utility to Security.pdf

Understanding the Four Rules of Simple Design

  • 1. Understanding the Four Rules of Simple Design
  • 2. Lessons from watching thousands of pairs work on Conway's Game of Life by Corey Haines1 1 Buch bei Leanpub, Twitter
  • 3. Focused on the almost continuous decisions made around things such as naming variables and extracting methods
  • 4. It's not about any particular technique. It's not about any particular language.
  • 5. It's about better design, not good versus bad design.
  • 6. Four Rules of Simple Design 1. Tests Pass 2. Expresses Intent 3. No Duplication (DRY) 4. Small
  • 7. Don't Repeat Yourself This rule isn't about code duplication; it is about knowledge duplication: Every piece of knowledge should have one and only one representation. — The Pragmatic Programmer2 2 http://pragprog.com/book/tpp/the-pragmatic-programmer
  • 8. Small • Any vestigial code that is no longer used? • Any duplicate abstractions? • Extracted too far?
  • 9. Conway's Game of Life 1. If a living cell has less than two living neighbors, it will die. 2. If a living cell has two or three living neighbors, it stays alive. 3. If a living cell has more than three living neighbors, it will die. 4. If a dead cell has exactly three living neighbors, it becomes alive.