码迷,mamicode.com
首页 > 其他好文 > 详细

无法停止讲故事的计算机科学家--Knuth访谈

时间:2020-04-19 00:30:48      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:news   开发   win   otto   ant   address   set   pass   图灵   


对Donald Knuth来说,好的代码和好的表达是一样的。


Part1

Donald Knuth is a computer scientist who came of age with his field. During the nascent years of computer programming in the middle of the last century, a candy company ran a contest that summoned his talents as a 13-year-old. The contest asked kids to determine how many words could be made from the letters of the candy’s name: Ziegler’s Giant Bar. It was a well-defined problem with distinct pieces, just the kind he loved.
高纳德是一个在自己领域里非常成熟的计算机科学家。在上个世纪中期计算器编程发展的初期,一家糖果公司举办了一场比赛,13岁的他在比赛中激发了才能。比赛要求孩子们计算使用糖果的名字:Ziegler’s Giant Bar,中的字母可以拼出多少的单词。这是一个带有离散片段的明确定义的问题,且正是他热爱的那种。
“I had an obsessive-compulsive streak that drew me to digital, discrete problems. And I loved poring over large collections of information,” Knuth said.
我有一种强迫症的倾向,这种倾向把我推向数字的,离散的问题面前。我喜欢钻研大量的信息集合。
Knuth methodically leafed through his family’s 2,000-page Funk & Wagnalls unabridged dictionary in the basement. He even convinced his parents he was sick, winning himself two weeks away from school to work on the problem. After labeling index cards with headings such as “Aa,” “Ab” and “Ba” based on the beginnings of possible words using letters from the candy’s name, he went down the dictionary’s columns noting words that qualified. He found that he could skip entire sections of the dictionary, such as pages for words starting with the letter “C,” or sections of the “B” words whose second letter was “U.”
高纳德在地下室有条不紊的翻阅着家里的2000页的词典:Funk & Wagnalls unabridged dictionary。他甚至让自己的父母相信自己生病了,这给他赢得了离开学校的两周时间来解决这个问题。在使用糖果名字中的字母给索引卡加上Aa,Ab和Ba等标题后,他根据字典列开始标记出符合要求的单词。他发现自己可以跳过词典的某个部分,例如C开头的单词的那些页,或者B开头跟着U的单词的那些页面。
The contest officials had identified approximately 2,000 words they could expect, but Knuth found more than 4,700. He was rewarded with a spot on television and chocolate for his entire class. He would go on to win many more accolades, including the first ACM Grace Murray Hopper Award, the National Medal of Science and the A.M. Turing Award.
举办方已经确定了大约2000个他们可以想到的单词,但是高纳德找到了超过4700个。他的奖励是上电视一次,并且给全班赢得了巧克力。他还赢得了很多其他的荣誉,包括ACM Grace Hopper奖,国家科学奖和ACM图灵奖。



Part2

