Click here to Skip to main content
15,921,716 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThe Art of Writing Comments :: Software Engineering Pin
valikac22-Nov-02 17:11
valikac22-Nov-02 17:11 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Matt Gullett22-Nov-02 18:03
Matt Gullett22-Nov-02 18:03 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Hockey22-Nov-02 18:16
Hockey22-Nov-02 18:16 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Ranjan Banerji22-Nov-02 18:07
Ranjan Banerji22-Nov-02 18:07 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Hockey22-Nov-02 18:12
Hockey22-Nov-02 18:12 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
valikac22-Nov-02 18:29
valikac22-Nov-02 18:29 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Michael Dunn22-Nov-02 19:23
sitebuilderMichael Dunn22-Nov-02 19:23 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Michael P Butler23-Nov-02 2:10
Michael P Butler23-Nov-02 2:10 
My simple approach to comments is,

Explain why I did something not what I did.

It's pointless trying to explain what the code is doing as that should be obvious from the code. However you should always say why you did something. This helps you when you go back to the code and wonder why the code is doing what it does.

I also document public class members, so that if somebody reuses the class then they know what the interface does and what parameters are needed. Anything private doesn't usually get a function header. I like people take a black box approach, documenting those functions that are specified in the design document but not really caring about the internal implementation.





Michael

Life’s not a song.
Life isn’t bliss.
Life is just this.
It’s living. -- Buffy the Vampire Slayer: Once more, with feeling

GeneralRe: The Art of Writing Comments :: Software Engineering Pin
Gary R. Wheeler23-Nov-02 2:58
Gary R. Wheeler23-Nov-02 2:58 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
valikac23-Nov-02 5:49
valikac23-Nov-02 5:49 
GeneralRe: The Art of Writing Comments :: Software Engineering Pin
loic28-Nov-02 1:52
loic28-Nov-02 1:52 
GeneralCOM+fopen - relative path Vs Absolute path Pin
devvvy22-Nov-02 16:57
devvvy22-Nov-02 16:57 
GeneralRe: COM+fopen - relative path Vs Absolute path Pin
Anders Molin23-Nov-02 0:45
professionalAnders Molin23-Nov-02 0:45 
Generalmemory slot and installed memory size/type Pin
JimBello22-Nov-02 14:18
JimBello22-Nov-02 14:18 
GeneralRe: memory slot and installed memory size/type Pin
alex.barylski22-Nov-02 18:24
alex.barylski22-Nov-02 18:24 
General'diff' algorithm Pin
moliate22-Nov-02 12:43
moliate22-Nov-02 12:43 
GeneralRe: 'diff' algorithm Pin
Shog922-Nov-02 13:05
sitebuilderShog922-Nov-02 13:05 
GeneralRe: 'diff' algorithm Pin
moliate22-Nov-02 15:29
moliate22-Nov-02 15:29 
GeneralRe: 'diff' algorithm Pin
Scott H. Settlemier23-Nov-02 6:32
Scott H. Settlemier23-Nov-02 6:32 
GeneralRe: 'diff' algorithm Pin
moliate25-Nov-02 8:58
moliate25-Nov-02 8:58 
Generalextracting dialog box to use in other program Pin
IrishSonic22-Nov-02 13:36
IrishSonic22-Nov-02 13:36 
GeneralRe: extracting dialog box to use in other program Pin
Christian Graus22-Nov-02 14:01
protectorChristian Graus22-Nov-02 14:01 
GeneralRe: extracting dialog box to use in other program Pin
IrishSonic22-Nov-02 14:12
IrishSonic22-Nov-02 14:12 
GeneralRe: extracting dialog box to use in other program Pin
Christian Graus22-Nov-02 14:14
protectorChristian Graus22-Nov-02 14:14 
GeneralRe: extracting dialog box to use in other program Pin
IrishSonic23-Nov-02 5:37
IrishSonic23-Nov-02 5:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.