One of the key factors for success as a software developer is to work smarter, not harder. These posts contain tips on how you can do just that.

Implementing the Singleton Pattern

Saturday, July 15 2017 smart-code

The Singleton design pattern is one of the most well known from the famous book by the Gang of Four, but it’s well overused and often poorly implemented. Let’s discuss why that is and how the singleton pattern can be properly implemented (hint: it’s easier than you think). In a follow-up post, we’ll discuss why you almost never want to do this.

Read more »

Static Analysis tools for the Win

Saturday, April 15 2017 smart-code

It’s no secret that I’m a big fan of static analysis tools, believing that they can provide a very useful second opinion on my code, helping me to deliver high-quality code that does what it is needed.

Read more »

Exception Logging

Tuesday, January 19 2016 smart-code

When something goes wrong in a .NET application, it’s important to log sufficient information from the exception for diagnostic purposes. Here are some ideas on how to do this well.

Read more »

On the Merits of Simple Code

Saturday, November 28 2015 smart-code

As developers, we seem to love building complex things. This might be because being good at complexity is a prerequisite to becoming a developer in the first place. But this doesn’t mean that complexity is always necessary.

Read more »

Semantic Types

Sunday, September 27 2015 smart-code

As anyone who has seen my presentation Becoming a Better Developer will know, the anti-pattern primitive-obsession describes a practice that encourages the proliferation of bugs. The best way to counter this problem is to introduce semantic types.

Read more »

Command Line Processing

Sunday, September 21 2014 smart-code

Despite the popularity of application servers and single page web apps, there are still times when a simple console application is the easiest - and best - way to solve some kinds of problems.

Read more »