Knuth eventually merged his dual loves of discrete digital problems and large collections of information in his magnum opus, The Art of Computer Programming — a book series he began writing as a graduate student in 1962 and has yet to complete. He published volume 1 in 1968, and it’s currently in its 27th printing. Volume 2 followed in 1969 and volume 3 in 1973. By then he was a computer science professor at Stanford University, but he worried that his work would prevent him from completing his books. So he took a leave of absence in 1990 and then retired in 1993 to spend the rest of his life completing the seven-volume set. Now 82, he’s hard at work on part B of volume 4, and he anticipates that the book will have at least parts A through F.
高纳德先生最终在自己的代表作《计算机程序设计艺术》中融合了他对离散数字问题和大规模信息集合的双重爱好,这套书是他在1962年读研究生的时候开始写的,至今还没完成。他在1968年出版了卷1,到目前为止已经是滴27次印刷了。卷2是1969年出版,卷3是1973年出版。那时他是斯坦福的一名教授,当时担心自己的工作会妨碍自己完成这套书。因此,1990年开始休假,在1993年退休,并且用余生来完成这个七卷本的书。现在,82岁了,正在撰写卷4的PartB,他预计这本书至少会有A到F这些部分。
The Art of Computer Programming is more than a how-to manual. Just as Isaac Asimov and Eric Temple Bell wove narratives and characters into their science and math stories, Knuth delights in telling stories of computer science.
《计算机程序设计艺术》不仅仅是一本操作手册。就像阿西莫夫和贝尔将叙事和任务融入到他们的科学和数学故事中一样,Knuth喜欢讲述计算机科学的故事。
“The best way to communicate from one human being to another is through story,” he said.
Knuth说:人与人之间最好的沟通方式就是通过故事。
This passion for communication helped him play another starring role in the story of computer science beyond his magnum opus. When his publisher sent him galley proofs for the second edition of volume 2 in the 1970s, Knuth was disturbed by the arrangement and appearance of the numbers, symbols and words on the pages. He flew to Los Angeles to see a machine that printed glossy magazines digitally, hoping it could provide aesthetic relief, but it was too expensive. Nonetheless, on that trip he began developing a computer language that would allow him to typeset mathematics digitally.
这种沟通的激情帮助他扮演了计算机科学中除了代表作之外的另外一个主角。当他的出版商在20世纪70年代给他寄过来自己的卷2的第二版校样的时候,Knuth对其中的数字,字母和文字的排列感到困扰。他飞到洛杉矶去看那台数码印刷精美杂志的机器,希望它能提供审美上的解脱,但是它实在是太贵了。尽管如此,在那次旅行后,他开始开发一种能让他对数字进行数码排版的计算机语言。
I’m unable to resist a good story. I viewed myself not as a pioneer, but as a journalist.
我无法抗拒一个好故事。我将自己视为一个记录者观察者而不是一个先驱。
Back at Stanford, Knuth put aside The Art of Computer Programming for nearly a decade to develop TeX (pronounced “tech”), a sophisticated, game-changing program that put digital typography on a desktop computer. He made it open source, much to the benefit of professional mathematicians, computer scientists, economists, engineers, linguists, statisticians and anyone else who lacked technical symbols on their keyboards but understood the placement of complicated formulas better than their publishers. In a world of often ephemeral computer programs, TeX has endured as the gold standard for making scientific papers more beautiful and easier for experts to read and understand.
回到斯坦福之后,Knuth将写书暂时搁置,并且花费了大约十年时间开发了TeX(读做Tech),一种复杂的,改变游戏规则的程序,可以数码排版放在台式机上。他将软件开源,这对专业的数学家,计算机科学家,经济学家,工程师,语言学家,统计学家和任何缺少输入技巧但是比出版商懂得排布复杂公式的人,都大有裨益。在一个计算机程序日新月异的时代,TeX一直是使得科学论文更美观,更被同行专家阅读和理解的黄金标准,并且经受了时光的检验。
Knuth’s interest in storytelling also led him to develop a philosophy of literate programming — a method for writing computer programs as literary essays. A literate program intersperses source code with elegant prose written in a familiar language, such as English. The source code delivers functionality and efficiency, while the exposition addresses a human reader, rather than the computer’s compiler. Anyone who later updates or debugs a literate program will avoid the often time-consuming and costly problem of trying to understand the original programmer’s algorithms, design decisions and implementation strategies. Knuth is a computer scientist who understands that words matter.
Knuth对讲故事的兴趣也导致了他发展处了一种文学编程的哲学--就是一种将计算机程序写成散文的方法。一种将源码和熟悉的语言例如英语写的优雅的散文穿插在一起的文学程序。源码传递了功能和效率的同事,解释的部分针对的是人,而不是计算机编译器。后面的人更新或者调试文学程序的时候可以避免通常是耗时并且成本高昂的理解原来程序员的算法,设计和实现策略的过程。Knuth是一位明白文字重要性的计算机科学家。



Part 3

Quanta Magazine spoke with Knuth in February at his home on the Stanford campus. The interview has been condensed and edited for clarity.
量子杂志2月的时候在他斯坦福的家中采访了Knuth。为了清楚起见,采访文字进行了精简和编辑。


