it's been a while since my last post on this mailing list. I would like to
discuss with you a couple of topics, before actually going further on those.
=== Coding Standards ===
For coding standards, I mean the way the code is formatted and written. I
understand everyone has his own style, but unfortunately I cannot accept to
have them all inside the same code base. We still have a big heritage of
the past, but I can definitely *enforce a unique style from new code*.
This are a set of simple rules that we will follow from now one (and they
are essentially the same that Qt uses as well):
1. Indentation is made with spaces, no tabs! Basic indentation is 4 spaces
(set your editor accordingly). Ideally, try to keep every line inside 80
2. variable names: use camel case, with first letter lower-case, e.g.
3. class names: use pascal case notation (camel case with first letter
upper-case), e.g. ThisIsAClassName;
4. class members: use camel case, after starting with " m_ ", e.g.
5. class methods: use camel case, e.g. thisIsAMethod( ). Use the same
convention for free functions (functions that don't own to a class);
6. Filename: same name of the class it contains.
I think we can start from this basic rules, that should give already a
certain uniformity across the code base. *Old classes, written with a
different style, will hold as they are until they are refactored for other
=== Test Driven Development ===
This is a topic I want to discuss with all of you. The aim of Test Driven
Development is to: 1) build the code driven by a set of tests that define a
unique behaviour; 2) create a set of unit test that will constantly check
the integrity of as much code as possible. TDD is becoming a common way to
develop software in the industry, however it is really hard to add TDD
inside an already existing project, especially when the size is above a
certain threshold (like Luminance HDR). However, it's possible to build
tests for the existing code during the development of new feature, or
during the refactoring of old ones.
I want your opinion on this, hence I suggest you to read around the web,
and to have a look at this library: Googletest, Boost.Test and CTest (for
CMake). Note that the usage of these libraries is for development only, and
eventually they won't be shipped with the final binary.