Toolbox for project manager
Reduce development time. Increase team communication. Reuse and modify existing code. Create optimized programs. Enforce standards. Ensure covering tests. Produce complete and correct documentation. Manage maintenance efforts. The tasks a project manager faces are difficult. How do you achieve all of this? In this article we show how a project team can benefit from the use of Aivosto tools in the different phases of a development project.
The tools mentioned are most useful for Visual Basic, Visual Studio and Office VBA projects. We also link to additional readings on the subject.
1. Evaluation and reuse of existing code
Often you start a project with an existing system at hand. How does the old code work? Are there modules and classes that are candidates for reuse?
Project Analyzer is an essential tool for understanding existing VB, VBA and VB.NET code and also for evaluating its quality. With Project Analyzer's graphic and hypertext features, developers can surf in the old code to understand the relationships of forms, classes and modules, visualize how control flows via procedures and data via variables.
Visustin creates flow charts for existing code. Flow charts are helpful for understanding source in a visual way. They come handy if the code is uncommented, complex or written with a stirred spaghetti-style logic. Visustin is a good companion for Project Analyzer. It works on the detail level while Project Analyzer visualizes the bigger picture.
Reuse isn't just about copy & paste. Old code needs to be changed in a managed way. The articles Restructuring Visual Basic code and Refactoring tools show some techniques for that purpose.
2. Code writing
Coding takes a lot of time if you want to achieve quality results. Decrease the time allocated for coding, and you end up with a costly increase in testing, bug fixing and maintenance.
Fortunately, you can win time without affecting the quality by using productivity add-ins that let developers write their code faster. VB Friend is a Visual Basic 6.0 add-in that completes shortcuts into complete code structures. It also adds a number of other productivity features, such as automatic indentation, to the programming environment.
Writing correct code as quickly as possible isn't the only objective at the coding phase. If there are more than just one person working on the code, coding conventions are important. Your team can use Project Analyzer to enforce styling and naming standards. The standards are fully customizable to suit your organization's own style. By analyzing their code developers can see themselves when they have violated the agreed standards, fix their code and change their habits.
3. Optimization
In the optimization phase you make sure that your application's performance is adequate. You also need to make sure that any unnecessary code left from the code writing phase is removed. The latter is called dead code elimination and it can radically decrease the size of the end product.
VB Watch is a sophisticated performance profiling tool. It logs the execution as your application runs, finding bottlenecks. A bottleneck is a location in the code that gets executed a large number of times, that take a long time to execute, or both. By correctly identifying the bottlenecks you can focus the performance optimization efforts on that part of the project where the efforts yield the best results.
Project Analyzer performs an automated project review on the code. It suggests optimization techniques based on a comprehensive, configurable set of code review rules. The tool detects a large number of optimization issues, ranging from language-dependent syntax rules to the detection and removal of inoperative dead code.
We've written a couple of articles on Visual Basic code optimization. VB tips shows a number of useful memory and speed optimization rules. Optimize string handling contains useful tricks for text-intensive projects.
4. Testing
In order to be properly tested, each part of the program needs to be executed. Unfortunately, this is rather hard to achieve in practise, because of the inherent complexity of code.
VB Watch is a tool that logs the execution as your tests are performed. When a test session is complete, VB Watch shows which lines were executed and how many times they ran. It reveals the unexecuted parts you need to focus on during the next test session. Session after session you achieve a higher test coverage, and use VB Watch to direct where your efforts should go next. VB Watch is also a debugger that logs things such as call trace and object initialization to ease bug fixing.
5. Documentation
Documentation is often skipped or performed only partially. Proper project documentation requires time and effort. As the code evolves, the documents may quickly go out-of-date. It's usual that the best documentation is the code itself.
Fortunately, you can automate document generation and use tools to generate documentation out of code. Via this kind of a documentation process the documents area always up-to-date, as long as you remember to run the generator.
Project Analyzer generates documents out of source code. The available reports range from source print-outs to hyperlinked code web sites, procedure listings, interface descriptions, module diagrams, dictionaries and other refined reports.
Visustin generates flow charts to document complex procedures. Flow charts are great additions next to the source code itself. They can also be used instead of a written explanation of an algorithm.
The article Writing comments suggests one way to automate the documentation. When code comments are used systematically, automatic document generation is quick and painless.
6. Maintenance
Bug fixing forms an important part of the maintenance phase. No matter how well you tested your program, it's next to impossible to remove all the bugs without leaving some of them lurking in the code.
When an error hits the user, the typical error message may not tell you much of what happened. You'll be lucky to catch the error message or number. There's often too little information on the location of the error, what the user was doing at the moment, and what status the system was in. This is where VB Watch comes handy. Before releasing your program to the end-users, you run it through VB Watch Protector. This tool instruments your code with advanced error handlers. When a run-time error hits the user, full error data is generated, including error line, call stack and variable values at the time of the error. The user has the option to email the error report back to the developers, who may utilize this information to quickly find out the cause of the error.
7. Moving the knowledge
When a new person enters a team, understanding existing projects is one of the most important tasks facing him/her. Understanding unfamiliar code is possible by just reading it, but this is a time-intensive task. Again, two tools help with the learning curve: Project Analyzer and Visustin. These tools can really save a lot of time and money when a new developer is about to take over an existing program.