this post was submitted on 17 Jan 2025
175 points (98.9% liked)

Programmer Humor

32710 readers
1692 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] 1 points 19 minutes ago

except: pass

[–] [email protected] 12 points 2 hours ago

Like putting electrical tape over your check engine light.

[–] Bosht 5 points 1 hour ago

That's fucking hilarious

[–] [email protected] 43 points 3 hours ago (1 children)

Still not as excellent as On Error Resume Next

Imagine the sheer ~~idiocy~~ genius required to add a language feature where, if an error occurred, the handling method is to just pretend that line of code never existed and continue onto the next line.

VBA is truly the language of savants.

[–] [email protected] 10 points 2 hours ago

PowerShell does that by default, and it's my least favorite feature in my most used language.

$ErrorActionPreference = Stop

At the start of almost every script.

[–] [email protected] 31 points 3 hours ago
[–] konalt 13 points 3 hours ago (1 children)

I wrap every line of code in a try catch block, even my try catch blocks are in try catch blocks just in case the first accidentally drops it after catching it

[–] CaptainBlagbird 3 points 3 hours ago

Yo dawg, I heard you like try-catch blocks

[–] [email protected] 19 points 4 hours ago* (last edited 4 hours ago) (1 children)
[–] [email protected] 4 points 2 hours ago
process.on('uncaughtException', console.error)
[–] [email protected] 4 points 2 hours ago

I came across a stack overflow recently about how to do something in a jasmine unit test. Someone gave a solution of “I just changed the test to xit(“… and now there are no errors!”

[–] [email protected] 6 points 3 hours ago

Donald Trump does coding.

[–] [email protected] 4 points 3 hours ago* (last edited 3 hours ago)

It works on their machine though!

[–] devilish666 1 points 57 minutes ago

Push it to prod & see the world burns around you