Programming Jokes

Who says science jokes are not funny? Below you can see some of the best Programming jokes we know, along with short explanations to the more obscure of them.

Do you know any funny Programming jokes yourself? Let us know in the comments section below.


“What is the object-oriented way to become wealthy?”
“Inheritance.”

Explanation
Inheritance is one of the main mechanisms of object-oriented programming.


“Why did the programmer quit his job?”
“Because he did not get arrays.”

Explanation
Array is a data structure in programming. This is a wordplay with “a raise”.


“Why do programmers always mix up Halloween and Christmas?”
“Because Oct 31 equals Dec 25.”

Explanation
The number 31 in the Octal number system equals the number 25 in the Decimal number system.


“0 is False and 1 is True, correct?”
“1.”

Explanation
This answer does not give any information.


A man is smoking a cigarette and blowing smoke rings into the air.  His girlfriend becomes irritated with the smoke and says, “Can’t you see the warning on the cigarette pack?  Smoking is hazardous to your health!” To this, the man replies, “I am a programmer.  We don’t worry about warnings; we only worry about errors.”

Explanation
In programming, there are two types of problems with the code – warnings and errors. Warnings do not necessarily prevent the code from executing properly, so they are not that worrhsome.


Why computers are like men:

  1. In order to get their attention, you have to turn them on.
  2. They have a lot of data but are still clueless.
  3. They are supposed to help you solve problems, but half the time they are the problem.
  4. As soon as you commit to one, you realize that if you had waited a little longer, you could have had a better model.

Why computers are like women:

  1. No one but the Creator understands their internal logic.
  2. The native language they use to communicate with other computers is incomprehensible to everyone else.
  3. Even your smallest mistakes are stored in long-term memory for later retrieval.
  4. As soon as you make a commitment to one, you find yourself spending half your paycheck on accessories for it.

“What do you call a programmer from Finland?”
“Nerdic”.

Explanation
This is a wordplay with the word nerdy and Nordic.


“Why do Java programmers need to wear glasses?”
“Because they do not C#.”

Explanation
Java and C# are two different programming languages.


99 little bugs in the code.
99 bugs in the code.
Take one down, patch it around.
100 little bugs in the code.

Explanation
This is a modification of the famous “99 bottles of beer”. In coding, it often happens that you fix one bug and then few others appear.


The programmer got stuck in the shower because the instructions on the shampoo said “Lather. Rinse. Repeat.”

Explanation
The instructions created a loop without terminating conditions.


“I don’t see women as objects. I consider each of them in a class of her own.”

Explanation
A joke related to object-oriented programming.


An SQL query walks into a bar, walks up to two tables and asks, “Can I join you?”

Explanation
“SQL JOIN” is a clause which is used to combine two or more tables.

Around the World

There is an island on a planet and infinitely many planes on it. You need to make one of these planes fly all around the world and land back to the island. However, each of the planes can carry fuel which is enough to travel just half of the way, and fuel cannot be stored anywhere on the planet, except for the island and in the planes. Assuming the planes can refuel each other mid-air, and all of them must eventually arrive safely back on the island, how many of them do you need to accomplish the task?

3 planes are enough, label them A, B, C. They leave the island simultaneously in a clockwise direction, and after 1/8 of the way, A refuels B and C completely, then turns back towards the island. B and C continue to fly until they get to 1/4 of the way, where B refuels C completely and turns back towards the island. When C gets mid-way, A and B leave the island counter-clockwise, and after 1/8 of the way, A refuels B completely and turns back towards the island. B continues towards C, and when the two planes meet, they share their fuel, then fly together towards the island. In the meantime A arrives on the island, refuels completely, and starts flying again counter-clockwise towards B and C, so that it can meet them and give them enough fuel, so that all of them arrive safely on the island.
It is easy to see that 2 planes are not enough.

FEATURED

Six Friends Camping

Monday, six friends went camping. Tuesday, John, Jack, and James cooked some mushrooms. Wednesday came and they ate the mushrooms. Thursday found them dead. Exactly one friend survived, how come?

The six friends are called John, Jack, James, Tuesday, Wednesday, and Thursday. John, Jack, James, and Tuesday cooked the mushrooms. Wednesday joined them and they ate the mushrooms. Thursday was the one to find them dead, so he is the survivor.

