Content
@
0 reply
0 recast
2 reactions
grin
@grin
what's some programming advice that's considered common sense or that you hear often, but is actually bad advice?
18 replies
7 recasts
16 reactions
timdaub
@timdaub.eth
- comment your code - be consistent
1 reply
0 recast
0 reaction
MOLO
@molo
this is bad advice?
1 reply
0 recast
1 reaction
timdaub
@timdaub.eth
yes
1 reply
0 recast
0 reaction
MOLO
@molo
hmm. why?
1 reply
0 recast
1 reaction
timdaub
@timdaub.eth
Comments: Never explain what your code does in comments. Only write them when you want to persist info that hasn't already been expressed in code (e.g. context) Consistency: Inconsistency makes people feel bad. Your code still runs. It's emotional/irrational to write consistent code, just bc it makes you feel better
3 replies
0 recast
0 reaction
L
@lajos
Strong agree for comments: comments usually mean the code is not expressive enough, less comments = better code Inconsistency doesn't make me feel bad, but the review I leave on the PR could make the author feel bad. We structure code the way we do for a reason, and throwing that out the window is junior level stuff.
0 reply
0 recast
0 reaction