Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
55
Embracing the changing technology paradigms
avinashchugh
0
53
product thinking is problem solving.
avinashchugh
0
160
The anatomy of a platform.
avinashchugh
0
120
Evolutionary Enterprise Architectures
avinashchugh
0
72
Continuous Delivery in Motion
avinashchugh
0
160
seven tips to effective writing
avinashchugh
0
250
micro services, yotta benefits
avinashchugh
1
220
managing build artifacts with nexus
avinashchugh
0
110
Other Decks in Programming
See All in Programming
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
190
Simple Storage Service(S3) is not simple
iwatsukayura
0
220
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
310
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
16k
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
190
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
820
Jetpack Compose Mechanisms
skydoves
2
550
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
490
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
350
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Optimizing for Happiness
mojombo
378
71k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
570
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
The browser strikes back
jonoalderson
0
1.8k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
A Tale of Four Properties
chriscoyier
163
24k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
sira's awesome portfolio website redesign presentation
elsirapls
0
440
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
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/