this post was submitted on 05 Jan 2025
60 points (90.5% liked)
Programming
17764 readers
544 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
"Adds a and b"?
Sure, not useful. Thats a what, not a why.
"Combined value needed for these outputs"
The "why". Useful. Shows the purpose, and explains the context it may be used in.
Assuming the "why" is known is the mistake - and one I see from junior and mid level, I dont care what language it is, its the same. Using refactoring code as an example, without context - the why - can cause problems. What may be more efficient for one resulting value being presented can cause issues for others (let's say precision as an example of why it could be a problem). Failing to include why something is being done is usually what introduces these problems, someone misses a different context than what they are looking at, and that belongs in a comment.
A comment on "why" isn't just important - for any block of code - it is, IMO, a requirement. I have and will continue to respond with "add comments as to why and resubmit".