Regarding coding style

Dan Bishop danb_83 at yahoo.com
Sat Mar 8 20:27:32 EST 2008


On Mar 8, 1:31 pm, Grant Edwards <gra... at visi.com> wrote:
...
> <rant>
> What I really can't stand are the pointy-haired comment blocks
> at the beginnings of C/C++ functions that do things like tell
> you the name and return type of the function and list the names
> and types of the parameters. Gee, thanks.  I never could have
> figured that out from looking at the source code itself. IMO,
> comments explaining what the parameters are used for usually
> indicates that the parameter names were poorly chosen.

You must work for the same company I do.  I've seen a whole bunch of
comments that look like:

//---------------------------------------------------------------------------
// CXyzBase::LogMessage
//
//    Write a message to the log.
//
//    Args:
//       strMsg = the message to log
//
void CXyzBase::LogMessage(const CString& strMsg)
{
   //
}

And even worse, at the top of that file:

//---------------------------------------------------------------------------
// XyzBase.cpp
//
//    This file contains the implementation of class CXyzBase.
//
//    Copyright (C) 2008 Foobar Computer Consulting
//
//    VERSION   PROJECT#     DATE     DESCRIPTION
//    -------   --------   --------   ------------------
//      1.00     123456    01/04/08   Original creation.
//

Eleven lines, of which the only useful information to me was the
project number, as knowing this let me look up who was behind these
comments.



More information about the Python-list mailing list