Automating our tasks is a special treat. In what other career can we program machines to do our jobs for us? Oh, if only it were that easy. Automating something takes time, but the payback can be enormous. This chapter doesn't attempt to teach Perl, Python, Ruby, Unix shell, VBasic, or Kix32. Instead, this chapter is about why we automate, what to automate, and how to automate. I'll also include some shortcuts that have helped me through the years. Automation has the obvious benefit of reducing work for you because the task becomes quicker to do orthrough Unix cron or Windows Schedulerhappens automatically without any intervention at all. An unexpected benefit is that an automated task is easier to delegate. Any task you can foist onto someone else is a special victory.
In this chapter, I will use the terms script and program to mean different things. Script implies a short program, possibly only a few lines. A script is usually a BAT file, a few lines of Perl, or a small Unix shell file. I'll use the term program when I mean a longer program, one that requires more thought and planning. Programs are usually written with a more formal process that includes requirements gathering, development, and testing. Programs tend to be written in compiled languages like C++ and interpreted languages that are suited to large programs such as Perl, but this is not always the case. Perl programmers, for example, often refer to their code as a Perl script if it is small and a Perl Program if it is large. |