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.
Mentioned in ?
References in periodicals archive ?
student in computer science, who developed GOTCHAs along with Manuel Blum, professor of computer science, and Anupam Datta, associate professor of computer science and electrical and computer engineering.
Phil Cooper, chief executive of Venture Wales, said: "Alun and his team at Gotcha are providing a vital service to help former military personnel identify and develop civilian careers.
With Gotcha Pets and Gotcha Gifts there are hundreds of gift ideas to suit all pockets with prices starting from as little as 1.
The Gotcha Program reflects the Towson State University Police Department's commitment to protect and serve the campus community.
Oscar Feldenkreis, President and Chief Operating Officer of Perry Ellis International, said: "This is a great opportunity to increase penetration of the Gotcha brand to additional, complementary categories with a licensee that can clearly interpret the essence of the Gotcha lifestyle.
A Gotcha spokesman added: "No one wants to be the bearer of bad news but it's better off knowing than not knowing.
Designed to mark the video launch of film Runaway Bride, the Tom-I Gotcha is physically attached to the wrist so, like a real relationship, there's no escape.
FEBRUARY 1999: Former Rangers star Ally McCoist is on the receiving end of a Gotcha.
MOUNTAIN VIEW, Calif & TOKYO -- Ooyala and Gotcha Media announced today that they have collaborated to provide the stream for TEDxTokyo 2010 in HD on May 15th, 2010.
The 248-page 2010 Gotcha Covered Look Book is built off the extraordinary work of yearbook staffs and advisers from around the world and showcases 2008 and 2009 yearbooks.
Gotcha was created by the partnership to highlight road safety and attempt to combat negativity surrounding speed cameras to younger motorists aged 16 to 25.
Fifth favourite at 10-1 is Gotcha, the distasteful headline in a downmarket tabloid during the Falklands War.