[SATLUG] culture question

jaret jaret at aberlorn.com
Mon Aug 4 11:05:36 CDT 2008


It's truthiness. Even a function with no comments might receive 
meta-data comment tags describing what's going on. This is particularly 
necessary when programmers work in groups coding in large, complex, 
shared, multi-dll packages.  The development environments will usually 
have different options for commenting. Some comments are used by 
programmers to explain an algorithm (e.g. /*  comment */) and others are 
within meta-data tags (e.g. <summary>Do this</summary>) perhaps used by 
intellisense, which is very helpful when writing large software packages.

For myself when writing small sub-sets of code I prefer little to no 
comments and rely on meta-data preceding class, property and function 
headers to give me a summary of what they are supposed to do.  When 
functions get longer or more complex (perhaps multiple recursion) I may 
add brief comments to tell others what is intended. Comments can be used 
here as an opportunity to stub in ideas for improving code. (e.g. this 
needs to be isolated further into it's own function)  But for any 
complicated algorithm comments are welcome to explain to others and help 
yourself remember what you were trying to do.

There'll also be disagreement as to what constitutes "elegant" code. 
Naming conventions of global variables or function parameters come to 
mind or replacement of "if" statements with ? : sequences (e.g ( a == 0 
? 100 : 250 ) )  For beginning programmers "if" might be easier to 
understand but "? :" in my opinion is more elegant and just as easy to 
understand.

~Jaret



Todd W. Bucy wrote:
> I am currently writting a paper comaring F/OSS gift economics to that of
> the Iroquian Wampum system of the 15th and 16th centuries (also a gift
> economy).  I will not go into all the gory details of my argument, as it
> largely does not pertain to Linux.  I wrote something that has the ring
> of "truthiness" and would like to have the communitites opinion on the
> matter.  comment follows:
>
> "...code that is noted as being “elegant” often requires very little in
> the way of comments...code which contains to many comments is often
> thought of as being 'over-designed'..."
>
> I would like to know if this is generally true within the hacker
> community.  I am by no means a hacker and I am very warry of making such
> a statement without some confirmation.
>
> Thanks in advance
> Todd
>
>
>   



More information about the SATLUG mailing list