Jonathan Boccara's blog

How to Combine Functions with Logical Operators in C++

Published January 31, 2020 - 0 Comments

In C++, most STL algorithms can use one function to perform their job on a collection. For example, to extract all the even numbers from a collection, we can write code like this: auto const numbers = std::vector<int>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; auto results = std::vector<int>{}; std::copy_if(begin(numbers), end(numbers), back_inserter(results), isMultipleOf2); Assuming […]

Mikado Refactoring with C++ Feature Macros

Published January 24, 2020 - 0 Comments

This is a guest post by Vaughn Cato. Vaughn has been developing using C++ since the early 90’s and is still learning!  You can find him on Twitter @vaughncato. Thanks to Ricardo Nabinger Sanchez for his review of the article. Refactoring is a technique for making improvements to the design of a code base without […]

Rockstool Interview

Published January 21, 2020 - 0 Comments

I’ve been recently interviewed, not “interviewed” in the sense of job-interview, but “interviewed” in the sense of let’s interview this person to know about their story (which would also part of what you do in a job interview, but anyway). If you’re curious to know about my story and how I ended up doing what […]

Technical Debt Is like a Tetris Game

Published January 17, 2020 - 0 Comments

Technical debt, legacy code… if you’re a professional software developer you must have come across those terms, and even across some code that embodies them. But as a professional software developer, you also have to interact with people that don’t know your code. And sometimes, you have to convince these people that you need to […]

The Shapes of Code

Published January 14, 2020 - 0 Comments
shape of code

Every piece of code we write is unique, or pretty much. However, there are things that are common in a lot of code, even across various codebases, and even across various languages: the physical shape that code has. Beyond the mere visual aspect of code, the shape of a piece of code can carry information […]

No Raw For Loops: Assigning to a Data Member

Published January 10, 2020 - 0 Comments

A few years ago Sean Parent presented his famous C++ Seasoning talk, where he recommended avoiding raw for loop and using STL algorithms instead. This made a lot of people sensitive to this topic, and encouraged us to think about how to convert the for loops in our code into more declarative constructs. Recently I encountered a […]

The Dangers of Coupling and How to Avoid Them

Published December 31, 2019 - 0 Comments

This article is NWH, standing for Not Written Here. The concept of NWH is inspired from the NIH (Not Invented Here) syndrome which consists in refraining from using existing code from outside the company and reinventing the wheel every time. Just like it is good practice to look out for solutions developed elsewhere, we’re going […]