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?
- Yellowstone Volcanic System Four Times Bigger Than Thought
- Columbia's Lame Oz Defense
- The Evolutionary Psychology Reason Some People Will Be Anti-GMO
- Pictures Of March 20th Eclipse From Svalbard
- Poison As Medicine And How Venom Can Sometimes Be A Savior
- It Shouldn't Be There: Henize 2-10 And The Cosmic Conundrum
- A Paper on Leptonic CP violation
- "Good discussion. One would think that any sensible person could smell the snake oil even through..."
- "That is true. Matthew proposed it as a hypothesis. He actually invited naturalists to test it by..."
- "It is an absolute shame that such a brilliant doctor is being crucified in the media, although..."
- "I've got to say that I reserve some measure of awe at the P.T. Barnum gall some people have. Belle..."
- "I don’t often comment on blogs, however I feel compelled to offer my two cents from the peanut..."
- Cheaters and the cheated: Biased reports on international students don't help
- Conservation win: Hawaiian Honeycreeper hatches its way back from the brink of extinction
- Despite pediatric guidelines, babies as young as 6 months using mobile media
- Fat finding: Target brown fat and you target obesity
- Combined brachytherapy techniques should be 'benchmark' for cervical cancer treatment