Why C Remains Popular After 50 Years?

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

Quick overview of how Clang works internally

It’s proven that Clang is a mature compiler For C and C++ as GCC and Microsoft compilers, but what makes it so special is the fact that it’s not just a compiler. It’s also an infrastructure to build tools. Thanks to its library based architecture which makes the reuse and integration of new features more flexible and easier to integrate into other projects.
Continue reading “Quick overview of how Clang works internally”

7 Common reasons of using the namespaces in a C++ project.

Namespaces were introduced to the C++ Standard in 1995 and usually they are defined like this:

A namespace defines a new scope. They provide a way to avoid name collisions.

Although namespaces are used extensively in recent C++ code, most older code does not use this facility. 

After exploring the source code of many C++ projects, here are some common reasons of using the namespaces in these projects. Continue reading “7 Common reasons of using the namespaces in a C++ project.”

Inside the Unreal Engine 4.5 source code

The Unreal Engine is a game engine developed by Epic Games, first showcased in the 1998 first-person shooter game Unreal. Although primarily developed for first-person shooters, it has been successfully used in a variety of other genres, including stealthMMORPGs, and other RPGs.

Its code is written in C++ and  it’s used by many game developers today. Its source code is available from GitHub and it’s free for students. Many amazing games were developed using this engine, it permits to produce very realistic rendering like this one. Continue reading “Inside the Unreal Engine 4.5 source code”

15 Essential C++11 Features to Enhance Your C++ Projects.

Over recent years, there has been much discussion about the “Renaissance of C++”. It’s undeniable that Microsoft played a significant role in this resurgence.

In 2011 Microsoft announced in many articles the comeback of C++, and Microsoft C++ experts like Herb Sutter attended many conferences to explain why C++ was back and mostly recommended the use of Modern C++. At the same time, the standard C++11 was approved and we began to talk about C++ as a new language. Continue reading “15 Essential C++11 Features to Enhance Your C++ Projects.”

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

Two easy approaches to leverage your C++ OOP design skills.

Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa. Low coupling is often a sign of a well-structured computer system and a good design, and when combined with high cohesion, supports the general goals of high readability and maintainability. The goal of this case study is to show the benefits of loose coupling and high cohesion, and how it can be implemented with C++. The case study consists of designing an application that accesses a file in order to get data, processes it, and prints the result to an output file. Continue reading “Two easy approaches to leverage your C++ OOP design skills.”