Explore the design of a modern C++ library : MemCache++ case study.

MemCache++ is a light-weight, type-safe, simple to use and full-featured Memcache client. It was developed by Dean Michael Berris who is a C++ fanatic and currently works at Google Australia. He also is part of the Google delegation to the ISO C++ Committee.

Studying the well-designed libraries is recommended to elevate your  C++ design and implementation skills, and the goal of this article is to discover some memcache++ design choices that make it easy to understand and use. Continue reading “Explore the design of a modern C++ library : MemCache++ case study.”

Don’t touch to my C++ code.

Back to 2005  when I  worked in a company where most of the code was developed in C++, in 2006 the managers decide to develop the new projects with C# and also migrate some C++ projects to C#, here were  their arguments against C++:

  • C++ is too complex.
  • The C++ build system is too difficult to manage and maintain.
  • C++ is stagnated for many years and it’s on its way to dying.
  • It becomes very difficult to recruit a C++ developer.

Continue reading “Don’t touch to my C++ code.”

What if the internet connection is down. Do you still productive as C++ developer?

As developer, How many times during a day you need to ask google for something related to your work? How to use a library? Is there a fix for an encountered problem?

Maybe the answer is at least once a day.

Currently and as developers, the internet saves us a lot of time. Whatever the problem you have, just search the right keywords in google and instantly and in many cases you have a result that matches your need. Continue reading “What if the internet connection is down. Do you still productive as C++ developer?”

Flashback to explore the C++ algorithms implementations over years.

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 “Flashback to explore the C++ algorithms implementations over years.”

Tracking the hidden duplicate code in a C++ code base.

It’s known that the presence of duplicate code has negative impacts on software development and maintenance. Indeed a major drawback is when  an instance of duplicate code is changed for fixing bugs or adding new features, its correspondents have to be changed simultaneously.

The most popular reason of duplicate code is the Copy/Paste operations, and in this case the source code is exactly similar  in two or more places , this practice is discouraged in many articles, books, and web sites.However,  sometimes it’s not easy to practice the recommendations, and the developer chose the easy solution: the  Copy/Paste method. Continue reading “Tracking the hidden duplicate code in a C++ code base.”

Try to understand the Linus Torvalds C++ opinion.

Linux, Php, and Git are a popular projects developed with C, in the other side OpenOffice, firefox, Clang, Photoshop are developed with C++, so it’s proven that each one is a good candidate to develop complex applications. Try to prove that a language is better than the other is maybe not the good debate. However we can discuss the motivations behind choosing one of them.

When I discovered the opinion of Linus Trovalds about C++, and as a C++ developer I totally disagree with his point of view. But it’s a point of view from the lead developer of the Linux kernel and git and he can’t be totally wrong. Continue reading “Try to understand the Linus Torvalds C++ opinion.”

Some C++ good practices from the OpenCV source code

OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real-time computer vision, developed by Intel Russia research center in Nizhny Novgorod. The library is cross-platform. It focuses mainly on real-time image processing.

OpenCV is widely used, Adopted all around the world, for end users, it’s very mature and powerful, for developers it’s well implemented and designed. The OpenCV developers used very basic principles which makes it very simple to understand and maintain.

Let’s discover some OpenCV design choices: Continue reading “Some C++ good practices from the OpenCV source code”

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

The 15 C++11 features you must really use in your C++ projects.

During the last few years, we talk about the “C++ Renaissance”. We have to admit that Microsoft was a major part of this movement, I remember this video where Craig Symonds and Mohsen Agsen talked about it.

In 2011 Microsoft announced in many articles the comeback of C++, and Microsoft C++ experts like Herb Sutter did 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 “The 15 C++11 features you must really use in your C++ projects.”