Showing results for December 27, 2011 - The Old New Thing

Dec 27, 2011
Post comments count0
Post likes count0

Introducing the for-if anti-pattern

Raymond Chen
Raymond Chen

Over the years, I've seen a bunch of coding anti-patterns. I figured maybe I'll share a few. Today, I'll introduce what I'm calling the for-if anti-pattern, also known as "We'll sell you the whole seat, but you'll only need the edge." This is a special case of the for-case anti-pattern, where all but one of the cases is null. This can natural...

Code