Even the White House wants you to abandon C and C++, It’s time to focus on C++ safety and join the Bjarne initiative.

The C and C++ languages are no longer favored by the highest American authorities. Indeed, the White House wishes for developers to use memory-safe languages. In this report published on Monday, the Office of the National Cyber Director (ONCD) of the White House invites developers to reduce the risk of cyberattacks by using languages without memory vulnerabilities. IT companies “can prevent the introduction of multiple vulnerabilities into the digital ecosystem by adopting secure languages,” the presidency said in a statement. It refers to those that are protected against buffer overflow, out-of-bounds reads, and memory leaks.

Continue reading “Even the White House wants you to abandon C and C++, It’s time to focus on C++ safety and join the Bjarne initiative.”

Are you curious to know where the move feature is used in your C++ projects, on your behalf?

Move semantics is a feature introduced in C++11 that allows more efficient transfer of resources (such as dynamic memory) from one object to another. It addresses the inefficiencies associated with deep copying objects, especially large ones, by allowing objects to “steal” the resources of other objects when possible, rather than duplicating them.

Before C++11, when you assigned one object to another, a copy constructor or assignment operator would be invoked, resulting in a deep copy of the object’s data. This process could be expensive, particularly for large objects or those containing dynamic memory allocations. This feature is particularly useful in scenarios where performance optimization is critical, such as in high-performance computing, game development, and resource-constrained environments.

Move semantics introduces the notion of “rvalue references” and a new concept called “move constructors” and “move assignment operators”.

Here’s how it works:

Continue reading “Are you curious to know where the move feature is used in your C++ projects, on your behalf?”

Top 10 C++ Libraries in 2024

C++ is a powerful programming language that provides a wide range of libraries to help developers build efficient and effective software. These libraries cover a variety of domains, including general-purpose programming, graphics, networking, databases, and more.

However, be careful choosing a software library is not always an easy task, specially if many concurrent libraries exist for a specific need. Many factors could influence a developement team to choose a library, here are some of them:

Continue reading “Top 10 C++ Libraries in 2024”

Explore a flexible C/C++ SonarQube plugin based on CppDepend.

Both CppDepend and SonarQube are static analyzers that offer a rule-based system to detect problems in C/C++ code. However, the CppDepend default Rules-Set has very few overlaps with the SonarQube rules

Basically, the SonarQube rules are good at analyzing what is happening inside a method, the code flow while the CppDepend code model, on which the CppDepend rules are based, is optimized for a 360 view of particular higher-scale areas including OOP, dependencies, metrics, breaking changes, mutability, naming…
Continue reading “Explore a flexible C/C++ SonarQube plugin based on CppDepend.”

Chris Lattner: Revolutionizing the C++ World

Maybe almost all C++ developers know the LLVM infrastructure and the Clang compiler. But how many know that Chris Lattner is their creator when he was only 25 years old. How it’s possible? I remember when I was 25 years I spend my time to understand the C++ basics 🙂

The story begins with a thesis

In late 2000, Lattner joined the University of Illinois at Urbana-Champaign as a research assistant and M.Sc. student. While working with Vikram Adve, he designed and began implementing LLVM, an innovative infrastructure for optimizing compilers, which was the subject of his 2002 M.Sc. thesis. He completed his Ph.D. in 2005, researching new techniques for optimizing pointer-intensive programs and adding them to LLVM. Continue reading “Chris Lattner: Revolutionizing the C++ World”

Chasm Theory: Exploring C Longevity, C++ Rebirth & Python’s Rise

How many times do you read “C++ is dead” or “Is the C programming language still used?”, but in the reality they still very popular.

And how many times we read “WOW this newcomer programming language is the best”, but after few years nothing really happens and the new language decrease in popularity. However, there are some exceptions, the most interesting one is python which rise from a not widely used scripting language to a very popular programming language. Continue reading “Chasm Theory: Exploring C Longevity, C++ Rebirth & Python’s Rise”

Defensive programming with new C++ standards

Defensive programming is a form of defensive design intended to ensure the continuing function of a piece of software under unforeseen circumstances. Defensive programming practices are often used where high availability, safety or security is needed.

Defensive programming is an approach to improve software and source code, in terms of: Continue reading “Defensive programming with new C++ standards”

Track the quality evolution of your C++ code base.

Each developer wants to have a clean code, easily readable and maintainable and with a few issues and bugs. And there’s no magic solution to achieve this goal. Each company has its own best practices and coding rules and try to define a process to keep the code very clean.

It’s not an easy task to measure the code quality of a project, many tools provide their algorithms to evaluate it depending on many factors: Continue reading “Track the quality evolution of your C++ code base.”