• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

code comments

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    code comments

    A guy I work with is constantly giving me a hard time about not commenting my code enough. Well, I was just fixing some of his code, and was looking at the comments he put in.

    This is a contender for the most redundant comment I have ever seen:

    // Send Message
    SendMessage();

    I'd say this comment is redundant too.
    // now get the mantissa
    int mantissa = FastMessageDecoder_ParseINT32();

    For a start the 'now' is completely unnecessary. Of course it's now - it's not going to be next week is it. That leaves 'get the mantissa'. Well, duh!.

    #2
    Thanks for reminding me why I don't socialise with programmers...
    Older and ...well, just older!!

    Comment


      #3
      Originally posted by ratewhore View Post
      Thanks for reminding me why I don't socialise with programmers...
      Thanks for reminding me why I don't use this web site - it hasn't changed.

      Comment


        #4
        Originally posted by ratewhore View Post
        Thanks for reminding me why I don't socialise with programmers...
        Originally posted by christhecontractor View Post
        Thanks for reminding me why I don't use this web site - it hasn't changed.
        Well to be pernickety.......

        As far as we know RW doesn't socialise with programmers - TRUE

        But you do use this web site.............

        But hey - I expect a large minority of your programmer friends will have found your post interesting..... and also wouldn't want to socialise with RW

        Comment


          #5
          Well, if I was reviewing the muppet's code, it would get a fail. Comments are to add to the code, to make it clearer what's going on. Not to repeat what's already there.
          Down with racism. Long live miscegenation!

          Comment


            #6
            Originally posted by Drewster View Post
            Well to be pernickety.......

            As far as we know RW doesn't socialise with programmers - TRUE

            But you do use this web site.............

            But hey - I expect a large minority of your programmer friends will have found your post interesting..... and also wouldn't want to socialise with RW
            This is a logic puzzle isn't it?
            Older and ...well, just older!!

            Comment


              #7
              Originally posted by christhecontractor View Post
              A guy I work with is constantly giving me a hard time about not commenting my code enough. Well, I was just fixing some of his code, and was looking at the comments he put in.

              This is a contender for the most redundant comment I have ever seen:

              // Send Message
              SendMessage();

              I'd say this comment is redundant too.
              // now get the mantissa
              int mantissa = FastMessageDecoder_ParseINT32();

              For a start the 'now' is completely unnecessary. Of course it's now - it's not going to be next week is it. That leaves 'get the mantissa'. Well, duh!.
              My contender: a BAL program of several hundred lines. Only one comment: in the middle of a page of
              CLC xxxx
              BE yyyy

              there was one BE that had the comment "BRANCH EQUAL".

              Comment


                #8
                Not programming I know, but that reminds me of steps in some written procedures I've had to rewrite:

                6. Do this before the step above...
                ...
                8. You might need to check the result.
                ...
                14. You don't need the green binder.

                Comment


                  #9
                  Originally posted by Doggy Styles View Post
                  Not programming I know, but that reminds me of steps in some written procedures I've had to rewrite:

                  6. Do this before the step above...
                  ...
                  8. You might need to check the result.
                  ...
                  14. You don't need the green binder.
                  Yes, exactly and some people write code like that - which is ok except when they insist I write it like that too - then it gets a little annoying.

                  Comment


                    #10
                    Originally posted by Drewster View Post
                    Well to be pernickety.......

                    As far as we know RW doesn't socialise with programmers - TRUE

                    But you do use this web site.............

                    But hey - I expect a large minority of your programmer friends will have found your post interesting..... and also wouldn't want to socialise with RW
                    Well, I don't really use this site, this is the first time I've logged on in over a year. I guess I didn't realize that most people on the site aren't programmers. You're probably all agents aren't you! RW is not a nice chap. I bet he's an agent.

                    Comment

                    Working...
                    X