Talk:Monkey patch

Latest comment: 2 years ago by 65.36.66.178 in topic "Method swizzling"

Objective-C edit

How does this compare to Objective-C categories and posing?

__init__.py edit

I just removed the statement:

In Python a file named __init__.py must exist for a directory to become a Python package. Normally code is not placed in this file, and so provides the best place to hide code when waging war with guerilla patches.

For one, there are MANY examples in the python standard library where the __init.py__ file contains lots of code (e.g. the 'email', 'logging', 'encoding' packages, among many other). For two, monkey-patching can happen on any kind of object, regardless of whether it is part of a package (the only place __init__.py is relevant at all). The determination of *best place* is entirely subjective. And finally, if you're modifying the __init__.py, you're modifiying the package itself, which by definition is not monkey patching. William McVey (talk) 23:01, 30 January 2008 (UTC)Reply

self-modifying code edit

Would it be relevant to have some kind of reference to self modifying code in this article. At least in the "See also" section? --Jarl (talk) 12:33, 1 May 2009 (UTC)Reply

"Monkey Patch" & "Hot fix" not mutually exclusive edit

Article says "Other forms of modifying a class at runtime have different names, based on their different intents. For example, in Zope and Plone, security patches are often delivered using dynamic class modification, but they are called hot fixes.[citation needed]"

It seems to me that "Monkey Patch" and "hot fix" are not mutually exclusive. I believe it would be correct to say "we had to send out a hot fix [meaning the change was delivered on the fly, with a minimal (possibly zero) amount of down time] this morning. Bob figured out a way to do it as a Monkey Patch [meaning ...well... monkey patch! ;)]" Am I wrong about that? Oliepedia (talk) 14:56, 23 July 2010 (UTC)Reply

I was also immediately skeptical of this sentence for the same reason. The way I see it a monkey patch may indeed be delivered in a hotfix, but the concepts themselves don't have that much to do with each other. Okj579 (talk) 14:24, 27 June 2014 (UTC)Reply

Cutting down etymology edit

I'm cutting down the etymology explanation, particularly the part about "doing battle", because (a) it's tangential to the actual etymology, and (b) the etymology isn't well attested. I googled around for any other source to support that etymology, and all I could find were references to that same Shane Hathaway claim. There's no relevant information to be found searching for "guerrilla patch" or "gorilla patch" besides said direct references. I would expect, if this were a true etymology, that there would be some evidence of the earlier terms being used in context (maybe on a Zope mailing list?). —Preceding unsigned comment added by Merc64 (talkcontribs) 18:55, 29 September 2010 (UTC)Reply

http://www.jimmycuadra.com/posts/guerillapatch-an-interface-for-monkey-patching-objects-for-ruby-1-9-and-2-0 uses the phrase "guerilla patch", if anyone's interested. User:GKFXtalk 16:57, 9 December 2013 (UTC)Reply
I wondered if the term was related to 'code monkey' Gomez2002 (talk) 13:23, 16 July 2014 (UTC)Reply


Another possible etymology edit

The entry for monkey in Chambers 20th Century Dictionary (1983 Edition) includes an intransitive verb meaning "to meddle with anything, to fool". This would seem to be a less contrived etymology. It is similar to the term "greasemonkey" for a mechanic (someone who meddles with cars and consequently gets covered in grease).TristramBrelstaff (talk) 12:20, 18 November 2011 (UTC)Reply

Agree, it is definitely talked about in this sense in Ruby. You re-open the class and "monkey around with it" 24.22.48.80 (talk) 17:40, 26 March 2012 (UTC)Reply

YAPE (Yet another possible etymology) edit

Could this be related to Greasemonkey the browser patching technology? That's been around long enough.

External links modified edit

Hello fellow Wikipedians,

I have just modified one external link on Monkey patch. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit User:Cyberpower678/FaQs#InternetArchiveBot*this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 18 January 2022).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—cyberbot IITalk to my owner:Online 07:16, 7 June 2016 (UTC)Reply

Flagged issues edit

  • does the 'original research' flag still apply?
    • there are references at the bottom
    • I personally use 'monkey patch' all over the place, as does at least one of my previous colleagues, and I have no affiliation with the authors of this article

Hughperkins (talk) 11:19, 13 July 2017 (UTC)Reply

"Method swizzling" edit

Currently, Method swizzling redirects to Monkey patch but isn't mentioned there at all. Is it a synonym? Googling suggests that this term might be Objective-C/Swift-specific. – Tea2min (talk) 08:32, 20 April 2021 (UTC)Reply

Similarly, Duck punching, Dynamic Funk, and arguably Gorilla patch redirect here but aren't mentioned. 65.36.66.178 (talk) 16:22, 15 November 2021 (UTC)Reply