From: Eleanor McHugh Date: 2009-07-15T00:11:51+09:00 Subject: Re: Twelve rules of Ruby On 14 Jul 2009, at 15:33, Garry Freemyer wrote: > I would think that the twelve rules should be in the form of what > things are, not what they are not. > > It is also implied that the twelve rules would be something to learn > early on .... so it's for those just starting to learn ruby. I think the point is that most people involved with Ruby - even those with considerable experience - would be unlikely to consciously know all twelve (or however many) of these rules. In that sense they're the theoretical basis of expertise as opposed to competence. Of course actual expertise cannot be distilled into an arbitrarily small set of rules because it embodies much more than just theoretical knowledge: you have to pay your dues if you want an instinctual and wide-ranging grasp of any subject, mostly by making large numbers of errors and then reflecting on their significance. A couple of things I'd put on my personal list of Ruby rules: 1. Ruby is duck-typed. The type of an object is not the same as its class and objects can (in a complex program at least some will) change their identity at runtime. The only definitive type information therefore comes from message passing. 2. Learn Ruby/DL or (j)ruby-ffi and leverage your platform for all it's worth. 3. Metaprogramming is a right, not a privilege. Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason