gotcha


Also found in: Dictionary, Acronyms, Idioms, Wikipedia.

gotcha

(jargon, programming)
A misfeature of a system, especially a programming language or environment, that tends to breed bugs or mistakes because it both enticingly easy to invoke and completely unexpected and/or unreasonable in its outcome.

For example, a classic gotcha in C is the fact that

if (a=b) code;

is syntactically valid and sometimes even correct. It puts the value of "b" into "a" and then executes "code" if "a" is non-zero. What the programmer probably meant was

if (a==b) code;

which executes "code" if "a" and "b" are equal.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
Mentioned in ?
References in periodicals archive ?
To its credit, OLPR has sometimes recognized that its own position looks like a "gotcha." OLPR published an article describing an apparent "gotcha" admonition.
When I last visited some years ago, it was a very simple multi-lender gotcha site.
Smart multi-matter management is the solution to this gotcha. It is a good practice to consider the entire playing field when setting up a new matter.
Although Maggie Philbin became aware that she was part of a 'Gotcha' within seconds of filming and left the set-up seemingly to get help for the stranded victim seeking her aid, never to return.
If you keep asking gotcha questions, you're virtually guaranteed to lose the business of today's savvy prospects.
Gotcha! Most of us believe foods labeled as "real'' are more healthful.
The new Gotcha Covered line includes a shampoo, a conditioner, a styling gel, a leave-in detangler and an all-purpose surface shield spray.
Indeed, Gotcha Gas revolves around: a motorcycle gang, a host of motorists unwittingly stranded near an ill-conceived Army blast site for a bomb test, and a cast of zany characters involved in an impossible scenario.
8 ( ANI ): Computer scientists at Carnegie Mellon University have developed a new inkblot password system called GOTCHA to increase security against online password thefts.
But perhaps most distressing is the tendency of many elected officials to ignore urgent needs--such as decaying bridges--and instead jump on "gotcha" moments to impugn the integrity of political opponents and exaggerate the perceived shortcomings and harmful effects of proposed or actual policies.
But last week, Sandy found out the truth when a giant Gotcha! sign was put up on his lawn, featuring a picture of a mole in police hat.