2008
04.21

Comments on comments

There’s a lot of maintenance of code on my current project.  The code is not always of a very high standard (ok, so that’s being nice!).  One of the things that annoys me is where code comments are pointless, and are glibly added without any thought to their purpose.

Here’s an example of a poor comment:

  //function function will call the various functions depending on the selection that was made
  addProgrammes( ctlFlexTable, xaxisf.AsString() );

Of course, and to be fair, there are slightly more useful comments:

  // — Add a total row —
  row = new MIS.Tables.Rows.TotalRow( ctlFlexTable );

On the whole, I feel that comments should be used in source code to highlight the purpose of a piece of code, where that purpose is not immediately apparent.  Also, comments can be used to explain functionality where that functionality is not obvious.

Andrew.

2008
04.20

Welcome

This is the Metaflex developer’s blog. We will be writing about scenarios, cases, projects, happenings, fun facts, not so fun facts, and anything else we find interesting enough to share.

Your authors are Andrew Perelson and Stephen Perelson – brothers who share a love for software development. Together we have over 30 years of experience working in the IT industry locally and internationally and we hope you will gain positively from our blog.