Learn from Old Games: Prince of Persia & Doom3

Currently many mature libraries and frameworks exist for each programming language and many advanced features were added to the languages. But what about the old projects where the language features were not advanced as now and no many mature libraries existed yet?

Let’s explore some old well implemented projects and discover how they are implemented. Continue reading “Learn from Old Games: Prince of Persia & Doom3”

Make Your Visual C++ Experience Much Better.

Visual C++ is one of the most used C++ IDEs which provides many interesting features to developers, each new version brings new major features and many extensions are available to add more nice features to it.In this post, I will talk about some useful features provided by CppDepend.
Continue reading “Make Your Visual C++ Experience Much Better.”

Why should you care about C/C++ static analysis?

Many resources discuss the benefits of using the static analysis tools, and how they could help you  improve your code base.  Somehow they show you what you could gain after using them. But did you asked yourself what do you lose if you don’t use them?

Let’s take an example of a memory corruption due to  free of a pointer twice, this cause random crash. It could take few hours or maybe many days to find this kind of issue. Many similar risky problems exist in C/C++ specially concerning memory corruption.  Just one problem could cost few dollars or many thousands of dollars. Continue reading “Why should you care about C/C++ static analysis?”

C++11/C++14/C++17 Features in WinObjC: A Case Study

In a previous post we talked about the clang-tidy tool to detect where you can use some new C++11/C++14/C++17 features to modernize your C++ source code.  But how we can easily detect where the new C++ features are used in a project?

Facebook and Google use intensively C++11 in their source code. Folly from Facebook as we discovered in a previos post use almost all the C++11 features and I was curious to know if Microsoft also use the new  C++11 standards in their open sourced code. Continue reading “C++11/C++14/C++17 Features in WinObjC: A Case Study”

Improve your C++ skills by exploring the Clang test suite.

Many resources exist talking about the better way to learn a programming language, we can enumerate:

  • Reading a book or a magazine.
  • Resources from web sites.
  • From a collegue.
  • Doing a training.
  • Explore open source projects.

However it’s difficult to find resources that explains easily the  advanced C++ techniques using mini samples and if you are interested to improve your C++ skills, it’s recommended to explore the standards which is a very difficult task, few developers could read a big pdf with more than 1500 pages. Continue reading “Improve your C++ skills by exploring the Clang test suite.”

Easily detect where you can modernize your C++ codebase.

C++11/C++14/C++17  includes several additions to the core language and extends the C++ standard library. Some of these new features are very easy to use and bring a big added value to your C++ projects.

It’s interesting to detect automatically places where we can use some C++11 new features. For such needs clang-tidy is a standalone tool used to automatically convert C++ code, written against old standards, to use features of the newest C++ standard where appropriate. 

Developers who utilze Clang could easilly use the clang-tidy tool. However for Visual C++ developers and other compilers users it’s not an easy task to benefit from this interesting tool result.

To let all C++ developers benefit from this amazing tool, CppDepend is integrating it now in its latest windows version 2018.1 in order to detect the places where the following features could be used: Continue reading “Easily detect where you can modernize your C++ codebase.”

Why the C++ modules feature is very important for the C++ future?

C++ have stagnated for many years, and many developers were confident that the language will have the same destiny as Cobol, Fortran and VB6. No new projects will be developed with it and  C++ developers will just do the maintenance of the existing projects. But against all odds, C++ reborn from its ashes and the new standards changes a lot how the language is used. Continue reading “Why the C++ modules feature is very important for the C++ future?”

Exploring SQLite Codebase: Improve C++ Skills

16 years after its first checkin, SQLite is the most widely deployed database engine in the world. An open source project such as this is a good candidate for learning how to make your code easy to understand and to maintain.

Let’s discover some facts about the SQLite code base, beginning with the following code snippet: Continue reading “Exploring SQLite Codebase: Improve C++ Skills”

The refactoring overhead costs of the C++ mechanisms over C

Few years ago when Linus Trovalds criticized C++ and told:

inefficient abstracted programming models where two years down the road you notice that some abstraction wasn’t very efficient, but now all your code depends on all the nice object models around it, and you cannot fix it without rewriting your app.

Many C++ developers does not appreciate this opinion. However we must admit that each language facility comes with a price and it’s better to know it than to think that my best programming language is perfect. Continue reading “The refactoring overhead costs of the C++ mechanisms over C”