Q: Have you always been interested in writing?
A: Early on, I was advised that the real world would be too hard for me. I didn’t expect to discover anything new, but I loved conveying my enjoyment of ideas in writing.
早些时候,有人告诉我,现实世界对我来说太难了。我不期望能发现什么心的东西,但是我喜欢用写作来传达我对思考的喜悦。
In sixth grade, a couple friends and I started a two-page paper on a ditto machine. We had jokes. In high school, every Monday night as the newspaper editor, I did an all-nighter to get the paper out. I saw my first line of type in college as the student paper copy editor. In my junior and senior years, we started the engineering and science review. For example, I wrote, “Th5E4 CH3EmIC2Al2 Ca3P4Er.” Every word was a chemical formula.
在6年级的时候,我和几个朋友开始在复印机上写2也的论文。我们有搞笑的往事。在高中的时候,每个周一晚上,作为报纸的编辑,我都会通宵把报纸弄出来。大学的时候我作为学生论文的复印编辑,看到了我的第一行字。在大三和大四的时候,我开始了工程和科学的复习。例如,我写到,那个化学Caper。其中的每个字都是化学公式。


Q: And that led to your magnum opus? Do you think of it as another story?
A: The Art of Computer Programming is a manifesto. It describes the way I love to do math and the way I wish I had been taught. Beginning on Page 1, I tell the story of algorithms. Most textbooks at the time didn’t explore the human side of discoveries. They just said, “This is how chemistry works,” or “This is how physics works.”
《计算机程序设计艺术》这一系列的书是一份宣言。它描述了我喜欢数学的方式,并且描述了我希望别人教我的方式。在开始的第一页,我讲了一个算法的故事。当时的大部分的教科书没有探索发现的人性的一面。那些教科书只是说,“这就是化学的远离”或者“这就是物理的原理。”
I also tell a technical story. I say, “Here’s something that doesn’t work, and here’s a way to solve that problem.” Instead of presenting only facts, I add drama. Science is much easier to learn if you know the sequence of discoveries. Also, I’m unable to resist a good story. I viewed myself not as a pioneer, but as a journalist.
我也讲技术故事,我说,“这是行不通的方式,这是解决问题的方式。”除了罗列事实,我加上了戏剧元素。如果你了解了发现的顺序,科学是更容易学习的。并且,我无法抗拒一个好的故事。我将自己视为以为记录者和观察者而不是一个先驱。


Q: Beyond the story, then, what’s The Art of Computer Programming about?
A: After two years of writing my book, I realized that its novelty was quantitatively determining how good a program is. I didn’t just want to say one program was better than another. I wanted to say one is 13.8% better than another, and explain how to compare them.
在写书的两年后,我意识到,是新奇性可以量化一个程序的好坏。我不想只是说一个程序比另外一个程序好。我想说,一个程序比另外一个程序好13.8%,并且解释如何比较他们。
Author A would talk about algorithm A, and author B would talk about his competing algorithm B. And author A never wrote about algorithm B, and author B never wrote about algorithm A. Also, authors A and B used different computers. As a neutral journalist, I explained both from one point of view. Asking, “How good is an algorithm really?” is a fun problem. That’s the analysis of algorithms.
作者A会谈论算法A,作者B会谈论他的算法B。但是作者A从不会写算法B,并且作者B也不会写算法A。作者A和B使用不同的计算机。作为中间的记录者,我从两个角度解释这个问题。通过发出一个非常有趣的问题:究竟一个算法有多好?这就是算法分析。


