Monkey Patch
Version 1.0.0 · Updated 2026-07-28
CORE DEFINITION
Monkey patch is a programming technique that modifies program logic by patching code. It is also known as duck punning. Monkey patch means using a pun-like technique to piece together program logic that deviates from the conventional program, and this technique only takes effect at runtime. The appearance of a monkey patch indicates that the program itself has design flaws. When used on web pages and databases, it becomes SQL injection attacks. Improper use of Unix Shell flags can also cause similar security issues, such as naming a file in the form of "-x", where the command line may interpret the file name as a passed parameter, causing runtime exceptions.
SCAFFOLDING EFFECT
Reduce cognitive load
Monkey patch is a programming technique that modifies program logic by patching code. It is also known as duck punning. Monkey patch means using a pun-like technique to piece together program logic that deviates from the conventional program, and this technique only takes effect at runtime.
Anchor fast decisions
Dynamically modifying the behavior of classes or modules at runtime without changing their source code. The mechanism is runtime code replacement.
MINIMUM ACTION
In progress 0/3Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E7%8C%B4%E5%AD%90%E8%A1%A5%E4%B8%81verified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS