The Care and Feeding of Pre-Compiled Headers

The Care and Feeding of Pre-Compiled Headers

The great majority of the literature on warfare concentrates on topics such as formations, maneuvers, equipment, and training. What they often leave out is the importance of the supply lines. The most cunningly devised plan will be worthless in the long term if your supply lines fail. The same can be said for large-scale C++ development. Most of the books and articles out there deal with class hierarchies, object-oriented design, and mind-bending template tricks. However, when it comes down to it, a solid physical structure and good code layout will go a long way towards making all programmers productive. When the milestones near and the pressure piles on, a badly structured C++ codebase is likely to be as fatal as the cold, Russian winter was to Napoleon’s army. ...

How Incredible Is Incredibuild?

How Incredible Is Incredibuild?

There is no doubt that Xoreax’s Incredibuild will speed up most full builds of C++ projects using Microsoft Visual C++ to varying degrees. I’m not going to argue that. But is using Incredibuild in your project really a good idea? ...

Even More Experiments with Includes

Even More Experiments with Includes

One aspect of the scientific process is publishing detailed experiment descriptions and results so that they can be independently verified by other scientists. That’s exactly what I decided to do after reading Kyle Wilson’s surprising results in his article “Experiments with Includes.” ...

Exploring the C++ Unit Testing Framework Jungle

Exploring the C++ Unit Testing Framework Jungle

Update (Apr 2010): It’s been quite a few years since I originally did this comparison. Since then, Charles Nicholson and I created Unit Test++, a C/C++ unit-testing framework that addresses most of my requirements and wish-list items. It’s designed to be a light-weight, high-performance testing framework, particularly aimed at games and odd platforms with limited functionality. It’s definitely my framework of choice and I haven’t looked at new ones in several years because it fits my needs so well. I definitely encourage you to check it out. -——— One of the topics I’ve been meaning to get to for quite a while is the applicability of test-driven development in games. Every time the topic comes up in conversations or mailing lists, everybody is always very curious about it and they immediately want to know more. I will get to that soon. I promise! In the meanwhile I’m now in the situation that I need to choose a unit-testing framework to roll out for my team at work. So, before I get to talk about how to use test-driven development in games, or the value of unit testing, or anything like that, we dive deep into a detailed comparison of existing C++ unit-testing frameworks. Hang on tight. It’s going to be a long and bumpy ride with a plot twist at the end. ...

Book review: Effective STL

Book review: Effective STL

Have you read Effective C++ also by Scott Meyers? No? Go buy it right now, read it, reread it, and then come back here. I guarantee that it will make a huge difference in the way you work. ...

Simple Is Beautiful

Simple Is Beautiful

If you’ve read some of my other articles, you know that I believe that the best code is no code at all. But what if you actually have to write some code? What then? This article deals with that question and shows the importance of simplicity. ...

Physical Structure and C++ - Part 2: Build Times

Physical Structure and C++ - Part 2: Build Times

For small projects, we can blissfully code away without paying any attention to physical structure and we won’t be any worse off for it. However, as a project grows, it reaches a critical point where build times become unbearably slow. This article looks into the reasons for such slow build times and explores some techniques to speed things up. ...

Physical Structure and C++ - Part 1: A First Look

Physical Structure and C++ - Part 1: A First Look

The physical structure of a C++ program is very important yet it is often overlooked. This two-part article will attempt to explain why the physical structure of a program is so important, present some useful guidelines, and show its effect on compile times. ...