Sample chapter: Working with functions
- Understand functions.
- Use functions to provide ease of reuse.
- Use functions to encapsulate logic.
- Use functions to provide ease of modification.
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 examines the reasons for the scripting guidelines and provides examples of both good and bad code design.
Read this complete chapter here .