9 Automating tedious tasks
This chapter covers
- Understanding why programmers write tools
- Determining which modules we need to write a given tool
- Automating cleaning up emails that have > > > symbols
- Automating manipulating PDF files
- Automating removing duplicate pictures across multiple image libraries
Suppose that you’re responsible for creating 100 reports, one for each of 100 people. Perhaps you’re a teacher and need to send a report to each of your students. Perhaps you work for HR and need to send an annual assessment report to each employee. Regardless of your role, you have the problem of having to create these reports, and you decided to prepare your reports as .pdf files. You need a customized cover page for each report too, and those cover pages are designed by one of your colleagues (a graphic design artist).
You and your colleague work independently, and, finally, the job is done. Or wait, not so fast. Because now you have to put each cover page at the beginning of each report.
At this point, a nonprogrammer might grit their teeth and start on the job, manually merging the cover page with the first report, the second cover page with the second report, and so on. That could take hours. Not knowing that there may be another way, a nonprogrammer may just power ahead until the job is done.
But you’re a programmer now. And most programmers, the two of us included, would never power ahead with manual work like this.