Hi –
On Sat, 8 Mar 2008, Phlip wrote:
You are answering the question “how can I use tests to help bad
designs live longer?”
No, neither asking nor answering that question
I just mean that I
don’t think that “Can you write a ‘reasonable’ test suite for it?” is
the beginning and end of all examination of whether a given practice
is a good one. Among other things, test suites are constrained by test
tools, the current state of which I admire greatly but which are
themselves subject to change and modification. I think one has to take
all of this into account. That’s all I mean.
That’s a valid question and answer, but it’s non-responsive to my
point.
The goal, if you must Monkey Patch, is to slightly increase the odds
of a clear diagnostic error message when the real library upgrades out
from under the patch.
Sure, but that’s true of all your code. I don’t like to stigmatize
code that does something to the framework itself, which, like all
other code, can be good or bad, well-maintained or not, etc. The
adoption of the term “monkey patch” over the last couple of years is,
I think, unfortunate, since it does tend to stigmatize practices that
in many cases are perfectly reasonable and rational.
In short, I don’t literally append “… but you have to do it well and
make sure it works” to everything I say about Ruby, Rails, or software
in general, but I think it’s kind of understood to be implied 
David
–
Phlip
http://assert2.rubyforge.org/
–
Upcoming Rails training from David A. Black and Ruby Power and Light:
ADVANCING WITH RAILS, April 14-17 2008, New York City
CORE RAILS, June 24-27 2008, London (Skills Matter)
See http://www.rubypal.com for details. Berlin dates coming soon!