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

    T Offline
    T Offline
    TheyCallMeMrJames
    wrote on last edited by
    #26

    When we were switching source repositories at a company with about 10 devs I had all the code on my workstation for the initial check in to the new system. I grep'd the directory and added ', The Wonder Pud' to every instance of one guy's name. He never thought to check it all out and change it back. Four years later I was back on contract for one month to help decommission the software and found lots of "John Smith, The Wonder Pud" all over the place.

    They Call me Mister James

    1 Reply Last reply
    0
    • R Roger Wright

      Since no one will ever read my code but me, no. But when I did this for a living, I did it all the time! :-D I must say, though, that I am not the Master of this art; that was Gary Diehl, an engineer at General Dynamics I worked with once. We built military hardware there - missiles, primarily - and that stuff is always delivered with loads of paper. Manuals for support techs were big things, hundreds of pages long and printed on D-size paper. Gary was convinced that no one really ever read them so, in the manual for one of the Sparrow-series missiles, he wrote 3 or 4 pages of long jokes and buried them in the document. That 5 years or so before I went to work for the company, and by the time I left, no one had ever mentioned them. Apparently he was right, and no one ever reads the things. But I hope that over the years that manual and those pages served to brighten many a sailor's day. :laugh:

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

      J Offline
      J Offline
      JasonPSage
      wrote on last edited by
      #27

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

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

      R 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

        J Offline
        J Offline
        JasonPSage
        wrote on last edited by
        #28

        I put many bits of humor in my code but not so much jokes per se...

        // Private Property Access Fields - you can't rely on these being available...
        // one day I might just make them private and BANG your code won't compile!
        // <evil laughing from over tired programmer... hahahhaha >
        function read_item_saName: ansistring;

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

        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

          F Offline
          F Offline
          Fabio Franco
          wrote on last edited by
          #29

          No. If the code ever goes to the client this might give a really bad image of the company. Not a very good idea. It also looks unprofessional, even if the code won't leave the company. It might end up looking bad for you.

          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

            F Offline
            F Offline
            Fabio Franco
            wrote on last edited by
            #30

            I agree. And depending on who ends up reading the code, things could get ugly.

            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

              N Offline
              N Offline
              Narud Shiro
              wrote on last edited by
              #31

              Sometimes I have wrote in the header of a sp or function a comment like this: /**** * If this code works properly, it was developed by _ME_. * Otherwise, it was developed by _JOE_. * And if you want to report any issue with this, please refer it to _JOHN_. ****/ And usually "JOHN" doesn't exists, or not longer works with us. :cool:

              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
                raphgb
                wrote on last edited by
                #32

                I once worked with an American guy who used swear words for his variables. When he'd run out of them he'd go on to profaning characters in literature, such as (not with asterisks, of course): boolean GandalfTheF******T*** = False; or string FrodoIsAnAsshole = "Please select from the following options: "; He worked quickly and accurately and, although he could be very prickly with the management, he was considered to be such an asset that no-one ever ticked him off.

                C 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

                  T Offline
                  T Offline
                  tobi93
                  wrote on last edited by
                  #33

                  some_code++; //no comment

                  1 Reply Last reply
                  0
                  • R raphgb

                    I once worked with an American guy who used swear words for his variables. When he'd run out of them he'd go on to profaning characters in literature, such as (not with asterisks, of course): boolean GandalfTheF******T*** = False; or string FrodoIsAnAsshole = "Please select from the following options: "; He worked quickly and accurately and, although he could be very prickly with the management, he was considered to be such an asset that no-one ever ticked him off.

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

                    There's funny, and then there's just stupid.

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

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

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

                      Why were you using GOTO in the first place? :doh:

                      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
                        Lawrence14610
                        wrote on last edited by
                        #36

                        At my place I was tasked to write a common class for standard error messages. Send in the error number and out comes the message with captions, buttons, etc. For my Case Else, the caption is 'Programmer is 404'.

                        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

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