Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
sudosuave118yFor a personal project ,I don't think it's necessary,but for a work project,documentation is very important
-
2k lines and 3 months later, you'll thank yourself for putting down a few notes here and there
-
hayz8568yIt's necessary not to "overcomment" too, yesterday I found a code in production which was basically returning true if x == y.
The code in three methods was 464 characters, (Don't ask me why or how) while comments on this "functionality" where 480 characters. -
i like to write it with myself a few years back in mind. Me years ago was (is still) a total noob
-
speaking from experience as someone who spends a lot of time documenting everything (including every one else's code) only to have none else read it... its still worth it...always think of future self first and foremost. also I'd recommend confluence - beautiful for documentation - especially if you're already drinking the atlassian coolaid.
-
when I develop packages for r ( a statistical language) documentation is always part of the work. in most IDEs a shorcut lets you insert a framework of that describes the function, arguments and so forth. however for more in depth documentation you really need to do it yourself.
-
hayz8568y@Charmgoggles to be honest I prefer do first write tests ;)
Your approach might be ok if you have thought out every little aspect of your code. Even then is very likely that your code will change, therefore some of your comments will become irrelevant or wrong, and it is better (IMHO) to have no comments than misleading comments.
Documentation ðŸ˜is the lest fun part of the development cycle
undefined