Jonathan Boccara's blog

Better Macros, Better Flags

Published May 28, 2019 - 0 Comments

Today’s guest post is written by guest author Foster Brereton. Foster is a 20-year C++ veteran at Adobe, and a Senior Computer Scientist on Photoshop. He is also a contributor to the Adobe Source Libraries and stlab.cc. He can be reached at @phostershop on Twitter. Once thought of as a handy tool in the programmer’s […]

The Expressive Absence of Code

Published May 21, 2019 - 0 Comments

When we think about expressive code, we generally think about the code we write. But as I learned while watching Kate Gregory’s ACCU talk What Do We Mean When We Say Nothing At All?, expressive is also code that we don’t write. What does that mean? What do we mean when we say What Do […]

3 Types of Macros That Improve C++ Code

Published May 14, 2019 - 0 Comments
macro C++

Macros are bad, it’s a well known fact, they’re vestiges from the past that really, really don’t fit well with the ever-growing modernity of C++. Well, except the macros that are good, that is. There is a rule that says that every rule has its exceptions. It implies that this rule itself has exceptions too, […]

How to Send an STL Collection to a Curried Object

Published May 10, 2019 - 0 Comments
STL intersperse

After seeing how to send individual objects to a curried object, let’s see how we can haul a whole collection into one of those curried creatures. One use case for this is to intersperse a collection of strings with commas. If you’re jumping in the topic of curried objects just now, a curried object is […]

How to Output Strings Separated by Commas in C++

Published May 7, 2019 - 0 Comments
string separated comma C++

Every once in a while we all face that problem: how to output strings separated by commas (or by any other character), and not have a comma appear after the last one? Or rather: how to avoid writing a comma after the last string AND keep the code clean of the annoying bookkeeping that this […]

Curried Objects in C++

Published May 3, 2019 - 0 Comments

Curried objects are like facilitators. They consist in intermediary objects between a caller and a callee, and helps them talk to each other in a smooth way. This ability makes the code simpler and easier to read. While having seen and used the pattern at various places, the first time I encountered the actual term […]

The Common Vocabulary of Software Developers

Published April 30, 2019 - 0 Comments
common vocabulary software developers

Writing expressive code is putting together code that conveys our intents, for other people to understand them. And the thing with code is that it tends to lasts. So what you write today in your codebase is like a letter that you address to people living in the future. Those people include all the developers […]