-1

EDIT The original title of the question was Is there a non-derogatory term for 'monkey patching'. As I have learned that the term is actually not derogatory, or is at least not meant to be, I changed the name to free it from mistaken implications.


I would like to describe a piece of software, and try not to use emotionally biased language. However I am not aware of an unbiased alternative to 'monkey patching'.

The term is meant to be derogatory for a reason. Many see it as a useful but problematic technique.

I am aware of an alternative, but it is equally derogatory: 'duck punching'.

I see 'open classes' not as an alternative name, but as a prerequisite for monkey patching.

'Overriding' does not seem right either. I would like to differentiate between monkey patching and the regular overriding as part of inheritance-based polymorphism.

kostja
  • 419
  • 4
  • 13
  • 2
    Did you study the [history of the term](http://en.wikipedia.org/wiki/Monkey_patch) at all? I fail to see how it was *meant to be derogatory*. I should know, I was there when the term came into use. – Martijn Pieters Apr 15 '14 at 09:29
  • But *runtime patching* is the 'technical' term. – Martijn Pieters Apr 15 '14 at 09:31
  • Yes, I did. 'Changing the code sneakily and and possibly incompatibly with other such patches'. The meaning of 'Guerilla', the term used before 'monkey' stands for a small war, or an asymmetric armed conflict. Further, I have seen the term 'monkey patching' used in a derogatory context. This is how I came to my impression. – kostja Apr 15 '14 at 09:38
  • Do you happen to have a reference or a source for 'runtime patching'? It sounds right to me and I think it is the best answer so far :) – kostja Apr 15 '14 at 09:39
  • So how is that term 'disrespectful or critical'? No, I don't have a reference for the term; but that's what it *does*. Patch the code at runtime. – Martijn Pieters Apr 15 '14 at 09:39
  • You also appear to be referring to attributes of the Guerrilla Patch method, which Monkey Patching *replaced*. – Martijn Pieters Apr 15 '14 at 09:43
  • If you really insist: 'Sneakily' implies either insufficient communication or something that should be hidden for a reason. So I view it as a negative term. Same goes for the explicit mention of incompatibility. Same goes for 'guerilla' as insurgency, armed conflict. Monkeys are viewed as less intelligent than humans and are often used for derogatory comparisons. E.g. 'monkeying around' is not something a self-respecting person would often engage in. – kostja Apr 15 '14 at 09:47
  • I am not aware of the Guerilla patch method and it's differences to monkey patching. – kostja Apr 15 '14 at 09:50
  • 2
    Only the last part actually applies to the term *monkey patching*. Which was a *joke*, based on someone mistakenly hearing Gorilla where Guerrilla was meant. I can assure you emphatically that the term was never meant in any other way than to convey gentleness over brute force. If you read the term as derogatory, that's you bringing in your own context. – Martijn Pieters Apr 15 '14 at 09:51
  • 1
    A monkey patch is a Guerrilla patch that takes care not to step on the toes of other patches, see http://plone.org/documentation/glossary/monkeypatch – Martijn Pieters Apr 15 '14 at 09:53
  • Thank you for pointing out the differences and the history lesson :) Could you please repost the relevant parts of your comments as an answer, including the term 'runtime patching', since it sounds right to me. – kostja Apr 15 '14 at 10:00
  • This question appears to be off-topic because it is a "name that thing" question. "Name that thing" are bad questions for the same reasons that "identify this obscure TV show, film or book by its characters or story" are bad questions: you can't Google them, they aren't practical in any way, they don't help anyone else, and allowing them opens the door for the asking of other types of marginal questions. See http://blog.stackoverflow.com/2012/02/lets-play-the-guessing-game – gnat Apr 15 '14 at 12:15
  • As are virtually all terminology questions ;). I am looking for a synonym, which IMO is different from 'name that thing' and 'the guessing game' as I already have the thing and a name for it. Feel free to delete it anyways. Somehow I do not feel welcome here :) – kostja Apr 15 '14 at 12:20

1 Answers1

8

As someone who was actually working at Zope Corporation (then still called Digital Creations) when the term came into being, I can emphatically state it is very much not derogatory.

The term is a tongue-in-cheek reference to runtime patching (or dynamic patching, if you will).

We talked about sneaking in and altering Python code at runtime; the term Guerrilla Patching was used because sometimes dynamic patches could interfere and conflict. Conflict -> Guerrilla warfare, as the conflict was dynamic and depended on the terrain.

Then someone who had misheard the term and thought it was Gorrilla Patching, had come up with a way to wrap a method and re-use it in their dynamic patch. This meant that even if the method had already been patched, you would not undo that work. Because this was a gentler, more caring form of patching, he used the name Monkey Patch instead. The name stuck as it spread through the wider Python community.

If you feel you cannot use terms like that because they have too many other connotations for you, then so be it.

The technical, colorless and humorless version you are looking for is dynamic runtime patching.

Martijn Pieters
  • 14,499
  • 10
  • 57
  • 58
  • I have found a source of my misconception about 'monkey patching' being derogatory from the start: http://devblog.avdi.org/2008/02/23/why-monkeypatching-is-destroying-ruby/. At least I am not alone with it. – kostja Apr 15 '14 at 16:00
  • All references I can find come from the Ruby community, that blog post being the oldest reference. If that is the source of the idea that monkey patching is derogatory, then he really misunderstood something. And in that context, it was the *patching itself* that was deemed derogatory; not the term. – Martijn Pieters Apr 15 '14 at 16:06
  • Sure, it's just too easy to misinterpret names. That's why I prefer them 'colorless and humorless'. Makes them context-free. – kostja Apr 15 '14 at 16:15