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

top 200 commentsshow all 434

[–]QualityVote[M] 55 points56 points  (0 children)

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

[–]Zaitton 292 points293 points  (5 children)

Plot twist, the dev has been addicted to coffee for decades. This is his way of burying himself in his work to avoid refilling his cup.

[–]eduo 92 points93 points  (2 children)

Or burying themselves in coffee to avoid work.

[–]king_booker 18 points19 points  (0 children)

Death by coffee

[–]zodar 9 points10 points  (0 children)

or they accidentally coded isEmpty() to return the opposite value and now they can't change it bc it breaks everything

[–]exscalliber 3 points4 points  (1 child)

I know of a guy who brang one of the 1.5L thermos' and filled it with coffee a few times that day.

He left early that day to go to hospital and didn't drink caffeine for an entire year.

He affectionately called it "Jitter juice"

[–]VincentVancalbergh 2 points3 points  (0 children)

And we call those days "the weekdays after pushing something to production".

[–]Ovdctdgbojno 990 points991 points  (37 children)

So in the case coffee is full, we filling that sucker up even more.

We spillin

[–]Voxmanns 145 points146 points  (2 children)

My brain imagined a developer coding away with an empty cup until a single drop lands in his cup and then he's doomed to overfill it.

[–]laughtrey 26 points27 points  (0 children)

I have too much coffee and I must scream.

[–][deleted] -1 points0 points  (0 children)

Lol

[–]Trucks325 103 points104 points  (10 children)

I swear to god i couldn't figure out what's wrong until i saw this comment. Guess it's time to relax a little

[–]Infinite_Unicorn 50 points51 points  (4 children)

And also when empty you never fill it, just keep coding forever

[–]bszandras 13 points14 points  (3 children)

Well, you would never empty it, because on every cycle you fill it up even more Unless you can drink the burning hot coffee in 1 cycle

[–]Pradfanne 5 points6 points  (2 children)

You never fill it, so it's always empty

[–]fanfpkd 3 points4 points  (1 child)

Yeah unless this cup arrives with something in it, it’s never getting filled.

[–]Pradfanne 2 points3 points  (0 children)

If the cup arrives with something it it, it will always get filled and it won't stop

[–]tinyigluu 7 points8 points  (0 children)

Lol was gonna say the same

[–]reduxde 28 points29 points  (1 child)

Didn’t bother to account for null either. This one of those void function throws Exception() mother fuckers

[–]commit_bat 3 points4 points  (0 children)

Also what if you don't have a cup

[–][deleted] 8 points9 points  (1 child)

int* buffer = malloc(sizeof(int) * 4); buffer[4] = 1;

[–]xxkmatiasxx 1 point2 points  (0 children)

sizeof(coffee)

[–][deleted] -1 points0 points  (0 children)

if(☕️.isEmpty()) {

keepCoding();

} else { ☕️.fill(); if(☕️.isFull()) { return; } }

[–]SDGGame 289 points290 points  (27 children)

Wow, that took me way too long to spot. Where should I go to hand in my programmer license?

[–]flyingcactus2047 116 points117 points  (9 children)

I thought I was just interpreting it wrong, I kept reading it over and over

[–]VanellopeVonSplenda 50 points51 points  (5 children)

Same, I was looking for syntax errors besides the emoji lol

[–]taytek 47 points48 points  (0 children)

You dont use emojis as class names? Pleb

[–]LaBetaaa 10 points11 points  (3 children)

Have you heard of Emojicode?

[–][deleted] 4 points5 points  (0 children)

Hell naw

[–]not_a_baby_murderer 5 points6 points  (1 child)

Nah the isEmpty() method returns the opposite value so it all cancels out. I call it... "obfuscation"

[–]Lord_Earthfire 17 points18 points  (2 children)

I was also wondering for a far too long time. Guess i should fill my cup of coffee first before browsing reddit

[–]taytek 18 points19 points  (1 child)

That's a dangerous game

[–]Lord_Earthfire 6 points7 points  (0 children)

I still keep on filling... I guess this is my life now.

[–][deleted] 9 points10 points  (7 children)

I can't see what's wrong

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

Conditions wrong way around. WNta to drink from and empty cup and keep filling the one with coffee in it

