In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […]
The post [fix dev diary] Week 6-7: Description and Issue ID appeared first on Simplify C++!.
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […]
The post [fix dev diary] Week 6-7: Description and Issue ID appeared first on Simplify C++!.
When classes have an “isValid” method or similar, the code using them often is less clear and harder to maintain. If possible, validity should be an invariant that can not […]
The post isValid()? Establish invariants and avoid zombie objects appeared first on Simplify C++!.
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […]
The post [fix dev diary] Week 5: appeared first on Simplify C++!.
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […]
The post [fix dev diary] Week 4: Closing in on core domain code appeared first on Simplify C++!.
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […]
The post [fix dev diary] Week 3: create command and application service appeared first on Simplify C++!.
In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […]
The post [fix dev diary] Week 2: Foundation of the CLI App appeared first on Simplify C++!.
This is the start of my dev diary blog post series, where I document the minutiae of what I am doing for my toy project Fix. The diary can also […]
The post [fix dev diary] Week 1: Preparations appeared first on Simplify C++!.
When I wrote about rebooting the blog, I also wrote I’d reboot my toy project “Fix”. Here is what Fix is about – this time. What is Fix? Fix is […]
The post Old new Project: Fix appeared first on Simplify C++!.
Installing everything we need to develop C++ applications can be a lengthy, even painful process. Docker makes it possible to build a development environment once and deploy it everywhere. The […]
The post Docker4c: portable C++ development environment appeared first on Simplify C++!.
After several months, even years of not writing a post, I am back and motivated to blog again – and more. My history of blogging When I started blogging in […]
The post Rebooting the blog appeared first on Simplify C++!.
Recently, I have given a workshop about language features introduced in C++14 and C++17. Since a major part of those features includes constexpr things, I gave my trainees the task […]
The post Constexpr FizzBuzz – An Exercise in Compile-Time Calculations appeared first on Simplify C++!.
You’ve probably heard about the rule to prefer standard algorithms over raw for loops. The major reason is that those algorithms say what is happening in the name and encapsulate […]
The post algorithms and the KISS principle appeared first on Simplify C++!.
From February 3rd through February 6th I have been in Folkestone, UK, to visit the first C++ On Sea conference. There must be something in the water on that island […]
The post Cpp On Sea 2019 Trip Report appeared first on Simplify C++!.
The pImpl idiom is a useful idiom in C++ to reduce compile-time dependencies. Here is a quick overview of what to keep in mind when we implement and use it. […]
The post The pImpl Idiom appeared first on Simplify C++!.
Keep simple data structures simple! There’s no need for artificial pseudo-encapsulation when all you have is a bunch of data. Recently I have come across a class that looked similar […]
The post Simple data structures appeared first on Simplify C++!.
Sometimes we need unformatted data, simple byte sequences. At first glance, std::string might be a fitting data structure for that, but it is not. Think about data we get from […]
The post std::string is not a Container for Raw Data appeared first on Simplify C++!.
If you follow some C++ social media accounts you will now and then encounter C++ quizzes and trick questions. Do we need to know the answers to be good C++ […]
The post C++ Quizzes and Trick Questions – Do we Have to Know the Answers? appeared first on Simplify C++!.
Now and then we have the need to call functionality that was written in C from our C++ programs. For that, we need to use and understand extern "C". The […]
The post Calling C Code from C++ With ‘extern “C”‘ appeared first on Simplify C++!.
There are two different ways to create a std::shared_ptr: via one of its constructors and via std::make_shared. Both have their merits and different tradeoffs. First of all I’d like to […]
The post std::make_shared vs. the Normal std::shared_ptr Constructor appeared first on Simplify C++!.
In C++, there are a few ways how values that we would consider different compare equal. A short overview. Here, with “compare equal” I mean, that the expression a == […]
The post Same, same, but different: when different values compare equal appeared first on Simplify C++!.
With the new C++ standards, we got a lot of features that feel like “quality-of-life” features. They make things easier for the programmer but do not add functionality that wasn’t […]
The post Modern C++ Features – Quality-of-Life Features appeared first on Simplify C++!.
The term “Modern C++” is often used interchangeably with “Code using the new C++ standard”. Here, “new” may be anything from C++11 to C++17 or even whatever is available of […]
The post “Modern C++” != “New(est) Standard” appeared first on Simplify C++!.
Today I’ll continue the little CMake tutorial series. We’ll add a few options and a bit of fine-tuning to the compilation of our example project. This post is part of […]
The post CMake – Properties and Options appeared first on Simplify C++!.
Have you ever seen one of those nasty errors that appear on one machine and not on another? To be able to track those down we need a reproducible build […]
The post Reproducible build: environments and scripts appeared first on Simplify C++!.
In the last week, I had several occurrences that again taught me something I already knew – at least in theory. Local build results can be deceiving. In our current […]
The post “Builds on my machine!” – About local build appeared first on Simplify C++!.
As promised in the last post about CMake, today we’ll use a proper CMake project structure for our “Hello CMake” project. This post is the third of a series about […]
The post CMake Project Structure appeared first on Simplify C++!.
Sometimes we want to express the state of “nothing meaningful” instead of a value. This is the use case for C++17’s std::optional. In programming, we often come across the situation […]
The post Modern C++ Features – std::optional appeared first on Simplify C++!.
Last week, we’ve started our little CMake project with a “Hello CMake” one-liner. Now it’s time to expand that example by adding another target and information about the project. Adding […]
The post CMake – Another Target and the Project appeared first on Simplify C++!.
Since I have mentioned CMake in a handful of past blog posts, it is time to give a short introduction for those that don’t know it yet. CMake is one […]
The post Hello CMake! appeared first on .
Having written about std::variant and std::visit last week, it’s time to string together some modern C++ features to build a naive basic implementation of overload, a proposed C++ feature. Recap: […]
The post Overload: Build a Variant Visitor on the Fly appeared first on .
std::variant is a library addition in C++17 for sum types, and std::visit is one of the ways to process the values in a std::variant. Sum types What is a sum […]
The post Modern C++ Features – std::variant and std::visit appeared first on .
I have written about the code style of having “trailing return types everywhere” in the past. My advice back then was to use them only when necessary. I might have […]
The post Trailing Return Types, East Const, and Code Style Consistency appeared first on .
Two weeks ago, I attended the ACCU Conference in Bristol again, and again it was a blast. ACCUConf is by far the most interesting and enjoyable conference I have attended […]
The post ACCUConf 2018 Trip Report appeared first on .
We often use standard containers as members of our classes. In a lot of cases, the semantics we actually need is not equivalent to the semantics the containers provide. A […]
The post Tailor Standard Containers to Your Needs appeared first on .
Contrary to Sunday’s orchestrated April Fool’s posts, raw pointers are not going anywhere. However, there are some things in those posts that are based on reality. I’ll go into a […]
The post Raw Pointers Are Gonna Stay! appeared first on .
There’s some great news coming from the C++ standards committee: Raw pointers are gone – or rather will be in C++20. Gone, finally Two weeks ago, the ISO C++ standards […]
The post Raw Pointers Are Gone! appeared first on .
I have had a lot of questions and discussions lately about the necessity for a code of conduct at conferences. I boycott any conference that does not have one or […]
The post Code of Conduct – why I Insist appeared first on .
In my last post, I wrote about forward declarations for normal classes. Today, I give you some information about forward-declaring templates and enums. Forward-declaring Enums As I wrote in the […]
The post Forward-declaring Templates and Enums appeared first on .
As promised last week in my post about strange include techniques, I will go into reducing compile time dependencies. Reducing dependencies by shifting them from headers to source files can […]
The post Forward Declarations to Reduce Compiletime Dependencies appeared first on .
After having had to clean up some unusual #include techniques, I’ll put together some advice on how not to use #include – and how to use it. Last week I […]
The post #include – Don’t get fancy appeared first on .
In many projects, there is a certain amount of code generation. The generated code is not seldom treated as a second-class citizen, the only measurement of code quality being whether […]
The post Clean Code Generation appeared first on .
Doing code reviews means interacting with other humans, which we need to take into account. We also often have the luxury of being able to choose the reviewer, and the […]
The post Code Reviews – The Human Aspect (Part 5) appeared first on .
We finally come to the core post of this series – how to do code reviews. This post is part of a series of posts about code reviews: Code Reviews […]
The post Code Reviews – How? (Part 4) appeared first on .
The “how” part of this post about code reviews got rather long, so I had to split it into two parts. This part is about preparing our code and our […]
The post Code Reviews – Preparation (Part 3) appeared first on .
Now that we know good reasons to do code reviews, which parts of our code need to be reviewed? What does not need review? This post is part of a […]
The post Code Reviews – What? (Part 2) appeared first on .
Are you doing code reviews with your current team? Do you feel they help a lot or are they just a waste of time? In part 1 of this blog […]
The post Code Reviews – Why? (Part 1) appeared first on .
A few days ago, I attended the Meeting C++ conference in Berlin, the third year in a row. As usual, I had a lot of fun and interesting conversations with […]
The post Meeting C++ 2017 Trip Report appeared first on .
In the last days, I’ve played around with Cevelop a bit, mainly interested in the refactoring capabilities it offers. Of course, one of the main points of a modern IDE […]
The post Refactoring Support in Cevelop appeared first on .
Code smells are indicators that there might be something afoul in our code. Here is a list of some of the most important smells. What are code smells? A code […]
The post Code Smells – a Short List appeared first on .
I recently got an email, asking me how I approach an unknown code base. Here’s an answer. It’s a common situation we face when we join a new project. We […]
The post Approaching an Unknown Code Base appeared first on .
Whenever you start something that will be “work in progress” for some time, take some sufficiently detailed notes. Have you ever come back from lunch, only to wonder what exactly […]
The post Taking Notes About Work in Progress appeared first on .
Last week I have touched source file organization of generated code. Today I’ll share some thoughts on testability of code when a part of it is generated. Code generation may […]
The post Generated Code appeared first on .
It’s time to write about project file organization again (See part 1 and part 2). Recently I came across two cases of confusion that, in my opinion, could have been […]
The post Source File Organization for C++ Projects Part 3: Dependent Repositories and Generated Code appeared first on .
The most important term I learned in the past months is “Ubiquitous Language”: speak the language of your domain everywhere. The term seems to come from the world of Doman […]
The post What’s Ubiquitous Language and Why You Should Care appeared first on .
Dipping my toes into a new project, I got a bunch of ugly warnings about a ton of C-casts inside a macro definition. Trying to get away from them was […]
The post reinterpret_cast vs. constant expression appeared first on .
Every refactoring can be composed of a set of simple basic steps. Knowing these basic refactoring steps is crucial when we want to continuously compile and test during the refactoring. […]
The post Basic Refactoring Steps appeared first on .
With C++17, we get class template argument deduction. It is based on template argument deduction for function templates and allows us to get rid of the need for clumsy make_XXX […]
The post Modern C++ Features – Class Template Argument Deduction appeared first on .
Online compilers can be useful tools to quickly compile a snippet of code without having to install a proper compiler on our computer. They can be especially useful to play […]
The post C++ Online Compilers appeared first on .