Cows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 1 year agoBill is a pro grammersh.itjust.worksimagemessage-square88fedilinkarrow-up1787arrow-down195
arrow-up1692arrow-down1imageBill is a pro grammersh.itjust.worksCows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 1 year agomessage-square88fedilink
minus-squareVilian@lemmy.calinkfedilinkarrow-up4·edit-21 year agoand if you need an unnecessarily complex code for performance sake?
minus-squarehstde@feddit.delinkfedilinkarrow-up14·1 year 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·1 year 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).