workaround kludge

workaround

  • 虽不能根本解决, 但能避开问题的替代方法。
  • 避免问题或困难而旁道而行达到目的。
  • 权宜之计; 应急之策。
  • 原本是电脑术语, 相对于「Fix」而言.
    当一个程式有了问题, 找出问题所在然后直接解决它叫做「Fix」;
    当问题始终无法解决, 于是想个方法忽略这个问题并使这个问题
    不致于影响你要用这程式达到的目的, 这样的方法就叫Workaround。

kludge [klu:dʒ], [kludʒ] 

杂凑体(kludge)可以认为是一种workaround(解决办法)。

在信息技术中,杂凑体(kludge)是一种编程或硬件的设计或者执行问题的不太好用的(但至少暂时有效的)解决方案。
据Eric Raymond说,这个词是由德语klug(意思是聪明)间接得来的。
当更正式或更恰当的解决方案还未出现(可能是因为时间的限制)时,杂凑体便产生了。
硬件或软件产品有时是在原来的设计上添加一个新的基本上不兼容的设计的产物,而不是完全重新地设计一个产品。
为什么杂凑体会变为一个看法不同的问题呢?用户的观点通常和设计者不同,而设计者了解必须要克服的问题。
信息技术产品是起源于不同设计哲学和限制的元素的结合,从这个观点来说,几乎所有的产品都包含了一些杂凑体的元素。

Kludge

kludge (or kluge) is a workaround, a quick-and-dirty solution, a clumsy, inelegant,
difficult to extend, hard to maintain yet effective and quick solution to a problem,
and a rough synonym to the terms "
jury rig" or "Jugaad".

This term is used in diverse fields such as 
computer scienceaerospace engineering
internet slang, and evolutionary neuroscience.

In computer science

In modern computing terminology, a kludge (or often a "hack") is a solution to a problem,
doing a task, or fixing a system that is inefficient, inelegant, or even unfathomable,
but which nevertheless (more or less) works.

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 the kludge is introduced in order to keep backwards compatibility,
but often it is simply introduced because the kludge is an easier alternative.
That something was often originally a crock, which is why it must now be hackedto 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.

A kludge is often used to fix an unanticipated problem in an earlier kludge;
this is essentially a kind of cruft.

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 (i.e., 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
thus increasing the time the electrical signal took 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.

In computer networking, use of NAT (Network Address Translation) (RFC 1918) or PAT (Port Address Translation)
to cope with the shortage of IPv4 addresses is an example of a kludge.
Another common example are quickstarts like those shipped with OpenOffice.org, RealPlayer, QuickTimeand Adobe products,
in which a bloated program that normally takes a long time to load is kept in memory to reduce the delay in starting it.

In FidoNet terminology, the term "kludge" refers to a piece of control data embedded inside a message.


原文地址:https://www.cnblogs.com/shangdawei/p/3103055.html