Wicked Bad Ruby
by
Matt Aimonetti
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Matt Aimonetti Boston 2013 W I C K E D BAD RUBY
Slide 2
Slide 2 text
@mattetti http://matt.aimonetti.net Matt Aimonetti
Slide 3
Slide 3 text
@mattetti http://matt.aimonetti.net Matt Aimonetti Steve Martocci
Slide 4
Slide 4 text
@mattetti http://matt.aimonetti.net Matt Aimonetti Steve Martocci
Slide 5
Slide 5 text
of Ruby programming “17,520 hours”
Slide 6
Slide 6 text
No content
Slide 7
Slide 7 text
No content
Slide 8
Slide 8 text
Avdi Grimm “the messiest, nastiest big-ball-of-mud code I have seen in my entire career has been in Rails projects.”
Slide 9
Slide 9 text
Matt Van Horn “I once saw a Rails controller over 3KLOC long with 500 line create and update methods that were 85% cut & pasted from each other.”
Slide 10
Slide 10 text
there isn’t such thing as bad code
Slide 11
Slide 11 text
println "Hello World"
Slide 12
Slide 12 text
name “Code is neither good or evil, but only a place for good and evil” Caesar Marcus “coder” Aurelius
Slide 13
Slide 13 text
good / bien (fr) / bueno (es) “having desirable quality”
Slide 14
Slide 14 text
bad / mauvais (fr) / malo (es) “undesirable”
Slide 15
Slide 15 text
Not scientific terms • Religion • Ethics • Philosophy
Slide 16
Slide 16 text
Spice Girls “So tell me what you want, what you really, really want”
Slide 17
Slide 17 text
1. define expected outcome
Slide 18
Slide 18 text
2. evaluate solutions
Slide 19
Slide 19 text
3. implement
Slide 20
Slide 20 text
4. re-evaluate
Slide 21
Slide 21 text
Me “you aren’t paid to write ‘good’ code, you’re paid to deliver great products”
Slide 22
Slide 22 text
don’t write code
Slide 23
Slide 23 text
materialize ideas
Slide 24
Slide 24 text
understand what you are building business objectives timeline proposition value players risk factors ...
Slide 25
Slide 25 text
emo code
Slide 26
Slide 26 text
delivered the expected outcome
Slide 27
Slide 27 text
but then...
Slide 28
Slide 28 text
hard to understand
Slide 29
Slide 29 text
hard to maintain
Slide 30
Slide 30 text
hard to scale
Slide 31
Slide 31 text
slow
Slide 32
Slide 32 text
Every other Hacker News comment “You’re doing it wrong”
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
Sandi Metz “Classes can be no longer than one hundred lines of code”
Slide 35
Slide 35 text
Sandi Metz “Methods can be no longer than five lines of code”
Slide 36
Slide 36 text
Some StackOverflow Rubyist “You can’t write good code unless you use TDD”
Slide 37
Slide 37 text
No content
Slide 38
Slide 38 text
• fast iterations • level of confidence • robustness • syntax beauty • abstraction level • simplicity • known patterns • performance • limited dependencies • test first • learning curve
Slide 39
Slide 39 text
Amy Hoy “If you try to dictate to other people what their values should be, you’re an asshole”
Slide 40
Slide 40 text
communicate!
Slide 41
Slide 41 text
focus on the outcome while learning & improving
Slide 42
Slide 42 text
@mattetti
Slide 43
Slide 43 text
@mattetti @sandimetz @kytrinyx