Whether to use punctuation in comments or not?
-
If you program in, say, C# do you sometimes put a semi-colon at the end of a statement and sometimes not? No, because the compiler rejects the code as being incorrect. In my opinion, the same standard for quality and accuracy should be applied to comments as well. Why write beautiful code and then decorate it with ignorant boogers?
:josh: My WPF Blog[^] The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it. - Michelangelo (1475-1564)
Josh Smith wrote:
Why write beautiful code and then decorate it with ignorant boogers?
Variety is the spice of life? :-D
-
Josh Smith wrote:
Why write beautiful code and then decorate it with ignorant boogers?
Variety is the spice of life? :-D
hlmechanic wrote:
Variety is the spice of life?
In that case, I think I'll write all my comments in a mixture of ebonics and textspeak...
// yo bi4tch! dis cod3 be 4xin d4 us3r if d4 foo w4nn4 s4v3 dis shiznit?
:josh: My WPF Blog[^] The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it. - Michelangelo (1475-1564)
-
Cool! I actually *do* have ascii art in all my projects source code comments at some point or another. I figure it will amuse someone some day down the road since no one else ever looks at the great majority of my code anyway. It serves a useful purpose in denoting blocks of commonly related code such as separating the Microsoft auto generated form code in c# winform projects from my own code:
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
//( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
"I don't want more choice. I just want better things!" - Edina Monsoon
-
If you program in, say, C# do you sometimes put a semi-colon at the end of a statement and sometimes not? No, because the compiler rejects the code as being incorrect. In my opinion, the same standard for quality and accuracy should be applied to comments as well. Why write beautiful code and then decorate it with ignorant boogers?
:josh: My WPF Blog[^] The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it. - Michelangelo (1475-1564)
-
Cool I luv the idea;). Do you know any simple program that creates me bigger texts(e.g. 3 lines by height) in ascii?
There are dozens of them online, here's the first one that google returned: http://www.network-science.de/ascii/[^] There are also plenty that can turn a gif or jpg into ascii which you can then paste in your comments as well. The possibilities are endless. ;)
"I don't want more choice. I just want better things!" - Edina Monsoon
-
I would be thankful if someone tell me the answer. What is the standard usage? In the easiest, I mean I would like to know whether to put . at the end of my comment or not:)
Full on English in function headers and comments and fair better english than here :) i still need to get a plug in for VS 2005 for my spelling mistakes however It does help you and other people in say 6months time when you need to review/update/repair/toubleshoot a big project. so if its a poll i vote yes :)
-
// No But then you knew I was going to say that, eh? ;P
// Seriously though, I don't put periods at the end of my comments, but I will
// .. for a sentence break in the middle of one. Why? I really have no idea,
// .. it has always been that wayThen again, I am one of those weird people who still uses two spaces after a period for readability.
Ðavid Wulff What kind of music should programmers listen to?
Join the Code Project Last.fm group | dwulff
I'm so gangsta I eat cereal without the milkDavid Wulff wrote:
two spaces after a period for readability.
No school like the old school... That's exactly how I was taught back in the mid 80's. Two spaces after a full stop, one after a comma.
------------------------------------------- Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Just bugger off and leave me alone!!
-
Paul Watson wrote:
So far I've written half my life story into my code...
Half my life story is my code... :~
You must be careful in the forest Broken glass and rusty nails If you're to bring back something for us I have bullets for sale...
-
// No But then you knew I was going to say that, eh? ;P
// Seriously though, I don't put periods at the end of my comments, but I will
// .. for a sentence break in the middle of one. Why? I really have no idea,
// .. it has always been that wayThen again, I am one of those weird people who still uses two spaces after a period for readability.
Ðavid Wulff What kind of music should programmers listen to?
Join the Code Project Last.fm group | dwulff
I'm so gangsta I eat cereal without the milkDavid Wulff wrote:
I am one of those weird people who still uses two spaces after a period for readability.
I still think it's weird. What flummoxes me is that you and CG are otherwise good users of English, but both have a practice that I find rather strange - you using two spaces after a full stop, and Christian using a space before a question mark.
Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
I would be thankful if someone tell me the answer. What is the standard usage? In the easiest, I mean I would like to know whether to put . at the end of my comment or not:)
-
David Wulff wrote:
two spaces after a period for readability.
No school like the old school... That's exactly how I was taught back in the mid 80's. Two spaces after a full stop, one after a comma.
------------------------------------------- Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Just bugger off and leave me alone!!
-
David Wulff wrote:
I am one of those weird people who still uses two spaces after a period for readability.
I still think it's weird. What flummoxes me is that you and CG are otherwise good users of English, but both have a practice that I find rather strange - you using two spaces after a full stop, and Christian using a space before a question mark.
Cheers, Vıkram.
After all is said and done, much is said and little is done.
I would never put a space before punctiation, only after. The purpose of double spacing after periods is to aid skim reading because it more clearly breaks up large blocks of text. It is a left over from mono-spaced typewriter days, bit it still applies with today's typefaces and you will find it in newspapers, posters, adverts, etc -- anything that is designed to be quick and easy to read.
Ðavid Wulff What kind of music should programmers listen to?
Join the Code Project Last.fm group | dwulff
I'm so gangsta I eat cereal without the milk -
I would be thankful if someone tell me the answer. What is the standard usage? In the easiest, I mean I would like to know whether to put . at the end of my comment or not:)
the purpose of punctuation is to make the written word readable because there is no direct interaction between the writer and the listener and or other people who read or otherwise make use of the work that was written by the writer when they read it they can't detect any gesticulations facial expressions tonal changes or pauses. That's a yes. If you want people to read what you write, write it so that it can be understood without effort.
-
I would never put a space before punctiation, only after. The purpose of double spacing after periods is to aid skim reading because it more clearly breaks up large blocks of text. It is a left over from mono-spaced typewriter days, bit it still applies with today's typefaces and you will find it in newspapers, posters, adverts, etc -- anything that is designed to be quick and easy to read.
Ðavid Wulff What kind of music should programmers listen to?
Join the Code Project Last.fm group | dwulff
I'm so gangsta I eat cereal without the milkDavid Wulff wrote:
punctiation
David Wulff wrote:
It is a left over from mono-spaced typewriter days, bit [sic] it still applies with today's typefaces
You do realize I was being polite when I lumped you with CG in the 'whose English is otherwise good' crowd, don't you? ;P Sorry, mate, couldn't resist. :-O
Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
David Wulff wrote:
punctiation
David Wulff wrote:
It is a left over from mono-spaced typewriter days, bit [sic] it still applies with today's typefaces
You do realize I was being polite when I lumped you with CG in the 'whose English is otherwise good' crowd, don't you? ;P Sorry, mate, couldn't resist. :-O
Cheers, Vıkram.
After all is said and done, much is said and little is done.
:doh:
Ðavid Wulff What kind of music should programmers listen to?
Join the Code Project Last.fm group | dwulff
I'm so gangsta I eat cereal without the milk