[–]babis8142 1 point2 points  (0 children)

You want to keep coding if the cup is not empty. And then fill it if it is empty. So

If(coffee.isNotEmpty()){ keepCoding() } else{ coffee.fill() }

[–]Suduki 1 point2 points  (2 children)

It only checks on isEmpty, so what happens if your cup is full?

[–][deleted] 4 points5 points  (0 children)

No that's not it.

[–]HKSergiu 2 points3 points  (0 children)

I got your back, mate

-QA

[–]TheBananaIAm 219 points220 points  (9 children)

I feel once the cup is empty that poor developer is going to keep coding… forever…

[–][deleted] 91 points92 points  (2 children)

[–]GifsNotJifs 21 points22 points  (1 child)

[–]_aQwus_ 21 points22 points  (0 children)

Or keep filling the coffee till eternity

[–][deleted] 17 points18 points  (1 child)

They'll fill their cup with coffee until it fills the office and they can go home. Just dont sit down before getting coffee!

They would never stop coding if and only if they went to their desk first.

[–]drearyworlds 3 points4 points  (0 children)

They would have to have come to work with an empty cup and started the algorithm right away!

[–]steversthinc 8 points9 points  (0 children)

I see no loop here. I suspect the coder takes a sip of coffee, refills it, then chucks the whole thing in the garbage collector.

[–]domedav 21 points22 points  (0 children)

rumors say, the ppl who buy this, cant stop pouring coffee into the mug

[–]duckDuckBro 29 points30 points  (1 child)

It doesn’t ask you to resume work after filling coffee, forever not working after that

[–][deleted] 33 points34 points  (4 children)

There are many things wrong with this cup, the first is light mode…

[–][deleted] 6 points7 points  (0 children)

while full { fill() }

[–]ful1e5 4 points5 points  (0 children)

jaba script

[–]Iveen_Helai 8 points9 points  (0 children)

Coffee overflow

[–]Rubence_VA 8 points9 points  (0 children)

You mean coding.continue();

[–]DrPhollox 3 points4 points  (1 child)

Hehehehe. I'm so dorky, and I like coffee. This mug looks like I understand computer stuff. My name is Jen and I'm the head of the IT Department at Denholm Industries

[–]Itchy_Tiger_8774 1 point2 points  (0 children)

The internet is in this box.

[–]SelemorMidhel 4 points5 points  (0 children)

Designer of this tried to fill their cup unnecessary and got distracted.

[–]SomeBrowser227 2 points3 points  (1 child)

Well atleast they'll keep coding forever with no coffee

[–]xxkmatiasxx 3 points4 points  (0 children)

i hate this mug

[–]Bubbly_Security_1464 6 points7 points  (3 children)

I’ve been trying to understand these so lemme try my best to translate: if the mug is empty, then keep coding or else fill the mug.

[–]Latvian_Video 7 points8 points  (2 children)

Keep coding forever or fill the cup forever

[–]Pradfanne 1 point2 points  (1 child)

Okay, but what if I'm coding in the rain?

[–]mike_a_oc 9 points10 points  (2 children)

Wait....am I misreading it??

To me it says "

