Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
30
Embracing the changing technology paradigms
avinashchugh
0
32
product thinking is problem solving.
avinashchugh
0
140
The anatomy of a platform.
avinashchugh
0
110
Evolutionary Enterprise Architectures
avinashchugh
0
58
Continuous Delivery in Motion
avinashchugh
0
130
seven tips to effective writing
avinashchugh
0
220
micro services, yotta benefits
avinashchugh
1
190
managing build artifacts with nexus
avinashchugh
0
88
Other Decks in Programming
See All in Programming
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
10
2.5k
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
510
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
400
チームをチームにするEM
hitode909
0
350
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
420
マスタデータ問題、マイクロサービスでどう解くか
kts
0
110
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
130
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
390
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.9k
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
560
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
120
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
22
BBQ
matthewcrist
89
9.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Designing Powerful Visuals for Engaging Learning
tmiket
0
180
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
110
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
240
Ethics towards AI in product and experience design
skipperchong
1
140
Are puppies a ranking factor?
jonoalderson
0
2.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
59
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
220
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/