Preferred monkeypatching technique

Hi –

On Sun, 16 Jul 2006, why the lucky stiff wrote:

rigid, upright (sticky and pale) homosapien fails.

Plus, I like the irony of Rubyists monkeypatching the word monkeypatching:
gutting it, redefining it, and dangerously executing it in public.

But why dance, in the first place, to the tune of whoever says
whatever about Ruby and/or other scripting languages? No nuance of
“monkeypatching” resonates with anything in or about Ruby – so why
act under an imperative to enter into a relationship with it?

I know, I know – my vision of Ruby’s design as unified and not split
into programming/metaprogramming, or good/3vi1, or [whatever the
opposite of monkeypatching is]/monkeypatching, is hopelessly Utopian.
I plead guilty.

(Can someone please follow up with a witticism about the Scopes
(“monkey”) trial? :slight_smile:

David

On Sat, Jul 15, 2006 at 08:41:17AM +0900, Hal F. wrote:

Now people are applying it to Ruby. That bothers me
a little.

The term “hacking” used to have a negative slant on it, too. It’s not
the term,
though, it’s the slant that matters. The term can’t be taken back, you
know?
So what exactly does it mean?

Well, because it’s derogatory in origin, it’s also ambiguous. It’s got
a nested
image of primates performing informal needlework. Conversely, there’s
an image
of crafty and agile treeswingers going up into the lofts, the places
where the
rigid, upright (sticky and pale) homosapien fails.

Plus, I like the irony of Rubyists monkeypatching the word
monkeypatching:
gutting it, redefining it, and dangerously executing it in public.

_why

Hal F. wrote:

late to squash it?
Let’s hope not.

I believe it comes from the Python community. Python (I think) allows
for something similar to Ruby’s ability to modify any and all classes,
but my (limited) understanding is that there are enough differences
between the two that what is reasonable and proper in Ruby is not quite
so elegant or appropriate in Python. The term may be correct for
Python, but in Ruby this is just a normal and correct way to use the
language.

The use of the term indicates unease with, and lack of understanding of,
Ruby on the part of the speaker, rather than describing anything about
Ruby.


James B.

“In physics the truth is rarely perfectly clear, and that is certainly
universally the case in human affairs. Hence, what is not surrounded
by
uncertainty cannot be the truth.”

  • R. Feynman

On Jul 18, 2006, at 10:36 AM, James B. wrote:

Let’s hope not.
The use of the term indicates unease with, and lack of
understanding of, Ruby on the part of the speaker, rather than
describing anything about Ruby.


James B.

Aparenhtly the term originated as Guerilla patch. As in Guerilla
warfare :wink: And it was misunderstood and ended up being called monkey
patch. Interesting read here: Monkey patch - Wikipedia

-Ezra

James B. wrote:

being used in the Ruby community. I wonder if it’s too
language.

The use of the term indicates unease with, and lack of understanding of,
Ruby on the part of the speaker, rather than describing anything about Ruby.

I don’t think it’s quite that bad and tend to agree with _why. If
anything perhaps the original tokenizers used it to express an
uneasiness with actually doing it, but it the right hands and using the
right language (Ruby) “monkeypatching” can also be be good thing. In
other words, it’s really just slang for something much more techincal
–essentially, AOP and Metaprogramming. Simliar to duck typing which is
more or less slang for Type Polymorphism.

T.

James B. wrote:

being used in the Ruby community. I wonder if it’s too
the language.

The use of the term indicates unease with, and lack of understanding
of, Ruby on the part of the speaker, rather than describing anything
about Ruby.

Not necessarily. For me, the term “monkeypatch” establishes a
distinction between a patch that adds functionality in a totally benign
way, and a patch that changes the behavior of existing functionality
using (meta)programming techniques. Because a monkeypatch, if not
carefully considered, can put the main codebase into a state that causes
other monkeypatches to be buggy (or worse), it is useful to be able to
put a finger on the technique and teach the best practices that go along
with it. Perhaps the term “monkeypatch” has bad connotations for some,
but it seems to be undergoing a reclamation (for instance, the wikipedia
entry does not have a negative connotation). For Pythonistas,
monkeypatching may be ill advised; for Rubyists it is normal, but can
cause such side effects as to be quite dangerous. By naming it, we can
better control it.

Tom

Hi –

On Wed, 19 Jul 2006, Tom W. wrote:

Actually it was only last week that I first saw this term
this is just a normal and correct way to use the language.
main codebase into a state that causes other monkeypatches to be buggy (or
worse), it is useful to be able to put a finger on the technique and teach
the best practices that go along with it. Perhaps the term “monkeypatch” has
bad connotations for some, but it seems to be undergoing a reclamation (for
instance, the wikipedia entry does not have a negative connotation). For
Pythonistas, monkeypatching may be ill advised; for Rubyists it is normal,
but can cause such side effects as to be quite dangerous. By naming it, we
can better control it.

How about we call the whole thing “programming”, and at the same time
do whatever we can to bring it about that people do this “programming”
thing as intelligently and safely as possible? :slight_smile:

David

[email protected] wrote:

Hi –

On Sun, 16 Jul 2006, why the lucky stiff wrote:

The term “hacking” used to have a negative slant on it, too. It’s not
the term,
though, it’s the slant that matters. The term can’t be taken back,
you know?
So what exactly does it mean?

Being called a hacker was a badge of honor, an still is among certain
groups, but the word has been corrupted for general use.

I read that Wikipedia article on the origins of the term monkey
patching; I don’t think anyone ever saw it as something to be proud of.

Well, because it’s derogatory in origin, it’s also ambiguous. It’s
got a nested
image of primates performing informal needlework. Conversely, there’s
an image
of crafty and agile treeswingers going up into the lofts, the places
where the
rigid, upright (sticky and pale) homosapien fails.

Or not.

Plus, I like the irony of Rubyists monkeypatching the word
monkeypatching:
gutting it, redefining it, and dangerously executing it in public.

A public execution of the term would be a Good Thing.

But why dance, in the first place, to the tune of whoever says
whatever about Ruby and/or other scripting languages? No nuance of
“monkeypatching” resonates with anything in or about Ruby – so why
act under an imperative to enter into a relationship with it?

Agreed. People will use whatever terms they think appropriate in the
context of their culture, experience, and expectations. That’s not a
reason to encourage all behavior or just assume all expression deserve
equal footing.

I know, I know – my vision of Ruby’s design as unified and not split
into programming/metaprogramming, or good/3vi1, or [whatever the
opposite of monkeypatching is]/monkeypatching, is hopelessly Utopian.
I plead guilty.

(Can someone please follow up with a witticism about the Scopes
(“monkey”) trial? :slight_smile:

Well, monkey patching may be an appropriate term for Python, but given
that Ruby is more evolved, we need to call the technique “evolutionary
enhancement”.


James B.

“In physics the truth is rarely perfectly clear, and that is certainly
universally the case in human affairs. Hence, what is not surrounded
by
uncertainty cannot be the truth.”

  • R. Feynman

Ezra Z. wrote:

Aparenhtly the term originated as Guerilla patch. As in Guerilla
warfare :wink: And it was misunderstood and ended up being called monkey
patch. Interesting read here: Monkey patch - Wikipedia

Ah, thank you. Quite informative.


James B.

“Simplicity of the language is not what matters, but
simplicity of use.”

  • Richard A. O’Keefe in squeak-dev mailing list

James A. wrote:

/james heads of to code using a Bauhaus loop, followed by a
double-reversed pointer melange. Nice flourish at the end there.

Well, I guess we should prepare ourselves to have a lot of threads here
entitled “Programming question”.

Tom

On Wed, Jul 19, 2006 at 06:07:19AM +0900, James B. wrote:

Well, monkey patching may be an appropriate term for Python, but given
that Ruby is more evolved, we need to call the technique “evolutionary
enhancement”.

Or, if you want to surround it with an even more positive aura, maybe
even
“intelligent design” ?

On 7/18/06, [email protected] [email protected] wrote:

How about we call the whole thing “programming”, and at the same time
do whatever we can to bring it about that people do this “programming”
thing as intelligently and safely as possible? :slight_smile:

I say go to the opposite end of the spectrum - let every subtly
different programming technique have a strange and ambiguous name! It
could be just like figure-skating. I mean, why would anyone want to be
just ‘jumping’ when they could be doing a ‘Triple Salchow’ followed by
a ‘Left-reversed Double Axel’!

/james heads of to code using a Bauhaus loop, followed by a
double-reversed pointer melange. Nice flourish at the end there.

Hi –

On Wed, 19 Jul 2006, Mauricio F. wrote:

(“monkey”) trial? :slight_smile:

Well, monkey patching may be an appropriate term for Python, but given
that Ruby is more evolved, we need to call the technique “evolutionary
enhancement”.

Or, if you want to surround it with an even more positive aura, maybe even
“intelligent design” ?

Awww, I was hoping someone would pick up on the “scopes” part :slight_smile:

David

[email protected] wrote:

that Ruby is more evolved, we need to call the technique “evolutionary
enhancement”.

Or, if you want to surround it with an even more positive aura, maybe
even
“intelligent design” ?

Awww, I was hoping someone would pick up on the “scopes” part :slight_smile:

I try not to shoot fish in a barrel… not till they evolve
rudimentary legs, anyway.

Hal

On 7/19/06, Hal F. [email protected] wrote:

Well, monkey patching may be an appropriate term for Python, but given

I try not to shoot fish in a barrel… not till they evolve
rudimentary legs, anyway.

Hal

If it walks like a fish…?

Sean :wink:

Sean O’Halpin wrote:

If it walks like a fish…?

cut SeaDuck < Duck
join :flop => :waddle
def flop
“flop… flop… flop”
end
end

It does now :wink:

T.