Really Geek Humor: Computer Code Comments
    By Tommaso Dorigo | June 2nd 2014 08:51 AM | 2 comments | Print | E-mail | Track Comments
    About Tommaso

    I am an experimental particle physicist working with the CMS experiment at CERN. In my spare time I play chess, abuse the piano, and aim my dobson...

    View Tommaso's Profile
    Programmers may not be the guys with the best sense of humor around, but I found it quite entertaining to read a web page with a collection of source code comments arising a smile.

    The one I liked the most is the following - not even a comment, but the way the guy called the object he instantiates:

    I am sorry if you do not get it - let me try to explain. A program may "throw an exception" if something goes wrong - say it finds itself in the need of dividing by zero, or taking the square root of a negative number, or accessing a non-existing memory address. The language has a command that "throws" the exception, and the exception may have a text attached or other characteristics, which are specified by its constructor command. The code above "throws" the exception called "up", so the code does contain the command "throw up"....

    Others might like more the other code segments in the page linked - worth a visit.


    You may then be interested in this twitter account which rips off the comments from the latex files in astro-ph arxiv postings:

    Michael Martinez
    Nah, this is the funniest one by far.  It describes about half my programming life, when I have had to go back and modify programs I haven't looked at in months or years.
    //When I wrote this, only God and I understood what I was doing
    //Now, God only knows