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
32
Embracing the changing technology paradigms
avinashchugh
0
38
product thinking is problem solving.
avinashchugh
0
150
The anatomy of a platform.
avinashchugh
0
110
Evolutionary Enterprise Architectures
avinashchugh
0
62
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
93
Other Decks in Programming
See All in Programming
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
520
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
250
Unity6.3 AudioUpdate
cova8bitdots
0
120
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.3k
Ruby x Terminal
a_matsuda
7
590
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
390
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
360
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
15
2.8k
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
490
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
370
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Tell your own story through comics
letsgokoyo
1
830
Faster Mobile Websites
deanohume
310
31k
Practical Orchestrator
shlominoach
191
11k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Balancing Empowerment & Direction
lara
5
940
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
380
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/