Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[译] [900] 第九章 繁琐事务自动化 #15

Open
cssmagic opened this issue Feb 29, 2024 · 1 comment
Open

[译] [900] 第九章 繁琐事务自动化 #15

cssmagic opened this issue Feb 29, 2024 · 1 comment

Comments

@cssmagic
Copy link
Owner

cssmagic commented Feb 29, 2024

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
  • Organizing your and your partner’s phone pictures in the same place
  • 探讨程序员编写工具的动机
  • 确定编写特定工具需要哪些模块
  • 自动清除含有 > > > 符号的电子邮件
  • 对 PDF 文件进行自动化操作
  • 把你及你伙伴的手机照片统一整理至同一位置

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).

假设你需要制作 100 份报告,每个人分得一份。可能你是教师,需要向每位学生发送一份报告;或者你在人力资源部门,需要向每位员工发送年度评估报告。不论你担任何种角色,你都将面临制作这些报告的挑战,并且你决定以 .pdf 格式来准备这些报告。每份报告还需一个个性化的封面,这些封面由你的一位同事——一位平面设计艺术家——设计。

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 of your reports.

你和你的同事分头工作,终于,任务完成了。但是,别急。因为现在你必须把每个封面页添加到每份报告的最前面。

At this point, a non-programmer 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 non-programmer 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.

然而,你现在是一名程序员。包括我们自己在内的绝大多数程序员,都不会选择坚持这种手动重复的工作。

...

...


本章目录

  • 9.1 Why programmers make tools
  • 9.2 How to use Copilot to write tools
  • 9.3 Example 1: Cleaning up email text
    • 9.3.1 Conversing with Copilot
    • 9.3.2 Writing the tool to clean up email
  • 9.4 Example 2: Adding cover pages to PDF files
    • 9.4.1 Conversing with Copilot
    • 9.4.2 Writing the tool
  • 9.5 Example 3: Merging phone picture libraries
    • 9.5.1 Conversing with Copilot
    • 9.5.2 Top-down design
    • 9.5.3 Writing the tool
  • 9.1 程序员为什么创造工具
  • 9.2 如何使用 Copilot 编写工具
  • 9.3 示例一:电子邮件文本的清理
    • 9.3.1 与 Copilot 对话
    • 9.3.2 制作工具
  • 9.4 示例二:给 PDF 文件增加封面页
    • 9.4.1 与 Copilot 对话
    • 9.4.2 制作工具
  • 9.5 示例三:合并手机照片库
    • 9.5.1 与 Copilot 对话
    • 9.5.2 自顶向下的设计
    • 9.5.3 制作工具

本章正文略。如需阅读,请购买正版。


@cssmagic
Copy link
Owner Author

cssmagic commented Aug 8, 2024

👉 想要更多译稿预览,请前往 总目录 中按章节阅读。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant