Welcome Guest, Not a member yet? Register   Sign In
Comments and explanations - how to do it better?
#3

(This post was last modified: 01-09-2016, 04:02 PM by PaulD. Edit Reason: Added PS )

(01-09-2016, 03:48 PM)InsiteFX Wrote: Hi PaulD,

I try to write my code so that it is self readable, use descriptive names, methods etc;

If you can not read the code then comment it well and then take another look at it.

I agree, but I suppose my question is, is what does it mean to 'comment well'? What rules do other people use during commenting, and when do you add the comments, given that it is really hard to tell when you are coding what is obvious and what is not to your future self.

I feel that I need a new phase in my process that is all about commenting code, when the site goes live, when it is still fresh, and not just during the coding process. A new phase that is about 'commenting well' the code that is now finished and tested and ready for production. I have never done that before, just relied on commenting as I go. So what do you do? Yes, code is usually self readable and uses descriptive methods and functions, but do you have a commenting phase? Do you go through your code to comment especially for future development. I suppose this is getting towards documentation, which in all honesty I never write. Perhaps I should?

Paul.

PS Although I have built complex sites, and am quite proud of some of the stuff I have done, I am still fairly amateur in that I have never coded in a team. I am guessing that in a team, commenting becomes a more rigid process, explaining the logic of code protions. But that is outside my experience so I just don't know.
Reply


Messages In This Thread
RE: Comments and explanations - how to do it better? - by PaulD - 01-09-2016, 04:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB