Archive for June, 2009

A Case for Guard Clauses

June 12, 2009

One of my pet peeves in programming is that few people use guard clauses. A guard clause is an almost trivial concept that greatly improves readability. Inside a method, handle your special cases right away and return immediately.