this post was submitted on 14 Jul 2023
66 points (94.6% liked)

Programmer Humor

31992 readers
133 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] beardedrhino@lemmy.ca 7 points 1 year ago (1 children)

What am I looking at here? It just always goes to the first case right? ๐Ÿค”

[โ€“] fsniper@kbin.social 1 points 1 year ago* (last edited 1 year ago) (1 children)

It's not the real issue. I introduced that while anonymizing the data. It's that a 3-5 liner code became a huge switch case by just incrementing the code and never thinking how it should be done. This was caused by like 15 engineers in time :)

Something like below would be huge improvement:

subs1 = ["cluster1", "cluster2"]
if subs1.contains(clusterName) return subs1

[โ€“] Crackhappy@lemmy.world 4 points 1 year ago (1 children)

Lol. Dude, you can't do that to a bunch of coders and not expect them to read it literally.

[โ€“] fsniper@kbin.social 2 points 1 year ago (1 children)

Yep that's on me:) let's call this second breakfast!

[โ€“] Crackhappy@lemmy.world 1 points 1 year ago

Love you fam. :)