Programming

Switch your switch statements for something better

Posted on
fish in bowl

In the spirit of Dijkstra’s seminal work, let me dissect the bold statement given in the title, i.e. the switch statement. More often than not, I found switch statements in the code bases I work with to be a sub-optimal solution, and as usual, this is nothing new. Robert Martin already wrote about the detriments […]

Programming

On the harm of simple types

Posted on

Recently, I encountered a lot of occurrences, where I found problematic code that was essentially caused by the usage of primitive types where they simply were the wrong tool for the job. The following article will hopefully make you stop and rethink what you’re doing when you’re using one of these types the next time. […]