A kludge is the working but inelegant fix, one of the most enduring concepts in programming folklore. The Jargon File defines a kludge as “a clever programming trick intended to solve a particular nasty case in an efficient, if not clear, manner,” and also as “a Rube Goldberg device in hardware or software.” The defining tension is right there: it works, and it is even clever, but it is not clean, and everyone involved knows it.
The word’s spelling and pronunciation are themselves part of the lore, and the Jargon File spends real effort untangling them. There are two spellings, kludge and kluge, with different histories and pronunciations, and the File notes that the two have largely merged in usage even though purists distinguish them. One thread of the etymology traces the term to the German “kluge,” meaning clever or smart, which captures the grudging admiration a good kludge can earn.
In practice a kludge is what you build when the right solution is too expensive, too slow to arrive, or simply unknown, and the deadline is now. It might be a special case bolted onto otherwise clean logic, a hard-coded value that papers over a missing abstraction, or a sequence of operations that exploits some quirk of the system to get the right answer. The result functions, but it resists explanation and tends to break when the surrounding conditions change.
The concept carries a distinctive mix of pride and shame that is characteristic of hacker culture. To call your own code a kludge is to confess that it is ugly while also signaling that you were clever enough to make the ugly thing work. To call someone else’s code a kludge is mild criticism, an observation that the seams are showing. Either way the word acknowledges the gap between the elegant design one wishes one had written and the practical hack that actually shipped.
That gap is why kludge has stayed in the vocabulary for decades. Real systems accumulate kludges the way old buildings accumulate additions, and the Jargon File’s preservation of the term, with its careful attention to spelling, etymology, and tone, is itself a small monument to the engineering reality that working code is often messy code.