What is the etymology of 'munge'?
My own brief investigation into the etymology of munge yielded the following entry from The New Hacker's Dictionary:
- [derogatory] To imperfectly transform information.
- A comprehensive rewrite of a routine, data structure or the whole program.
- To modify data in some way the speaker doesn't need to go into right now or cannot describe succinctly (compare mumble).
This term is often confused with mung, which probably was derived from it. However, it also appears the word `munge' was in common use in Scotland in the 1940s, and in Yorkshire in the 1950s, as a verb, meaning to munch up into a masticated mess, and as a noun, meaning the result of munging something up (the parallel with the kluge/ kludge pair is amusing).
It would be very interesting if someone were able to find a connection between the computing jargon and the the Scottish munge mentioned here.
Munge was around in Yorkshire before 1950s, and can be seen here recorded in 1876:
Munge
to chew eagerly, or munch.
A person is said to munge, too, who murmurs surlily in an inarticulate manner.
The second usage, the surly inarticulate murmur, seems to fit your imperfectly transformed data or mumble more than the chewing does.
Jargon File
The New Hacker's Dictionary (1991) is based on the Jargon File, the earliest surviving version is from the mid-1970s and contains these definitions:
MUNCH v. Often confused with "mung", q. v. To transform information
in a serial fashion, often requiring large amounts of computation.
To trace down a data structure. Related to "crunch", as in
"number-crunching".MUNG (variant: MUNGE) Recursive acronym for Mung Until No Good. 1.
v. To make changes to a file, often large-scale, usually
irrevocable. Occasionally accidental. See "blt". 2. v. To
destroy.
Recursive acronyms were popular amongst hackers in the 1970s and can still be found.
TMRC Dictionary
A lot of early hackers were members of MIT's Tech Model Railroad Club, and member Pete Sampson compiled two editions of a TMRC Dictionary in 1959 and 1960.
Mung can be found in the earlier 1959 edition. The italics are Sampson's annotations from 2005: :
MUNG: mash until no good.
David Sawyer, a club member, would make vocal sound effects; his "mung" sound represented a mechanical part vibrating. I took it to refer to one part hitting another, and concocted this anti-acronym. The term has since spread and taken on figurative meanings.
Interesting to see the 1959 version was an acronym but the recursivity wasn't applied until the 1970s, and the variant munge wasn't mentioned until later.
Given the geographical, chronological and cultural gap between century US hacker culture, which liked to play with language and invented many playful terms, and Scottish and Yorkshire dialect, I find it unlikely there's a connection between the two, especially given Pete Sampson's explanation of his invention.
To mung:
to spoil, ruin, or destroy (often followed by up).
Computers : to make incremental changes to (a file, system, etc.), eventually ruining or destroying the original. to modify (an e-mail address) in an easily reversible way, to avoid spam.
According to Wikipedia the term is also an acronym and it appears there is no relation to munge meaning chewing but rather to mung meaning spoil, destroy: ( see above):
to mung or munge:
is computer jargon for a series of changes to a piece of data, which are often well defined and individually reversible, but which transform the original item into an unrecognizable form. The changes may be destructive, e.g. by corrupting a computer file, or simply concealing, e.g. changes to an email address to disguise it from spambots.
The term was coined in 1958 in the Tech Model Railroad Club at the Massachusetts Institute of Technology. In 1960 the backronym "Mash Until No Good" was created to describe Mung, and a while after it was revised to "Mung Until No Good", making it one of the first recursive acronyms. It lived on as a recursive command in the editing language TECO.
- Usages of the term appear in munged password (a strong, secure password created through character substitution), data munging (cleaning data from one "raw" form into a structured, purged one) and address munging (disguising an e-mail address).
mung, munge:
- A derogatory term meaning to imperfectly transform information.
- A comprehensive rewrite of a routine, data structure or the whole program. This term is often confused with mung and may derive from it, or possibly vice-versa.