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
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
58
Embracing the changing technology paradigms
avinashchugh
0
56
product thinking is problem solving.
avinashchugh
0
170
The anatomy of a platform.
avinashchugh
0
130
Evolutionary Enterprise Architectures
avinashchugh
0
75
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
120
Other Decks in Programming
See All in Programming
Event is what happens
moro
2
3.5k
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.7k
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
340
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
120
Kotlinの15年とServer-Side Kotlin
n_takehata
1
200
AmebaブログはKMPから卒業します
kmars0605
0
320
Getting Started with Vibe Coding
miccheng
0
180
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
GraphQL の onError と Nullability のこれから
quramy
0
200
ActionController meets Protocol Buffers
sorah
1
780
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
180
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
360
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.3k
Believing is Seeing
oripsolob
1
270
Designing Powerful Visuals for Engaging Learning
tmiket
1
640
Tell your own story through comics
letsgokoyo
1
1.1k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
540
Testing 201, or: Great Expectations
jmmastey
46
8.4k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
Typedesign – Prime Four
hannesfritz
42
3.2k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
HDC tutorial
michielstock
2
1k
Exploring anti-patterns in Rails
aemeredith
4
560
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/