Input kludge
From Wikipedia, the free encyclopedia
In computer programming an input kludge is software that fails to handle simple user input. For example, if a computer program accepts free text input from the user, an ad hoc algorithm will mishandle many combinations of legal and illegal input strings. Input kludge is usually difficult for a programmer to detect in a unit test, but very easy for the end user to find. The evidence exists that the end user can easily crash software that fails to correctly handle user input. Indeed, the buffer overflow security hole is an example of the problems caused.
Input kludge is an example of an anti-pattern.
To solve input kludge, one may use input validation algorithms to handle user input. A monkey test can be used to detect an input kludge problem. A common first test to discover this problem is to roll one's hand across the computer keyboard or to 'mash' the keyboard to produce a large junk input, but such an action often lacks reproducibility, a more useful test is to generate inputs that are designed to trigger the bug if it exists.