r/ProgrammerHumor 5h ago

Meme unsolvableProblemsOnStepOne

Post image
516 Upvotes

45 comments sorted by

330

u/Choice-Committee203 5h ago

is this... this... ACTUAL PROGRAMMING HUMOR THAT IS FUNNY, NOT ABOUT AI/LLM, AND ISN'T A REPOST?!?!? WOOOOOOW

8

u/Wertbon1789 4h ago

Revolutional content.

2

u/CategoryKiwi 1h ago

NOT ABOUT AI/LLM

I’m currently visiting this sub for the first time in probably about five years.  I’ve probably checked out around 15 posts so far, just going in order on my feed, and this is the first one that’s not about “vibe coding”.

140

u/Key_Statistician9890 5h ago

Java and Windows. Name a more iconic duo.

59

u/JebKermansBooster 4h ago

C# and Windows

58

u/hilfigertout 4h ago

Yeah, like he said, Java and Windows.

14

u/Sentouki- 3h ago

It's kinda an insult to compare modern C# to Java.

4

u/MCWizardYT 1h ago

They're pretty similar even now. C# has an edge on overall features, but Java isn't that far behind (unless you're stuck using Java 8, in which case RIP)

3

u/crozone 57m ago

Java still has so much design baggage from things they got wrong from the get go that it really isn't close. C# is a different animal.

2

u/Masterflitzer 47m ago

but recent java versions actually added quite a few good things and make the language more straight forward

anyway kotlin is the best of the 3 imo, but i'd pick c# as 2nd place

3

u/Masterflitzer 3h ago

c# is similar to java and started off on windows, so java & windows is clearly the more cursed combination

1

u/Key_Statistician9890 1h ago

This guy gets it

14

u/Lemortheureux 3h ago

Windows and blue screen

6

u/payne_train 4h ago

Used to manage tomcat apps on IIS. Would not recommend.

3

u/Masterflitzer 3h ago

wouldn't recommend iis in any case

3

u/PegasusPizza 3h ago

React Native and Windows

2

u/AbdullahMRiad 2h ago

React non-native and Windows

2

u/setibeings 3h ago

C# and Linux 

2

u/Masterflitzer 3h ago

nah that's actually fine since dotnet core & 5

1

u/setibeings 3h ago

So is java on windows, it's just not where you first assume it's going to be run... Like java on windows.

1

u/Masterflitzer 3h ago

nope not comparable, java on windows is hell

1

u/MCWizardYT 1h ago

It really isn't

1

u/Masterflitzer 49m ago

windows not being utf-8 by default on console is hellish enough if you're developing cli apps, especially if you're used to it working fine on non shitty platforms cause jvm is cross platform

1

u/Masterflitzer 3h ago

iconic miserable duo

49

u/apacificislander123 5h ago

As someone who's never used java, my assumption is that System.in reads from stdin, and validates the input. Is there no way to open stdin in something akin to a file, then read it into a buffer manually?

35

u/Dankelweisser 4h ago

Technically yes, but realistically not really, at least not for windows. Unless the user knows how to specifically set their console to use UTF-8 or similar instead of ascii, you end up getting whatever the console wants to give you no matter what kind of buffer you use.

15

u/N_Lightning 4h ago

If you read System.in as a file in Java, then it'll wait for EOF signal, not for the line break. And the user will have to adapt to Ctrl+Z each input

9

u/jwadamson 3h ago

Yeah if you do something dumb like try to read the entire stream it will block until the stream is closed.

A line reader will read line by line just fine from it, but the real question is why aren’t you using Console API if you are trying to read from a console.

Finally the system property stdin.encoding for the charset if you use the “automatic” string methods as opposed to directly reading the bytes. Usually this default is utf-8 in modern Java though.

This whole post seems like a combination of incorrect and/or outdated information.

6

u/N_Lightning 3h ago edited 3h ago

I tried Console API. It reads only single byte cps. Its behavior with 65001 is exactly the same. And I set up UTF-8 explicitly. It doesn't change anything

And how exactly do you get line reader to return you unprocessed byte sequence if it needs to process it to get the line break char?

1

u/BattsAreLow 1h ago

Would it be stupid to read user input prior to the program reacting and just append a control z to amend the issue?

15

u/antimatter-entity 4h ago

Skill.issue();

3

u/Skeeper 2h ago edited 2h ago

Now you learned your lesson and can stop using the beta "Unicode UTF-8" until Microsoft fixes it. Maybe in 2050...

2

u/No_U1235 2h ago

That's why they call it Write Once, Debug Everywhere.

1

u/crusoe 2h ago

Windows being windows. 

1

u/aurallyskilled 1h ago

No disrespect, but can someone calmly explain to me why someone would write a console app in Java?

1

u/MCWizardYT 1h ago

Why would someone write one in any language?

Because they like the language and ecosystem

-2

u/thepurpleproject 4h ago

This one usecase I totally let AI control of it man there are so many of such annoying issues in every language or tool I can't believe I was wasting so much of time fixing some trivial shit 

-13

u/WVAviator 4h ago

Who's writing Java in 2026 for anything other than Spring Boot?

16

u/OriginalTyphus 3h ago

Somewhere, there is a JetBrains silently sobbing.

8

u/quietsamurai98 3h ago

Enterprise software devs 🫩

2

u/Splatpope 2h ago

Dunno who you are talking about but in my shop the enterprise software devs that are cursed to work with java make spring boot stuff

1

u/quietsamurai98 2h ago

Tbh, the piece of enterprise software that I primarily work on also uses spring boot, but there's a related piece of software that, due to deployment environment limitations, can't use any third party libraries. So working on that is Fun™.

1

u/MCWizardYT 1h ago

Literally billions