comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Comments on Coding Style
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Comments on Coding Style [message #70675 is a reply to message #70674] Thu, 29 April 2010 12:26 Go to previous messageGo to previous message
Aram Panasenco is currently offline  Aram Panasenco
Messages: 41
Registered: April 2010
Member
David Fanning wrote:
> Aram Panasenco writes:
>
>> I want your comments on the programming conventions I use and how I can
>> change them to make the code more clear and desirable for other
>> programmers to improve. Some things to consider:
>>
>> - Should I use comments or is the code (so far) pretty self-explanatory?
>> - Is the non-standard capitalization annoying you? Should I switch to
>> the classic IDL capitalization (All-caps for IDL keywords, capitalized
>> function and procedure names)?
>> - Is there anything wrong with the way I handle the IDL class? The
>> routines?
>> - Anything wrong at all? I'd rather fix it now than thousands of lines
>> of code later.
>
> I like the style, but, yes, you need comments. Lots of
> them. :-)
>
> Also, the __DEFINE method has to be the *last* method
> in the file, not the first, or you will spend all your
> programming time compiling files as if you were programming
> in C or something. :-)
>
> http://www.dfanning.com/tips/namefiles.html
>
> Cheers,
>
> David
>
>
>

Thank you Maarten and David for your comments ;)

I have followed your advice and added comments, added a header, and
moved the __DEFINE method to the bottom of the file. That means I am now
going to need more criticism about these things.

I am going to try and use only one header per class that will describe
the entire class interface. I am using non-standard tags (Name, Design
Details, Abstraction, Syntax, and Public Methods) instead of the more
standard (Name, Purpose, Category, Superclasses, Subclasses, Syntax). Is
that a bad change? What would you like to see different about the header?

Are the comments describing the intention of the code rather than
repeating it? Are the comments distracting, are there too many or too
little?

Class:

http://pastebin.com/QuNuMKwu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AO, SAO
Next Topic: Writing *.csv files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:29:19 PDT 2025

Total time taken to generate the page: 0.00469 seconds