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
45
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
210
Interviewing Developers - Boulder Ruby May 2018
mghaught
1
120
The Prototyping Mindset - Devoxx.us 2017
mghaught
0
180
Make Better Decisions
mghaught
0
180
Make Better Decisions
mghaught
0
41
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
プロダクトエンジニアとしてのマインドセットの育み方 / How to improve product engineer mindset
saka2jp
1
190
AIエージェントは「使う」だけじゃなくて「作る」時代! 〜最新フレームワークで楽しく開発入門しよう〜
minorun365
PRO
8
1.3k
CloudComposerによる大規模ETL 「制御と実行の分離」の実践
leveragestech
0
190
次世代のメールプロトコルの斜め読み
hirachan
3
390
AI時代におけるドメイン駆動設計 入門 / Introduction to Domain-Driven Design in the AI Era
fendo181
0
330
LLM APIを2年間本番運用して苦労した話
ivry_presentationmaterials
11
9.3k
龍昌餃子で理解するWebサーバーの並行処理モデル - 東葛.dev #9
kozy4324
1
120
ソースコードを読むときの思考プロセスの例 ~markdownのレンダリング方法を知りたかった2 markdownパッケージ~
sat
PRO
0
100
Pythonで構築する全国市町村ナレッジグラフ: GraphRAGを用いた意味的地域検索への応用
negi111111
5
1.7k
メタプログラミングRuby読書会の活用
willnet
1
130
Raycast AI APIを使ってちょっと便利なAI拡張機能を作ってみた
kawamataryo
1
250
累計5000万DLサービスの裏側 – LINEマンガのKotlinで挑む大規模 Server-side ETLの最適化
ldf_tech
0
200
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Context Engineering - Making Every Token Count
addyosmani
8
340
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
What's in a price? How to price your products and services
michaelherold
246
12k
Visualization
eitanlees
150
16k
Building an army of robots
kneath
306
46k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building Applications with DynamoDB
mza
96
6.7k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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