January 28, 2021
Hot Topics:

Writing Efficient VB Software

  • By Yash Kumar
  • Send Email »
  • More Articles »

I know many of you out there never gave it a thought. Whatis efficient software. An efficient piece of software is software that not only cutsback on system resources, but runs faster than other software performing the samefunction. This tutorial is designed to make you write software that is 10 times fasterthan what you will normally write. This is a must read for any developer. Itcontains dozens of techniques that will greatly help you create efficientsoftware. Before I start the actual tutorial, Ill list some principles that you should followwhen reading this tutorial:

  • Get it Right the first time: One of the most common mistakes made by programmers is that they scribble down whatever code they like and then come back to try and optimize it. Eventually they find out they have to rewrite the procedure again. So get it right the first time


  • Dont get carried away:. Eventually, even after you've written an efficient piece software, you will or should come back to revise and correct your code. I would like to make it clear as to not get carried away doing so. Ive seen many programmers do so. So, go through your code. If you find a loop or fragment of code that you feel you could improve by around 1 second, go for it. But if it's something you could only improve by 100 ms, leave it the way it is. Rewriting it will just cause more bugs to creep in and more testing. So, you need to balance the costs in making such changes. Also, the user would normally not feel a difference unless the change is a significant one.


  • Use OOP wherever required: For those of you who dont know, OOP stands for Object Oriented Programming. In Visual Basic, it is simply the usage of classes. Most of you might know that usage of objects (classes in this case) can be highly inefficient and should be avoided. I would go against this. Efficient does not only mean making speedy software, it means making manageable and less bug prone software. Using classes will greatly help in all these things. So if you fell that your software really needs a class, please use one. This tutorial should help you speed up the internal working of the class.

When making efficient VB software, always keep theseprinciples in mind. Now lets get on with the actual tutorial, which has beendivided into 2 sections, Speeding up your code and Compiler Optimizations.

Page 1 of 3

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date