Cows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 11 months agoBill is a pro grammersh.itjust.worksimagemessage-square94fedilinkarrow-up1788arrow-down196
arrow-up1692arrow-down1imageBill is a pro grammersh.itjust.worksCows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 11 months agomessage-square94fedilink
minus-squareVilian@lemmy.calinkfedilinkarrow-up4·edit-211 months agoand if you need an unnecessarily complex code for performance sake?
minus-squarehstde@feddit.delinkfedilinkarrow-up13·11 months agoThere’s a comment for you to explain the why. Rule of thumb: code explains the how and what, comments explain the why.
minus-squaremagic_lobster_party@kbin.sociallinkfedilinkarrow-up5·11 months agoThose cases are rare. Often the most basic solution is good enough. If you have to write complex code, then you should write a comment (write the name of the algorithm for example).
and if you need an unnecessarily complex code for performance sake?
There’s a comment for you to explain the why.
Rule of thumb: code explains the how and what, comments explain the why.
Yeah that’s a good summary
Those cases are rare. Often the most basic solution is good enough.
If you have to write complex code, then you should write a comment (write the name of the algorithm for example).