Q: Is “the analysis of algorithms” just a different way of saying “the art of computer programming”?
A: I was at a Society for Industrial and Applied Mathematics conference in 1967 when somebody asked what I did. In those days, computer science was partitioned into numerical analysis, artificial intelligence and programming languages. That was it. I realized I needed a name for what I do.
我在1967年的工业和应用数学会议上被问到我是干什么的。在那时候,计算机科学被划分到数值分析,人工智能和编程语言中。就在那时,我意识到我需要一个名字来描述我是做什么的。
My book’s novelty was its rigorous studies of how good the algorithms were. I decided that the next time I was asked this question, I would say, “Analysis of algorithms.” My definition was: If I’m interested in it, it’s the analysis of algorithms. It wasn’t a very good definition.
我的书的新奇之处在于它认真研究了算法如何好。因此我决定下次再有人问我这个问题的时候,说,算法分析。我的定义是,当我感兴趣的时候,是算法分析,这当然不是一个非常好的定义。
Later, I decided to justify it. I decided it was the quantitative study of how good an algorithm is, which I divided into two parts. One part considered all possible algorithms for a certain problem. The other part considered one particular algorithm for a certain problem.
后来,我决定证明它。我决定对一个算法的好坏做定量的研究,我将这个分为两个部分。第一部分是考虑某一个问题的所有的可能的算法。第二个部分是考虑某一个问题的特定算法。
Analysis of algorithms was going to be my life’s work. I told my publisher to change the title of my book to The Analysis of Algorithms. My publisher said, “That will never sell.” They made the right decision. Still, I was happy when, 40 years later, five or six books came out with the title Analysis of Algorithms.
对算法的分析是我毕生的工作。我告诉出版商将我的书的名字修改为算法分析。但是我的出版商告诉我,这样的话这本书卖不出去的。他们做出了正确的决定。尽管如此,四十年后的今天,5-6本名为算法分析的书出版的时候我还是很开心的。


Q: But for you, programming is also about more than functionality. When you designed TeX, for example, you wanted to find “the most pleasing curve” that connects certain points. Were you trying to program beauty?
A: My program had to connect points in some way that reverse-engineered what a good calligrapher would do. The letter “S” comes to a point where the curvature changes from positive to negative. Then maybe it stays steady for a while. The letter’s designers followed some logic to make lines into letter shapes. I wanted to capture not only the design’s outcome, but the intelligence behind it. That’s like writing a computer program.
我的程序必须以某种逆向工程的方式联系起来,是一个好的书法家该做的事情。字母S到达一个点的时候,曲率从正变成负的。或许后面还会稳定一段时间。字母的设计者遵循一定的逻辑将线条做成字母的形状。我不仅想要捕捉设计的结果,也要捕捉这背后的智慧。这就像是写程序一样。
I talked to designers to understand what they were trying to achieve. The math was there to capture the design in a quantitative way. With mathematics, I put little dials on everything. I could say the letter “A” has got this point, that thickness, angles here, tapering there, a hump in the bottom and a certain serif length.
我和设计师交谈,去理解他们想要达到的目的。数学就是用于将设计量化的方式。有了数学的帮助,我在所有的东西上都放一个小的转盘。随后,我可以说字符A,有它的位置,它的厚度,它的角度,底部有凸起,有衬线。
I never intended to replace designers. I only wanted to capture for future generations exactly what we were doing then. With TeX, a design is reproducible.
我从未想过取代设计师。我只是想要理解我们在做的事情的本质。有了TeX这个软件,设计师可复制的。



Q: Did you anticipate TeX’s global acceptance or its ability to endure?
A: TeX was only supposed to be for my secretary and myself. Phyllis [Astrid Benson Winkler] was a wonderful secretary. She could read my handwriting and make it beautiful. Printing technology was going down the tubes because the tried-and-true methods were becoming too expensive. Nearly every piece of mathematics published in the 1970s looked atrocious. In the American Mathematical Monthly, the subscripts were in a different font from main-line text. I knew computer programming could make books look good again.
TeX本该作为我的秘书只速与我。但是我的出色的秘书Phyllis。他能读我的手稿,修改的美观。印刷技术正在走下坡路,因为可靠的方法过于昂贵了。20世纪70年代的发表的几乎每一篇数学论文都看起来很糟糕。在美国数学月刊上,下标的字体和正文的字体甚至都不一样。我知道计算机程序可以让书籍重新变得好看。
I finished debugging a trial version of TeX in April 1973. In May, I had 10 users. In June, I had 100 users. In July, I had 1,000. Each new group would say, “You’ve gotta have this feature.” Five years later, I released what is essentially the TeX we have now. That was designed for Americans. Then the Europeans started to use it. So in the 1980s, I made it work for world languages.
1973年1月,我完成了试用版的Tex,5月份的时候我有10个用户。6月份的时候,我有100个用户。7月份的时候,我有1000个用户。每一个新的小组都会说,你一定要加入这个特性。五年后,我发布了现在我们使用的TeX的核心代买。开始的时候是为美国人设计的,后来欧洲人开始使用,在20世纪80年代的时候,我让它成为全世界都能使用的。


