Programmer joke

preview_player
Показать описание
This is how to trick a wish-granting genie with math.

Reddit joke

8 bit computing

Overflow and underflow

Integer overflow

Nuclear Gandhi

Send me suggestions by email (address at end of many videos). I may not reply but I do consider all ideas!

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

If you purchase through these links, I may be compensated for purchases made on Amazon. As an Amazon Associate I earn from qualifying purchases. This does not affect the price you pay.

Book ratings are from January 2023.

My Books (worldwide links)

My Books (US links)
Mind Your Decisions: Five Book Compilation
A collection of 5 books:
"The Joy of Game Theory" rated 4.3/5 stars on 290 reviews
"The Irrationality Illusion: How To Make Smart Decisions And Overcome Bias" rated 4.1/5 stars on 33 reviews
"40 Paradoxes in Logic, Probability, and Game Theory" rated 4.2/5 stars on 54 reviews
"The Best Mental Math Tricks" rated 4.3/5 stars on 116 reviews
"Multiply Numbers By Drawing Lines" rated 4.4/5 stars on 37 reviews

Mind Your Puzzles: Collection Of Volumes 1 To 3
A collection of 3 books:
"Math Puzzles Volume 1" rated 4.4/5 stars on 112 reviews
"Math Puzzles Volume 2" rated 4.2/5 stars on 33 reviews
"Math Puzzles Volume 3" rated 4.2/5 stars on 29 reviews

2017 Shorty Awards Nominee. Mind Your Decisions was nominated in the STEM category (Science, Technology, Engineering, and Math) along with eventual winner Bill Nye; finalists Adam Savage, Dr. Sandra Lee, Simone Giertz, Tim Peake, Unbox Therapy; and other nominees Elon Musk, Gizmoslip, Hope Jahren, Life Noggin, and Nerdwriter.

My Blog

Twitter

Instagram

Merch

Patreon

Press
Рекомендации по теме
Комментарии
Автор

In real life, you may get 255 wishes, or you msy get (-1) wish, and have to perform one wish for the genie.

vincentl
Автор

Genie: You have 3 wishes
Programmer: I wish for 0 wishes left
Genie: Granted, now you have 3 wishes
Programmer: Damn it, wish count is stored as 2 bit unsigned int

MoonGlow
Автор

Well that must be an old 8-bit genie. Imagine if it was a 32 bit genie...

javoresku
Автор

Genie: "You have 3 wishes, you know the rules"
Me: I wish for 0 wishes
Genie: "Really? ...Ok, I will not grant any of your wishes. Have a good day."
Me: ... Crap. They patched the exploit.

Bluexx
Автор

Just thought of a way around the "no wishing for more wishes" rule: wish for more genies.

MichaelPiz
Автор

Wife: Get a loaf of bread; and if they have eggs, get a dozen.
Programmer returns with a dozen loaves of bread.

trchri
Автор

I might make 2 regular wishes first just incase.

evanrosman
Автор

This fails if wishes are predecrement (--wishes_left, grant wish)

Genie: you have 3 wishes
Programmer: I wish for 0 wishes left
Genie: (decreases wishes left to 2, then grants wish, setting wishes left to 0)
Genie: your wish is granted. You have 0 wishes left. All your wishes have been used. Goodbye.

aaronbredon
Автор

One of my fave t-shirts, "There are 10 types of people in the world, those who know binary and those who don't."

Cenzo
Автор

Next joke: Why would a programmer get confused with Halloween and Christmas?

IanHsieh
Автор

That easy to achieve.
1. wish: Count the wishes in an 8-bit unsigned integer variable.
2. wish: Let set the wish counter to 0.

Genie: I'm not signed for this.

And now we just created the brand new Genie programing language. 🤣

Автор

This is why you decrement the variable first then grant the wish, wishes become 2 then 0.

UserJ
Автор

I like that he created an 8 minute video to explain a joke and still managed to turn it into a useful lesson

Makememesandmore
Автор

Don't ask for NULL wishes, you may crash the genie.

paulowen
Автор

Any experienced genie would decrease left wishes before granting the wish. It must have been a junior developer probably.

Ostap
Автор

I just found a magic lamp and tried this on the Genie…

The Genie muttered something about a buffer underrun and stopped responding 🤷🏻‍♂️

smilerbob
Автор

I remember this genie programmer joke:
-Genie: you have 3 wishes
-Programmer:

1.do the opposite of my next wish,
2.don’t fulfil my third wish,
3.ignore my first wish
-- critical error

ЭролСезгин
Автор

Actual overflow in Civilization I: Treasury jumps from 32767 to 0. I can hear myself swearing still today.

berndschneider
Автор

As far as I'm aware all genies are 2-bit having a maximum of 3 wishes.

robliversage
Автор

Just hope the genie programming language uses wraparound overflow errors and doesn’t just spit out “error overflow line 13”

atlas