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
Less Abstract! Surprising effects of expressing OOP in pictures
Search
Ivan Nemytchenko
November 18, 2019
Technology
1
400
Less Abstract! Surprising effects of expressing OOP in pictures
Ivan Nemytchenko
November 18, 2019
Tweet
Share
More Decks by Ivan Nemytchenko
See All by Ivan Nemytchenko
The Curse of Service Object
inem
0
60
Modern Make for modern (Rails) programmers
inem
0
55
Откуда берется сложность в Rails-проектах и куда бы её деть?
inem
0
220
Rails без боли и оверинжиниринга
inem
0
290
Painless Rails: наводим порядок в контроллерах
inem
0
240
Pure functions and side effects
inem
0
31
Solving architectural problems with OOP in pictures
inem
1
5.3k
Embrace multi-model thinking!
inem
1
91
Embrace multi-model thinking
inem
0
130
Other Decks in Technology
See All in Technology
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
3
840
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
24
5.3k
マルチアカウント環境への発見的統制の導入
ch1aki
1
1.3k
Janus
bkuhlmann
1
490
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
150
Google Cloud の AI を支える裏側のインフラを垣間見る!
maroon1st
0
230
LLM とプロンプトエンジニアリング/チューターをビルドする / LLM and Prompt Engineering and Building Tutors
ks91
PRO
0
220
o11y入門_外形監視を利用したWebアプリケーションへの最適なモニタリング_TechBrew
k5k
3
100
0→1開発における技術選定において一番大切なこと
bicstone
1
330
Discord とビルダー&チャットボットの使い方 / How to use Discord and Builder & Chatbots
ks91
PRO
0
130
Tableau事例紹介 / Tableau Case Study of Eureka
kazuya_araki_tokyo
1
170
Tebiki株式会社 エンジニア採用資料
tebiki
0
4.1k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
354
18k
What's new in Ruby 2.0
geeforr
337
31k
Web Components: a chance to create the future
zenorocha
305
41k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
A Tale of Four Properties
chriscoyier
150
22k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
YesSQL, Process and Tooling at Scale
rocio
163
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
2k
Fashionably flexible responsive web design (full day workshop)
malarkey
397
65k
Clear Off the Table
cherdarchuk
83
310k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
119
39k
Transcript
Less Abstract! Effects of expressing OOP in pictures Ivan Nemytchenko
@inemation inem.at
Who is this guy? • Educator • Freelance consultant •
Complexity fighter • GitLab fan • Serbian Siberian • inem.at • @inemation
Serbian Siberian ??
I am Russian
None
None
Omsk is in Siberia
I live in Serbia
Serbia != Siberia
Serbia != Siberia != Syria
What’s the problem? Abstractions on top of abstractions on top
of other abstractions!
What’s the problem? Very hard to see the big picture
in real projects
What’s the problem? Very hard to see the big picture
in real projects CRC Cards
What’s the problem? Very hard to see the big picture
in real projects UML :(
What to expect here? 1. It is gonna be fun!
2. You’ll become better at: • Learning, teaching, explaining complex concepts • Visualizing big picture • Finding architecture flaws •Tracking dynamics
OOP in pictures Foundation Advanced concepts Using in practice
How to illustrate Dependency Injection * with one picture **
so that everyone understands ?
“Smart kettle” task Boil water correctly and safely! 1. No
code 2. Just classes 3. And their methods
Artistic soldiers method
Kettle components (objects) small dudes == objects
Kettle components (objects) small dudes == objects
Kettle components (objects) small dudes == objects
Kettle components (objects) small dudes == objects
Objects with methods! arms == methods
A method number of fingers == number of arguments
Instance variables Stored inside the brain
Instance variables Can be reused later
But how other stuff is going to look like?…
Returning results door on the body
Private methods “internal arms”
Exception puking
Basic anti-patterns
Too many arguments
Too many methods
Too long methods
Too many instance variables
Too much conditional logic in methods Swallen arms
Too much of everything!!!
OOP in pictures Foundation Advanced concepts Using in practice
Polymorphism same number of hands with same number of fingers
None
None
Classes A spawning platforms
Classes A spawning platform
same topology Object & classes have the
Topology Cups and donuts share the same topology
same topology Object & classes have the
Execution flow
Execution flow
Execution flow
Execution flow == Rube Goldberg machine
Execution flow
Execution flow
Execution flow
Dependencies have to remember about classes to use them
Dependencies
Side effects
Dependency Injection Instead of remembering thing we pass them as
arguments
None
OOP in pictures Foundation Advanced concepts Using in practice
Visual language!
None
None
None
None
None
None
None
None
None
None
None
Big picture
Dynamic anti-patterns
Dynamic anti-patterns
Dynamic anti-patterns
Dynamic anti-patterns
Dynamic anti-patterns
None
None
None
None
None
None
None
OOP in pictures Foundation Advanced concepts Using in practice
None
– George Box “All models are wrong but some are
useful.”
• Big picture • Modelling • Documenting • Sharing knowledge
• Explaining What can you use it for
Ivan Nemytchenko, inem.at, @inemation RubyConf 2019 Questions?