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. What is your best code comment this year?

What is your best code comment this year?

Scheduled Pinned Locked Moved The Lounge
questiondatabase
44 Posts 35 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.
  • B Brady Kelly

    Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

    D Offline
    D Offline
    Dave Sexton
    wrote on last edited by
    #28

    I litter my code with trinkets for the other members of the team and as little gems for the future. With over 500 assemblies and millions of lines of code, the chances of finding comments ranging from the mundane to the hilarious are pretty slim. Apart from the standard // Workaround for & // to do: there are: /* you're the real thing, yeah the real thing, even better than the real thing. :ds */ (under a particularly crafty bit of genius) // f*** direct debits, I wanna go home :ds (after a particularly long night wrestling with a settlement instruction file) // who's yer daddy? :ds (above call to an inherited method) I still comment my code adequately with "normal" comments. Just find this makes code more fun to read.

    But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
    Because programming is an art, not a science. Marc Clifton
    I gave up when I couldn't spell "egg". Justine Allen

    1 Reply Last reply
    0
    • 0 0x3c0

      Real programmers don't need to program. They just manipulate the EM field generated by their brain so as to cause electrical anomalies which translate to hexadecimal instructions and machine code inside the processor.

      OSDev :)

      F Offline
      F Offline
      Fahad Sadah
      wrote on last edited by
      #29

      Real programmers don't need processors.

      1 Reply Last reply
      0
      • D descenterace

        In the middle of a 1700-line JS file: // <magic type='black'> [... 150-line Javascript function, returning a factory function to create and track state for a UI widget which, strictly speaking, should not work ...] // </magic> Some time ago, that same file started with a comment along the lines of: // abandon hope all ye who enter here I think I may have to restore that comment.

        F Offline
        F Offline
        Fahad Sadah
        wrote on last edited by
        #30

        I was trying to get a certain CSS3 selector (forget which one, now) to work in Firefox and Webkit type browsers, without -moz- and -webkit- prefixes (I'll share the secret later). I used <magic> tags, but didn't comment them out =p

        1 Reply Last reply
        0
        • M Member 4593559

          Not my comment, but it is one of my all time favourites :

          static const double c_PI = 3.14159265358979323846; //mmmmmmm PI

          F Offline
          F Offline
          Fahad Sadah
          wrote on last edited by
          #31

          //3.141592653589HELPIMTRAPPEDINAUNIVERSEFACTORY79323846

          1 Reply Last reply
          0
          • 0 0x3c0

            Real programmers don't need to program. They just manipulate the EM field generated by their brain so as to cause electrical anomalies which translate to hexadecimal instructions and machine code inside the processor.

            OSDev :)

            T Offline
            T Offline
            TechnoDezi
            wrote on last edited by
            #32

            Real programmers have work to do, and don't write stupid comments on threads :-)

            C 1 Reply Last reply
            0
            • B Brady Kelly

              Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

              D Offline
              D Offline
              DragonsRightWing
              wrote on last edited by
              #33

              // No Comment ...

              1 Reply Last reply
              0
              • 0 0x3c0

                Real programmers don't need to program. They just manipulate the EM field generated by their brain so as to cause electrical anomalies which translate to hexadecimal instructions and machine code inside the processor.

                OSDev :)

                C Offline
                C Offline
                costas0811
                wrote on last edited by
                #34

                I get this is a joke but is anyone else annoyed by people who are serious when they use a phrase like "real programmers do....?"

                E 1 Reply Last reply
                0
                • B Brady Kelly

                  Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

                  A Offline
                  A Offline
                  Adrian Cole
                  wrote on last edited by
                  #35

                  Not a comment, but in a defect report under "steps to reproduce" ... "Chant magic incantation three times then wave wand."

                  while (e) { Coyote(); }

                  1 Reply Last reply
                  0
                  • B Brady Kelly

                    Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

                    S Offline
                    S Offline
                    Stuart Rubin
                    wrote on last edited by
                    #36

                    This was from last year (or maybe two years ago). It was written by a contractor in some code for us. It wreaks of irony because it is a completely illogical statement, yet completely true in this software context of the code. // Note: there are 1024 milliseconds in a second

                    1 Reply Last reply
                    0
                    • B Brady Kelly

                      Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

                      A Offline
                      A Offline
                      Ammar Arwany
                      wrote on last edited by
                      #37

                      // be real programmer and go on

                      :laugh:

                      1 Reply Last reply
                      0
                      • C costas0811

                        I get this is a joke but is anyone else annoyed by people who are serious when they use a phrase like "real programmers do....?"

                        E Offline
                        E Offline
                        endozs
                        wrote on last edited by
                        #38

                        Nahh, real programmers have a harder skin than that ;)

                        1 Reply Last reply
                        0
                        • B Brady Kelly

                          Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

                          T Offline
                          T Offline
                          the Kris
                          wrote on last edited by
                          #39

                          // It is impossible to get here, so throw an exception if we do throw new Exception( "Catastrophic error!" ); 20 days later... the phone rings...

                          1 Reply Last reply
                          0
                          • B Brady Kelly

                            Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

                            S Offline
                            S Offline
                            Sreedevi Jagannath
                            wrote on last edited by
                            #40

                            ;P Mine is: //Ha Ha - Gotcha! //Thought this function really did something, didn't ya?

                            1 Reply Last reply
                            0
                            • 0 0x3c0

                              Real programmers don't need to program. They just manipulate the EM field generated by their brain so as to cause electrical anomalies which translate to hexadecimal instructions and machine code inside the processor.

                              OSDev :)

                              H Offline
                              H Offline
                              Hired Mind
                              wrote on last edited by
                              #41

                              Real programmers drop to a command prompt and type: COPY CON PROGRAM.EXE And then begin whistling into their 1200 baud acoustic-coupler modem.

                              1 Reply Last reply
                              0
                              • C CPallini

                                Real programmers don't need a compiler.

                                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                [My articles]

                                P Offline
                                P Offline
                                Plamen Dragiyski
                                wrote on last edited by
                                #42

                                Real programmers need only beer! They program everything else!

                                1 Reply Last reply
                                0
                                • T TechnoDezi

                                  Real programmers have work to do, and don't write stupid comments on threads :-)

                                  C Offline
                                  C Offline
                                  CPallini
                                  wrote on last edited by
                                  #43

                                  Real programmers don't work, they do enjoy programming. Real programmers don't write stupid comments on thread just because they don't use threads... :-D

                                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                  [My articles]

                                  1 Reply Last reply
                                  0
                                  • B Brady Kelly

                                    Mine is, "// TODO Still a big f*****g mystery why Category object in KpiAggregateCriteria has null UnitOfMeasure and DisplayFormat." It is in fact because EF doesn't load association sets automatically, unless they are explicitly projected in your query.

                                    Q Offline
                                    Q Offline
                                    Qaos
                                    wrote on last edited by
                                    #44

                                    'Someday VB you'll grow up to be a real language with boolean short circuiting I had a bunch of nested if statements that could have been simplified with boolean short circuiting and I was frustrated.

                                    Qaos

                                    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