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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
33
Embracing the changing technology paradigms
avinashchugh
0
40
product thinking is problem solving.
avinashchugh
0
150
The anatomy of a platform.
avinashchugh
0
110
Evolutionary Enterprise Architectures
avinashchugh
0
63
Continuous Delivery in Motion
avinashchugh
0
130
seven tips to effective writing
avinashchugh
0
230
micro services, yotta benefits
avinashchugh
1
200
managing build artifacts with nexus
avinashchugh
0
97
Other Decks in Programming
See All in Programming
安いハードウェアでVulkan
fadis
1
930
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
飯MCP
yusukebe
0
490
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
1.9k
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
190
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
230
「速くなった気がする」をデータで疑う
senleaf24
0
150
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
130
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
140
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
610
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
520
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Music & Morning Musume
bryan
47
7.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
150
Raft: Consensus for Rubyists
vanstee
141
7.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Building the Perfect Custom Keyboard
takai
2
720
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
310
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
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/