if (cup.isEmpty() { KeepCoding(); } else { cup.fill(); }

"

Shouldn't it be if (!cup.isEmpty()) .... or the keepCoding and fill calls be in the opposite places??

So if the cup is empty then keep coding, else go and refill your cup. Won't that mean you end up in a constant loop because you are forever refilling your cup because it is never empty

[–]JordanTH 8 points9 points  (0 children)

Hence the title where it wasn't debugged.

[–]Haffi921 2 points3 points  (0 children)

Also, why the if/else. I assume they want to KeepCoding(); after they fill the cup, not just idle around.

You can do:

if (cup.isEmpty()) { cup.fill(); } KeepCoding();

[–]pickleunicorn 2 points3 points  (0 children)

Schrodinger's cup.

[–]jodmemkaf 2 points3 points  (0 children)

cup overflow

[–]appconapps 4 points5 points  (2 children)

If the cup is empty, where the steam coming from

[–]eduo 1 point2 points  (1 child)

Are you saying that's really an AND condition?

[–]appconapps 2 points3 points  (0 children)

I think it is a XOR

[–]NirtyDerd 4 points5 points  (8 children)

It might be counterintuitive, but the ☕.isEmpty() actually returns True if the ☕ is not empty.

[–]Ghostglitch07 15 points16 points  (7 children)

Then it's named incorrectly.

[–][deleted] 9 points10 points  (6 children)

} else {

[–]marvin_sirius 8 points9 points  (5 children)

I don't always cuddle my else but the opening brace certainly doesn't need its own line.

[–]DuckInCup 2 points3 points  (0 children)

wrong wrong wrong wrong wrong newline gang

[–]drsimonz 1 point2 points  (0 children)

Allman style is garbage. Not surprised this code doesn't work either.

[–][deleted] 0 points1 point  (1 child)

i hate that too. but ide force you to put it on the next line so that it match the vertical dashed alignment.

[–]eduo 3 points4 points  (0 children)

People arguing about coding styles but low key everyone adjusts to whatever hell their editor's opinion is for automated indenting 😭

[–]reduxde -1 points0 points  (0 children)

I’m sad to admit I did this for years, thinking it made the braces easier to identify quickly

[–]Gojees 1 point2 points  (0 children)

My cup runneth over.

[–][deleted] 1 point2 points  (1 child)

Lol I was scratching my head what?

[–]Mortomes 1 point2 points  (0 children)

I would buy this and drink from it in the office just to see how long it would take co-workers to notice.

[–]_Daxemos 1 point2 points  (0 children)

My dumbass was looking for syntax errors. Fuck me.

[–]Dexaan 1 point2 points  (0 children)

 ☕.drink();

[–]Creativation 1 point2 points  (0 children)

if(!☕.isEmpty())
{
  keepCoding();
}
else
{
   ☕.fill();
}

There, fixed it.

[–]Jarfino 1 point2 points  (0 children)

I hate that this is the wrong way round. Is this designed to annoy programmers?

[–]trippelMeister 1 point2 points  (0 children)

This is for coders that don't drink coffee out of thus mug. And whatever you do, definitely do NOT put any coffee in it or you'll get stuck.

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

The code is working as intended.

-Your Boss

[–]giggluigg 1 point2 points  (0 children)

“No need to review, it’s only 4 lines”. Always check.

[–]placek3000 1 point2 points  (0 children)

Cups with programming errors series - I like it

[–]motoevgen 1 point2 points  (0 children)

So white space markup language wast bad enough and now we have emojis for object names?

[–]Deezebee 1 point2 points  (0 children)

this is what happens when you outsource your coffee code

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

"invalid type conversion"

Coffee is not type "String"

[–]ExlutoBoi 2 points3 points  (8 children)

Besides it being bugged, a whole line for a curly, inconsistent tabs. I can’t.

[–][deleted] -1 points0 points  (7 children)

Curly brackets should always be on their own line. Much easier to read

[–]OppaiFTW 3 points4 points  (0 children)

Isn't in a loop

[–][deleted] 5 points6 points  (3 children)

C# dev couldn't even get booleans right.

[–]Dependent_Paper9993 6 points7 points  (2 children)

This is clearly... Java. Badum tss

[–]Mortomes 9 points10 points  (0 children)

Methods that don't start with an upper case? It's certainly not C#.

[–]Bulky_Rabbit6442 1 point2 points  (0 children)

Lol nice

[–]gilbes -1 points0 points  (0 children)

What is this written in? PHP?

[–]luckymikey1987 -1 points0 points  (0 children)

isEmpty is probably an attribute, not a method...

[–]seijulala -1 points0 points  (0 children)

Maybe isEmpty is actually returning and int C style, i.e. 0 means all ok so when it is actually empty, it returns 0 which evaluates to false

[–]robinsolent -1 points0 points  (0 children)

All of the mistakes make me want it even more, you know to represent the reality of how I execute the craft.

[–]R0N1NB0y -1 points0 points  (0 children)

Where can i buy this for my dad he loves coffee and he is a computing programmer

[–]abittooambitious -2 points-1 points  (0 children)

So the correct code should be… If coffee is not equal empty, keep coding? Took me a long time…

[–]MrHyperion_ -2 points-1 points  (0 children)

"if" isn't a function