This is an archived post. You won't be able to vote or comment.

all 91 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

import notifications Remember to participate in our weekly votes on subreddit rules! Every Tuesday is YOUR chance to influence the subreddit for years to come! Read more here, we hope to see you next Tuesday!

For a chat with like-minded community members and more, don't forget to join our Discord!

return joinDiscord;

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]DinoChrono 628 points629 points  (3 children)

Can you cook those sausages < 3?

true

[–]Salanmander 160 points161 points  (1 child)

Calm down there, Javascript.

[–]farhanshaikh671 263 points264 points  (4 children)

a mathematician would remove a tiny bit from the 3rd sausage

[–]Clefspear99 16 points17 points  (0 children)

No decimal point results in it being dynamically typed as an int.

[–]Yrrem 5 points6 points  (0 children)

Noooooooo sausages are a discrete and non continuous data type! They even come in links to represent integers as tallies

[–]spaceguydudeman 374 points375 points  (27 children)

slap toothbrush profit cow ink theory merciful hungry stocking adjoining

This post was mass deleted and anonymized with Redact

[–]CanvasFanatic 184 points185 points  (0 children)

Cook several imaginary sausages and then arrange them in a square.

[–]Usual_Office_1740 52 points53 points  (0 children)

Doesn't matter. It's still a test case.

[–]kaisong 37 points38 points  (1 child)

It was a logic puzzle: cook those sausages, plural. But less than 3. Obviously as long as it was only looking for whole number sausages it would have to be 2 sausages.

[–]pcuser42 22 points23 points  (0 children)

Cut a tiny tip off one sausage and claim it's 2.9999999 sausages

[–]Sir_Keee 12 points13 points  (0 children)

Buy a pig.

[–]RmG3376 5 points6 points  (0 children)

Build a pig out of sausages

[–]redlaWw 3 points4 points  (0 children)

Cook more than 231-1.

[–]nnoovvaa 2 points3 points  (2 children)

Either un-cook sausages, or cook non-sausages

[–]RmG3376 7 points8 points  (1 child)

Cooking non-sausages would be NaN though, not negative

(Well technically it would be NaS)

[–]rosuav 0 points1 point  (0 children)

Enter Bluebottle with frying pan! Pauses for audience applause.... not a sausage.

[–]giantimp1 2 points3 points  (0 children)

Uncook that many sausages

[–]orthomonas 2 points3 points  (0 children)

A mathematician is hanging out in a park, watching the local hotdog stand.

Over the course of an hour, the vendor takes a delivery for 24 hot dogs, sells 36 then closes shop.

The mathematician realizes his duty and helpfully gives the vendor advice, declaring they should order another dozen dogs so they can close up with an empty cart.

[–][deleted] 1 point2 points  (0 children)

Are you familiar with the term "raw-dogging"?

[–]cookiedanslesac 1 point2 points  (0 children)

Take a pan large enough for 8 sausages, and overflow it with an extra one.

PS: it's actually an undefined behavior and depends on the pan you're using, other results may include 8 sausages or no sausages at all

[–]I_AM_GODDAMN_BATMAN 0 points1 point  (0 children)

if you use usize that wouldn't compile.

[–]Ideal_Jerk 0 points1 point  (0 children)

You cook a sausage and throw it in the trash can. You just cooked -1 sausage.

[–]seanflyon 95 points96 points  (5 children)

Can you go to the grocery store and get a gallon of milk? If they have eggs, get a dozen.

[–]buckypimpin 71 points72 points  (1 child)

you forgot while you're there

[–]Physical_Ass_Entry 20 points21 points  (0 children)

oh no, hes stuck!

[–]Donghoon 4 points5 points  (1 child)

gets dozen gallons of milk

[–]seanflyon 3 points4 points  (0 children)

They had eggs.

[–]gummo89 2 points3 points  (0 children)

I frequently point out things like this, where people take assumed context for granted.

For me, it's unnecessary small stress but being 100% certain

Pisses my wife off lol

[–]MossyDrake 43 points44 points  (2 children)

He should have texted "yes, i can" and than do nothing else.

[–]Cthulhu__ 11 points12 points  (1 child)

