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
clean code: four rules of simple design
Search
Avinash Chugh
May 31, 2014
Programming
1.2k
5
Share
clean code: four rules of simple design
the slide deck used for an internal design/programming workshop for developers.
Avinash Chugh
May 31, 2014
More Decks by Avinash Chugh
See All by Avinash Chugh
Platform Thinking - Bringing Agility to Business
avinashchugh
0
43
Embracing the changing technology paradigms
avinashchugh
0
48
product thinking is problem solving.
avinashchugh
0
150
The anatomy of a platform.
avinashchugh
0
120
Evolutionary Enterprise Architectures
avinashchugh
0
65
Continuous Delivery in Motion
avinashchugh
0
140
seven tips to effective writing
avinashchugh
0
240
micro services, yotta benefits
avinashchugh
1
210
managing build artifacts with nexus
avinashchugh
0
100
Other Decks in Programming
See All in Programming
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
240
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
390
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
290
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
540
Oxlintのカスタムルールの現況
syumai
5
920
Moments When Things Go Wrong
aurimas
3
130
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
500
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
210
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
200
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
250
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
470
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
210
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
The Cult of Friendly URLs
andyhume
79
6.9k
Docker and Python
trallard
47
3.9k
Technical Leadership for Architectural Decision Making
baasie
3
380
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
270
For a Future-Friendly Web
brad_frost
183
10k
Prompt Engineering for Job Search
mfonobong
0
320
Discover your Explorer Soul
emna__ayadi
2
1.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
A designer walks into a library…
pauljervisheath
211
24k
Transcript
1 CLEAN CODE Four rules for simple design, according to
Kent Beck
WHO IS KENT BECK? 2 +Agile Manifesto +JUnit
IS TDD DEAD? 3
THE PURSUIT OF SIMPLICITY 4 Do the simplest thing that
could possibly work
5 RULE 1 - ALL TESTS MUST PASS ! Program
correctness Feedback loops Confidence levels Ease of evolution Working specification ! !
THE PYRAMID OF TESTING 6 Unit tests Integration tests Functional
tests The higher we go ! ▫︎fewer numbers ▫︎slower feedback ▫︎higher cost
7 ! ! Duplication is waste Eliminate waste Say it
once, Say it well Less code means fewer bugs ! ! RULE 2 - ONCE AND ONLY ONCE (OOO)
RULE 3 - EXPRESS YOUR INTENT 8 ! All in
the name Staying small Role playing Tell, don’t ask The world as we see it
9 ! ! ! Would you really need this? (minimal
methods, classes, & modules) RULE 4 - NO SUPERFLUOUS PARTS
FORM VS. FUNCTION 10
ENDLESS POSSIBILITIES 11
12 YOU AIN’T GONNA NEED IT! ! ! The world
is changing. fast. Build for what you know. Over time, you’ll know more. What if I could look ahead?
LISTEN TO THE CODE 13 ! ! 1. Write a
test, make it pass, refactor 2. Refactor to the point of simplicity 3. Listen to the code
THE SIMPLE DESIGN DYNAMO TM 14
SUMMARY 15 ! ! 1. All tests must pass 2.
Don’t repeat yourself 3. Express your intent 4. Stay lean
For questions or suggestions: ! Avinash Chugh
[email protected]
THANK YOU
REFERENCES 17 ! ! 1. http://c2.com/cgi/wiki?XpSimplicityRules 2. http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/ 0132350882 3.
http://math.ucr.edu/home/baez/physics/General/occam.html 4. http://blog.thecodewhisperer.com/2013/12/07/putting-an-age-old-battle-to-rest/