domingo, 3 de maio de 2020

THE COMPUTER SCIENTIST WHO CAN’T STOP TELLING STORIES

For pioneering computer scientist Donald Knuth, good coding is synonymous with beautiful expression.

Donald Knuth has worked his whole life to tell stories with and about computer programs.

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.

“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.”

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.

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 the current version is in its 42nd 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.

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.

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.

“The best way to communicate from one human being to another is through story,” he said.

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.

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

Quanta Magazine spoke with Knuth in February at his home on the Stanford campus. The interview has been condensed and edited for clarity.

Nenhum comentário:

Postar um comentário