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?
- Doomsday Dashboard Makes Tracking The Apocalypse Convenient
- Intellectually Gifted Kids And Learning Disabilities Often Go Hand In Hand
- Why It Took Big Humans To Populate Europe
- When Does Quantum Mechanics Become Classical Physics?
- Roseroot Herb For Depression - Randomized, Double-blind, Placebo-controlled Trial
- Dark Matter - Now With More Darkness
- "Greetings Mr Bloom Thank you for your work. I currently reside in Boise Idaho. Looking at the Pewforum..."
- "I am reminded of the Australian children’s sci-fi serial, Tomorrow’s End. It is the year..."
- "Nice article. A good wake up call for educators and psychologists. Failure to..."
- "I can not see any comment yet. Again I do appreciate if one can point out any oversimplification..."