The comment earlier about using modified hungarian notation is about
the best thing I seen for writing self-documenting code. It's
particularly good when a new programmer has to go into someone
else's code and tweak something. And everyone is a "new" programmer
even when they have to go back into their own code six months later!
Another tool I use is a function mapper. I wrote mine in VB because
it runs faster there, but my original version worked fine in
MapBasic too. But what it does is it reads all the code starting
from an mbp or mb file, looking for references to subroutines and
functions and also any calls to them. It produces a report that
lists module, line no. reference type (function, sub, call, etc.)
and function name for all references in order of appearance. Then it
produces a second list, sorted by function name, of where that
function is in the code.
Those two lists by themselves are very useful for navigating
uncharted source code, but then I used the list as a lookup table
for a dialog box that lists any function name, and a listbox of all
functions that call it and another that lists all functions that it
calls. Click on either list and you can move up and down through a
routine very easily.
Since this last is written in MB, I suppose one could also get it to
draw an actual map of all the functions which would show the
architecture (or lack of it) pretty well.
But I would like to know what your "tried and tested" methods might
be. I'm always looking for a better way to manage software, so if
you could share them, I'd appreciate it.
> ----- Original Message -----
> From: "Jones, Ioan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 23, 2001 07:51
> Subject: MI-L MapBasic Code Documentation Standards
>
> > Dear All
> > I'm soon to embark on the documentation and enhancement of someone else's
> > rather lengthy and for the most part "un -commented" MB code. Before I
> > begin this arduous task using my tried and tested documentation style I
> was
> > wondering whether anyone has any advice to offer in the way of code
> > documentation standards suitable for MapBasic?
> >
> > Thanks
> >
> > Ioan
> >
> > Ioan Jones
> > GIS Consultant
> > Fox I.T.
> >
> > Tel: +44 (0) 7775 665772
> > Email: [EMAIL PROTECTED]
--
- Bill Thoen
------------------------------------------------------------
GISnet, 1401 Walnut St., Suite C, Boulder, CO 80302
tel: 303-786-9961, fax: 303-443-4856
mailto:[EMAIL PROTECTED], http://www.gisnet.com
------------------------------------------------------------
~~~~~~~~~~ Advertisement ~~~~~~~~~~~
Quick DOQQ Aerial Photos - Lower Price, Faster Delivery
LAND INFO offers full coverage of DOQQ aerial photos, priced lower and
delivered faster than the USGS and other providers. LAND INFO also offers
feature extraction from the photography. Visit
http://www.landinfo.com/directions.htm for complete details.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.