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
Two programmers in one
Search
Jano González
June 07, 2014
Programming
1
130
Two programmers in one
My RubyNation 2014 talk
Jano González
June 07, 2014
Tweet
Share
More Decks by Jano González
See All by Jano González
Containerizing your monolith
janogonzalez
0
290
Migrando a Microservicios
janogonzalez
1
270
Extracting services from a monolith
janogonzalez
3
240
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
420
Microservices in Practice
janogonzalez
7
620
The Bipolar Programmer
janogonzalez
4
570
Ruby for your two internal programmers
janogonzalez
4
210
Ruby for Java minds
janogonzalez
4
1k
How Ruby Programmed Me
janogonzalez
11
470
Other Decks in Programming
See All in Programming
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Contemporary Test Cases
maaretp
0
130
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
Realtime API 入門
riofujimon
0
150
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Building Applications with DynamoDB
mza
90
6.1k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Making Projects Easy
brettharned
115
5.9k
Facilitating Awesome Meetings
lara
50
6.1k
A designer walks into a library…
pauljervisheath
203
24k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Building Adaptive Systems
keathley
38
2.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
The Cult of Friendly URLs
andyhume
78
6k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Transcript
TWO PROGRAMMERS IN ONE
@janogonzalez
None
A TALE OF TWO DEVELOPERS
HACKER V/S THINKER
HACKER
GET THINGS DONE
FAST
HACKS
MAINTENANCE NIGHTMARE
NEEDS MORE DUCT TAPE
THINKER
THINKS ABOUT ABSTRACTIONS
THINKS ABOUT MAINTAINABILITY
TOO MANY ABSTRACTIONS
ANALYSIS PARALYSIS
NEEDS MORE LAYERS
MY HISTORY
A TRILOGY OF MOVIES
THE HACKER YEARS
THE HACKER YEARS
THE LEARNING YEARS
THE UML YEARS
THE UML YEARS
THE HACKER WAS GONE
UML, RUP, GoF, XML, ETC.
STOCKHOLM SYNDROME
EVOLUTION?
THE ONE TRUE WAY™
THE PATH?
FEAR
I WAS SO WRONG!
EVERYDAY LIFE IS THE PATH
ENTER RUBY
SMALLTALK IN PERL’S DISGUISE
HAPPY THINKER
THINKER class AccountProtectionProxy def initialize(real_account, owner) @subject = real_account @owner
= owner end ! def method_missing(name, *args) check_access @subject.send(name, *args) end ...
OMG! GoF NEVER WAS SO EASY
HAPPY HACKER
HACKER $1 if str ~= /(foo)+/
ONE LINERS FTW!
HACKER ❤ THINKER
LET’S WORK TOGETHER
HARMONY
HARMONY (1..42).select(&:even?). map { |n| n * 2 }. reduce(&:*)
THE PATH
THE PATH IS NO PATH
THE PATH
WORKING TOGETHER
HACKER
EXPLORE NEW TERRITORY
THINKER
FIND ACCEPTANCE CRITERIA
DEFINE COMPONENTS
BALANCE
DELIVER VALUE V/S DIMINISH TECHNICAL DEBT
CREATIVITY V/S STANDARDIZATION
EXAMPLE
CASE STATEMENT V/S FACTORY + COMMANDS
CASE STATEMENT
EXAMPLE case account_type when :premium then # do stuff when
:standard then # do stuff when :personal then # do stuff end
FACTORY + COMMANDS
EXAMPLE class PremiumAccount def initialize # do stuff end !
def execute(context) # do stuff end end
EXAMPLE class AccountFactory def self.create(type) name = "#{type.capitalize}Account" klass =
Kernel.const_get(name) klass.new end end
EXAMPLE AccountFactory .create(account_type) .execute(context)
THE BEST APPROACH?
IMPLICIT V/S EXPLICIT
CLARITY V/S DRY
CLARITY V/S SRP
NOW V/S FUTURE
MY HUMBLE ADVICE
LEARN ABOUT BEST PRACTICES
DON’T FOLLOW BLINDLY YOUR FUNCTIONAL GURU
DON’T FOLLOW BLINDLY YOUR OO GURU
TESTS + REFACTORING
HOW TO IMPROVE IF YOU ARE A…
HACKER
LEARN ABOUT OOP & PATTERNS
TRY IMMUTABILITY & SEQUENCES
DO SEPARATE RESPONSIBILITIES
THINKER
LEARN ABOUT ONE LINERS
TRY CODE GOLF
DO EVIL STUFF
EVERYONE
READ A LOT OF CODE
WRITE A LOT OF CODE
ONE LAST ADVICE
守破離
SHU 守破離
HA 守破離
RI 守破離
None
ANTIPATTERN: ETERNAL SHU
ANTIPATTERN: START IN HA
CONCLUSIONS
RUBY GIVES YOU FREEDOM
LETS YOU STRIVE FOR BALANCE
AVOID CARGO CULT
GOOD ADVICE V/S LAWS
THERE IS NO TRUE PATH
IF YOU MEET THE BUDDHA IN THE ROAD, KILL HIM!
FOLLOW YOUR ❤
THANK YOU! ❤
IMAGES ! • http://commons.wikimedia.org/wiki/File:Yin_yang.svg • http://upload.wikimedia.org/wikipedia/commons/archive/f/ f4/20050917122925%21Janus-Vatican.JPG