Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
America's Next Top Engineer
Aaron Patterson
June 07, 2013
16
1.9k
America's Next Top Engineer
Presentation popularity at RedDot RubyConf
Aaron Patterson
June 07, 2013
Tweet
Share
More Decks by Aaron Patterson
See All by Aaron Patterson
Don't @ Me! Faster Instance Variables with Object Shapes
tenderlove
0
91
RailsConf 2022 Keynote
tenderlove
1
220
Some Assembly Required
tenderlove
0
320
HexDevs 2021
tenderlove
0
140
Compacting GC for MRI
tenderlove
59
4.1k
But At What Cost?
tenderlove
8
13k
Compacting GC in MRI v2
tenderlove
1
410
The View is Clear From Here
tenderlove
2
390
Reducing Memory Usage in Ruby
tenderlove
16
2.8k
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
38
3.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
338
18k
How to Ace a Technical Interview
jacobian
270
21k
Designing on Purpose - Digital PM Summit 2013
jponch
108
5.9k
Robots, Beer and Maslow
schacon
154
7.3k
Web development in the modern age
philhawksworth
197
9.6k
Learning to Love Humans: Emotional Interface Design
aarron
263
38k
Three Pipe Problems
jasonvnalue
89
8.9k
How GitHub Uses GitHub to Build GitHub
holman
465
280k
Why You Should Never Use an ORM
jnunemaker
PRO
49
7.9k
We Have a Design System, Now What?
morganepeng
37
5.9k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.1k
Transcript
Your Guide to Presentation Popularity!
Your Guide to Presentation Notoriety!
None
•Provocative Title •Risqué Photos •Ruby Code?
Provocative Title:
Use Ruby 1.9 like an Engineer
Use Ruby 1.9 like a SEXY Engineer
Risqué Photos
America's Next Top Model
America's Next Top Engineer
Confident
Elegant
Sultry
Sexy
Thoughtful
Fierce
Playful
Powerful
Provocative
Ruby Code?
protected def method_missing(method, *args, &block) if Array.method_defined?(method) to_a.send(method, *args, &block)
elsif @klass.scopes[method] merge(@klass.send(method, *args, &block)) elsif @klass.respond_to?(method) scoping { @klass.send(method, *args, &block) } elsif arel.respond_to?(method) arel.send(method, *args, &block) elsif match = DynamicFinderMatch.match(method) attributes = match.attribute_names super unless @klass.send(:all_attributes_exists?, attributes) if match.finder? find_by_attributes(match, attributes, *args) elsif match.instantiator? find_or_instantiator_by_attributes(match, attributes, *args, &block) end else super end end private def references_eager_loaded_tables? # always convert table names to downcase as in Oracle quoted table names are in uppercase joined_tables = (tables_in_string(arel.joins(arel)) + [table.name, table.table_alias]).compact.map{ |t| t.downcase }.uniq (tables_in_string(to_sql) - joined_tables).any? end
TL;DR