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

Unusual Code Comments

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

    #21
    Originally posted by VectraMan View Post
    I've often seen:

    Code:
    // increment x
    x++;
    It's from people who believe that writing comments are what makes good code.
    Not quite as blatant as yours, but a favourite of mine is

    Code:
    // Open the connection to the database
    dbConnection.Open();

    Comment


      #22
      A long time ago in a land far away...

      Code:
              MOVL    R9, R0                               ; STATUS, R0
              RET                                          ; ONLY HERE FOR THE BEER
      The standard was a comment for every line, so even RET got one.
      Behold the warranty -- the bold print giveth and the fine print taketh away.

      Comment


        #23
        #define FLASH_GORDON 32

        Comment


          #24
          I like the ones that say
          Code:
          //To be deleted
          So why didn't you?

          Comment


            #25
            Code:
            // Kick IE to force repaint
            element.className = element.className;
            Probably a candidate for "Weirdest workaround" as well

            Comment

            Working...
            X