Using the VB IDE as a Learning Tool

Level:
Level1

Like many other subjects, there's no substitute for practical experience when it comes to learning Visual Basic. In my humble opinion, one of the best, if not the best, ways to learn the language is to simply dive right in and start coding. Its really not as rash as it sounds.


Your First Visual Basic Project

Picking a first project is often an area where beginners make their first mistake in learning VB. It seems there are two general approaches that are often used that can lead the beginner to giving up.

The first approach is to buy a book and start working through sample applications or the sample applications that ship with VB. While I'll be one of the first people to suggest that reading good books on VB is a great idea a lot of beginners get frustrated in one of two ways.

  1. The samples are either so trivial or useless that you get bored.
  2. The samples are so complex that you can't understand them.
Either of these scenarios can lead to frustration. While there are good sample applications available, and reading well written code is a great learning tool, its still no substitute for actually sitting down and writing your own app.

The second approach is to pick a project that's simply too complex for a first effort. Many beginners start out thinking that they would like to write a replacement for the Windows Explorer or some other wildly complicated application. Without having a solid foundation in the language and a lot of experience writing large applications, something this difficult often leads the beginner to give up in frustration or simply become lost or overwhelmed by the complexity of the project.

If you're stumped for ideas for a project, one of my favorite areas for small applications is writing programming utilities. While the VB development environment is one of the easiest to use tools on the market, its ripe with possibilities for add-ons or simple tools such as code generators, code librarians, file management tools, etc.

In most cases, these types of tools can be simple to write and have the added benefit of teaching you about the development environment and the language while you are writing them. For example, if you write a small utility to automatically generate a procedure template given a few parameters such as the procedure name and whether its a sub or a function, you'll not only learn something about writing a program, but also gain a thorough understanding of proper code syntax.

Another benefit is that when your skills develop, you can take your small utilities and integrate them into the VB IDE as an add-on.




Learning by Doing

I'd call it a truism to say that we learn by doing. When you actually sit down and start writing an application, you're faced with both design challenges on a large scale and the details of the language. You'll need to learn how to declare variables, create subs, functions, and event procedures, and write VB statements.

So go ahead, buy a good book, or browse throgh this sites tutorials - do some reading and work through some sample applications, but don't forget that you won't really begin to learn the language until you start writing your own applications.

By Joe Garrick

If you enjoyed this post, subscribe for updates (it's free)