From: James Britt Date: 2006-12-06T07:40:39+09:00 Subject: Re: "more than enough rope" Giles Bowkett wrote: > I just found out that Josh Susser's cancelled presentation at RubyConf > was going to be called "More than enough rope to hang yourself," and > was going to be about how to avoid misusing Ruby's power. I've > definitely written code where my main goal was getting my head around > lambda() or things like that -- now I have code on my hands where I'm > trying to decide, is this beautiful, well-written stuff, or was I just > indulging in a bunch of gratuitous cleverness because I had the > option? > > Obviously this is a judgement call -- but does anyone know good > resources for those questions like, when do I use metaprogramming, > when do I just use more normal techniques? 1. If you're still not thinking of metaprogramming as a normal technique, then perhaps you should not use it. (But that's a catch-22.) 2. If you go back and look at code after a week or two, and have a hard time readily understanding what's going on, then perhaps it's too clever. -- James Britt http://web2.0validator.com - We're the Dot in Web 2.0 http://www.rubyaz.org - Hacking in the Desert http://www.jamesbritt.com - Playing with Better Toys