dwyl / app

Clear your mind. Organise your life. Ignore distractions. Focus on what matters.
http://dwyl.github.io/app/
143 stars 22 forks source link

Chore: Adding comments to the code #317

Closed LuchoTurtle closed 1 year ago

LuchoTurtle commented 1 year ago

as noted in https://github.com/dwyl/app/pull/314#discussion_r1115217580

The added code has no comments. They should be added so newcomers understand what it does better.

nelsonic commented 1 year ago

Retrospectively adding comments to code - and only when requested - is like doing homework after the deadline. At best it's a "C" for effort. If you want to be an "A+ Player", make it as easy as possible for everyone in your team to pick-up the code you write and maintain/extend it.

It might feel arbitrary to add comments. But for future reference: all code MUST be documented as if you actually want someone to understand it the first time they read it without having to waste time Googling for any part of it.

You won't have felt the pain of inheriting a codebase without tests or detailed comments. And for your sake I hope you never have suffer that pain.

"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." ~ John Woods