Testable Singletons in C++

Jun 23, 2018 - 5 minutes
TL-DR: make the getInstance() method of a Singleton return an abstract type and allow it to be overriden at link-time. Disclaimer: the technique here explained is maybe as old as C++. I don’t claim to be the author of the idea. I just wish I had learned it 10 years ago. So you hate, or at least dislike, the Singleton pattern, right? I am not its fan and can’t recall the last time I created one, but we must accept the fact that they exist in the wild, specially in legacy codebases. Read more ...

Hello World

Jun 23, 2018 - 1 minutes
Well, after many years (really) I decided, again, to make a blog. As usual, it will be mostly about software development and other things that happen between my ears. Stay tuned! Read more ...