Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RubyConf 2019 - Investigative Metaprogramming by Betsy Haibel When was the last time you got an un-Googleable error? The kind that takes you and your lead three days to debug, with weird generic stacktraces deep in framework internals? What if you could approach that bug with something other than trial, error, and tears? Metaprogramming can come to the rescue -- just not the kind you do in production. In this talk, you'll learn strategies for investigative metaprogramming. You'll learn how to insert debugging hooks anywhere and instrument anything. You'll even learn how to turn that information into actionable bugfixes. #confreaks #rubyconf2019
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video from RubyConf 2019 titled "Investigative Metaprogramming" by Betsy Haibel explores strategies for using metaprogramming as a debugging tool in Ruby, particularly when dealing with elusive errors. Haibel opens with a relatable anecdote about a challenging debugging experience while upgrading a Rails application, highlighting how traditional search methods often fall short when facing unique errors that are not well-documented online. Key points discussed include: - **Definition of Metaprogramming**: Haibel delves into the definitions of metaprogramming, contrasting academic definitions with practical, everyday usage in Ruby. She emphasizes how metaprogramming in Ruby differs significantly from other programming languages, primarily due to Ruby's dynamic nature. - **Investigation and Debugging Techniques**: Haibel outlines various techniques for inserting debugging hooks through metaprogramming, which include: - Using reflection to understand the structure of objects. - Recording behavior through dynamic language features, such as the TracePoint API. - Reviewing recorded telemetry to trace back errors. - **Example of a Debugging Process**: Haibel details the process her team undertook to identify why a hash was freezing unexpectedly during a Rails upgrade. By using metaprogramming to dynamically insert debugging logic, they were able to pinpoint where the issue occurred, drastically reducing their debugging time from days to just hours. - **Importance of Contextual Understanding**: The talk stresses that the goal of debugging with metaprogramming is not merely to understand every aspect of the program but to effectively resolve issues and fix bugs by observing behaviors and responses in real-time. Ultimately, Haibel concludes that using metaprogramming enables developers to create their own tools to inspect and understand code better, leading to a more empowered programming experience in Ruby. This approach promotes flexibility and a deeper relationship with a language that actively involves the developer in the debugging process, encouraging a shift away from rigid frameworks and embracing Ruby's dynamic attributes. Throughout her presentation, Haibel seeks to inspire developers to leverage metaprogramming for investigative purposes, transforming frustrating debugging encounters into moments of efficient learning and problem-solving.
Suggest modifications
Cancel