cm0002@lemmy.world to Programmer Humor@programming.dev · 8 个月前Senior Wisdomlemmy.mlimagemessage-square64fedilinkarrow-up1811arrow-down18
arrow-up1803arrow-down1imageSenior Wisdomlemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 8 个月前message-square64fedilink
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up13·8 个月前And decent variable names if you can, as well. No magic numbers!
minus-squareZILtoid1991@lemmy.worldlinkfedilinkarrow-up7·8 个月前WYM, I can’t just name my functions foo() and my variables single letters? /s
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up6·8 个月前$retVal and $item are my personal favourite.
minus-squareipkpjersi@lemmy.mllinkfedilinkarrow-up7·8 个月前Make 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$retValand$itemare 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…