As members of a functional society, we adhere to standards every day of our lives. Often we don't think about these standards; rather, we take them for granted and apply them naturally. For instance, when you pull up to an intersection that's a four-way stop, you stop your car and check for cross-traffic. Once any cars already crossing the intersection are through, you determine who has the right of way (the car first to arrive at a stop sign and then whichever car is on the right) and cross the intersection at the appropriate time. You might do this 50 times a day. You might do this while eating a donut, drinking coffee, or talking to a carful of passengers. When you were first learning to drive, it took a considerable amount of attention to figure out the procedure, but once you became comfortable with the situation the process became second nature. This is how programming standards should be.
One of the standards that affects our everyday lives is the electrical standard of 110 volts. When you plug a new appliance into a wall outlet, you don't have to check the appliance's documentation and use a voltmeter on the outlet to determine whether the appliance and the outlet will work together. You can rest assured that both devices adhere to strict standards. If a device doesn't need the full 110 volts, it uses a mechanism such as a transformer to step down the power so that it can function connected to a 110-volt system. When more power is required—for instance, clothes dryers require 220 volts—the device's plug is a completely different size and shape, which makes it incompatible with a 110-volt system. Obviously, if such standards weren't adhered to, injury or death could result. These standards are so critical that an organization certifies components and makes sure they meet the necessary standards and pass certain safety checks, which is why almost all electrical components carry the UL (Underwriters Laboratories) logo.
Employing interface and coding standards may not save someone from an electrical shock or prevent two cars from colliding in an intersection, but strict adherence to a published set of standards does offer benefits. Code written to a set of standards is easier to maintain and enhance, and often the correct utilization of accepted standards creates improved code—studies have shown that code written to standards usually contains fewer errors.
For a good example of the benefits of standardization when applied to a user interface, you need look no further than the Microsoft Office suite. Whether or not you like the interface, it's easy to understand and respect the benefits that the suite's set of visual standards gives the end user. I know that nothing is perfect, and I could come up with a list of changes I'd like to see made in the Office interface, but I really awoke to the interface's benefits—a direct result of applied standards—when I wrote my first Microsoft Office Compatible commercial program. It was a lot of work to get that certification, and it even required a waiver because of the inability of the tool I was using at the time to create certain required features—no, it wasn't Microsoft Visual Basic, but it was a Microsoft product. My fellow programmers and I found ourselves writing a good bit of code that we could have gotten by without had we not wanted the certification. We also spent an insane amount of time on toolbars, menus, and accelerator keys. However, when our customers started using the product, we received a large number of compliments and kudos.
What the customers told us was that the amount of internal training and support required for the implementation of our application was far lower than expected. Users were able to focus on the functions and features of our program rather than on the mechanics of the interface, such as navigation. For example, when a user wanted to print, he or she knew where to find the Print button. The button was located as it is in Office, and it displayed the printer icon that the user was already familiar with. Likewise, users familiar with Office's standard hot keys could simply press Ctrl+P to print. In the end, our initial investment in development paid major dividends for our customers. When it comes to an application's interface, the consistency that standards produce is key. Although it might be a little less apparent, consistency and standards are also key when it comes to writing code.