The Key to Successful OOP C++ Project: Stable Abstractions

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”

Boost vs C++ Standards: The Future of C++

In 1998 a proposal for  a C++ Library Repository Web Site was posted by Beman G. Dawes. The original vision aims to satisfy two major goals:

  • A world-wide website containing a repository of free C++ class libraries would be of great benefit to the C++ community. Although other sites supply specific libraries or provide links to libraries, there is currently no well-known website that acts as a general repository for C++ libraries. The vision is this: a site where programmers can find the libraries they need, post libraries they would like to share, and which can act as a focal point to encourage innovative C++ library development. An online peer review process is envisioned to ensure library quality with a minimum of bureaucracy.
  • Secondary goals include encouraging effective programming techniques and providing a focal point for C++ programmers to participate in a wider community. Additionally, such a site might foster C++ standards activity by helping to establish existing practice.

Continue reading “Boost vs C++ Standards: The Future of C++”

Learn Design Patterns from RigsOfRods Game Project

The majority of developers have already heard about the design patterns, GOF(Gang Of Four) patterns are the most popularized, and each developer has his way to learn them , we can enumerate:

  • Reading a book.
  • From web sites.
  • From a collegue.
  • Doing a training.

Regardless of the method chose, we can learn by heart the patterns and spent hours to memorize their UML diagrams, but sometimes when we need to use them in a real project, it becomes more problematic. Continue reading “Learn Design Patterns from RigsOfRods Game Project”

C++ Standards and Best Practices: The Perfect Combo

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”

The hidden cost of a high coupling with a C++ framework.

Many C++ libraries and frameworks are available and using them can accelerate the development of your projects. In this post we will explore the drawback of having a C++ application highly dependent with an external framework. But first what’s the difference between a library and a framework? And why the high coupling with a framework could have more drawbacks than a high coupling with a library? Continue reading “The hidden cost of a high coupling with a C++ framework.”

Learn from the C++ POCO libraries how to write a clean code.

The POCO C++ Libraries are a collection of open source class libraries for developing network-centric, portable applications in C++.

POCO stands for POrtable COmponents. The libraries cover functionality such as threads, thread synchronization, file system access, streams, shared libraries and class loading, sockets and network protocols (HTTP, FTP, SMTP, etc.), and include an HTTP server, as well as an XML parser with SAX2 and DOM interfaces and SQL database access.

The modular and efficient design and implementation makes the POCO C++ Libraries well suited for embedded development. Continue reading “Learn from the C++ POCO libraries how to write a clean code.”

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

Master C++ Concurrency with ‘Concurrency with Modern C++

C++11 and beyond introduced a new thread library. This library includes utilities for starting and managing threads. It also contains utilities for synchronization like mutexes and other locks, atomic variables and other utilities.

It’s a good news to have a standard way to manage the concurrency in C++, indeed before the introduced features in the new standards, many libraries and ways existed to manage the concurrency in the C++ projects. Continue reading “Master C++ Concurrency with ‘Concurrency with Modern C++”

Easy steps to modernize your C++ code.

Recently the C++ community  promotes the use of the new standards to modernize the existing code base.  However even before the release of the C++11 standard some known 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 “Easy steps to modernize your C++ code.”