Jonathan Boccara's blog

How to Use is_permutation on Collections of Different Types

Published June 28, 2019 - 0 Comments

std::is_permutation is an STL algorithm that checks if two collections contain the same values, but not necessarily in the same order. We have encountered is_permutation in the STL algorithms on permutations, and we’ve seen how it was implemented. If you’d like a refresher on std::permutation, check out those two articles to get warmed up. Today we’re focusing […]

Understanding the implementation of std::is_permutation

Published June 25, 2019 - 0 Comments

Knowing your STL algorithms is a good thing. And knowing what’s inside of them is a great way to go further in their study. In that spirit, let’s dig into the implementation of std::is_permutation. It’s a nice algorithm to study, as it can be implemented by using other STL algorithms and it has some interesting […]

The Cons and Cons of the Hungarian Notation

Published June 21, 2019 - 0 Comments
hungarian notation

wMaybe wthe wheadline wof wthis warticle wgave wyou wa whint wabout wmy wposition won wthe wHungarian wnotation p. And maybe the above sentence does, too. Hungarian notation can mean several things in programming, but the common meaning is that it’s a convention to prefix the name of each object in code with a tag about its type. To […]

The Shortest Name There Is

Published June 18, 2019 - 0 Comments
underscore

The names with give to the objects in code are a fabulous tool to express our intentions for the next developer to read them. Especially with good names. But in some cases, the name of an object becomes a burden. It happens when that object doesn’t make much sense in the first place, but for […]

Should Private Methods Always Be Const?

Published June 14, 2019 - 0 Comments
Private methods

What is the job of a function? A function takes inputs and computes outputs based on them. And to clarify a function’s interface, we saw how important it was to clarify what its inputs and outputs are. There is a particular sort of function in C++ that use specific conventions to express their inputs and […]

Why You Should Separate Commands from Queries

Published June 11, 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 […]

Write Your Own Dependency-Injection Container

Published June 7, 2019 - 0 Comments

This post focuses on the use of a design pattern to connect the modules of a codebase in a structured and testable way. This is a guest post from Nicolas Croad. Nicolas has been a professional developer primarily in c++ for most of a 15 year career. Presently working in real time graphics for the New […]

Get Better with Legacy Code This Summer (Limited Offer)

Published June 4, 2019 - 0 Comments

Do you have to work with legacy code? If you answered Yes, then you’re like most software developers. Is it a pleasant experience? If you answered No, then you’re still like most software developers. The reality of Legacy Code It shouldn’t be that way. Most of us choose to become programmers out of passion, so […]