Expressiveness

I was thinking the other day about magic numbers. I’m sure you’ve come across them. In fact, I’m pretty sure you’ve created them! Everyone who programs has. It might be a value...

Learning to Delegate

Learning to delegate is one of those things that you don’t really need to do much at the beginning of your career. And since it’s not (rarely?) taught in school, it’s something you l...

Code Reviews

Last night I had a dream that I was performing a code review for someone. Keep in mind that browsers like Chrome, Firefox and others use an integer to represent this, but Internet Explorer and a brows...

Optimizing Too Early?

For years I’ve been in the camp that optimization of software should come towards the end of a project. Build the software, profile it, then fix any outlandish problems. And that has largely wor...

When is it OK to Copy Code?

You may have heard the software development principle ‘don’t repeat yourself’, or DRY. I stick to it was well as I can, but I have been trying to think of a list of exceptions. When ...

Code That Works The First Time

Scary, isn’t it? How is it that this new block of code that you just wrote is performing perfectly the very first time you ran it? I’ve done it a few times in my career in non-trivial bloc...

Tinier and Tinier Bits

We’ve all heard horror stories about long functions. I’m talking about ones with hundreds of lines of code; massive monolithic custom or one-off algorithms. I’ve seen them in the wil...