Sunday, July 23, 2006

Coding Standard Check

Parasoft C++Test is a coding standard verification tool. With about 700 rules taken from books such as Effective C++ and from famous coding standards, it tries to test the quality of your software. Rules cover not only formatting but also common mistakes. Test configurations allow you to choose which rules to test.  In the architect version, you are allowed to create and modify rules to adapt to your own coding standard. Visual Studio project can be imported, a C++Test project is then created and reflects compilation options.  Although a bit slow, surely because the application is coded in java, it does a pretty good job. Hopefully, the check is done incrementally. Rule infringements can be suppressed with an explanation comments. This suppression is saved in the project. Sharing the project on your source control, or using Parasoft sharing server allow programmers to share their suppression list.

The product comes in 3 versions:

-         Pro: perfect for programmer day-to-day check.

-         Architect: allow to create and modify rules.

-         Enterprise: run from command line, create HTML report. Ideal for build servers and nightly test. Also allow to edit rules

Pro and Architect version are available in floating licenses.

Until now, it just seems to be the perfect product. But if you only wish to check standard, the price will put you on the floor. C++Test is not only a standard checker but also a unit test creator. So you buy two products in one, while most of the time you don't need both. From my point of view, I don't need the unit test part, and the product is then unaffordable for me. But if you can afford it, this product does what it claims to do.

Thursday, July 06, 2006

Interesting Game Development Blog

The site where I find some inspirations :

http://www.gamesfromwithin.com/

Strong Coding Standards

Every programmer has its own coding style. All together, they can fragment the code like countries, each using a different language. Working on colleagues' code can quickly become a nightmare. While some programmers have difficulties to adapt to coding standards, you can't work effectively without it.

You should design your coding standards with some important things in mind :
- The primary goal of your coding standards should be readability. This is the most important, the code must be pleasant to work with.
- The type of the identifier should be obvious. At first glance, you should be able to know if it's a local variable, an object member,...
- Group by functionality. If you put all accessors in the same area of the file, it is easy to catch them. It's also easier to find what's exposed and what isn't.
- It should be easy to find files knowing a symbol ( Not all "intellisense"-like functionality works ).
- The coding standards should help ease the development of programming tools such as class generator, file cleaner, ... A include generator can speed up the process (it simply parses the file, searching for type, and includes needed files ).

The design of the coding standards is one of the most important things. It can really speed up your coding process as much as it can kill it.