Mathematical Puzzles: A Connoisseur’s Collection

Review

Mathematical Puzzles: A Connoisseur’s Collection by Peter Winkler is not your casual puzzle book. Even though most of the problems inside are easy to formulate, many of them require extensive mathematical background and well-developed analytical thinking. If you possess these two qualities, however, you will certainly enjoy this book. The puzzles are hard, the solutions are beautiful, and the explanations are very well-written. The book contains over 100 puzzles that are split into different categories – Insight, Numbers, Geometry, Geography, Algorithms, and others. In order to give you an idea of what to expect, I have selected several puzzles from the book which represent its overall level.

1. Given 10 red points and 10 blue points on the plane, no three on a line, prove that there is a matching between them so that line segments from each red point to its corresponding blue point do not cross.

2. A phone call is made from an East Coast state to a West Coast state, and it’s the same time of day at both ends. How can this be?

3. The hour and minute hands of a clock are indistinguishable. How many moments are there in a day when it is not possible to tell from this clock what the time is?

4. Associated with each face of a solid convex polyhedron is a bug that crawls along the perimeter of the face, at varying speed, but only in the clockwise direction. Prove that no schedule will permit all the bugs to circumnavigate their faces and return to their initial positions without incurring a collision.

MP:ACC is one of the most valuable puzzle books in my collection. If you are up to the challenge it offers, you owe yourself a favor to buy it. Even if you don’t feel too confident in your abilities to solve the problems in the book, you can still get it and study the solutions. And if you need more mathematical brilliance, you can check out Peter Winkler’s other puzzle book, Mathematical Mindbenders.

  • 15 years and up
  • math-heavy, difficult puzzles
  • ingenious and elegant solutions
  • various categories, including geography!
  • great explanations and notes by the author

GET MP: ACC HERE

Free Rice

What is better than solving problems and learning new things? Doing exactly that, while fighting the hunger in Africa! “Free Rice” is a website, on which you choose a topic (vocabulary, science, math, etc.), and every time you answer correctly to a question, you contribute 10 grains of rice to people who need them. By clicking the banner below, you will be redirected to freerice.com. Just make sure to disable your ad-blockers, since hiding the (non-intrusive) ads may prevent you from accumulating donations.

Fair Split

It is well known how to split fairly a cake between two people – one of them cuts, the other one picks. The question is, how can you split fairly a cake between three people?

Easy: “Fairly” means that every person gets at least 1/3 of the cake.

Hard: “Fairly” means that every person has the opportunity to get at least as much cake as any other.

Easy (Banach-Knaster method):

The first person cuts 1/3 piece of the cake. If the second person thinks it is larger than 1/3, he can trim it to 1/3. If the third person thinks the cut (and possibly trimmed) piece is larger than 1/3, he can trim it to 1/3 and keep it. Otherwise, the second person takes the piece if he decided to trim it, or the first one, in case he did not. After that, there are two people left, and they can easily split the remaining cake between them. This approach works for any number of people.

Hard (Selfridge-Conway method):

The first person cuts the cake in 3 pieces. The second one takes the biggest piece and trims it so that it becomes as large as the second biggest piece, puts the trimmings aside. The third person picks one of the three big pieces. Then, if the trimmed piece is still available, the second person takes it, if not – he picks whichever he likes. The first person takes the last remaining big piece. Among the first two people, whoever did not pick the trimmed big piece, splits the trimmings into 3 parts. The other one picks one of these parts, then the first person picks another. The last part goes to the person who split the trimmings.

Two Solid Cubes of Lead

You have two solid cubes of lead, which have almost the same size. You cut a hole in one of them and pass the other one through it. After measuring the cubes later, it turns out that the larger cube is still heavier than the smaller one. How is this possible?

You cut a hole in the SMALLER cube, and pass the larger cube through it. “Prince Rupert’s cube” is the largest cube which can pass through a unit cube, and it is approximately 6% larger.

The Evolution of Trust

Game Theory is an intriguing subject in Mathematics, with various real-life applications. Even though many people have heard about the “Prisoner’s Dilemma” – one of the most famous problems in the field, few have delved deeper into the theory. Fortunately, Nicky Case (also a creator of “Parable of the Polygons”) is here to help again, by educating us in a fun, engaging manner. Check out his quick, 30 minutes introduction to Game Theory by clicking the image below.