this post was submitted on 14 Jul 2023
65 points (94.5% liked)

Programmer Humor

31791 readers
25 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 14 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 9 points 1 year ago

Lecturer: "Always comment your code."

Student: "The code documents itself!"

Also student: [see screenshot]

[โ€“] [email protected] 7 points 1 year ago (1 children)

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

[โ€“] [email protected] 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

[โ€“] [email protected] 3 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.

[โ€“] [email protected] 2 points 1 year ago (1 children)

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

[โ€“] [email protected] 1 points 1 year ago

Love you fam. :)

[โ€“] [email protected] 6 points 1 year ago (1 children)

How do I view this image in full resolution on Jerboa? Currently only able to see the low res version

[โ€“] [email protected] 3 points 1 year ago (1 children)

There's a download button in the top right. Not really convenient though, as you then need to go find the downloaded picture yourself.

[โ€“] [email protected] 4 points 1 year ago

Thank you, this helps, although jerboa really should have a button for full res right next to the download button.

[โ€“] [email protected] 5 points 1 year ago (1 children)

If any post was ever deserving of a +1 this is it right here.

[โ€“] [email protected] 4 points 1 year ago

And no reason to state this is from production.

[โ€“] [email protected] 3 points 1 year ago (1 children)

no one looks behind and questions how and why.

[โ€“] [email protected] 1 points 1 year ago (1 children)

No time in the development cycle for code review/refactors?

[โ€“] [email protected] 1 points 1 year ago

It is, but If you review 3 lines of pr and not the whole 50 lines of the file without thinking of the overall picture, this happens. I got this while reviewing a pr like this. And most probably I approved similar prs for this file in the past. Shame on me too..

load more comments
view more: next โ€บ