Avoid Tricks

[From "Programming Proverbs" by Henry F. Ledgard]

Avoid Tricks (Proverb 15 of 26)

"Every programmer has a secret desire to produce a truly clever program. Shortening the code by two lines, running the program two seconds faster, or using fewer identifiers are all popular pastimes. Resist the temptation, because the benefits seldom match the hidden costs. Aside from the extra time needed to develop that ‘special wrinkle’, hand-checking and debugging tricky code is often a study in horror, and on e must be extra careful of boundary conditions."

Admittedly this book was written way back in 1975 and so these may not be the current fad in tricks but just substitute your favorite. Isn’t it amazing how some coding problems just never seem to go away?