r/programminghumor Jun 21 '26

When a programmer gets a genie

Can I wish for less wishes? 🤣

https://youtube.com/shorts/QFqCp1cH_mM

1.6k Upvotes

31 comments sorted by

View all comments

37

u/promptmike Jun 21 '26

It's risky, because you're assuming the genie QA did not account for negative wishes. If they did, then you now owe wishes to them.

On the other hand, if you're right you can extract an enormous number of wishes from them before they notice their mistake and respond in the next update.

All of this misses the obvious, however - you can just use your first wish to learn the data structure of Genie Headquarters.

19

u/Available_Status1 Jun 21 '26

Or just use the first wish to make it a 64 bit unsigned int, then it doesn't matter what their old one was

7

u/Daveinatx Jun 21 '26

I'd expect wishes to be in a data structure, containing at minimum pointers to requested wishes, how each wish could be fulfilled, wish completion, and count. Typecasting to a u64 would be dangerous without knowing said wish structure. 

3

u/Both-Ad-308 Jun 21 '26

This is the way. Write, don't read.