Re: Re: Thoughts about Coding Styles and Conventions

Hi Sebastien,

Thanks for your comments! You are right that the source lacks enough documentation. I will try to always document all new code I write right from the start because otherwise I would never come back to the task. I also plan to start writing unit tests for each new class I write. Unit tests would further document the source by giving concrete examples of how the class is supposed to be used.

Thanks for the reference to the coding styles. The style advertised there differs from the one used in Calitko, but I found the part regarding documentation very interesting! I searched the Internet for like an hour to find that really good page, which presented all the popular styles for virtually any coding aspects, from which my style (and the Calitko style) was pretty much derived. Unfortunately, I’ve read it some years ago and I couldn’t find it again now. I’m not sure whether I still keep a printed copy anywhere… I hope I’ll eventually find that page!

Regards,

Peter

sebven wrote:Hi,

I agree with Peter, coding convention helps in understanding the code, make it more readable…

Whatever convention is adopted , it needs to be consistant trhough the whole document. So it is not a good idea to allow developer to use their own coding convention within a single project.

Here is a good reference:

http://www.possibility.com/Cpp/CppCodingStandard.html

I would say however that there is not enough comments in the overall calitko code.

I think each functions should have a comment explaining what the function does and what are their in and out paramaters. Even if you try to find obvious and self-explanatory name, a comment will explain the things better.

regards

seb

Would you like to post a relpy?


This post is a reply to:
Re: Thoughts about Coding Styles and Conventions
Hi,   I agree with Peter, coding convention helps in understanding the code, make it more readable... Whatever convention is adopted , it needs to be consistant trhough the whole document. So it (more...)

No follow-ups yet.