cm0002 to Programmer Humor@programming.dev · 1 month agoSenior Wisdomlemmy.mlimagemessage-square64linkfedilinkarrow-up1802arrow-down110
arrow-up1792arrow-down1imageSenior Wisdomlemmy.mlcm0002 to Programmer Humor@programming.dev · 1 month agomessage-square64linkfedilink
minus-squaresunbyteslinkfedilinkarrow-up12·1 month agoAnd decent variable names if you can, as well. No magic numbers!
minus-squareZILtoid1991linkfedilinkarrow-up6·1 month agoWYM, I can’t just name my functions foo() and my variables single letters? /s
minus-squareipkpjersi@lemmy.mllinkfedilinkarrow-up7·1 month agoMake sure to remember to update your comments too, otherwise it causes even more confusion when something works differently than it says it does.
Comment your code. Problem solved.
And decent variable names if you can, as well.
No magic numbers!
WYM, I can’t just name my functions
foo()
and my variables single letters? /s$retVal
and$item
are my personal favourite.Make sure to remember to update your comments too, otherwise it causes even more confusion when something works differently than it says it does.
That happened to me multiple times…