"Project Analyzer is a utility designed to analyze, optimize and document
applications developed with Visual Basic 3.0, 4.0, 5.0 and 6.0."
I have always been interested in how good my code is: is it reusable? could it be
improved? are there enough comments? This great utility tells you all this and more.
To start analysing a project, all you do is select the project file. From this, it
finds all the related files, and analyses each one. This is a quick process, for example,
on my meagre P100, it took 1:45 to analyse 6465 lines of code across 28 files. Once it has
analysed it, you can save the project for later reference.
Now we can really start looking at the features. The main window comprises of a list of
all the files, and a window containing information about each file. For all the modules
containing code, you can view the module in a ‘hypertext’ view. This is similar to what
you see in the VB code window, only more colourful and you can click on procedures to find
out about them. You can also find out information about the module. This is one of Project
Analyser’s strengths. It gives you information like name, version, lines of code, and
information about the number of procedures. You are also told how many comments you have,
and how much whitespace you have, as a percentage.
It is on procedures that Project Analyser really comes into its own. For each
procedure, you can find out about the variables called, whether there are any dead ones.
It also provides an analysis of what procedures this current procedure calls, and which
ones call it. There are also some metrics about your code, but we will look at them later.
Although you cannot edit the modules directly from Project Analyser (because it is an
analyser not an editor), this is useful for highlighting dead code, and highly complex
code, which needs to be more split up, with more comments.
Project Analyser also has the ability to produce reports. This include a module calling
tree, a procedure calling tree, file, procedure and variable lists, a ‘need’ report (i.e.
shows dependencies), library report, problem report and design quality report. All these
can be saved as text files or copied to the clipboard. Of all these, the design quality
has to be the best. It gives a good summary of the overall complexity of the project,
using the intuitive metrics. These metrics give an idea of how easy it will be to maintain
and debug the code. They range from simply number of lines of code to information
complexity, which considers which variables and procedures used. Other metrics include
cyclomatic complexity (how many nested statements) and structural complexity (how many
other procedures are dependant on this one). They give you a good rounded view of the
project as a whole, and what problem areas there are that need addressing.
Lastly, there are several add-ins for Project Analyser. There is Super Project Analyser
which analysers several projects at once, and groups of projects; there is Project Printer
and Project Graph which provide an easy way to print your projects and view them
graphically as flowcharts.
All in all this is an excellent project. The analysis engine is quick and powerful, and
the reports are accurate. They are also ruthless at pointing out where you need
improvements, and how complex your code it. I was very surprised at what was pointed out
to me about my coding and what improvements there were to make. Although I did not see any
speed improvements, I definitely found debugging it in future much easier.
Name : Project Analyser
Web site : http://www.aivosto.com