Common Problems Areas, and How to Avoid Them
There is much to be said for the old maxim, “The best way to learn is by making mistakes.” Once you have made a mistake, found out what you did wrong, and rectified the error, you will—in general— have a much better understanding of the concepts involved and of what is needed to build a successful application. But to save you from having to experience this painful process of trial and error in its entirety, we’d like to share with you some of the most common errors that ourselves and other programmers we’ve worked with have made over more years than we care to remember. These types of errors are actually not unique to VBScript, nor in fact to VB, but to programming in general. In approximate order of frequency, they are:
Straight in at No. 1 in the charts this week are syntax errors generated by typing errors. This is a tough one; typing errors —the misspelled function call or variable name—are always going to creep into code somewhere. They can be difficult to detect, particularly because they are typing errors—we frequently train our eyes to see what should be there, rather than what is there. When the effect of the typing error is subtle, it becomes even more difficult to detect. For instance, in a client-side script, we had spelled
LANGUAGEasLANGAUGEin coding the<SCRIPT>tag. The result was that MSIE immediately began reporting JavaScript syntax errors. This isn’t surprising, given that in the absence of a validLANGUAGEattribute, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access