Directives

2.1 Give procedures and modules descriptive names.

One of the easiest ways to make your code more understandable is to give your procedures descriptive names. Function names such as DoIt, GetIt, and PrintIt aren’t nearly as understandable as CalculateSalesTax, RetrieveUserID, and PrintSpreadsheet.

The first thing to remember when naming a procedure is that DOS is gone (not dead and gone, but closer to dead every day). Many programmers from the early days are still trying to break old habits that hinder rather than benefit development. For instance, some languages commonly used in the past limited the number of characters you could use to define a procedure name. We still see programmers choosing procedure names such as CALCTAX, ...

Get Practical Standards for Microsoft® Visual Basic® .NET, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.