Home
Sandor Dargo's Blog
Cancel

Beautiful C++: 30 Core Guidelines for Writing Clean, Safe and Fast Code by J. Guy Davidson and Kate Gregory

If you are familiar with the Pluralsight courses of Kate Gregory, you won’t be surprised by the name of this book. While many consider C++ a complex language that always results in difficult to rea...

My first work experience with C++20

I joined a new team recently. We have our own internal microservices as well as libraries. While for microservices we support one main branch, for libraries we do have to support at least three, in...

Use strong types instead of bool parameters

There are some recurring themes in code reviews. Experienced reviewers often already have a template of comments somewhere for such recurring patterns. Sometimes only in the back of their minds, bu...

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...