$30 off During Our Annual Pro Sale. View Details »
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
49
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
Baltic_Ruby_Keynote_2025.pdf
mghaught
0
70
State of RubyGems 2024
mghaught
0
220
Interviewing Developers - Boulder Ruby May 2018
mghaught
1
130
The Prototyping Mindset - Devoxx.us 2017
mghaught
0
180
Make Better Decisions
mghaught
0
180
Make Better Decisions
mghaught
0
43
Ruby Community: Awesome; Could be Awesomer
mghaught
2
290
Ruby Community: Awesome; Could be Awesomer
mghaught
4
180
Other Decks in Technology
See All in Technology
小さな判断で育つ、大きな意思決定力 / 20251204 Takahiro Kinjo
shift_evolve
PRO
1
580
生成AI時代の自動E2Eテスト運用とPlaywright実践知_引持力哉
legalontechnologies
PRO
0
210
RAG/Agent開発のアップデートまとめ
taka0709
0
150
寫了幾年 Code,然後呢?軟體工程師必須重新認識的 DevOps
cheng_wei_chen
1
1.2k
Playwrightのソースコードに見る、自動テストを自動で書く技術
yusukeiwaki
13
5.1k
第4回 「メタデータ通り」 リアル開催
datayokocho
0
120
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
220
Microsoft Agent 365 を 30 分でなんとなく理解する
skmkzyk
1
1k
エンジニアリングをやめたくないので問い続ける
estie
2
600
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
1.8k
re:Inventで気になったサービスを10分でいけるところまでお話しします
yama3133
1
120
生成AIでテスト設計はどこまでできる? 「テスト粒度」を操るテーラリング術
shota_kusaba
0
600
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Producing Creativity
orderedlist
PRO
348
40k
A Modern Web Designer's Workflow
chriscoyier
698
190k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Site-Speed That Sticks
csswizardry
13
990
Designing for humans not robots
tammielis
254
26k
Navigating Team Friction
lara
191
16k
Side Projects
sachag
455
43k
Code Review Best Practice
trishagee
74
19k
Automating Front-end Workflow
addyosmani
1371
200k
Code Reviewing Like a Champion
maltzj
527
40k
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