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
5
1.2k
clean code: four rules of simple design
the slide deck used for an internal design/programming workshop for developers.
Avinash Chugh
May 31, 2014
Tweet
Share
More Decks by Avinash Chugh
See All by Avinash Chugh
Platform Thinking - Bringing Agility to Business
avinashchugh
0
27
Embracing the changing technology paradigms
avinashchugh
0
27
product thinking is problem solving.
avinashchugh
0
140
The anatomy of a platform.
avinashchugh
0
110
Evolutionary Enterprise Architectures
avinashchugh
0
55
Continuous Delivery in Motion
avinashchugh
0
120
seven tips to effective writing
avinashchugh
0
220
micro services, yotta benefits
avinashchugh
1
180
managing build artifacts with nexus
avinashchugh
0
84
Other Decks in Programming
See All in Programming
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
110
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
110
GUI操作LLMの最新動向: UI-TARSと関連論文紹介
kfujikawa
0
660
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
950
202507_ADKで始めるエージェント開発の基本 〜デモを通じて紹介〜(奥田りさ)The Basics of Agent Development with ADK — A Demo-Focused Introduction
risatube
PRO
6
1.4k
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1k
中級グラフィックス入門~効率的なメッシュレット描画~
projectasura
4
2.5k
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
330
Google I/O Extended Incheon 2025 ~ What's new in Android development tools
pluu
1
250
DataformでPythonする / dataform-de-python
snhryt
0
160
Understanding Kotlin Multiplatform
l2hyunwoo
0
250
MCPで実現できる、Webサービス利用体験について
syumai
7
2.4k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
183
54k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Agile that works and the tools we love
rasmusluckow
329
21k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
GraphQLとの向き合い方2022年版
quramy
49
14k
Gamification - CAS2011
davidbonilla
81
5.4k
KATA
mclloyd
32
14k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
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/