glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] coding guidlines


From: Bradley Arsenault
Subject: Re: [glob2-devel] coding guidlines
Date: Mon, 20 Oct 2008 11:56:29 -0400

On Sun, Oct 19, 2008 at 7:45 PM, Leo Wandersleb <address@hidden> wrote:
hi

i'm thinking a lot about how to attract more people to glob2 and somehow all of a sudden we have now many people rather active at the same time after some weeks of no action at all.
still many complain about the code beeing unreadable and i'd like to start and improve that.

what do you think about the following guidlines?
- one class per file (i've seen files with 5900 lines.)
- a folder hirarchy reflecting the namespace usage.
- every public attribute has to be commented (use /// or /** */ so doxygen works) even when the name is speaking so the comment is nothing more than this name.
- (every variable and private methode/attribute should be treated the same)

Unfortunately Eclipse/CDT does not allow refactoring like i'm used to have it at work else i'd like to rename so many classes and attributes for consistency. Did anybody succeed to savely rename public methodes in eclipse in c/c++??

greetings,

leo

I disagree with these hard coded guidelines. I feel that it should be up to the programmers discretion what kind of organization they do. It should be a requirement that code be documented, but not all code needs to be documented the same way, and requiring that every attribute be documented will only waste time in the end. There are times when there needs to be multiple classes per file. AIEcho is a decent example,  IRCThreadMessage or NetMessage is a much better example of when it would be very wrong to separate these classes into different files. It would be wasteful, time consuming, and only serves to make things more confusing for other programmers.


--
Extra cheese comes at a cost. Bradley Arsenault.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]