The Old Paint-Stirrer Trick

[From "Writing Solid Code" by Steve Maguire, Treacheries of the Trade.}

"One of the oldest tricks in home maintenance is to pick up a screwdriver to pry the lid off a can of paint and then use the screwdriver as a stir-stick. I should know; I have collection of multicolored screwdrivers. Why do people use screwdrivers to stir paint when they know darn well they shouldn't? I'll tell you why: because at the moment the screwdriver is convenient and guaranteed to work and, like those screwdrivers, are not used for their intended purpose."

Steve then goes on to give an example where the coder uses something like:

char *p;
p = ...;
int j = atoi(p + (*p == '+'));

If you don't see the screwdriver here ... we'll, I hope you like multi-colored programs. (And this screwdriver isn't even guaranteed to work!)