Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Primer on the 4 Rules of Simple Design
Search
Marty Haught
September 15, 2016
Technology
0
34
Primer on the 4 Rules of Simple Design
A short introduction to the 4 Rules of Simple Design given at Boulder Ruby in 2015 and 2016.
Marty Haught
September 15, 2016
Tweet
Share
More Decks by Marty Haught
See All by Marty Haught
Interviewing Developers - Boulder Ruby May 2018
mghaught
1
92
The Prototyping Mindset - Devoxx.us 2017
mghaught
0
170
Make Better Decisions
mghaught
0
170
Make Better Decisions
mghaught
0
30
Ruby Community: Awesome; Could be Awesomer
mghaught
2
270
Ruby Community: Awesome; Could be Awesomer
mghaught
4
160
Other Decks in Technology
See All in Technology
M5stackで使用できるpHセンサの開発
shinrinakamura
0
190
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
VSCodeの拡張機能を作っている話
ebarakazuhiro
1
810
EM完全に理解した と思ったけど、 やっぱり何も分からなかった話 / EM Night Fukuoka #1
hirutas
0
280
本当のAWS基礎
toru_kubota
1
640
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.6k
JAWS-UG Bedrock Claude Night
yamahiro
3
720
非同期推論システムによるコスト削減と信頼性向上
koki_nishihara
1
360
生産性向上チームの紹介
cybozuinsideout
PRO
1
920
MapLibreとAmazon Location Service
dayjournal
1
190
【SORACOM UG 東海】あらゆるモノがつながる社会へ、IoT と SORACOM
soracom
PRO
1
140
IaCジェネレーターとBedrockで詳細設計書を生成してみた
tsukasa_ishimaru
4
890
Featured
See All Featured
It's Worth the Effort
3n
180
27k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
The Pragmatic Product Professional
lauravandoore
26
5.8k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
Optimising Largest Contentful Paint
csswizardry
12
2.4k
Designing for Performance
lara
601
67k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Practical Orchestrator
shlominoach
183
9.7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
A Tale of Four Properties
chriscoyier
152
22k
Building an army of robots
kneath
300
41k
Designing with Data
zakiwarfel
96
4.8k
Transcript
Primer on the 4 Rules of Simple Design Marty Haught
@mghaught
Origin • Introduced by Kent Beck pre 2000 • via
Extreme Programming (XP) • Associated with “Do the simplest thing that could possibly work.”
Corey Haines http://bit.ly/4rules-boulderruby $11.99 • via Code retreats • Conway’s
Game of Life
The Rules 1. Tests pass 2. Expresses intent 3. No
duplication 4. Small
1. Tests Pass • Need to verify that your code/system
works • Automated tests are the fastest way to verify
2. Expresses Intent • Intention revealing • You can quickly
look at it and know what it does • Not bad naming, unclear or inaccurate • Does the method/variable match the language you use to describe it?
3. No Duplication • DRY - Don’t Repeat Yourself •
Commonly thought of as repetition in code structure (lines of code) • Also knowledge duplication • "Every piece of knowledge should have one and only one representation."
4. Small • No extraneous parts to the code •
Does everything there have a purpose? • Is it still being used? • Did I extract too far?
Resources • Corey’s Book: http://bit.ly/4rules-boulderruby • XP wiki: http://c2.com/cgi/wiki?XpSimplicityRules •
JB Rainsberger: http://www.jbrains.ca/permalink/ the-four-elements-of-simple-design