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
Write S.O.L.I.D code
Search
Yoan
June 13, 2017
How-to & DIY
2
2.5k
Write S.O.L.I.D code
Learn how to write Object Oriented S.O.L.I.D code
Yoan
June 13, 2017
Tweet
Share
More Decks by Yoan
See All by Yoan
Coder sans se noyer dans la complexité
thirion
0
41
L'artisanat logiciel à l'heure du numérique responsable
thirion
0
120
Clean Code du point de vue de la cognition
thirion
0
190
Agile Tech Coaching - The Missing Piece Of Your Organization
thirion
1
150
Cultiver l'intelligence collective à l'heure de ChatGPT
thirion
0
150
Clean Code from the Cognition Point of View
thirion
2
210
Xanpan - une méthode agile hybride centrée sur l'équipe
thirion
0
210
Les aventures d'un facilitateur au pays des techs - Agile Grenoble 2023
thirion
0
150
Clean Code du point de vue de la cognition
thirion
1
290
Other Decks in How-to & DIY
See All in How-to & DIY
カンファレンスでリフレッシュ!無理なく楽しむカンファレンス参加術 / How to enjoy conferences without stress
kattsuuya
1
9.6k
JAWS-UG と AWS - JAWS-UG 沖縄 Cloud on the Beach 2025
awsjcpm
0
140
Nutanix Community Edition 超入門 25.04
ricefield66
0
240
20250226_AI Code Agents祭り_MK_AIコーディングエージェントのコラボレーション開発
mk0721
PRO
0
150
評価のギャップから紐解く、「評価軸」と「ソフトスキル」の重要性
blajir
2
150
Azure PortalのQoLを上げてたら Big Techに怒られた
horihiro
2
570
私がカンファレンスのプロポーザルを書くときに考えていること
kotomin_m
1
680
ライブ感を生む 巻き込み型スライドの作り方/Create your slide like a heavy metal concert
ikuodanaka
5
1.4k
How to Create a Betpro Account in Pakistan [Complete Guide]
betproid
0
490
登壇資料を素早く作るための順番
kotomin_m
7
1.7k
The Definitive? Guide To Locally Organizing RubyKaigi
sylph01
9
2.6k
JAWS-UGのご紹介 JAWS-UGとは?
awsjcpm
0
5.6k
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
160
The Spectacular Lies of Maps
axbom
PRO
1
650
Building Adaptive Systems
keathley
44
3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How GitHub (no longer) Works
holman
316
150k
Odyssey Design
rkendrick25
PRO
2
560
Ruling the World: When Life Gets Gamed
codingconduct
0
180
Documentation Writing (for coders)
carmenintech
77
5.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
240
GitHub's CSS Performance
jonrohan
1032
470k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
150
Transcript
@yot88 By yoan thirion S.O.L.I.D principles
@yot88 bad code / Good code Bad code vs Good
code Categorize each piece of code
None
@yot88 Singleton Tight Coupling Untestability Premature Optimization Indescriptive Naming Duplication
Single Responsibility Open/Closed Principle Liskov Substitution Interface Segregation Dependency Inversion Patterns and anti-patterns
@yot88 SRP A class should have only 1 responsibility
@yot88 Software entities should be open for extension, but closed
for modification. Open closed
@yot88 Subtypes must be substitutable for their base types. Liskov
substitution
@yot88 Clients should not be forced to depend on methods
that they do not use. Interface segregation
@yot88 High level modules should not depend on low level
modules : both should depend on abstractions. DI
@yot88 Good code / bad code Align each piece of
code with a S.O.L.I.D principle
1 3 3 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 13 16 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 4 2 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 15 14 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 8 6 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 11 9 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
3 10 5 1 3 16 13 2 4 14
15 6 8 9 12 5 10 11
12 1 3 16 13 2 4 14 15 6
8 9 12 5 10 11
1 3 16 13 2 4 14 15 6 8
9 12 5 10 11
@yot88 Let’s refactor using s.O.L.I.D
@yot88 exercises Practice S.O.L.I.D principles on code examples Clone the
repository at : https://github.com/ythirion/solid-kata Foreach code example : • identify why it’s breaking the given principle • Write down your refactoring strategy • Refactor it
@yot88 Where do you stand ? No quite yet On
the way Ready to roll