this post was submitted on 13 Feb 2025
523 points (98.9% liked)

Programmer Humor

24670 readers
352 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
[–] Omgpwnies@lemmy.world 11 points 4 months ago (3 children)

Break it up into functions with names that describe what it does, then the script becomes basically a sequence of function calls and is easier to read and troubleshoot.

[–] 1984@lemmy.today 9 points 4 months ago* (last edited 4 months ago)

Yeah I dont know why people dont do this. Then an overall description of the script at the top is enough and anyone can just look at function names to see what is going on.

[–] jkercher@programming.dev 2 points 4 months ago

I'm on your side dude. Comments rot. Some are useless. Don't even get me started on doxygen comments.