this post was submitted on 17 Jan 2025
245 points (98.0% liked)

Programmer Humor

19969 readers
1666 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 8 comments
sorted by: hot top controversial new old
[–] Karyoplasma@discuss.tchncs.de 30 points 3 hours ago (1 children)
[–] FooBarrington@lemmy.world 16 points 2 hours ago (1 children)
try {
    operation();
} catch {
    // nice weather, eh?
}
[–] Karyoplasma@discuss.tchncs.de 1 points 45 minutes ago

Starting with Java 21 (I think), they've introduced ignored variables, so you can now actually do this:

try {
    operation();
} catch (Exception _) {
    // nice weather, eh?
}
[–] nichtburningturtle@feddit.org 27 points 4 hours ago

If I can't see it, is it really there?

[–] cbazero@programming.dev 21 points 4 hours ago (2 children)
[–] Isoprenoid@programming.dev 5 points 2 hours ago

This is why:

"It ain't stupid if it works."

is fundamentally incorrect.

[–] breakingcups@lemmy.world 6 points 3 hours ago

I would add: until it doesn't.

[–] wizardbeard@lemmy.dbzer0.com 2 points 3 hours ago

-ErrorActionPreference SilentlyContinue