Breaking nil to fix bugs: experimental approach
December 13, 2024
28 min
Free
Description
In Ruby, encountering `nil` is inevitable and often leads to frustrating bugs and NoMethodError exceptions. While `nil` is a crucial part of Ruby's design, it can be the source of elusive and hard-to-diagnose issues in your codebase. This talk explores an unconventional and experimental approach to debugging by "breaking" the nil object. How will we debug bugs? - extending the NilClass - customizing method_missing - creating methods dynamically with the previous options This is probably the wrong solution. Don't try this in production. However, we'll find bugs and it will be fun!