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
250
Migrando a Microservicios
janogonzalez
1
260
Extracting services from a monolith
janogonzalez
3
240
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
410
Microservices in Practice
janogonzalez
7
620
The Bipolar Programmer
janogonzalez
4
560
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
私のEbitengineの第一歩
qt_luigi
0
420
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
120
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
110
全力の跳躍を捉える計測アプリを作る
ogijun2018
0
1.1k
What we keep in mind when migrating from Serverless Framework to AWS CDK and AWS SAM
kasacchiful
1
130
dotfiles について話したい #湘なんか
stefafafan
2
290
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
1k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
1
2k
マルチモジュールにおけるテスト最適化
fxwx23
0
170
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
620
暴走のウホーレン 〜想いってのはvimrcにしないと伝わらないんだぜ〜 / iosdc_japan_2024
uhooi
1
240
労務ドメインを快適に開発する方法 / How to Comfortably Develop in the Labor Domain
yuki21
1
250
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
52k
Fantastic passwords and where to find them - at NoRuKo
philnash
47
2.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Docker and Python
trallard
39
3k
A Tale of Four Properties
chriscoyier
155
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
Optimising Largest Contentful Paint
csswizardry
28
2.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
46
48k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
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