Q: It sounds like discovery has always been part of your process. Does that remain true today?
A: I write an average of five new programs every week. Poets have to write poems. I have to write computer programs.
每周我大约平均写5个程序。就像诗人需要写诗歌一样。我需要编程。
The ultimate test of whether I understand something is if I can explain it to a computer. I can say something to you and you’ll nod your head, but I’m not sure that I explained it well. But the computer doesn’t nod its head. It repeats back exactly what I tell it. In most of life, you can bluff, but not with computers.
我理解还是不理解的终极的测试就是我能否像计算机解释清楚。我可以给你说一些事情,你也可以向我点头,但是我不确定我是不是讲清楚了。但是计算机不需要点头,他非常,明确的重复我告诉它的事情。生活的大部分时候,人可以虚,但是计算机不会。


Q: You spend your days writing, but you also have other interests. How do you approach each day?
A: Jack London wrote 1,000 words every day before talking to anybody. He was totally, “Let me alone until I’ve got my thousand words!” Then he would drink or proofread the rest of the day. No, my scheduling principle is to do the thing I hate most on my to-do list. By week’s end, I’m very happy.
杰克伦敦每天不写1000字之前不会和其他人说话。他完全是那种:让我一个人呆着,知道我写完我的一千字,的那种。之后,剩下的时间,他会喝酒或者校对。我不是这样的,我的日程的调度的原则是先做to do list上的最不喜欢做的事情,这样的话到周末的时候,我非常的开心。


Q: Really? How does doing what you hate make you happy?
A: It would be very easy for me to say, “Oh, let me be a genius and never clean the toilet.” But even cleaning toilets is doable. [My wife] Jill and I got uniforms that have a slot where the 409 cleaner fits. You go over there and squirt and feel good cleaning the toilet!
我很容易说:“让我成为天才吧,永远不要打扫厕所”。但是即使是打扫厕所也是可行的。我老婆,和我有一套衣服上就有409吸尘器的插槽。去哪里,喷一下,清理厕所也会感觉很好。
A person’s success in life is determined by having a high minimum, not a high maximum. If you can do something really well but there are other things at which you’re failing, the latter will hold you back. But if almost everything you do is up there, then you’ve got a good life. And so I try to learn how to get through things that others find unpleasant.
人生的成功取决于下限的高度,而不是上限的高度。如果你可以把某个事情做的非常的好,其他的事情上失败,失败的事情就会拖后腿。如果所有的事情做的还行,那么生活也还算不错的。所以,我努力学习做好别人不爱做的事情。


Q: You also have many projects that have nothing to do with computer science, such as your musical composition, Fantasia Apocalyptica. You even built your house around a two-story pipe organ. Is this variety also part what makes you happy?
A: I wrote a couple of books, including Things a Computer Scientist Rarely Talks About, that are about theology — things you can’t prove — rather than mathematics or computer science. My life would not be complete if it was all about cut and dried things. The mystical things I don’t understand give me humility. There are things beyond my understanding.
我写了几本主题并不是数学或者计算机科学的书,包括计算机科学家几乎不会谈论的主题,神学--无法证明的事情。如果我的生活全部是老生常谈的事情的话,我的人生是不完美的。神秘的无法理解的事情让我学会谦卑。确实有一些事我无法理解。
In mathematics, I know when a theorem is correct. I like that. But I wouldn’t have much of a life if everything were doable. This knowledge doesn’t tear me apart. Rather, it ensures I don’t get stuck in a rut.
在数学上,我知道什么时候理论是正确的,我喜欢这样。但是如果所有的事情都是这么可爱,那这不能称为生活。这些(神学的)知识没有将我割裂,相反,使我不落窠臼。


