🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

documentation standards

Started by
1 comment, last by skitzo_smurf 24 years, 4 months ago
Hi, has anyone ever felt like you are reading a "choose your own adventure book" when trying to look at another''s source code? Things can get pretty confusing. I was wondering if there was a standard as far as code documentation. just a thought, skitzo
"Innocent is just a nice way to say ignorant, and stupidity is ignorance with its clothes off."words of,skitzo_smurf
Advertisement
No, not "choose your own adventure" more like Dante''s "Inferno".

My university''s CS department had a documentation standard that covered documenting function prototypes and implementations, i.e. This variable means this. This function is supposed to do this. But I don''t think there''s really any official ANSI standard, if that''s what you mean.

In the real world, it varies from company to company. ex:
I had a friend who''s job was to maintain SAS code. He ended up deleting all the existing comments and said it was easier to understand what was going on that way. His boss agreed with him. On the other hand, the last company I consulted with had a bunch of C programs that were written by electrical engineers. Each and every line was commented, and if it was copied and pasted from somewhere else, the original source was documented. And each function had a introducing comment. And each header file... If I had to guess I''d say the comment to code ratio was about 6 to 1. I don''t want to say electrical engineers are uptight, but ....

Nowadays, I''m just happy when the comments are in english.
Take a look at the book Code Complete by Steve McConnell. Code documentation is one of many issues it sorts out very good.

Actually, even forcing your team members/managers to read selected chapters may sometimes be a good idea.

This topic is closed to new replies.

Advertisement