Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Code comments

Code comments

Scheduled Pinned Locked Moved The Lounge
c++questionannouncement
25 Posts 15 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Emanuele 0

    How do you begin your code? Do you write comments at the beginning that tell who is the developer, the date, the name of the module?? I usually begin like this: ///////////////////////////// // fileName.cpp //Date: 09/04/2001 // Author: emanuele delbono // Version: 1.0 // Revision history // Date - Author // Comments: ////////////////////// And you?? Do you insert some sort of joke?? :-))

    T Offline
    T Offline
    Tom Archer
    wrote on last edited by
    #21

    I personally don't believe in comments like this. It's just one more thing to maintain and to quickly become meaningless when just one person in a long chain of developers forgets. To me commenting code like this is a bit like using writeln's to debug - it was useful in its day, but not the best way of doing things now. This sort of information is one of the things that version control software was created for. Cheers, Tom Archer Author, Inside C# Best mini-putt score = 22

    1 Reply Last reply
    0
    • E Emanuele 0

      How do you begin your code? Do you write comments at the beginning that tell who is the developer, the date, the name of the module?? I usually begin like this: ///////////////////////////// // fileName.cpp //Date: 09/04/2001 // Author: emanuele delbono // Version: 1.0 // Revision history // Date - Author // Comments: ////////////////////// And you?? Do you insert some sort of joke?? :-))

      T Offline
      T Offline
      Tim Smith
      wrote on last edited by
      #22

      Yes, I have stuff like that. But I don't include anything that the source control system automates. Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?

      1 Reply Last reply
      0
      • T Todd Smith

        I use a VC++ add-in to generate .cpp/.h files. So every file has the same format that looks something like

        #ifndef _REGISTRY_H_
        #define _REGISTRY_H_
        //****************************************************************************
        //**
        //** Registry.h
        //**
        //** Author : Todd Smith
        //** Date : Mon Dec 10 10:21:58 2001
        //** Notes : CMM lvl -1 compliant header
        //**
        //** $Id: Registry.h,v 1.5 2002/01/04 21:20:23 todd Exp $
        //**
        //****************************************************************************
        //============================================================================
        // INTERFACE REQUIRED HEADERS
        //============================================================================

        Todd Smith CPUA 0x007 ... shaken not stirred

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #23

        Todd Smith wrote: I use a VC++ add-in to generate .cpp/.h files. Todd, what add-in is this and where can I get it? Michael Martin Australia mjm68@tpg.com.au "Don't belong. Never join. Think for yourself. Peace" - Victor Stone

        T 1 Reply Last reply
        0
        • L Lost User

          Todd Smith wrote: I use a VC++ add-in to generate .cpp/.h files. Todd, what add-in is this and where can I get it? Michael Martin Australia mjm68@tpg.com.au "Don't belong. Never join. Think for yourself. Peace" - Victor Stone

          T Offline
          T Offline
          Todd Smith
          wrote on last edited by
          #24

          I use a modified version of this generate a .h and .cpp in the project dir (I can send a copy if you like) http://www.codeguru.com/devstudio\_macros/make\_file\_pair.shtml And then a slightly modified version of this to paste blocks of code into a file (one or .h and one for .cpp) http://www.codeguru.com/devstudio\_macros/code\_template\_sandy.shtml Todd Smith CPUA 0x007 ... shaken not stirred

          L 1 Reply Last reply
          0
          • T Todd Smith

            I use a modified version of this generate a .h and .cpp in the project dir (I can send a copy if you like) http://www.codeguru.com/devstudio\_macros/make\_file\_pair.shtml And then a slightly modified version of this to paste blocks of code into a file (one or .h and one for .cpp) http://www.codeguru.com/devstudio\_macros/code\_template\_sandy.shtml Todd Smith CPUA 0x007 ... shaken not stirred

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #25

            Todd Smith wrote: I use a modified version of this generate a .h and .cpp in the project dir (I can send a copy if you like) That would be much appreciated Todd. Michael Martin Australia mjm68@tpg.com.au "Don't belong. Never join. Think for yourself. Peace" - Victor Stone

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups