Developer news from Aivosto (VBShop) - June 2004 1. Beautiful automated flowcharting 2. Find the unnecessary bits in your VB/VB.NET apps 3. Practical VB documentation tasks 4. Did the code really execute? x----------------------------------------------------------------------x 1. Beautiful automated flowcharting C/C++, C#, VB/VB.NET, Delphi, Java, JavaScript, COBOL, Perl, T-SQL, PL/SQL Need a clear diagram showing how the if, else, loop, exit and goto statements make up an algorithm? Turn ugly spaghetti code to beautiful flow charts! Visustin makes them for you. Just give Visustin a piece of code and you get a flow chart - automatically with a great beautiful layout. You can print it, save as a web page or copy to your project document. Or you can export it to Microsoft Visio 2002 and automate your Visio diagramming tasks. http://www.aivosto.com/visustin.html x----------------------------------------------------------------------x 2. Find the unnecessary bits in your VB/VB.NET apps Are you maintaining lines you shouldn't have at all? Is your project full of old stuff that you're just carrying around for no reason? Get rid of the needless bits! The first thing to consider is the dead code: sub-programs not called, variables never read, function return values never used, classes not instantiated, and forgotten controls. The other thing to handle is duplicated code. How many times do you copy&paste old code to make up a new function or module? Then you modify a few lines and carry double the bits. When you need to change the code, you end up modifying all the copies, instead of enhancing a single reusable function or module. A few more ways to bloat your app: - Add a procedure parameter but don't use it. - Add an event but don't raise it, leaving all its handlers dead as well. - Re-Declare the same DLL function in every module. - Repeat the same string over and over again in the app. Project Analyzer is a tool for the hunt for needless code. It detects the dead bits and duplicated lines, Declares and strings in Visual Basic and VB.NET projects. Project Analyzer is so reliable it can even remove the dead parts automatically. Read more: http://www.aivosto.com/project/deadcode.html x----------------------------------------------------------------------x 3. Practical VB documentation tasks List the files in a project with date/size. List a module's subs/functions and how many lines of code they have. List the member variables of a class. List all global constants. List all forms with their borderstyle and min/maxbutton setting. * List the menus on your forms. * List the controls and control classes you use. * List the DLL files and declarations your application uses. List the public interface members of each class and module. List the methods, properties and variables of each class or module. List the execution paths that will eventually call a Sub. List which procedures execute in response to an event. Turn all code to web pages for your colleagues to surf. Project Analyzer can do all of this for your VB and VB.NET projects. Copy the crucial information to your project documentation or save it in PDF, RTF or HTML for later use. http://www.aivosto.com/project/project.html * Features marked with an asterisk are available for VB6 but not VB.NET. x----------------------------------------------------------------------x 4. Did the code really execute? Have you ever found yourself asking these questions? - Does that event fire? - Has this method ever run? - Did the Else branch execute? - Is the error handler trapping any errors? VB Watch Profiler allows you to log the execution of VB6 code. It counts how many times each procedure and line was executed. You can run your app normally. After the session, VB Watch Profiler shows you the lines that did not run. Use this information to find code that should have executed, yet did not. Or use it to find locations requiring more tests. In addition, VB Watch shows you how many times each line was executed and how many milliseconds it took, which is a great way to spot potential bottlenecks. VB Watch works with Visual Basic 6.0. http://www.aivosto.com/vbwatch.html x-----------------------------------------------------------------------x You received this email because you have subscribed to the Aivosto newsletter. Unsubscribe/change: http://www.aivosto.com/mailinglist.html x-----------------------------------------------------------------------x Aivosto Oy, www.aivosto.com, vbshop aivosto.com We hope to hear from you! x-----------------------------------------------------------------------x