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?
- Nibiru Internet Hoax "Blood Moon" Video - Kudos To Independent For Straight Debunking Article :).
- Your Microbiome Did Not Cause Your Weight Problem
- A Great Blitz Game
- Anomaly!: Book News And A Clip
- On Sexuality, You Weren't Born That Way, Says Paper
- Beekeeping Fad And The Stress Of Traveling Is Harmful To Bees
- Petition: Let's End Dramatized Reporting Of "Doomsday" Stories - The Vulnerable Get Suicidal
- "Dear Robert, RE: EARTHS TWIN SUN You may wish to confer with Paul Cox Astronomer of Sloo Observatory..."
- "Michael, I don't know, if anyone here has another idea do say :). But I'd guess perhaps a lens..."
- "To Robert Walker http://poleshift.ning.com/profiles/blogs/nibiru-daily-on-webcam?xg_source=activity..."
- "As someone with GAD, Depression and OCD, it's difficult to go about my days without worrying about..."
- "Well, you know. I saw a comment on these 'preppers'/doomsday fanatics' video and there was a comment..."
- Latest IARC Report Connects Fatness with More Cancers
- Fact Checking Mylan Claims They Raised The EpiPen Price Because of Improvements
- I’ve Had More Exposure To Agent Orange Than Anyone: Here’s What I Know
- Brussels – a Final Destination for Medical Care
- Organic Farms Yield 20% Fewer Crops than Conventional Farms
- Funding Scientific Research In A Scientific Way
- Mapping pluripotency differences between mice, monkeys, and humans
- Smokers with newly discovered genetic markers have higher lung cancer risk
- Key substance for treatment of visceral leishmaniasis identified
- High-tech alternative to brain surgery proves effective for most common movement disorder
- Fateful evolution: New study improves accuracy of cancer diagnosis