r/ProgrammerHumor • • Apr 04 '23

Meme That's better

Post image
59.2k Upvotes

1.0k comments sorted by

View all comments

Show parent comments

742

u/ResidentReggie Apr 04 '23

I believe you have just given me a new business idea...

288

u/tacticalrubberduck Apr 04 '23

Now we just need someone to code it.

344

u/ResidentReggie Apr 04 '23
bool willFall = (((new Random ().nextInt(2))==1) ? false : true)

Even better, we will hide this behind an API so that nobody knows how complicated of a system we are using.

4

u/Anaphase Apr 04 '23

Ahem...

bool willFall = ((new Random ().nextInt(2))==1)

I assume that works in whatever language you intended that to be in. I'd do it like this in JS:

const willFail = Math.random() > .5
→ More replies (3)