Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Whether to use punctuation in comments or not?

Whether to use punctuation in comments or not?

Scheduled Pinned Locked Moved The Lounge
question
32 Posts 18 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Josh Smith

    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)

    H Offline
    H Offline
    hlmechanic
    wrote on last edited by
    #18

    Josh Smith wrote:

    Why write beautiful code and then decorate it with ignorant boogers?

    Variety is the spice of life? :-D

    J 1 Reply Last reply
    0
    • H hlmechanic

      Josh Smith wrote:

      Why write beautiful code and then decorate it with ignorant boogers?

      Variety is the spice of life? :-D

      J Offline
      J Offline
      Josh Smith
      wrote on last edited by
      #19

      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)

      1 Reply Last reply
      0
      • M Member 96

        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

        S Offline
        S Offline
        sacoskun
        wrote on last edited by
        #20

        Cool I luv the idea;). Do you know any simple program that creates me bigger texts(e.g. 3 lines by height) in ascii?

        M 1 Reply Last reply
        0
        • J Josh Smith

          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)

          S Offline
          S Offline
          sacoskun
          wrote on last edited by
          #21

          I also like the tidy and consistant working habit. Thanks in advance to all repliers, I really get new ideas for my commenting. I will use punctuation marks as much as I can.

          1 Reply Last reply
          0
          • S sacoskun

            Cool I luv the idea;). Do you know any simple program that creates me bigger texts(e.g. 3 lines by height) in ascii?

            M Offline
            M Offline
            Member 96
            wrote on last edited by
            #22

            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

            1 Reply Last reply
            0
            • S sacoskun

              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:)

              S Offline
              S Offline
              Sam_c
              wrote on last edited by
              #23

              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 :)

              Code Project Lounge 101 by John Cardinal

              1 Reply Last reply
              0
              • D David Wulff

                // 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 way

                Then 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 milk

                _ Offline
                _ Offline
                _Damian S_
                wrote on last edited by
                #24

                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!!

                S 1 Reply Last reply
                0
                • S Shog9 0

                  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...

                  C Offline
                  C Offline
                  Chris Maunder
                  wrote on last edited by
                  #25

                  Me too. Except mine's really buggy.

                  cheers, Chris Maunder

                  CodeProject.com : C++ MVP

                  1 Reply Last reply
                  0
                  • D David Wulff

                    // 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 way

                    Then 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 milk

                    V Offline
                    V Offline
                    Vikram A Punathambekar
                    wrote on last edited by
                    #26

                    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.

                    D 1 Reply Last reply
                    0
                    • S sacoskun

                      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:)

                      A Offline
                      A Offline
                      Anish M
                      wrote on last edited by
                      #27

                      Don't comment. Let the code explain in itself.

                      1 Reply Last reply
                      0
                      • _ _Damian S_

                        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!!

                        S Offline
                        S Offline
                        sacoskun
                        wrote on last edited by
                        #28

                        Cool thing, I wish it was the standard way of typing:^)

                        1 Reply Last reply
                        0
                        • V Vikram A Punathambekar

                          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.

                          D Offline
                          D Offline
                          David Wulff
                          wrote on last edited by
                          #29

                          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

                          V 1 Reply Last reply
                          0
                          • S sacoskun

                            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:)

                            M Offline
                            M Offline
                            Mark_Wallace
                            wrote on last edited by
                            #30

                            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.

                            1 Reply Last reply
                            0
                            • D David Wulff

                              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

                              V Offline
                              V Offline
                              Vikram A Punathambekar
                              wrote on last edited by
                              #31

                              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.

                              D 1 Reply Last reply
                              0
                              • V Vikram A Punathambekar

                                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.

                                D Offline
                                D Offline
                                David Wulff
                                wrote on last edited by
                                #32

                                :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

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups