Jonathan Boccara's blog

Why Expressive Code Matters

Published December 22, 2017 - 0 Comments
Why expressive code matters

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 […]

More Tips On Naming

Published December 15, 2017 - 0 Comments
More tips on naming

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 […]

Mixin Classes: The Yang of the CRTP

Published December 12, 2017 - 2 Comments
Mixin classes CRTP

Now that we’re clear on how the CRTP works, let me share with you another technique involving templates that is complementary to the CRTP: Mixin classes. I learnt about mixin classes by watching Arthur O’Dwyer’s Template Normal Programming talk at CppCon (actually you can find them in the slides because they were skipped over during the presentation). I find […]

Make Your Functions Functional!

Published December 8, 2017 - 2 Comments
functions functional inputs outputs

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 […]

A Minimal Interface: Both Expressive And Fast Code

Published December 5, 2017 - 0 Comments
Minimal interface

Have you ever used std::inserter to insert the outputs of an STL algorithm into a sorted container such as an std::set? And if you have, weren’t you annoyed by how its interface forces you to specify the position to insert the elements in the set? I find this very annoying, because most of the time we have […]

How to Use the STL With Legacy Output Collections

Published November 24, 2017 - 4 Comments
STL legacy code

When you start using the STL and its algorithms in your code, it’s a bit of a change of habits. And then after a while you get used to it. Then it becomes a second nature. And then even your dreams become organized into beautifully structured ranges that fly in and out of well-oiled algorithms. […]

Using Bad Code to Learn How to Write Good Code

Published November 21, 2017 - 0 Comments
bad code

Not all the code which is out there is as expressive as what we’d like. And working with bad code can be hard on motivation sometimes. In this week’s video, you’ll see 3 ways to put bad code to use, and learn from it how to write great code! Don’t want to miss out ? […]