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.
- PHYSICAL SCIENCES
- EARTH SCIENCES
- LIFE SCIENCES
- SOCIAL SCIENCES
Subscribe to the newsletter
Stay in touch with the scientific world!
Know Science And Want To Write?
- Your Probiotic Probably Has Gluten
- Mystery Of Morgellons - Disease Or Delusion - Scientific Hypothesis Of Connection With Lyme Disease
- Mummy Madness In The Anatomical Record - All Open Access
- Highest Energy Collisions ? Not In My Book
- Early Christian Apocalypse: St. Paul Gave Us Heaven And Hell Many Times Over
- Will We Soon Have A 2-D Liquid?
- Risk Management Turned Upside Down
- "[t]he only thing that can set us right is a katalepsis, a seizure by grace, something transformative..."
- "Well, Soon after having sent my previous comment I got a message from Neil Sloane that he had published..."
- "This phenomenon is familiar to market researchers. (I used to be one.) Causes are:  ..."
- "I appreciate the moderate tone - that is welcome (and rather rare, in public forums) - but of course..."
- "The Most Luminous Galaxy Has Been Hidden Until Now http://thingumbobesquire.blogspot.com/2015/05/the..."
- Savannahs slow climate change
- Sudden onset of ice loss in Antarctica detected
- Proton therapy has fewer side effects in esophageal cancer patients
- Mood instability common to mental health disorders and associated with poor outcomes
- Depression associated with 5-fold increase in mortality risk for heart failure patients