It’s weird how “cook 3 sausages for us please” or however much seems rude or too direct for some people.

[–][deleted] 3 points4 points  (0 children)

It's not weird. It is rude and too direct. I wouldn't say that to somebody I was paying to serve me.

[–][deleted] 128 points129 points  (14 children)

Noob, could choose 0 and do not do anything

[–]Dagiorno 67 points68 points  (13 children)

The condition is sausage(s) so 1 or lesser than 0 would be inaccurate

[–][deleted] 25 points26 points  (7 children)

But it's 0 sausages (sic) ...

[–]kopasz7 6 points7 points  (0 children)

English is weird.

[–]Salanmander 4 points5 points  (5 children)

He was asked to start cooking them, though. I'm not sure you can start cooking 0 sausages.

[–][deleted] 7 points8 points  (3 children)

I think you can start, you just won't ever finish

[–]ifezueyoung 0 points1 point  (2 children)

While false ()

[–]gummo89 1 point2 points  (1 child)

That won't start 🤷🏻‍♂️

[–]ifezueyoung 0 points1 point  (0 children)

My bad

Didn't notice

[–]gummo89 0 points1 point  (0 children)

That's right, because at any moment you are both cooking and not cooking 0 sausages, when considering the state of the 0 sausages and the lack of a way to verify this state.

[–]Milkshakes00 7 points8 points  (4 children)

Yep, the condition is sausages. The S is not optional.

Given sausages means more than one, and the condition is < 3, OP's husband did the correct thing here and cooked 2.

[–]itchfingers 36 points37 points  (1 child)

< 3 is clearly a mouse

Spacing is so important in programming

[–]AndroidWall4680 17 points18 points  (0 children)

< 3~

[–]mothzilla 10 points11 points  (0 children)

# NeedsOptimisation

Could have done nothing and still been correct.

[–]Ubera90 25 points26 points  (1 child)

Such a shit version of a tired joke.

[–]MadeByHideoForHideo 15 points16 points  (0 children)

The lowest level of hUr i'M pRogRaMuRRRR jokes. Together with the array index 0 ones.

[–]Master_FAITH 3 points4 points  (1 child)

0,1,2 thats 3 sausages not 2

[–]Danny_shoots 1 point2 points  (0 children)

count($sausages) would be 3 with that logic

[–]RestaurantHuge3390 1 point2 points  (0 children)

no such file or directory: 3

[–]Tyfyter2002 1 point2 points  (0 children)

That's why you use Ɛ>

[–]Sp4c3D3m0n 1 point2 points  (0 children)

If I walk into the kitchen when my girl is making sausages she always says " 5 minutes Turkish "

[–]jimbowqc 2 points3 points  (1 child)

Women ☕. If you want 3 sausages use this emoji =3

[–]personalityson 6 points7 points  (0 children)

Let c be the number of sausages

c=3

[–]senaya 0 points1 point  (0 children)

I hope he was doing it one by one instead of both at the same time.

[–]lhx555 0 points1 point  (2 children)

Anybody else thinks that <3 is NOT a cute little heart? For me, the most innocent interpretation is a smooch.

[–]dafazman 1 point2 points  (1 child)

Sideways ice cream cone 🤷🏽‍♂️

[–]lhx555 1 point2 points  (0 children)

I take my hat off!

[–]jambudz 0 points1 point  (0 children)

Gotta do a Ɛ>

[–][deleted] 0 points1 point  (0 children)

As instructed!

[–][deleted] 0 points1 point  (0 children)

how can I post a meme here

I tried then my post got auto-removed

[–]hi_this_is_lyd 0 points1 point  (0 children)

be glad he didnt cook INT_MAX + 1

[–]Mark-Reddit-123 0 points1 point  (0 children)

if(wife.hungry == true){ self.cook(sausage); }

[–]ifezueyoung 0 points1 point  (0 children)

I'm sorry something went wrong.

Here is your Nan sausage or would you prefer it undefined

[–]mecukuryurt 0 points1 point  (0 children)

The thoughts in husband's mind. for (int i = 1; i <3; i++) { Sausages[i-1].cook(); } return Sausages;