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.”

We really need some safeguards against the richness of C++.

The AtomicObject team described well on their website the danger of the richness of C++:

C++ is an immensely rich language. This richness is both a blessing and a curse. A blessing, because of the expressive power and support for several programming paradigms; a curse because this richness means complexity, and there is much to master. C++ is a language to grow with, one for which each experience can teach new features, or better understanding.

Since each of C++’s features may interact with the others, learning C++ feels like gradually filling in a not-so-sparse matrix of knowledge formed by the cross product of the C++ feature vector with itself. No serious use of the language should be undertaken without good references at hand.

Continue reading “We really need some safeguards against the richness of C++.”

The first enemy of C++ is its past.

Before the initial standardization in 1998, C++ was developed by Bjarne Stroustrup at Bell Labs since 1979, as an extension of the C language as he wanted an efficient and flexible language similar to C

In 1983, “C with Classes” was renamed to “C++”, adding new features that included virtual functions, function name and operator overloading, references, constants, type-safe free-store memory allocation (new/delete), improved type checking. Continue reading “The first enemy of C++ is its past.”

The Importance of C++ Distributed Build Systems

As C++ developer if you have already build a C# or a java project you could be surprised by the speed of the build compared to C++. For some C++ projects it could take few minutes and for others, it could take many hours. It depends on the project size.
And even if the compilation phase is parallelized by using the cores available, the build still take too long compared to the other languages. Here are some reasons from this good stack overflow answer: Continue reading “The Importance of C++ Distributed Build Systems”