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.4k
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
Clean Code du point de vue de la cognition
thirion
0
160
Agile Tech Coaching - The Missing Piece Of Your Organization
thirion
1
100
Cultiver l'intelligence collective à l'heure de ChatGPT
thirion
0
120
Clean Code from the Cognition Point of View
thirion
2
170
Xanpan - une méthode agile hybride centrée sur l'équipe
thirion
0
180
Les aventures d'un facilitateur au pays des techs - Agile Grenoble 2023
thirion
0
120
Clean Code du point de vue de la cognition
thirion
1
250
Les aventures d'un facilitateur au pays des techs - Agile Tour Lausanne 2022
thirion
0
180
Functional Programming made easy in C#
thirion
0
280
Other Decks in How-to & DIY
See All in How-to & DIY
Within the team, I grow as a tester and continuously pursue product quality
camel_404
6
2.7k
JAWS-UG と AWS - JAWS-UG 沖縄 Cloud on the Beach 2025
awsjcpm
0
110
いぬぬウォッチャー - オレトク賞オンライン決勝 #ヒーローズリーグ
n0bisuke2
0
260
파이썬 토룡신점 운영후기
lqez
0
480
スマートハウスの蓄電性能の効率化を実現してみた~電気自動車編~
runrunsan
0
290
ジャンカーよ、車も買え ~10分でわかる!? 中古車選び入門~
arkw
1
150
What's the difference in taste between expensive and cheap mills? Measuring coffee particle size distribution using ImageJ
dogrunjp
0
590
ModuleLLM、最前線!
anoken
1
270
ラズパイカメラ向け ケーブル延長基板・ハウジングの開発
koheimasaki
PRO
2
360
LLMはTRPGのGMができる(確信)
kgmkm
0
1.6k
評価のギャップから紐解く、「評価軸」と「ソフトスキル」の重要性
blajir
2
110
AWSコミュニティプログラムとJAWS-UGアップデート / JAWS-UG函館 勉強会 vol.14
awsjcpm
2
150
Featured
See All Featured
Scaling GitHub
holman
463
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Balancing Empowerment & Direction
lara
5
700
Mobile First: as difficult as doing things right
swwweet
225
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Bash Introduction
62gerente
615
210k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
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