Jump to content

Kludge

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 12.152.105.2 (talk) at 16:18, 3 December 2007 (→‎Pronunciation: deletion of pseudointellecutal fap is FUN!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A kludge (or, alternatively, kluge) is a clumsy or inelegant solution to a problem or difficulty. In engineering, a kludge is a workaround, typically using unrelated parts cobbled together. Especially in computer programs, a kludge is often used to fix an unanticipated problem in an earlier kludge; this is essentially a kind of cruft.

Earliest recorded use

There are reports that the term was in use as early as the 1940s in the United Kingdom, although the first printed usage given in the Oxford English Dictionary is by Jackson Granholm[1] from the American Datamation magazine in 1962:

"An ill-assorted collection of poorly matching parts, forming a distressing whole."

Feb. 30/1 The word ‘kludge’ is...derived from the same root as the German Klug..., originally meaning ‘smart’ or ‘witty ’... ‘kludge’ eventually came to mean ‘not so smart’ or ‘pretty ridiculous’. Ibid. 30/2 The building of a kludge..is not work for amateurs. There is a certain, indefinable, masochistic finesse that must go into true kludge building.

In naval parlance, a kludge is "any piece of equipment that works well on shore but consistently fails at sea". It hence came to refer to clutter, especially that which may impede shipboard operations. In naval usage the name is alleged to come from the sound a substantial kludge makes hitting the water when tossed overboard. /klooj/. The idea of a jury rig, also marine, is close. See Rube Goldberg's or Heath Robinson's machines.

Aerospace engineering use

Perhaps the ultimate kludge was the first US space station, Skylab. Its two major components, the Saturn Workshop and the Apollo Telescope Mount, began their development as separate projects (the SWS was kludged from the S-IVB stage of the Saturn 1B and Saturn V launch vehicles, the ATM was kludged from an early design for the descent stage of the Apollo Lunar Module). Later the SWS and ATM were folded into the Apollo Applications Program, but the components were to have been launched separately, then docked together in orbit. In the final design, the SWS and ATM were launched together, but for the single-launch concept to work, the ATM had to pivot 90 degrees on a truss structure from its launch position to its on-orbit orientation, clearing the way for the crew to dock its Apollo Command/Service Module at the axial docking port of the Multiple Docking Adapter. The Airlock Module's manufacturer, McDonnell Douglas, even recycled the hatch design from its Gemini spacecraft and kludged what was originally designed for the conical Gemini Command Module onto the cylindrical Skylab Airlock Module. The Skylab project, managed by the National Aeronautics and Space Administration's Marshall Space Flight Center, was seen by the Manned Spacecraft Center (later Johnson Space Center) as an invasion of its historical role as the NASA center for manned spaceflight. Thus, MSC personnel missed no opportunity to disparage the Skylab project, calling it "the kludge." Undeterred by such criticism, Marshall engineers later kludged the Docking Module for the Apollo Soyuz Test Project from Skylab's Airlock Module.

Computer science use

In modern computing terminology, a kludge (or often a "Hack") is a 'solution' to a problem, doing a task, or fixing a system (whether hardware or software) that is inefficient, inelegant, or even unfathomable, but which nevertheless (more or less) works. It has been suggested, as a folk etymology, or backronym, that it means klumsy, lame, ugly, dumb, but good enough; which rather captures the point. To kludge around something is to avoid a bug or some difficult condition by building a kludge, perhaps relying on properties of the bug itself to assure proper operation. It is somewhat similar in spirit to a workaround, only without the grace. A kludge is often used to change the behavior of a system after it is finished, without having to make fundamental changes. Sometimes to keep backwards compatibility, but often simply because it is easier. That something was often originally a crock, which is why it must now be hacked to make it work. Note that a hack might be a kludge, but that 'hack' could be, at least in computing, ironic praise, for a quick fix solution to a frustrating problem.

Something might be a kludge if it fails in corner cases, but this is a less common sense as such situations are not expected to come up in typical usage. More commonly, a kludge is a poorly working heuristic which was expected to work well. An intimate knowledge of the context (ie, problem domain and/or the kludge's execution environment) is typically required to build a corner case kludge. As a consequence, they are sometimes ironically praised.

An anecdotal example of a kludge involved a computer part supposedly manufactured in the Soviet Union during the 1960s. The part needed slightly delayed receipt of a signal to work. Rather than setting up a timing system, the kludge was to make the internal wires extra-long, increasing the distance and so the time the electrical signal needed to reach its destination.

A variation on this use of kludge is evasion of an unknown problem or bug in a computer program. Rather than continue to struggle to find out exactly what is causing the bug and how to fix it, the programmer may hack the problem by the simple kludge of writing new code which compensates. For example, if a variable keeps ending up doubled in a certain code area, add code which divides by two when it is used, after the original code has been executed.

Other uses

In the science fiction television series Andromeda, genetically engineered human beings called Nietzscheans use the term disparagingly to refer to genetically unmodified humans.

Spelling

Most dictionaries have the spelling kludge as the headword, and kluge is listed as an alternate spelling. The jargon file however, claims that kluge was the original spelling, and kludge is in fact a variant.[1] One may therefore correctly observe that the etymology of kludge is itself a kluge.

Pronunciation

In the U.S., kludge traditionally rhymes with stooge, but the pronunciation rhyming with fudge is also encountered (from the alternative spelling pronunciation). Most dictionaries list only the former pronunciation, but Merriam-Webster lists both. The German word klug is pronounced approximately like clook.

In most English-speaking countries, the pronunciation of kludge would rhyme with fudge, since the d before the g would prevent the word from rhyming with huge.

See also

References

  1. ^ Robina Mapstone (June 7, 1973), Computer Oral History Collection, Jackson Granholm (PDF), Smithsonian National Museum of American History