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?
- How We Predict Climate Decades Ahead - Yet Can't Forecast Weather Ten Days Ahead - Chaos Patterned With Order
- Should Pregnant Women Be Concerned About BPA?
- The Five Stages Of A Dying Theory
- Time, Wittgenstein And Language Scaffolding
- When Salt Is An Endocrine Disruptor, The Term Is Officially Meaningless
- Storytelling Deconstructed: Vonnegut Was Right About Just Six Emotional Story Lines, Says Big Data
- Russian scientists increase DVD storage capacity million times
- "Websites like thelabbible and Unilad are all about clickbait. There is no true journalism within..."
- "Yes for sure. If you need support then there are several facebook groups where you can meet other..."
- "Hi F,okay, I see your point of view. Yes, there are many feelings at play when one joins the bandwagon..."
- "Hi, I somehow disagree with your view of theorists: it was not belief or disbelief in the potential..."
- "Your really really positive and sure that nothing is going to happen please Mr walker i am actually..."
- Annoying Studies’ Series: Newborn Weight Gain (Again!)
- Five PM? Time for Breakfast!
- Include Aerobic Fitness in Physical Exams, Heart Association Recommends
- Female Vervet Monkeys Assault Males that Do Not Participate in Fights
- Vaginal Ring Effective for HIV Infection Prevention
- Winter is No Wonderland