Have you ever seen a codebase crawling with `DWORD_PTR`, `HANDLE` and similar types? I bet it was a Windows application which never has been (and probably never will be) ported to another operating System, because it had fallen victim to a leaky or nonexistent encapsulation of WinAPI.
Sometimes I see functions that are meant to return a range of values, but instead of returning a container, they take one as out-parameter. There are several reasons why that […]
I don’t like comments, because having to comment a piece of code means the code itself does not express everything there is to know.
A few days ago I came across a tweet in my twitter timeline that made me think and spawned a little discussion: @diegorlosada Programming is one of the few fields […]
We use frameworks all the time. Some are part of third party libraries, others are self made. What options do we have if requirements change, especially for the custom frameworks?
If you like a heated discussion, just pick a few developers and start a conversation about singletons. Sentiments and opinions about that particular design pattern are all over the place. For […]
One of C++s strengths is that it is possible to write very performant code. But does that mean we always have to worry about performance and write our everyday code as […]
Have you ever come across a legacy code base with dark and dusty corners that have been untouched for years? Many of us have, because green field development of shiny new applications […]
In many legacy code bases we encounter functions that get their parameters passed by plain pointers. Often those pointers are expected to be not null. In this post I am […]
Some people adhere strongly to design patterns. They have read the “Gang of Four” book and are now convinced that there should be a design pattern used in almost every […]