Home
Sandor Dargo's Blog
Cancel

Storing references of pointers in containers in C++

This article is about the problem of storing vectors in a container and a bug I faced recently. Many would quickly find the conclusion that you should not store raw pointers, but you should work ...

Beyond Order: 12 more rules for life by Jordan B. Peterson

In his first book, 12 Rules for Life: An Antidote to Chaos, Jordan B Peterson focused on the consequences of too much chaos in our lives and how to make it better, how to bring our lives more into ...

The Employee-Company triangle

After having read the title, you must think I forgot something. How can two vertices (the employee and the company) form a triangle? The answer is simple, the employee takes up two of the three ve...

C++ basics: Pointers vs iterators

Do you sometimes feel that you cannot explain the most basic things of a language you work with? You’re asked a simple question and suddenly you can only say “eeeeeeeh, I have to check, sorry.” Do...

Mocking non-virtual and free functions with gMock

Last time we started to discover gMock and we went into details regarding how we can mock virtual functions. We saw how to indicate that a function is to be mocked, how to provide a canned behaviou...

Secondhand Time: The Last of the Soviets by Svetlana Alexievich

It’s very hard to start writing this blog post. I’ve been sitting in front of my laptop weeping. Like I did so many times while reading this book. I also had a feeling that “weeping” is one of the ...

Mocking virtual functions with gMock

In this mini-series we are going to discover mocking with gMock, the probably most widely used C++ mocking framework. I think that practical discussions should start with theoretical ones. In orde...

The big STL Algorithms tutorial: wrapping up

With the last article on algorithms about dynamic memory management, we reached the end of a 3-year-long journey that we started at the beginning of 2019. Since then, in about 30 different posts, ...

System Design Interview: An insider's guide by Alex Xu

Being a software engineer is special compared to many other professions in several ways. One aspect of this speciality is that you don’t just go to a job interview after polishing a bit your CV, th...

C++23: Deducing this

A few weeks ago, I participated in the first AFNOR meeting of my life. AFNOR is the French standardization organization, part of the ISO group and I’ve recently joined the group responsible for the...