this post was submitted on 17 Jan 2025
267 points (98.2% liked)

Programmer Humor

19987 readers
1376 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 11 comments
sorted by: hot top controversial new old
[–] HipsterTenZero@dormi.zone 2 points 30 minutes ago
[–] rickyrigatoni@lemm.ee 2 points 38 minutes ago

Warnings are for ignorings :3

[–] Karyoplasma@discuss.tchncs.de 34 points 3 hours ago (1 children)
[–] FooBarrington@lemmy.world 20 points 2 hours ago (1 children)
try {
    operation();
} catch {
    // nice weather, eh?
}
[–] Karyoplasma@discuss.tchncs.de 1 points 47 minutes ago* (last edited 38 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?
}

Edit: forgot that this is about JS lel

[–] nichtburningturtle@feddit.org 29 points 4 hours ago

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

[–] cbazero@programming.dev 21 points 4 hours ago (3 children)
[–] limer@lemmy.dbzer0.com 3 points 37 minutes ago

Sometimes it’s better to hope while closing eyes

[–] Isoprenoid@programming.dev 5 points 2 hours ago

This is why:

"It ain't stupid if it works."

is fundamentally incorrect.

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

I would add: until it doesn't.

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

-ErrorActionPreference SilentlyContinue