Re: Code Beautification Question

Hi Jared --
The funny thing about comments is that some sightlings like to use the /* */ 
style comments, lining up the beginning of each new line with " * " -- which 
causes a column of stars on the left -- then the closing */ indented so its 
star is also in line.
Now what purpose does this serve besides looking pretty? I think the other 
reason so many people do it is that when they do a grep on the source file, 
they can easily distinguish matches inside comments, as all the lines start 
with a star.
Anyway I'm sure what works for you is as good as any other convention.
Happy hacking.
--le

----- Original Message ----- 
From: "Jared Wright" <wright.jaredm@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, December 31, 2008 1:29 PM
Subject: Re: Code Beautification Question


Thanks for the tips, and with expressions that does make a lot of sense.
Currently my conventions are dictated by no-one but me, but I just
wanted to get a feel for if there are any widely accepted guidelines for
this. My biggest issues is with comments that wrap onto the next line, I
suppose. I write overly verbose comments maybe. *smile*

Jared

tribble wrote:
> Hi -- well it depends on the conventions of the people you are working 
> with.
> When I was coding for a living, we would not only indent, but for huge
> expressions, we would preserve the hierarchy of the operations in the
> expression in the indentation.
> However, for small to moderately sized expressions that ran over a line, 
> we
> would not insert a line break, but would leave it all on a line so that 
> the
> (now old fashioned) debugger would print the whole expression out when we
> were debugging.
> HTH
> --le
>
>
>
> ----- Original Message ----- 
> From: "Jared Wright" <wright.jaredm@xxxxxxxxx>
> To: <programmingblind@xxxxxxxxxxxxx>
> Sent: Wednesday, December 31, 2008 10:21 AM
> Subject: Code Beautification Question
>
>
> Hello all, Just a blink with a question for those of you who appreciate
> aesthetically pleasing code. If I have a line that wraps, say  because
> of long expressions in the code itself or because of trailing comments
> at the end of the line, is it standard practice to indent that line to
> match the indentation level of the line above it? Or because of the
> various line lenghts in different editors, am I only really making
> things worse by doing that? Would actually be nifty if this was a no-no,
> since my editor just puts the next line at the far left and combing
> through and making the indentation levels match is sort of a pain.
> Thanks for the thoughts.
>
> Jared
>
>
> __________
> View the list's information and change your settings at
> http://www.freelists.org/list/programmingblind
>
> __________
> View the list's information and change your settings at
> http://www.freelists.org/list/programmingblind
>
>
>

__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at 
http://www.freelists.org/list/programmingblind

Other related posts: