The Life of a Programmer

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

Are you afraid to write code? Does the thought linger in your brain that somewhere out there somebody has already done this? Do you find

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,

What is a closure?

You’ve heard the term, you’ve probably even used them, but what exactly is a closure? It’s a combination of data and code that have become