The new routine is so short that all it needs for documentation is a good name. Using a function call instead of eight lines of code makes the routine that originally contained the code less complex and automatically documents it. You can use the same technique to document complicated boolean tests. Improving portability Isolate use of nonportable operations to explicitly identify and isolate future portability work. Nonportable operations include use nonstandard language features, hardware dependencies, operating system dependencies, and so on.
Most languages contain handy, nonstandard extensions.
If you use nonstandard extensions, build routines of your own that act as gateways to those extensions. Then, you can replace the vendor's nonstandard routines with custom written routines of your own if needed. When an error is detected, having the code to which it applies contained within a single routine makes the error easier to diagnose and fix than if parts of the complex operation were spread throughout the program. The Greatest Invention in Computer Science Aside from the invention of the computer, the routine is arguably the single greatest invention in computer science. It makes programs easier to read and understand.