Recent Coded Smorgasbord
Inspired by the Pop-up Potpourri, the examples presented here aren't necessarily "bad" code nor do they imply the miserable failure that we're all used to reading here. The examples are more-or-less fun snippets of code like ones that we've all written at one time or another.
Defensive Programming and a Whole Lot More
by Alex Papadimoulis
in Coded Smorgasbord
on 2009-05-15
"Some programmers like to program defensively," wrote Sam, "and then there's some of my coworkers. This is found at the top of nearly every function of our C++ classes."
if (!this) return false;