贝贝60秒:为啥写得慢写得少
曲政 / 2020-01-15
今天是贝贝报告给你的第 321 天
2020-01-15 星期三 腊月二十一
今天看到图灵社区的有对高德纳的访谈,英文版在这里。我读了略有所得,似乎对自己也有启发,这里梳理出来,报告给你。
为什么要写?
- 自认为是作家。
- 没有发明,地位中立。
- 有用无作,舍我其谁。
为什么写得慢?
- 边写边学,边学边做,边做边写。
- 平均每周不只写一个程序。听说他跟一众图灵奖得主比写程序总是 bug 最少。
- 让非专家也能读懂,要花更多的精力。
图灵访谈的相关摘要(按我的理解修改了三句话)
记者、译者 / @何逸勤(图灵社区特约编辑)译者 / @高博
谈进度和写法
图灵社区:对您耗费几十年的时间创作的 TAOCP,我们代表所有已经和即将从中获益的中国读者,向您致以诚挚的感谢。到现在为止,这部著作已经创作了半个世纪。这样的成书过程,让我们想起歌德的《浮士德》。令人惊讶的是,目前这部作品仍可沿用您最初确立的内容架构。请问这种基础是如何构筑的?在目前的创作过程中,您用了哪些方法来保证自己的进度呢?
iTuring: You spent decades on TAOCP. On behalf of all Chinese readers that have benefited or will soon benefit from it, we’d like to express our sincere thanks to you. The creation of this piece of work spans half a century till now, and this reminds us of Goethe writing Faust. Surprisingly, it still could follow the structure you built at first. So how did you build such a foundation? How do you assure your writing progress?
高德纳:是啊,我确实是几乎不间断地写计算机程序超过 50 年了,平均每周完成多于一个程序。譬如,我刚刚查了电脑,统计出我在今年的持续学习和探索中,到目前为止已经写了 74 个程序。当然,其中某些程序是短小和简单的,但另外那些可都够让我忙上一阵子的。这样的编程过程,很自然地启发了 TAOCP 的内容架构,我们能依此建立整个计算机科学的知识体系。1967 年,我跟 Peter Naur 第一次见面时,我们发现各自都独立地对这一领域提出了完全一致的基本框架。
Knuth: Yes, it's true that I've been writing computer programs almost constantly for more than fifty years, at an average rate of more than one per week. For example, I just checked my computer and see that I've written 74 programs so far this year, as I continue to learn and explore. Of course some of those programs were short and simple, but others kept me quite busy. The process of programming naturally suggests a structure on which to build a knowledge of Computer Science. When Peter Naur and I met each other for the first time in 1967, we discovered that we had each come up with exactly the same basic outlines of the subject, independently.
都过了50年啦,照理说我早该写完 TAOCP 才对。不过,我还有很多累积下来的材料,需要 20 年甚至更多的时间,才可以转化成恰当的文字。因此,当看到你问我怎样保持进度时,我都直想发笑。
After 50 years I should of course have finished TAOCP long ago. Yet I still have many accumulated notes, which will require 20 or more years to write down properly. So it amuses me that you ask how I've been able to make “progress”.
要说我还是能有那么一点点进度的话,那最主要归功于采用了“批处理”而非“换入换出”的机制:在一个时间段内,我通常只全神贯注地做一件事情。每年我会暂停手上的工作两次,每次用两三周的时间阅读邮寄过来的期刊。我每周都会收到 8 份左右的期刊,我的秘书会把它们放到盒子里。浏览完它们并了解到技术动向后,我会在自己的文件中加入备注,提醒自己在将来专注于另外的主题时,应该阅读哪些内容。
What little progress I have made can be ascribed mostly to the use of “batch processing” instead of “swapping in and out”: Usually I'm at work intensively on only one thing at a time. Twice a year I pause, for two or three weeks, to read the journals that have arrived in the mail; journals come in about eight times per week, and my secretary puts them into boxes. After perusing them to learn about trends, I add notes to my files, telling me what I should read in future when I'm concentrating on some other topic.
目前,我正聚精会神在“可满足性求解器”(SAT solvers)这个令人着迷的领域,最近编写的 20 个程序都是在这个主题做相关探索的。藉由自己去钻研资料的手段,我可以更好地将核心思想传达给非专家的读者,并将这些思想跟其他应用紧密结合,
就仿佛我的一生都在专职研究可满足性的求解问题那么自然(我认为这句话可译为:“如果我一辈子都在钻研可满足性求解器,就没有这两点优势。” )。幸运的是,我现在跟顶级的专家们保持着联系,他们自告奋勇帮我检查写作中的错误。At present I'm totally engrossed in the fascinating area of “SAT solvers”; 20 of my most recent programs have been oriented to studies involving that topic. By learning the material myself, I hope I'll be better able to communicate the essential ideas to nonexperts, and to tie them together with other applications, than if I had specialized in SAT-solving all my life. Fortunately I'm now in touch with the leading experts, and they've volunteered to help debug what I write.
谈写字与思考的速度
图灵社区:我们听说,您目前还是先写出手稿,再在计算机中编辑。然而,您的TeX实际上颠覆了整个出版行业。那么,请问您不全用计算机写作的原因是什么?Dr. Dobb's 在评价 TAOCP 4A 的时候这样说道:“正如前几卷 TAOCP 那样,最新的这一卷也是浓缩了一个主题的精华内容。基于其高密度的内容和描述,本书是近年来屈指可数的必须在印刷版格式下阅读的计算机图书之一。书中为数庞大的数学注释,将使所有电子格式束手无策,PDF 版就像一批处处写满文字的 JPEG,难以卒读。”您是否考虑过,未来的电子写作和阅读应该是怎样的呢?
iTuring: We heard that, you are still handwriting the manuscript and then editing it on computer. Your TeX system has changed the publishing industry. But why do you still hand write instead of writing on computer? We are curious about that. When commenting on TAOCP 4A, Dr. Dobbs said “This latest opus is as densely packed a title as the previous TAOCP books have been; and given the density of both the content and presentation, Volume 4A is one of the few computer books these days that demands to be read in traditional ink on paper format. The sheer amount of mathematical notation in the book would make all electronic editions sans a PDF version just a collection of non-reflowable JPEGs interspersed with a sprinkling of text.” Have you ever thought about what digital writing and reading would be like in the future?
高德纳:我书写的速度跟我思维的速度是匹配的,这么一来,就完全不存在任何“瓶颈”。而我打字的速度就比我思考的速度更快,这样当我试图用键盘创作重要内容时,就会产生同步问题。(事实上,我也是先用笔写下你这 10 个问题的答案的。此刻,我正在 Mac 上输入草稿,并在过程中尽可能修润行文。)
Knuth: My speed of writing by hand matches my speed of thinking, so it is not at all a “bottleneck.” I can type faster than I can think; that leads to synchronization problems when I try to compose nontrivial material at the keyboard. (In fact, I wrote out the answers to your ten questions by hand first. Now I'm typing that rough draft into my Mac, polishing the style whenever possible as I go.)
速度通常不会是最重要的
标准(指标)。科学一般都难以迅速解释或迅速领会(快速解释)。我知道我的书是不容易读的,不过要知道的是,如果不是我精雕细琢地写的话,它们会比现在难读一百倍。Speed is usually not the most important criterion. Science cannot always be learned quickly or explained quickly. I know that my books are not easy to read … but they could have been a lot, lot harder, if I hadn't written them slowly and carefully.
谈不同项目的影响力
图灵社区:虽然,TAOCP 代表着您的主要成就,连您目前的头衔都是“计算机程序设计艺术荣休教授”,但也有很多人认为,您花十年时间开发的 TeX 对世界的影响更大。您对此有何看法?是否可以总结一下算法研究和实际编程之间的联系和各自作用呢?
iTuring: Although TAOCP is your major works, many people think TeX on which you spent ten years affected the world more. What do you think? Can you summarize the relation between Algorithm Research and actual programming, and their respective role?
高德纳:我对于把一项有益的活动排在另一项之前这种事,不十分感冒。例如,生物学家不应该把所有时间都花在攻克癌症和其他重症的疗法上。如果他们中的一些人仅在较轻微的问题上取得了重大进展——比如,消灭了头皮屑——他们也许实际上会带给更多人更持久的快乐。
Knuth: I don't like to rank one kind of useful activity over another. For instance, biologists shouldn't spend all their time studying cures for cancer and other high-profile diseases. If some of them would only make major advances to a lesser problem — like eliminating dandruff, say — they might in fact make more people happier more of the time!
TeX 使得文学编程成为了可能,这件事长远来看也许最终会给更多人的生活带来积极的影响,这一点强过我所做的任何其他工作,因为文学化的程序给它的用户带来的改进是巨大的。
In the long run, the fact that TeX enables literate programming might turn out to affect more people's lives in a positive way than anything else that I've ever done, because literate programs tend to be so much better for their users.
但我们还是别拿苹果去和橘子比较了。我认为生活中的每一个方面都是值得改进的,
而我也很高兴能在自己生活的场所和时代中以多种不同的方式做出贡献。(我认为他高兴的重点是时间地点,而不是什么贡献。可译为:“我也很感激自己生活在这样的地方、这样的时代,允许我以不同的方式做出多种贡献。”)But let's not compare apples to oranges. I think every aspect of life is worth improving, and I'm glad that I've been able to live in a place and time where I've been able to contribute in a variety of different ways.