From: "s.ross" Date: 2008-02-29T07:01:58+09:00 Subject: Re: Proposed Solutions (Monkeypatching) On Feb 28, 2008, at 1:43 PM, Trans wrote: > So like it or not, people > learning Ruby via Rails follow those patterns I'm going to take SWAG and say that people learning Ruby on Rails don't read the source code. This is based on my reading of the mailing list. Because 37s has taken a given approach does not mean that every Rails adopter will feel confident enough in their ruby_fu to do the same. I'll go one step further: I don't think most Rails programmers read the code in the plugins they install. I don't think Rails is introducing problems or misusing features in the language. Many, if not most Rails programmers accept the magic as just that: Magic. They don't feel like magicians, just people looking to get their jobs done in a more pleasant way. When you consider all the angles of this, don't neglect testing. Some very useful test methodology relies on extending classes, and I think it strengthens Ruby as a development platform. Finally, in the spectrum of hard-to-track-down bugs, where 1 is a syntax error and 100 is a concurrency bug, I would think problems introduced as a result of extending a base class fall somewhere near 25. My experience is that binary searching the unexpected behavior with puts statements and then probing with ruby-debug is normally enough.