After completing this chapter, you will be able to:
Use functions to encapsulate logic.
Use functions to provide ease of modification.
Use functions to provide ease of reuse.
There are clear-cut guidelines that can be used to design functions. These guidelines can be used to ensure that functions are easy to understand, easy to maintain, and easy to troubleshoot. This chapter will examine the reasons for the scripting guidelines and provide examples of both good and bad code design.