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

C / C++ / MFC

 
GeneralRe: MFC Questions Pin
Pavel Klocek22-Nov-02 21:33
Pavel Klocek22-Nov-02 21:33 
Generalmanually highlight a node in a tree control. Pin
trustno122-Nov-02 18:05
trustno122-Nov-02 18:05 
GeneralRe: manually highlight a node in a tree control. Pin
Michael Dunn22-Nov-02 19:25
sitebuilderMichael Dunn22-Nov-02 19:25 
QuestionHow to add new folder button Pin
sansingh22-Nov-02 17:58
sansingh22-Nov-02 17:58 
AnswerRe: How to add new folder button Pin
Atlantys22-Nov-02 18:13
Atlantys22-Nov-02 18:13 
GeneralBitmaps Pin
Steven M Hunt22-Nov-02 17:14
Steven M Hunt22-Nov-02 17:14 
GeneralRe: Bitmaps Pin
Christian Graus22-Nov-02 17:26
protectorChristian Graus22-Nov-02 17:26 
GeneralThe Art of Writing Comments :: Software Engineering Pin
valikac22-Nov-02 17:11
valikac22-Nov-02 17:11 
Hi.

I am a C++ programmer with experience with MFC and Winsock. I am working on project that utilize MFC, Winsock, and more advanced C++ like that found in Modern C++ Design. I have a question about writing commends.

I hate writing comments! Before you go off and post about responses, please consider my reasons. I understand the importance of comments from in terms of team project. In a team project where hundred and even thousands of programmers study and modify each other's code, comments are imperative. Comments are essential even in individual projects. Experienced programmers understand that we will one day read code we worked on six months ago. The bottomline is that comments are imperative to software implementation especially with C++ where some section of a code can be abstract and different to decipher.

Nonetheless, comments are tedious! For example, let say you spend an hour on an algorithm. Now, you have to spend another ten, twenty, even thirty minutes commenting the class or a collection of classes. In the end, you have less time solving other problems.

I want to know how do you programmers deal with commends in real-world team projects. Real-world projects vary from a simple simulation for NASA to an operating system. I know I am developing a bad habit that will hurt me in the end, but sometimes I get so caught up in solving problems that I ignore the comments. I remember all my code. Somethings I take a few minutes to see what goes on, but I always recommend it. Again, I understand the reason is because I am the person who wrote it.

Lastly, is there an art to writing good comments? How do you know where, when, and what to write such that the comment is elegant and takes up little time and effort because it becomes natural?

Thanks,
Kuphryn
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 
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 

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.