By Siobhan Roberts
The four-volume “The Art of Computer Programming” was included on American Scientist’s 2013 list of the books that shaped the last century of science. (Brian Flaherty for The New York Times)
For half a century, Donald Knuth, a computer scientist at Stanford University in California, has reigned as the spirit-guide of algorithms.
He is the author of “The Art of Computer Programming,” a continuing four-volume opus that is his life’s work. The first volume debuted in 1968, and the collected volumes (sold as a boxed set for about $250) were included by American Scientist in 2013 on its list of books that shaped the last century of science.
With more than one million copies in print, “The Art of Computer Programming” is the bible of its field. Inside are algorithms, the recipes that feed the digital age. Dr. Knuth, 80, is an esteemed algorithmist; his name is attached to some of the field’s most important specimens, such as the Knuth-Morris-Pratt string-searching algorithm. Devised in 1970, it finds all occurrences of a given word or pattern of letters in a text — for instance, when you hit Command+F to search for a keyword in a document.
Nowadays, with algorithms masterminding (and undermining) our very existence, the average programmer no longer has time to manipulate the binary muck, and works instead with layers of code — and often with chains of code borrowed from code libraries. But an elite class of engineers occasionally still does the deep dive.
Dr. Knuth is known for introducing the notion of “literate programming,” emphasizing the importance of writing code that is readable by humans as well as computers. He has argued that some computer programs are works of literature worthy of a Pulitzer Prize.
Dr. Knuth is also a notorious perfectionist offering reward money to anyone who finds a mistake in his books. His exacting standards may explain why his life’s work is nowhere near done. When he started out, he intended to write a single work. Soon after, computer science underwent its Big Bang, so he reimagined the project in seven volumes. Now he metes out sub-volumes, called fascicles. The next one was meant to be published in time for Christmas. It is delayed until April because he keeps finding more and more irresistible problems that he wants to present.
Horrified by what his book looked like on the page with the advent of digital publishing, Dr. Knuth took a detour to create the TeX computer typesetting system, which remains the gold standard for scientific communication and publication. Some consider it his greatest contribution, and the greatest contribution to typography since Gutenberg.
Though Dr. Knuth has famously said that “pleasure has probably been the main goal all along,” computer scientists are trying to solve real-world problems. Of course, they are also causing real-world problems. Algorithms written by humans are troubling enough. More worrisome, perhaps, are the algorithms written by the machine, as it learns.
“We are now writing algorithms we cannot read,” said Kevin Slavin of the Massachusetts Institute of Technology Media Lab. “We are subject to ideas and actions and efforts by a set of physics that have human origins without human comprehension.” As he has often noted, “It’s a bright future, if you’re an algorithm.”
All the more so if you’re an algorithm versed in Knuth. “Today, programmers use stuff that Knuth, and others, have done as components of their algorithms, and then they combine that together with all the other stuff they need,” said Peter Norvig, a director of research at Google.
“With A.I., we have the same thing. It’s just that the combining-together part will be done automatically, based on the data, rather than based on a programmer’s work,” he said, adding,“It could happen that each component is a page or chapter out of Knuth, because that’s the best possible way to do some task.”
Lucky, then, Dr. Knuth keeps at it. He figures it will take another 25 years to finish “The Art of Computer Programming.” Might the algorithm-writing algorithms get their own chapter, or a page in the epilogue? “Definitely not,” Dr. Knuth said.
“I am worried that algorithms are getting too prominent in the world,” he said. “It started out that computer scientists were worried nobody was listening to us. Now I’m worried that too many people are listening.”