Explore metaprogramming in Ruby and its potential pitfalls in this 24-minute conference talk from Derbycon 2016. Delve into the fundamentals of Ruby, its strengths, and the concept of metaprogramming. Examine Rails Dynamic Finders and the "Three Deadly Metaprogramming Senses." Learn through practical examples, including the use of eval and method_missing. Discover common mistakes and their solutions, with a focus on ActiveRecord implementation. Gain insights into effective Ruby programming techniques and best practices for metaprogramming.
Overview
Syllabus
Introduction
What is Ruby
Whats best in Ruby
What is metaprogramming
Rails Dynamic Finders
Three Deadly Metaprogramming Senses
Why would we use this
Example
The Bad
The Fix
Constanteyes
EmployeeID
Payment Method
eval
Why use eval
Whats the fix
Method missing
ActiveRecord
I love Ruby
Questions