Standard for commenting code.
Page 1 of 1
Atropa




Posts: 878

PostPosted: Fri, 18th Sep 2015 10:31    Post subject: Standard for commenting code.
Hallo.

I've just got offered a job as data analyst( \o/ ) where I will have to write different scripts to automatically analyse a lot of stuff. I will be coding together with other people which I have never done before. Is there any commenting standard which is recommended across languages? Or perhaps some of you have some general recommendations? Smile

I found a few general tips online such as
https://msdn.microsoft.com/en-us/library/aa164797.aspx
and the book clean code
http://www.amazon.com/dp/0132350882/?tag=stackoverfl08-20
but I do not know whether it is worth the time and money.

Thanks!
Back to top
bloodian




Posts: 1026

PostPosted: Fri, 18th Sep 2015 10:42    Post subject:
Yep, just read "Clean Code" and you're done Smile
Code should comment itself. The less comments you need the better. The only times I use comments is for:

- explaining weird business logic
- explaining weird code
- comments for public methods for public APIs

other than that, I'm sure the team will have some standards they'll teach you Wink
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Fri, 18th Sep 2015 10:46    Post subject:
Yeah, that is actually the best advice. Depending on the language, having some nice, speaking code is really what should be favored. Some commenting standards might already be in place if some auto documentation software is used. Just ask your colleagues if you have some project specific coding guidelines, they should also cover the proper commenting.


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
LeoNatan
Banned



Posts: 73193
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Fri, 18th Sep 2015 10:54    Post subject:
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Fri, 18th Sep 2015 10:57    Post subject:
LeoNatan wrote:
Some good advice here:

https://www.doc.ic.ac.uk/~susan/475/unmain.html


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group