“What’s the right name for this variable/function/class/module?” As programmers, this something we ask ourselves multiple times a day, and that is also a question that comes up often during code reviews. In this video, I’ll share with the question that I use to determine a name for something in code. And often, the answer to […]
RAII is a central concept in C++, that consists in relying on the compiler to call destructors automatically in certain cases. Putting appropriate code in such destructors then relieves us from calling that code – the compiler does it for us. RAII is an idiomatic technique of C++, but can we use RAII for everything? […]
Even though rvalue references have been around since C++11, I’m regularly asked questions about how they work and how to use them. For this reason I’m going to explain my understanding of them here. I think this is relevant to the topic of Fluent C++, expressive code in C++, because not understanding them adds a […]
Everyone has their little defaults. You know, that little something that they do from time to time and that gets on your nerves, even though they’re otherwise nice people? For C++, one of these little annoyances is the most vexing parse, well, as its name suggests. I think this is a topic related to expressiveness […]
[A Russian translation of this article is available on howtorecover.me – courtesy of Vlad Brown] A derived class sometimes needs to call the code of its base class and name it explicitly. But for bases classes with a long name, repeating it in the body of the derived class adds a lot of clutter to […]
On Fluent C++, we talk a lot about topics related to expressive code: writing expressive code, making existing code more expressive, and how to keep our motivation up and improve even when facing code that is not expressive. But WHY do we do this? Why is expressive code the main technical characteristic of code we […]
(this post is daily-able but you’ll need to split its independant parts across several days) Building strings sounds like one of the most basic things a programmer can do in any language. But in fact there is a lot of ways to go about it in C++, depending on how complex your need is. Here we […]
Getting naming right is crucial to convey your intentions through code. Indeed, the compiler doesn’t care if your names are clear enough. It is just for the people who work with you. And that includes you. The clarity of the names in a piece of code has a strong impact on how easy it is […]
A function takes input and produces outputs. Simple, right? If so, how come that a lot of functions in C++ code don’t look that way? And how to overcome those difficulties to make them look like proper functions and show a clear interface? This is the subject of this week’s video: Don’t want to miss […]
Naming is such an important topic to translate our intentions into code. But are there names that we should never see in code? This is what I discuss in this week’s video: Don’t want to miss out ? Follow:   Share this post!