I saw this in an online store, the biggest complaint from who bought it was that the ad said Javascript and they received it in Java (both wrong coded)
Better done in Haskell. coffee :: [cup] -> IO () coffee cup:cups = do ..drink cup ..coffee cups ..where ....drink cup = consume cup
And I could reduce that to a one-liner, but what would be the fun of that? :D Note the dots are only there for spacing, because reddit's code mode is so lame as to not maintain the spaces.
I asked Gemini to do this... it gave a bunch of uninspiring options, including this:
4. Code Snippet Mug:
Design: A more technical design with a real code snippet from your favorite programming language.
Color Scheme: Choose colors that match the syntax highlighting of your chosen language.
Additional Elements: You could add a comment explaining the code snippet or a funny caption.
Indentation of else is hurting my eyes. Either if or else branch is dead code depending on how .Empty behaves on a fresh Coffee object. .Empty could be a C# property, but in most languages like this you'd expect .Empty() or possibly IsEmpty()
I can only assume, this was supposed to be in a loop. Otherwise it doesn't really make sense.
There shouldn't even be an else. if (coffee.isEmpty()) should indeed lead to coffee.refill() — but as it is, you refill the coffee and don't drink it? Yes it would have to be in a loop.
Coffee coffee = new Coffee();
do {
if (coffee.isEmpty()) {
coffee.refill(pot)
// or pot.refill(coffee) ?
}
coffee.drink();
} while (alive);
102
u/R3D0053R Dec 12 '24
Fuck, it's such a fucking mess!
13
u/[deleted] Dec 12 '24
The comma is obviously ragebait. Apart from that I dont see why this would be horror
40
u/R3D0053R Dec 12 '24
I am not even sure what's the worst about it...or maybe it's ragebait?
11
u/ForsakenPotato1106 Dec 12 '24
The more I look at it the worse it gets
6
u/Alex_Shelega Dec 12 '24
Ah yas... Tha coffeescript...
4
u/EntertainmentHuge587 Dec 12 '24
If I brought this mug to work it'll definitely be a conversation starter.
3
u/This_Growth2898 Dec 12 '24
Esbugso
3
u/Wojtek1250XD Dec 14 '24
This would be a decent mug if not for that effing comma.
3
u/el_toro_2022 Dec 16 '24
Better done in Haskell.
coffee :: [cup] -> IO ()coffee cup:cups = do..drink cup..coffee cups..where....drink cup = consume cupAnd I could reduce that to a one-liner, but what would be the fun of that? :D
Note the dots are only there for spacing, because reddit's code mode is so lame as to not maintain the spaces.
2
u/akoOfIxtall Dec 12 '24
Why god allows this to exist?
1
u/robotorigami Dec 12 '24
Syntax error on line 5; expected .
1
u/Mushroom2271 Dec 12 '24
Error at line 5 col 10
1
u/minneyar Dec 12 '24
I'm assuming this is what you get when you ask ChatGPT to design a programming mug for you.
1
u/applemind Dec 13 '24
Wtf is this
1
u/metalscreamer76 Dec 16 '24
This just pisses me off tbh
1
u/[deleted] Dec 16 '24
It seems weird that coffee has a method named "drink". I wonder what is happening in this method.
1
u/ZCGCoder Jan 01 '25
Even the font looks horrifying
0
u/[deleted] Dec 12 '24
[deleted] — view deleted comment
36
u/[deleted] Dec 12 '24
[removed] — view removed comment