Yearly Archives: 2017

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

Fluent C++ Is 1 Year Old

Published November 17, 2017 - 9 Comments
Fluent C++ birthday 1 year old

So it’s been a year! It’s been a year since I decided to take up the project of running a blog. A year during which I met an incredible number of incredible people, where I wrote like a madman, where I discovered a part of myself that could actually hold that virtual pen and carry […]

Getting Inspired by Good Code

Published November 14, 2017 - 15 Comments
Getting inspired good code2

One way to write better code is… to read lots of great code! But where to find good code? In this week’s video, I detail how this technique works and several places easy to access to find good C++ to take inspiration of. And yes, you are going to see videos popping up on Fluent […]

Using Strong Types to Return Multiple Values

Published November 10, 2017 - 14 Comments

We’ve seen how strong types helped clarifying function interfaces by being explicit about what input parameters the function expected. Now let’s examine how strong types help clarifying functions that return several outputs. We’ll start by describing the various ways to return several outputs from a function in C++, and then see how strong types offer an […]

Calling Functions and Methods on Strong Types

Published November 7, 2017 - 7 Comments
Functions methods strong types C++

Strong types are a way to put names over data in code in order to clarify your intentions, and the more I work on it the more I realize how deep a topic that is. So far we’ve seen the following subjects in our series on strong types: Strongly typed constructors Strong types for strong interfaces […]

How Unit Tests Help Express Your Code’s Intent

Published November 3, 2017 - 2 Comments
unit test intentions

Guest writer Tim Scott talks to us about how to make unit tests express the intentions of a piece of code. Tim is a software developer and tester passionate about software quality and automation. You can find him online on DeveloperAutomation.com, his blog about increasing quality and developer efficiency through automation, or on his Twitter or […]

Function Aliases In C++

Published October 27, 2017 - 10 Comments

One thing that dramatically improves the expressiveness of a piece of code is respecting its levels of abstractions. It sometimes involves massive refactorings, but in many cases it just comes down to choosing good names in your code. Picking a name that is consistent with the abstraction level of the surrounding code can make a […]

The Results of the Expressive C++17 Coding Challenge

Published October 23, 2017 - 14 Comments
Expressive C++17 coding challenge

The Expressive C++17 coding challenge has come to an end after being open for three weeks, for submissions of the clearest code using C++17. It was a joint challenge between Bartek’s coding blog and Fluent C++, and its point was to learn collectively how to use C++17 to write clearer code. We’ll see the winner and […]