Neville
Silverman

Visual Basic Programmer, Sydney
Microsoft Access Database Programmer

Custom Built Software
System Optimisation
Office Automation
Phone Australia
(02) 9453-0456

Visual Basic and code Maintainability

Visual Basic and code MaintainabilityCode maintainability is the measure of the time, resources and expertise required to correct faults, improve performance, enhance functionality, or adapt to changing technology.

Maintainability is a concept that is almost always ignored when commissioning a new project. "How Much" and "How Long" are the only questions ever asked.

The code is never static – it always requires changing. Bug fixes, new functionality, inefficiencies and technology changes – will all require a code revisit.

The issue of code maintainability is first raised when the changes needed become costly. And all too often, even a simple change, is difficult to make. There is always a price to be paid for unmaintainable code – sooner or later.

The Fundamentals for Code Maintainability

Almost of all of this Website deals with the best practises for designing robust, efficient and maintainable systems. To be maintainable, the code must be:

  • Readable
  • Understandable
  • Changeable
  • Testable
  • Reliable
  • Simple

Here are some guidelines to achieve these aims:

The Programming Language

The choice of Software Development tools is an important factor in reducing the risk factor.

Selecting Visual Basic, the best and most popular programming language for commerce, ensures that a replacement programmer can be found without problem.

The logic of VB is simple and straight forward – essential factors for maintainability.

Visual Basic.Net Coding Conventions

Coding standards must be set at the outset and enforced. The aim is to make coding for the programmer (or a replacement) as easy as possible.

Objects, Constants and Variables should adhere to a consistent naming convention. This will enhance program maintainability.

For details, see the pages:

Size really does matter: The larger each block of code, the more bugs and the harder it will be to maintain. Re-usable Code Libraries are essential in reducing code size.

Refactoring (See Why have Visual Basic Coding Standards?) must also be an integral part of the development and maintenance of a computer system.

Documentation

Having a bookcase of documentation is not helpful.

But every complex aspect of the Visual Basic code must be documented, so that it is easy for a new programmer to be productive as quickly as possible.

And the function of every field in the database must be described and named according to an agreed standard.

Complex Code

Part of the standards should be to avoid unmaintainable, unmanageable code.

For example, only use Object-oriented programming (OOP) concepts that:

  • Make programming simpler
  • Improve software maintainability
  • Provide faster development times and higher-quality software

And discard the OOP concepts that:

  • Make the programming more complex
  • Take too long to implement

Protect Yourself From The Outset

Don't assume that somehow your project will automatically and magically adhere to the best maintainability coding standards. Demand sight of the documentation on the coding standard used.

Have a professional programmer inspect a sample of the code. For example, do the variable names adequately denote their meaning? Are there sufficient inline comments? Is a library of procedures being used? Is the latest and best technology being used?

All this applies equally to a software house or to a solitary programmer.