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?
- What Lies Beneath West Antarctica?
- Exodus 2100: Due To Climate Change
- Scientists Discover Oral Sex In Spiders
- Evidence Points To Widespread Loss Of Ocean Oxygen By 2030s
- The Geology Of Wine
- How To Make Women's Tennis More Competitive
- Professor Frenkel: Why Shouldn't We Drop Algebra From Our Education System?
- "Last references - My three contributed papers for the Proceedings of the INCFP 2015 Conference..."
- "Your case is common, Frumious. But multi-variable calculus is a low-level eighteenth century applied..."
- "Up until college, the educational system did their best to make me fear and loath math. The constant..."
- "Choosing just two of many issues: You can't get what 2+3 or 2*3 are without just taking them from..."
- "But if the vacuum structure around us turns out not to be the same as in empty regions of our Universe..."
- 3 Reasons Aerial Pesticides Are Not Causing Autism
- Most Stores Refuse E-Cigarette Sales To Minors
- Vitamin C Conundrum for the Organic Crowd
- Newsweek Journalist Loses His Mind, Time-Traveling Radioactivity And More Media Links
- This Single-Celled Organism Is Capable Of Learning
- Study Says Bilingual Kids’ Brains Are Smarter & Faster