Q: Does it matter if you finish The Art of Computer Programming?
A: Oh, I realize that computer science will keep living and developing. One scenario is that everybody will stop working on the kinds of computers we have now. They’ll all go to machine learning and use quantum computers. Then I could come to the end of the story of non-quantum computers. I’m happier when I can say, “This is the story’s end.” That’s the easiest way to imagine that I’ll finish. But I’m not answering your question.
奥,我意识到计算机科学会保持生存和发展。一种情况是所有人可能会停止使用我们现在使用的计算机。他们可能会使用量子计算机进行机器学习。这样的话我就可以结束非量子计算机的故事了。当我能说“这是故事的结局”的时候我会更加开心。这是我能想到的最简单的完成。但是我没有回答你的问题。
Do you know the story of Tristram Shandy? Laurence Sterne, in the late 1700s, wrote an autobiographical book, The Life and Opinions of Tristram Shandy, Gentleman, which he published in fascicles, or installments. It has about 100 pages just on his first week of life. He wants the life story to be complete but, of course, he won’t make it. Sterne wrote Tristram Shandy’s story until he couldn’t write anymore.
你听过过这个故事么,在18世界晚期,劳伦斯写了一个自传体的书,The Life and Opinions of Tristram Shandy,他以分册或者连载的方式出版了这本书。出生的第一周的故事就有差不多100页。他想要自己的人生故事完整,当然,他做不到。这个作者一直写,一直写,直到无法继续下去。
I want to continue writing good content in the best way I know, and cover things for which I have something original to say. I’ll do as much of that as I can, instead of saying that I’ve got to finish by a certain deadline. I’ve been so fortunate riding waves and being born at a time that was just right for my particular peculiarity. I’ve now achieved all of my life’s goals except The Art of Computer Programming. I’m in a situation where I’ll continue telling whatever stories I find and passing them on.
我想继续使用我知道的最好的方式写内容,并且涵盖我原创的东西。我会尽量多做,而不是说我将会在某个期限完成。我非常幸运,能出生在这样一个符合我特殊情况的好时代,并能乘风破浪。我现在已经实现了除了这本书之外的所有的人生目标。我现在的出境是,我将会继续讲述我找到的故事,并且踏踏实实的写下来传递下去。


<插图单独列在下面>

技术图片
Photo of Donald Knuth drawing diagrams by hand, working on The Art of Computer Programming
Knuth is currently working on volume 4, part B, of The Art of Computer Programming. He expects it to have at least four more parts, and the whole set to have three more volumes.
By Jill Knuth / 高纳德的妻子

技术图片
Photo of “The Chemical Caper,” a short story by Donald Knuth where every word is a chemical formula
Knuth has always told stories, with a science twist. In college, he penned a short story where each word was a chemical formula.
By Jill Knuth / 高纳德的妻子



技术图片
Photo of Donald Knuth at his home on a wooden balcony
Knuth at his home in 2020. He retired in 1993 to complete his magnum opus, The Art of Computer Programming.
By Jill Knuth / 高纳德的妻子


技术图片
Photo of Donald Knuth in a yellow shirt sits and reads from a volume of The Art of Computer Programming
Donald Knuth has worked his whole life to tell stories with and about computer programs.
By Vivian Cromwell / 摄影师作品

技术图片
Photo of Donald Knuth at a computer in his home, in front of shelves of books and a wall full of portraits
“The best way to communicate from one human being to another is through story,” Knuth said. This approach allowed him to analyze algorithms more rigorously and neutrally.
By Vivian Cromwell / 摄影师作品


技术图片
Black and white photo of Donald Knuth and Herman Zapf, working on a computer displaying a serif-font “ft”
Knuth in his Stanford office with typeface designer Herman Zapf in 1980, just a few years after the release of Knuth’s typography program, TeX.
By Chuck Painter / Stanford News Service

-THE END- 
2020年4月18日 23:23:06 
Translated By Charle Jiang

无法停止讲故事的计算机科学家--Knuth访谈

标签:news   开发   win   otto   ant   address   set   pass   图灵   

原文地址:https://www.cnblogs.com/kongchung/p/12729121.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!