4 ms·
IMHO those aren't best practice at all. It's just a vague list pick for the sake of writing these article. To me, the most important is that comment isn't the
by kureikain 5y ago
IMHO those aren't best practice at all. It's just a vague list pick for the sake of writing these article.
To me, the most important is that comment isn't the code. Then what it's and why we write it. Now, common becomes normal writing.
So the rule is? Know your audience.
Just think who you write this comment for and explain that to them. It helps a lot to guide people through what the code do. Especially in even driven code.
Imagine this pseudo code:
send_event({name: 'a', {props: name: 'a"}})
Why do name show up twice there? Without comment noone know why except people have business visbility. Because apparently some down the life consumer need the name in `props` and it cannot access the root of the object.
So. my best practice is know your audience when writing code comment.