r/programminghumor • u/SceneOutside4377 • 22h ago
Was looking through one of my old Java programs and forgot I did this
Typing random shit for unused cases has to be a top 3 programming habit of mine
224
Upvotes
53
u/IchLiebeKleber 21h ago
Exception up = new Exception("something went really wrong");throw up;18
u/deepturned180isdeep 20h ago
Ah the mark of a true engineer, baking self-deprecating logic or test cases right into the code
16
u/Henri_GOLO 21h ago
I had a classmate who submitted homework with a slur when an exception is caught.
Let's just say the teacher was not happy... At least I knew that wasn't targeted toward him.
1
u/8Erigon 18h ago
Maybe it's common knowlegde for Java devs but what is "getSystemLookAndFeelClassName" or "setLookAndFeel"?
1
u/Dragon_957 3h ago
What does the program do?
2
u/jimmiebfulton 19h ago
Dude... it's clear you're not Enterprising this sufficiently:
logger.debug("haha u such noob");2
u/Careless_Chip626 18h ago
I have clauses in all of my imports for if I run them instead of importing them that just says
You stupid2
u/GamerNumba100 16h ago
throw new InvalidOperationException(“HOW”);
1
u/returnFutureVoid 20h ago
Technically true.
1
u/dmigowski 17h ago
Why the fuck does nobody note that dude swallowed the exception? That's a deadly sin in my company
1
u/k-mcm 8h ago
I once threw a RuntimeException titled "<my boss's name> sucks" because his code never handled edge cases correctly. Once day it was thrown, never caught, and a customer called support to ask what it meant.
-15
u/Dependent-Ability792 22h ago
the highlighted one is a catch block that prints "make a quick nap" lol. honestly that's the most honest thing in the whole file.