by Rachael » Tue May 28, 2019 7:30 am
Graf Zahl wrote:
It's not ZScript, but when I started my current job roughly 2 years ago I inherited a source base of several 8000+ source files, all of it barely commented. It took over a year to get that into a state where I could work with it. Commenting one's source is generally important, even if it's merely a single one-line description what a function does.
It's really not just that - it's a whole lot more important than you say even here.
Commenting helps the actual coder in the long run, too. If you stick with that for more than 10 years, guaranteed that you're going to forget what the code does, without comments. I've looked back on my old ZDoom submissions and was very thankful that I put the comments that I did, because it was confusing as hell without them.
If the code seems self-documenting, though (i.e. it's really really obvious what it's doing) I tend to comment far less.
Personally I am really bad with comments, but if I have to do a weird trick in the code I do have a habit of putting a comment so that I know why the code was made to do what it does later on.
[quote="Graf Zahl"]
It's not ZScript, but when I started my current job roughly 2 years ago I inherited a source base of several 8000+ source files, all of it barely commented. It took over a year to get that into a state where I could work with it. Commenting one's source is generally important, even if it's merely a single one-line description what a function does.[/quote]
It's really not just that - it's a whole lot more important than you say even here.
Commenting helps the actual coder in the long run, too. If you stick with that for more than 10 years, guaranteed that you're going to forget what the code does, without comments. I've looked back on my old ZDoom submissions and was very thankful that I put the comments that I did, because it was confusing as hell without them.
If the code seems self-documenting, though (i.e. it's really really obvious what it's doing) I tend to comment far less.
Personally I am really bad with comments, but if I have to do a weird trick in the code I do have a habit of putting a comment so that I know why the code was made to do what it does later on.