Category monkey-patching

Unobstrusive metaprogramming, by Sean O’Halpin

I watched Sean O’Halpin 30-minute Ruby Manor presentation (Nov 2008) called “Unobstrusive metaprogramming”. He gave a few tricks about monkeypatching. Here are my highlights. Problems with monkey patching “the Rails way” namespace pollution documentation pollution cognitive pollution Case in point: >> [Kernel, Object, Class, Module].inject({}){|hash, klass|¬†hash[klass] = klass.methods.size; hash} => {Object=>98, Kernel=>159, Module=>99, Class=>99} >> […]

RubyConf ’08 keynote, by Dave Thomas

I watched the RubyConf ’08 keynote from Dave Thomas. Starting with his premise that you must work with tools that you love, Dave Thomas wants to improve the Ruby language he’s been using and loving for 10 years. His presentation details potential Ruby improvements, in terms of forks of Ruby. Here are my highlights of […]

The false debate on monkey-patching

Recently we saw the resurrection of a fashionable question: to monkey-patch or not to monkey-patch. In other words, is it a good thing to extend or modify the runtime code of dynamic languages? Jeff Atwood and Reginald Braithwaite expressed radically opposite views, (seemingly) casting the debate as a ring fight. I say “seemingly” because that […]