The Life of a Programmer

Search

Why switch is better than if-else

In Ben’s post, he questions whether switch statements are cleaner than if-else chains. I contend they are, because they better express the semantics of the

Invented Here Syndrome

How the belief that something must exist and fearing complexity can lead to writing too little code

Are global variables bad?

We hear it often, “global variables are bad, avoid using them!” But is this actually good advice? Simplified blanket statements are already a bit suspicious,