1511
you are viewing a single comment's thread
view the rest of the comments
[-] potustheplant@feddit.nl 14 points 1 year ago

Hard disagree. It's a lot easier and faster to understand a function that is prefaced with a small line of text explaining what it does rather than trying to figure it out yourself.

It's not about whether you can understand the code or not, it's about efficiency and clarity.

[-] Aurelius@lemmy.world 7 points 1 year ago

Yeah, just 15 seconds and jot down a comment. Whenever I’m even hesitant, I just leave a comment. Doesn’t hurt anything and it can always be removed if not needed

Easier to remove later rather than add it after the fact

If done right, the "what it does" is in the method name. If your method is too complicated to summarize in its name, chances are good you should split it up or extract parts of it.

this post was submitted on 06 Jul 2024
1511 points (100.0% liked)

Programmer Humor

25362 readers
1625 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