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. Jokes in Code Comments

Jokes in Code Comments

Scheduled Pinned Locked Moved The Lounge
c++architecturehelpquestion
48 Posts 42 Posters 2 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.
  • C Chris Maunder

    Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

    cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

    S Offline
    S Offline
    Steve C
    wrote on last edited by
    #37

    I prefer to drop an occasional nugget in the source control check-in comments. It's an interesting way to see who is paying attention :)

    1 Reply Last reply
    0
    • J JasonPSage

      I think I heard about that! LOL... I heard the manual got printed too!

      Know way too many languages... master of none!

      R Offline
      R Offline
      Roger Wright
      wrote on last edited by
      #38

      He's the same guy who coded a subroutine we often re-used for the end-of-test message when a hardware test failed. He programmatically connected two DVS (Digital Voltage Source) units to the X and Y inputs of the station oscilloscope to draw a pig running across the scope screen, while generating a squealing noise using the onboard speaker. A very talented guy... :-D

      "A Journey of a Thousand Rest Stops Begins with a Single Movement"

      1 Reply Last reply
      0
      • C Chris Maunder

        Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

        cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

        R Offline
        R Offline
        rozovits
        wrote on last edited by
        #39

        I'm working for the same company with one of my friends, and once I had to check his very old code. I've found a function which didn't do anything. There was a comment next to it saying "I don't know what's wrong, but it will be fixed". After I realized that this function is not really important, but it was a security hole, so I wrote "Yeah, it will be commented out!". After 4 months my manager came and asked how he can use SVN to find out who wrote this. I told him I did. He asked me not to be so personal in the future...

        1 Reply Last reply
        0
        • C Chris Maunder

          Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

          cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

          E Offline
          E Offline
          edmurphy99
          wrote on last edited by
          #40

          You mean like this? A Serpent guard, a Horus guard, and a Setesh guard meet on a neutral planet. It is a tense moment. The Serpent guard's eyes glow. The Horus guard's beak glistens. The Setesh guard's nose drips... jaffa humor

          1 Reply Last reply
          0
          • C Chris Maunder

            Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

            cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

            G Offline
            G Offline
            GStrad
            wrote on last edited by
            #41

            closest I've got was an error message that showed as BCAK Error: contact administrator on an error hook that grabbed UI failures. It was only used for the few iterations of code (released to a subset of users), then was replaced when we actually wrote the full error handling stuff.

            1 Reply Last reply
            0
            • P Pete OHanlon

              No. That wouldn't be the adult thing to do. From your question, I'm guessing you do.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              M Offline
              M Offline
              Michael J Collins
              wrote on last edited by
              #42

              Pete O'Hanlon wrote:

              That wouldn't be the adult thing to do. From your question, I'm guessing you do.

              Sense of humor is very important in a high stress development environment. The intellectual olympics often required to write good code can be easily softened and countered by a good laugh here and there. Nothing immature about that at all.... ....unless you're telling fart jokes..... -MJC

              Michael J. Collins Web Application Programmer

              1 Reply Last reply
              0
              • C Chris Maunder

                Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

                cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                L Offline
                L Offline
                Lynn Wallace
                wrote on last edited by
                #43

                No, but this one time, at band camp... I once put "Zeno would appreciate this" in a comment for a for loop limited by the halving of an integer counter, or right-shifting it, I can't recall which.

                1 Reply Last reply
                0
                • C Chris Maunder

                  Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

                  cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                  B Offline
                  B Offline
                  BrainiacV
                  wrote on last edited by
                  #44

                  Not a joke per se, but I'd occasionally insert...

                  //should not reach here
                  //shutdown and cry softly

                  Psychosis at 10 Film at 11

                  1 Reply Last reply
                  0
                  • C Chris Maunder

                    Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

                    cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                    C Offline
                    C Offline
                    Cmorum
                    wrote on last edited by
                    #45

                    Yes, I try to include at least one per app if I'm up to it (you have to be in the right mood). I have known a few other developers that have read some old code, and figured out by the syntax, topic, timing, or the source control, that I was the guilty party! However, I have never known of anyone that was angry or upset with my coding humor, and I know for a fact that several times it has brightened an otherwise stressed out day (including occasionaly lightening my mood when coming across my own joke or comment when I am doing a mod or patch months or years later). I almost always appreciate when I run across someone else's joke or humorous comment. Although I did come across one individual that tended to write scripture into his/her comments and I must say that for some reason, it didn't have the same effect! I also used to code humor into developer level error messages also, but once or twice a non-technical user came across it and it didn't go over quite as well. I pretty much stick to in-code comments now. I did have an email tag line that unnerved someone once though! :laugh:

                    1 Reply Last reply
                    0
                    • C Chris Maunder

                      Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

                      cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

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

                      Since the vast majority of my professional programming is in .NET, most of my funny comments are rants about Microsoft. // Why can't I delete one of these the same way I create them? I mean // seriously MS, a completely different section of the API to delete objects // than to create them? AGH!! --- // This code brought to you by the Microsoft QA department. Hey MS! I want // the last hour of my life back! (Seriously - this kludge is necessary b/c // of the following bug: (URL) etc... I would never use swear words or bash another programmer within the company, but this at least provides a little stress relief.

                      Before .NET 4.0, object Universe = NULL;

                      1 Reply Last reply
                      0
                      • L Lost User

                        Frequently. Most recently with many a sarcastic comment in some terribly written code. My first was when I was first learning the noble art of code - COBOL no less. As part of the course I was sent on to learn COBOL, we had to write a small program (time dims the exact requirements, but we HAD to use at least one GOTO! So I wrote an entire program based on Monopoly. Understand it didn't play the game, but I had paragraphs called "ItsYourBirthdayCollect10Pounds", variables called OldKentRoad and Mayfair and (of course) a label "JAIL" just so I could have my compulsory GOTO read GOTO JAIL followed by a comment of "Go directly to jail, do not pass GO do not collect 200) I passed.

                        ___________________________________________ .\\axxx (That's an 'M')

                        R Offline
                        R Offline
                        Ralph Wilson
                        wrote on last edited by
                        #47

                        _Maxxx_ Given some of the references in your post, you will probably understand this one. ;-) In 1980, I was sent to Old Windsor for some training at the ICL facility there. In the process of learning a financial modeling language (which, by the way, was a quite nice product) and being the only Yank, I was assigned to a small team tha had been sent by a nearby governmental body. When we had to create a sample project, we decided to try to simulate something that they could use, so we created a simulation of the SouthEast Watershed Effluent Region System . . . which we dutifully abbreviated to the SEWER system. ;-) The whole thing was full of similar plays on words and acronyms. ;-) Also, my favorite initial test message for any messaging system is "Please ignore previous message." That was the first meesage sent via a fax server to an associated company in the UK from the Memphis, TN, office where I was working. The Welsh owner of the company found it humorous but it totally confused his British office Manager. ;-)

                        1 Reply Last reply
                        0
                        • C Chris Maunder

                          Do you ever stick jokes in code comments through shear boredom or in the vein hope that one day, 2 years from now, the poor sop stuck with refactoring your code will get a tiny smile in his otherwise potentially painful day?

                          cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                          B Offline
                          B Offline
                          bdenton42
                          wrote on last edited by
                          #48

                          How about joke code? At a prior job one of the developers had added a small function called "pizza()" which would print out the names and telephone numbers of several of the local pizza joints in town. There was nothing that called it, but it could be executed in the debugger or via a special command on the console. A dozen years later someone complained to this developer that some of the pizza places no longer existed and that some of the phone numbers were wrong, so he submitted a change request which updated the function. One of the software builders noticed the change request, rejected it, and removed the offending code citing it as a waste of memory, never mind that it was a drop in the bucket as the project had over 20 million lines of code.

                          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