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
Ruby for your two internal programmers
Search
Jano González
October 03, 2013
Programming
4
220
Ruby for your two internal programmers
My Arrrrcamp 2013 talk
Jano González
October 03, 2013
Tweet
Share
More Decks by Jano González
See All by Jano González
Containerizing your monolith
janogonzalez
0
310
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
430
Microservices in Practice
janogonzalez
7
630
Two programmers in one
janogonzalez
1
140
The Bipolar Programmer
janogonzalez
4
580
Ruby for Java minds
janogonzalez
4
1k
How Ruby Programmed Me
janogonzalez
11
480
Other Decks in Programming
See All in Programming
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
210
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
410
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
400
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
150
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
2.3k
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
ASP.NET Core の OpenAPIサポート
h455h1
0
130
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
570
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
1.9k
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1.1k
Featured
See All Featured
Thoughts on Productivity
jonyablonski
68
4.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
We Have a Design System, Now What?
morganepeng
51
7.3k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
19
2.4k
Docker and Python
trallard
43
3.2k
Facilitating Awesome Meetings
lara
51
6.2k
Designing Experiences People Love
moore
139
23k
Faster Mobile Websites
deanohume
305
30k
Transcript
None
None
HELLO GHENT!
B - AT = G
PIRATES
RUBY FOR BIPOLAR PROGRAMMERS
$ whoami
@janogonzalez
@hop_in
PIRATES IN CHILE
XVI CENTURY
SIR FRANCIS DRAKE
HERO OR PIRATE?
AKA EL DRAKE
6.5M$ REWARD
SIR FRANCIS DRAKE
SIR FRANCIS DRAKE
HIDDEN TREASURES
ISLA MOCHA
MOCHA DICK
XXI CENTURY
NEW PIRATES
NEW PIRATES
NEW PIRATES
☑ PIRATES ☐ RUBY
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(&:*)
EXPRESS YOURSELF
EXPRESS YOURSELF File.open('my.txt').each do |line| puts line if line =~
/jano/ end
THE HIDDEN TRUTH
HIDDEN TRUTH $ irb > puts 'Ahoy World!' # Ahoy
World! # => nil
HIDDEN TRUTH > self.class # => Object
HIDDEN TRUTH > Object.included_modules # => [Kernel]
HIDDEN TRUTH > Kernel.methods.include? :puts # => true
THE MOST HIDDEN TRUTH
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
EXAMPLE case account_type when :premium then # do stuff when
:standard then # do stuff when :personal then # do stuff end
EXAMPLE class AccountAccount def initialize # do stuff end def
execute(context) # do stuff end end
EXAMPLE class PersonalFactory def self.create(type) name = "#{type.capitalize} Account" klass
= Kernel.const_get(name) klass.new end end
EXAMPLE AccountFactory .create(account_type) .execute(context)
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
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
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://en.wikipedia.org/wiki/File: 1590_or_later_Marcus_Gheeraerts,_Sir_Francis_Drake_Buckland_Abbey, _Devon.jpg • http://en.wikipedia.org/wiki/File:New_Albion._English_galleon_ %22Golden_Hinde %22_by_Sir_Francis_Drake._Oil_on_canvas._60_x_90_cm..jpg •
http://en.wikipedia.org/wiki/File:DRAKE_1577-1580.png • http://www.vivimoslanoticia.cl/wp-content/uploads/2013/09/Pel %C3%ADculas-piratas.jpg • http://radiopolar.com/images/noticias/20101127174025.jpg • http://upload.wikimedia.org/wikipedia/commons/a/aa/Isla_Mocha_1.jpg • http://www.todayifoundout.com/wp-content/uploads/2011/12/Moby- Dick-3.jpg