By using this site, you agree to our Privacy Policy and our Terms of Use. Close
nightsurge said:
HappySqurriel said:

I have worked professionally as a C# and Java developer and I have worked with C++ (and heavily used C++ in school) ... The differences between these languages are (pretty much) irrelevant, and the underlying principles that lead to good design are what is really important.

 

Good you can answer a very big question of mine.  Something that's been annoying me for ages now.

In the professional setting, how big of a deal was commenting, and how thoroughly did you have to do it?  It seems like each new CS professor I have, they introduce a different guide for commenting, and they all place differing levels of importance on it.  One class didn't require much at all.  One class wanted comments every single line.  The current class I'm in wants us to use JavaDoc and that seems like the most commenting and way more than necessary....

Depends on the language, how you write your code and company requirements. Personally, I would say get in the habbit of writing a lot of comments as it makes it easier in the long run.

If it is Assembly, then 1 comment every line is incredibly helpful as it is a pain to decrypt what someone else wrote. If you use abriviations, again comments are incredibly useful and should be plentiful. If you never use abriviations (my favorite way of writing code) then comments before every logical section makes sense. So maybe comments before a section that setup and execute an FFT on a data set, then another comment before sending the results to a display.

At a minimum you should have comments for the function description, inputs, and outputs for every function, and comments for what the variables are meant to be used for.




If you drop a PS3 right on top of a Wii, it would definitely defeat it. Not so sure about the Xbox360. - mancandy
In the past we played games. In the future we watch games. - Forest-Spirit
11/03/09 Desposit: Mod Bribery (RolStoppable)  vg$ 500.00
06/03/09 Purchase: Moderator Privilege  vg$ -50,000.00

Nordlead Jr. Photo/Video Gallery!!! (Video Added 4/19/10)