r/programminghumor • u/SceneOutside4377 • 6d 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
386
Upvotes
81
u/IchLiebeKleber 6d ago
Exception up = new Exception("something went really wrong");throw up;28
u/deepturned180isdeep 6d ago
Ah the mark of a true engineer, baking self-deprecating logic or test cases right into the code
20
u/Henri_GOLO 6d 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.
7
u/k-mcm 5d 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.
5
u/jimmiebfulton 6d ago
Dude... it's clear you're not Enterprising this sufficiently:
logger.debug("haha u such noob");1
u/8Erigon 5d ago
Maybe it's common knowlegde for Java devs but what is "getSystemLookAndFeelClassName" or "setLookAndFeel"?
1
u/Dragon_957 5d ago
What does the program do?
1
u/IntelligentWall7345 4d ago
Was this declared in an interface?
publicis grayed out.3
u/Careless_Chip626 6d 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 5d ago
throw new InvalidOperationException(“HOW”);
2
u/IndomitableSloth2437 17h ago
I have one that said something like "OH GOD SOMETHING WENT HORRIBLY WRONG"
1
u/returnFutureVoid 6d ago
Technically true.
1
u/dmigowski 5d ago
Why the fuck does nobody note that dude swallowed the exception? That's a deadly sin in my company
1
u/Ok_Brain_2376 4d ago
lmao, this reminds me when GTA 5 codebase got leaked, alot of comments were added similar to this
-15
u/Dependent-Ability792 6d 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.