this post was submitted on 17 Jan 2025
747 points (99.0% liked)

Programmer Humor

20146 readers
1281 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] FooBarrington@lemmy.world 75 points 1 week ago (12 children)
try {
    operation();
} catch {
    // nice weather, eh?
}
[–] Karyoplasma@discuss.tchncs.de 15 points 1 week ago* (last edited 1 week ago) (8 children)

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

[–] __ghost__@lemmy.ml 2 points 1 week ago (5 children)
[–] Traister101 2 points 1 week ago (2 children)

If your joking yes, if your not Java and Java Script are seperate things.

[–] dajoho@sh.itjust.works 2 points 1 week ago
[–] JustAnotherKay@lemmy.world 1 points 1 week ago (1 children)

Actually made this mistake in front of 20 people the other day. Guy at my job mentioned coding in java and I asked if he was doing web dev 🤦

[–] BangersAndMash@lemmy.world 2 points 1 week ago* (last edited 1 week ago) (1 children)

Plenty of java back end web development, so maybe not as embarrassing as you felt?

[–] JustAnotherKay@lemmy.world 1 points 1 week ago

He said "I've been closing in C# and Java for 2 years" and I asked, in front of everyone, "are you doing web dev?" And he just coldly said no

See this could have been fine if I didn't double down and go "then what are you using java for... OH WAIT"

load more comments (2 replies)
load more comments (4 replies)
load more comments (7 replies)