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?
- Science Left Behind: The Anti-Vaccine Update Update
- Moderate Pot Use By Adolescents Doesn't Hurt IQ
- What Americans Fear Most Isn't Ebola Or Terrorism, It's...
- Finding Fracking Fluids In The Environment
- Ashes And Vegetables: The Diet Of Roman Gladiators Was Rather Poor
- Cosmic Rays Jeopardize Deep-Space Astronaut Missions
- Manly Men And Feminine Women Are Not Evolutionary Mandates - They Are Urban Ones
- "Good comment shining genji, but some people do not need fancy arguments to uphold their status..."
- "The terms you use repeatedly and your circlic logic reeks of one religious group, maybe you just..."
- "why are you in all the arguments? Teach me how to get into more arguments. Also, teach me wft to..."
- "So if spirituality is selected for, that has nothing to do with evolution. If that is the case..."
- "said the unscientifically backed atheist to the other atheist..."
- An end to fat shaming? The 50 year DNA mystery of metabolic dysfunction may soon be solved
- Egg freezing: a smart career move?
- Women carry fetal DNA long after children’s birth
- Despite resistance, China will dominate future of GMOs
- Should Science and Nature run advertorial by wacky Dr. Bronner’s that misleads on GMOs?
- Jack the Ripper’s identity remains a mystery after error in DNA analysis revealed
- Teenage self-harm linked to problems in later life
- Unsteady on your feet? Little touches could make all the difference
- Promising blood biomarkers identified for colorectal cancer: Is a screening blood test within reach?
- Studies must be carried out to determine whether exercise slows the onset of type 1 diabetes in children and adults
- Clot dissolver tPA's tardy twin could aid in stroke recovery