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.”
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”
Every project has its own style guide: a set of conventions about how to write code for that project. Some managers choose basic coding rules, others prefer very advanced ones and for many projects, no coding rules are specified, and each developer uses his style.
It is much easier to understand a large codebase when all the code in it is in a consistent style. Continue reading “Write Efficient C Code: Learn from Linus Torvalds”
Have you already seen a basketball or a soccer player plays a simple yet effective game to such a point that you say: Why couldn’t everybody play like him, he uses only easy techniques?
And as C++ programmer I had the same remark when exploring the John Carmack source code. It’s so simple, we wonder why we can ‘t develop like him.
Let’s explore some Doom3 source code choices and try to understand why the code even if it’s simple, it’s very efficient.
On November 23, 2011 id Software maintained the tradition and it released the source code of their previous engine. This source code was reviewed by many developers, here’s as an example of Doom3 feedback from fabien (orginal source): Continue reading “John Carmack: A C++ Programming Legend”
Static analysis is not only about directly finding bugs, but also about finding bug-prone situations that can decrease code understanding and maintainability. Static analysis can handle many other properties of the code: Continue reading “Tracking C++ Code Smells: Database Approach”
As Bjarne Stroustrup points out, “C++ is a multi-paradigmed language.” It supports many different styles of programs, or paradigms, and object-oriented programming is only one of these. Some of the others are structured programming, and generic programming. In the last few years C++ experts like Andrei Alexandrescu, Scott Meyers and Herb Sutter promotes the uses of the generic programming and they qualify it as Modern C++ Design.
Here’s what say Andrei Alexandrescu about the Modern C++ design:
Modern C++ Design defines and systematically uses generic components - highly flexible design artifacts that are mixable and matchable to obtain rich behaviors with a small, orthogonal body of code.
Three assertions are interesting in his point of view: Continue reading “C++20 Concepts: Eliminating Generics Paradigm Drawbacks”
Robert C.Martin wrote an interesting article about a set of metrics that can be used to measure the quality of an object-oriented design in terms of the interdependence between the subsystems of that design.
Here’s from the article what he said about the interdependence between modules:
What is it that makes a design rigid, fragile and difficult to reuse. It is the interdependence of the subsystems within that design. A design is rigid if it cannot be easily changed. Such rigidity is due to the fact that a single change to heavily interdependent software begins a cascade of changes in dependent modules. When the extent of that cascade of change cannot be predicted by the designers or maintainers the impact of the change cannot be estimated. This makes the cost of the change impossible to estimate. Managers, faced with such unpredictability, become reluctant to authorize changes. Thus the design becomes rigid.
And to fight the rigidity he introduces metrics like Afferent coupling, Efferent coupling, Abstractness and Instability. Continue reading “The Key to Successful OOP C++ Project: Stable Abstractions”
C++ has been stagnated for many years, and many developers were confident that the language would have the same destiny as Cobol, Fortran, and VB6. On the contrary and against all odds, C++ is reborn from its ashes and the new standards are importantly changing how the language is used.
The evolution of C++ by adding many interesting features does not mean that c++98 standard was a bad standard. Indeed, it gives us many interesting features to develop all kinds of applications. We can enumerate many well-developed old C++ projects, where the code is easy to maintain and evolve. Continue reading “C++ Standards and Best Practices: The Perfect Combo”
Quake III Arena is a multiplayer-focused first-person shooter video game released in December 1999. The game was developed by id Software. Quake III was a very popular game and even now it’s still popular and many gamers enjoy with it.
The original source code of Quake3 can be found here .
Artem Kharytoniuk decide to create it’s own version and his goal is described in it’s repo:
This repository contains updated version of the original Q3 codebase with reorganized code structure, compatibility fixes, build setup for the latest Visual Studio and modifications that update the core tech but preserve original gameplay, look and feel. Continue reading “Comparing Quake3 Original and Kenny Edition Codebases”
C is one of the most popular language around all the world, it was initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs. Many thousands of projects was developed using C since then. It’s used for all kinds of needs, we can enumerate OS, embedded applications, gaming development, image processing, word processing and database engines.
Almost all the other languages have evolved over years, it’s not really the case of the C language, for example the C11 standatd does not bring many new features to C, only few modifications are introduced. Continue reading “Why C Remains Popular After 50 Years?”