Archive for the 'Tips' Category

Booleans as Function Parameters Considered Harmful

Let’s start with a quick quiz. What do the following completely made-up lines of code do?: thing.SetIsVisible( true ); thing.SetVisibile( true ); var item = factory.CreateThing( true ); Although they’re made-up, they could just as easily not be. When you jump into someone else’s code for the first time, all the code might as well [...]