OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, flexible 3D rendering engine written in C++ designed to make it easier and intuitive for developers to produce applications utilizing hardware-accelerated 3D graphics. The class library abstracts the details of using the underlying system libraries like Direct3D and OpenGL and provides an interface based on world objects and other high-level classes. Continue reading “OGRE Engine: A Case Study on OOP Principles”
Author: CppDepend Team
We really need some safeguards against the richness of C++.
The AtomicObject team described well on their website the danger of the richness of C++:
C++ is an immensely rich language. This richness is both a blessing and a curse. A blessing, because of the expressive power and support for several programming paradigms; a curse because this richness means complexity, and there is much to master. C++ is a language to grow with, one for which each experience can teach new features, or better understanding.
Since each of C++’s features may interact with the others, learning C++ feels like gradually filling in a not-so-sparse matrix of knowledge formed by the cross product of the C++ feature vector with itself. No serious use of the language should be undertaken without good references at hand.
Continue reading “We really need some safeguards against the richness of C++.”
The first enemy of C++ is its past.
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 “The first enemy of C++ is its past.”
Domain Driven Design, Immutability and C++.
There is a powerful and simple concept in programming that is widely underused: Immutability
Basically, an object is immutable if its state doesn’t change once the object has been created. Consequently, a class is immutable if its instances are immutable. Continue reading “Domain Driven Design, Immutability and C++.”
The Importance of C++ Distributed Build Systems
As C++ developer if you have already build a C# or a java project you could be surprised by the speed of the build compared to C++. For some C++ projects it could take few minutes and for others, it could take many hours. It depends on the project size.
And even if the compilation phase is parallelized by using the cores available, the build still take too long compared to the other languages. Here are some reasons from this good stack overflow answer: Continue reading “The Importance of C++ Distributed Build Systems”
Is the Free Lunch Over? Revisiting Herb Sutter Prediction
Back in March 2005 when herb Sutter published its famous article “The free lunch is over” and predicted a Concurrent Programming Revolution as big as Object-Oriented Revolution. And here’s a short explanation from the article about the prediction motivation : Continue reading “Is the Free Lunch Over? Revisiting Herb Sutter Prediction”
Unleashing C++ Power: Richness in Low-Level Code
How many times do you read a reflexion concerning C++ like this one:
C++ is a difficult language even for experienced C++ developers. Even for the simplest algorithms you have to explain many of the language subtleties. Consider a Hello World example: Continue reading “Unleashing C++ Power: Richness in Low-Level Code”
John Carmack: A C++ Programming Legend
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”
Thrashing Impact on C++ Performance: Doxygen Analysis
When the processes running on your machine attempt to allocate more memory than your system has available, the kernel begins to swap memory pages to and from the disk. This is done in order to free up sufficient physical memory to meet the RAM allocation requirements of the requestor.
Excessive use of swapping is called thrashing and is undesirable because it lowers overall system performance, mainly because hard drives are far slower than RAM. Continue reading “Thrashing Impact on C++ Performance: Doxygen Analysis”
OOP vs Generics : “Is” vs “Has” 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.
And as Thomas Becker explains in this interesting article, there’s a tension between the generic programming and OOP. And here’s from the article the opinion of Alexander Stepanov and elder statesman about OOP: Continue reading “OOP vs Generics : “Is” vs “Has” approach.”