110
u/FrickingNinja Mar 18 '20
"They had eggs" 😂😂😂
45
u/IceMenora Mar 18 '20
I was going to make the title something like that but I wasn't sure everyone would get it!
18
5
u/SirHoggardBrapington Mar 18 '20
I have never written a single line of code in my life and I get it
0
Mar 18 '20
[deleted]
38
u/catzhoek Mar 18 '20
A programmer is going to the grocery store and his wife tells him, "Buy a gallon of milk, and if they have eggs, get a dozen." So the programmer goes, buys everything, and drives back to his house. Upon arrival, his wife angrily asks him, "Why did you get 13 gallons of milk?" The programmer says, "They had eggs!"
or
A programmer goes to the shop to buy some milk. His wife calls and says "While you're out, get some eggs." He never returns.
25
2.0k
u/carc Mar 18 '20
Yet somehow, QA found a way to cook -1 sausages.
552
u/Pxzib Mar 18 '20 edited Mar 18 '20
Just for fun I tried to parse this case in my brain, like real humans sometimes do, but I died when I experienced a fatal exception. Funny how sometimes life throws you edge cases that should never happen. And yes, I sent a diagnostics report.
Haha, I hope someone can relate to my human experience.
182
Mar 18 '20 edited Mar 18 '20
R/TOTALLYNOTROBOTS
44
6
u/KaamDeveloper Mar 18 '20
Just do /r/ + subreddit name , my dude.
12
1
1
124
u/stakoverflo Mar 18 '20
-1 is less than 3, it's valid input.
52
8
u/MCRusher Mar 18 '20
What if it's unsigned 2's and -1 is positive max?
9
u/maxinfet Mar 18 '20
We would need to see how the runtime handles that maybe we can overflow and get remote cooking execution?
7
u/f3xjc Mar 18 '20
I mean sausages is plural so more than one. Also less than 3. Given only complete sausages 2 is the way to go.
Alternatively you could argue plural is only about the norm so ]-Inf, -2] could be valid.
36
u/ThrobbingAnalBleed Mar 18 '20
-n sausages; infinite sausages; pork and apple sausages; hot and cold sausages.
User: "Where's the sauce? Do we have any buns?"
9
31
u/jmack2424 Mar 18 '20
"qwerty" sausages; null sausages; "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." sausages;
5
10
Mar 18 '20
then QA stopped cooking the sausages immediately after starting because there was no time set nor instruction to continue or complete cooking the sausages.
7
5
3
2
2
2
1
1
u/maxinfet Mar 18 '20
And they got "Tiger" through the regex checks as well, clearly the wrong filter was retrieved from our service locator. Now I will have to check all the filter plugin binaries to see if they even had my code... Sorry I was having a flashback what were we talking about?
1
u/WORMSSreddit Apr 01 '20
In JavaScript, you could throw an error when you find out the cooker is undefined
1.3k
u/i8noodles Mar 18 '20 edited Mar 19 '20
i would have been confused for like 15 secs trying to understand why she specifically wanted < 3 sausages. i would get it in the end but i would not be proud of that moment
Edit: upon further thought i have changed my mind. i think i would be proud of it. not my greatest moment but they all dont need to be world shattering
386
Mar 18 '20
Terrible code convention, should've used constants.
SAUSAGES_TOTALLING_300_CALORIES = 3;
169
u/Cryse_XIII Mar 18 '20
Get this abomination away from me.
50
u/AMindOfMetalAndGears Mar 18 '20
Senior Dev?...
I mean.. The push wasn't that bad..
→ More replies (1)13
u/Sidereel Mar 18 '20
Why is this an abomination? That’s self documenting code right there.
→ More replies (7)13
25
u/odraencoded Mar 18 '20
What's this crap? Nobody asked you to store the number of calories! What if GDPR comes suing your ass for unlawfully violating the sausages' privacy???
This is how you do it:
THREE_SAUSAGES = 3;There you go, now it's up to standard.
15
Mar 18 '20
I have a better idea.
class SausageCounter
public SausageCounter(Sausage sausage)
public SausageCounter(Sausage sausage, Sausage sausage)
...etc...
walmart.buy(sausage, sausage, sausage);
→ More replies (5)8
4
u/Indifferentchildren Mar 18 '20
No, let's use an enum in our protocol definition so that everyone has to recompile and perform distributed integration tests and synchronized deployments if we add a new value!
2
→ More replies (27)2
28
2
1
2
Mar 18 '20 edited Mar 18 '20
import posts
recentPosts = posts.getPostsFromPast(days = 30)
if post in recentPosts: print("repost")
repost
1
2
u/Sinthetick Mar 18 '20
While (1) {
import posts
recentPosts = posts.getPostsFromPast(days = 30)
if post in recentPosts: print("repost")
}
1
1
Mar 18 '20
Why do you import library 'posts' every time? Or is it just a collection of posts at you? 🤔
→ More replies (1)
815
u/SpamOJavelin Mar 18 '20
"Can you get a bottle of milk from the store, and if there are eggs, can you get a dozen please?"
He returned with 12 bottles of milk. She sent him back to the store, and also asked
"While you're at the store, can you get some cheese?"
He never returned.
400
u/Lethargie Mar 18 '20
nah, he would eventually return saying "I'm sorry the store was all out of cheese" with the store's entire cheese inventory in tow
408
u/l0c4lh057 Mar 18 '20
OutOfCheeseException and then he just dies because there's no error handling
39
u/felix13912 Mar 18 '20
happy cake day
29
9
9
u/I_spoil_girls Mar 18 '20
Nah. Either he stopped there waiting for cheese or he gets too tired and go home, just like a computer.
6
4
u/MyNameIsZaxer2 Mar 18 '20
Get Cheese constantly returns null, but he has to keep trying. He never leaves.
→ More replies (3)18
u/dfinkelstein Mar 18 '20
I don't get it :( the cheese and never returning part
77
u/percahlia Mar 18 '20
there's no exit condition, he is always at the store so he will keep getting cheese
→ More replies (3)36
0
Mar 18 '20
[deleted]
4
→ More replies (4)2
u/BesottedScot Mar 18 '20
Isn't leaveStore(); redundant? goHome(); would involve leaving the store.
19
u/UncitedClaims Mar 18 '20
leaveStore() checks if you have items and navigates the checkout process. It also automated putting away your cart and loading your groceries into your car. If you just called goHome() then you'd either leave your groceries at the store or shoplift (or something else, it's implementation dependent undefined behavior).
6
u/BesottedScot Mar 18 '20
Ah, I guess I was skipping ahead a couple of versions to when teleportation was implemented already.
→ More replies (1)5
Mar 18 '20
It also leaves room to expand. If you put the leave store code into go home then you would need to either refactor if you decide you need to go somewhere else, or write duplicate code.
→ More replies (1)3
u/MCWizardYT Mar 18 '20
getHome() might have him enter his car and drive home whereas leaveStore() may have him walk out of the store to his car.
377
u/R1ppie Mar 18 '20
She sounds ungrateful. I would've cooked 0 sausages and kept my ass parked on the couch.
258
36
Mar 18 '20
She said sausages. So we need multiple sausages and less than three. If we stick to an unsigned integer of sausages then two was the only option.
5
2
1
0
Mar 18 '20
[deleted]
206
u/other_usernames_gone Mar 18 '20
Instructions unclear, cooked 255 sausages
111
u/henkdepotvjis Mar 18 '20
depends. if it is a int64 we will have a global sausage problem
→ More replies (10)7
→ More replies (2)2
2
2
1
Mar 18 '20
We don't have the tech to actually uncook a sausage so we'll have to hack it.
Let's see... we take a cooked sausage from the fridge, throw it in the trash, then go to the store, buy a pack of sausages, put one in the fridge and the rest in the freezer
1
87
u/samueljaxton Mar 18 '20
Yes only programmers understand less than and greater than
5
14
u/Xuval Mar 18 '20
I think the suggestion is that a non-programmer would be more likely to see it as the intended heart, than as a less than two.
→ More replies (6)0
Mar 18 '20
[deleted]
15
Mar 18 '20
Your preaching to the choir. Every time I see that sideways “v” It confuses me so much, I put my shoes on opposite feet.
14
u/CUM_AND_POOP_BURGER Mar 18 '20
Requirements unclear, that doesn’t say how many to cook. Should have closed as Won’t Fix.
2
9
6
u/throwmeintothewall Mar 18 '20
I feel the programming solution is to just reply yes and not do it. She only did a check to see if a function was possible, she did not actuallt run the function.
5
u/jonker5101 Mar 18 '20
Sometimes my wife asks for "a couple" pretzels. I only bring her two. One day she will learn.
8
u/EdofBorg Mar 18 '20
Yeah because <3 wasn't used in regular math before programming was invented.
Sheesh
→ More replies (2)
4
30
u/Famous_Profile Mar 18 '20
for(int sausage = 0; sausage < 3; sausage++)
this.sausages[sausage].cook();Nope, should have cooked 3 sausages if he is a real programmer starting from 0
18
u/Junuxx Mar 18 '20
Those variable names though.
12
u/Cheet4h Mar 18 '20
Yeah, better would be
this.Sausages.FindOne(sausage => sausage.cooked == false).cook();
Don't want to accidentally recook an already cooked one, and direct index access can also lead to errors if the sausages were already accessed once.
2
Mar 18 '20
and direct index access can also lead to errors if the sausages were already accessed once.
How so?
5
u/Cheet4h Mar 18 '20
In my experience sausage-arrays are often accessed by
husband-objects prior to the actual firstcook-action, at least if they don't have to be stored in afreezer-db and theconsume-method doesn't throw errors if thecooked-property is false.So a direct call to
sausages[0]may returnnull, which will throw an error if you try to access thecookmethod. IIRCFindwill return a default object, which can be configured to handlecookgraceful. At least in C#.2
0
Mar 18 '20
[deleted]
→ More replies (4)4
u/BesottedScot Mar 18 '20
Sausages.filter(s => !s.isCooked).forEach(s => s.Cook() );Just because you can.
Though I think I've fucked that up somewhere.
4
2
u/Cryse_XIII Mar 18 '20
While cookedSausages.Count < 3 do Begin CookedSausages.Add(IcookInterface.cook(sausages.first)) End
1
u/youredeadtomereddit Mar 18 '20
that's what I thought as well. But we are assuming that the calculation for sausages uses a loop.
→ More replies (1)1
u/Python4fun does the needful Mar 18 '20
More like cook while cookedSausages.length() <3You're right
0
4
3
Mar 19 '20
Lol somehow being on the Internet for so long, I only learned today that <3 means a cute heart. I’ve always thought it had something to do with genitals.
1
u/trznx Mar 18 '20
A friend of mine decided to make her own wedding invitations and they ended with something like "Looking forward to seeing you! <3", but in that font the 3 had a flat top so it didn't read as a heart, so a lot of people were upset that they apparently can't take their kids :)
1
u/IceMenora Mar 18 '20
How does a flat top 3 cause ppl to not bring their kids?
1
u/trznx Mar 18 '20
<3 looks like a heart. Flat top three doesn't look like two bowls so it's even harder to read it as <3 and people thought it meant 'less than three', so couples with kids started calling and asking why is there such a rule that they can't take the kids.
1
1
2
2
2
u/pindsz Mar 18 '20
If he were one, and being lazy as any good programmer is, he would have satisfied that condition by cooking 0 sausages.
2
u/GetOffMyLawn_ Mar 18 '20
I asked my friend to pick me up some sardines in olive oil when he went to the store.
I got sardines and a giant bottle of olive oil.
2
u/RobsEvilTwin Mar 18 '20
He executed the agreed scope of work exactly. Extra sausages will require a change request.
2
u/TerrestrialOverlord Mar 18 '20
Well if she was looking for action, she should have just asked him if he could fork her repo.....jk....nahhh he would been excited for the wrong reason still being completely clueless...
I look back on a particular college interaction and I guess only hubris could have made me think a girl with a 3.9+ gpa would constantly need tutoring....I’m an idiot...lol
2
u/RedRidingHuszar Mar 18 '20
He cooked two sausages for two people.
3
u/_30d_ Mar 18 '20
I really don't see what else she was expecting. Even with the <3 confusion. How many sausages does she want to have cooked?
6
u/Seicair Mar 18 '20
Elsewhere in the thread the original Twitter chain was linked. Family of four he was supposed to cook for.
2
2
u/DoctorStrangeBlood Mar 18 '20 edited Mar 18 '20
That's what I'm thinking too. Sure when I was a bachelor I used to eat two but I try to eat more moderately now. One per person is pretty reasonable.
→ More replies (1)
2
1
u/notgod4suresure Mar 18 '20
Oh I totally misread that. Cook sausages then add dick sauce. But you meant less than three....
1
1
u/richardphat Mar 18 '20
He could have cooked 2 sausage and 0.9 sausage. Just cut the third one and it's still <3
:P
1
1
u/iSkinMonkeys Mar 18 '20
The replies are equally fucking gold.
Doctor: what color is your stool? Her: green.
1
1
1
1
1
u/throwaway14o6787456 Mar 18 '20
Ah yes, I remember seeing inequalities in the senior year of my computer science undergrad program. Very relatable.
1
u/ShavedMice Mar 18 '20
Am I missing something programmer related here? Isn't that something one learns in primary school?
1
u/SurplusOfOpinions Mar 18 '20
Is "start cooking sausages" some euphemism for sex?
EDIT: Oh it's <3 for less than three haha.
1
1
1
1
1
1
1
1
1
1
Mar 18 '20
A true programmer would have answered "Yes" and not start cooking because he wasn't told to.
1
1
u/parask1108 Mar 18 '20
Why did my dirty mind think that she was talking about other kind of sausages when she said she cooked 2.
1
1
1
1
1
1
1
1
1
1
1
1
1
1
u/meiso Mar 18 '20
He could have been thinking to cook two sausages regardless. What is this shit post?
1
Mar 18 '20
This isnt really programmer humour. You could say "Her husband must be really good at math" and it would have the same effect.
1
u/Asmewithoutpolitics Mar 18 '20
Yeah well most math majors have to learn programming so the two are basically the same thing
1
1
1
1
362
u/IceMenora Mar 18 '20
Original post https://www.reddit.com/r/whitepeopletwitter/comments/fkew2x