Content pfp
Content
@
0 reply
0 recast
2 reactions

grin pfp
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 pfp
timdaub
@timdaub.eth
- comment your code - be consistent
1 reply
0 recast
0 reaction

MOLO pfp
MOLO
@molo
this is bad advice?
1 reply
0 recast
1 reaction

timdaub pfp
timdaub
@timdaub.eth
yes
1 reply
0 recast
0 reaction

MOLO pfp
MOLO
@molo
hmm. why?
1 reply
0 recast
1 reaction

timdaub pfp
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

MOLO pfp
MOLO
@molo
so if you misinterpret this (actually good) advice in a way that is pretty obviously not the intended meaning, it’s bad :) it’s like saying “drink water” is bad advice because it’s possible to drink a harmful amount
1 reply
0 recast
0 reaction

timdaub pfp
timdaub
@timdaub.eth
I don‘t compare software to e.g. a physical activity intentionally. Software is like writing English: almost anything can somehow be achieved somewhat. Drinking water is objective because you die without. But for software, inconsistent an uncommented code exists and runs just fine.
1 reply
0 recast
0 reaction