Back to Index

Donald Knuth: Writing Process | AI Podcast Clips


Transcript

- So what's your writing process like? What's your thinking and writing process like every day? What's your routine even? - Yeah, I guess it's actually the best question because I spend seven days a week doing it. - You're the most prepared to answer it. - Yeah, but okay, so the chair I'm sitting in is where I do-- - It's where the magic happens.

- Well, reading and writing. The chair is usually sitting over there where I have other books, some reference books, but I found this chair which was designed by a Swedish guy anyway. Turns out this is the only chair I can really sit in for hours and hours and not know that I'm in a chair.

But then I have the standup desk right next to us and so after I write something with pencil and eraser, I get up and I type it and revise and rewrite. Standing up. - The kernel of the idea is first put on paper. - Yeah. - That's where-- - Right, and I'll write maybe five programs a week.

Of course, literate programming. And these are, before I describe something in my book, I always program it to see how it's working and I try it a lot. So, for example, I learned at the end of January, I learned of a breakthrough by four Japanese people who had extended one of my methods in a new direction.

And so I spent the next five days writing a program to implement what they did and then I, they had only generalized part of what I had done so then I had to see if I could generalize more parts of it and then I had to take their approach and I had to try it out on a couple of dozen of the other problems I had already worked out with my old methods.

And so that took another couple of weeks and then I started to see the light and I started writing the final draft and then I would type it up, involved some new mathematical questions and so I wrote to my friends who might be good at solving those problems and they solved some of them.

So I put that in as exercises and so a month later, I had absorbed one new idea that I learned and I'm glad I heard about it in time, otherwise I wouldn't put my book out before I'd heard about the idea. On the other hand, this book was supposed to come in at 300 pages and I'm up to 350 now.

That added 10 pages to the book but if I learn about another one, my publisher's gonna shoot me. (Lex laughing) - Well, so in that process, in that one month process, are some days harder than others? - Are some days harder than others? Well, yeah. My work is fun but I also work hard and every big job has parts that are a lot more fun than others.

And so many days I'll say, why do I have to have such high standards? Why couldn't I just be sloppy and not try this out and just report the answer? But I know that people are counting me to do this and so, okay, so okay, Don, I'll grit my teeth and do it.

And then the joy comes out when I see that actually, I'm getting good results and I get, and even more when I see that somebody has actually read and understood what I wrote and told me how to make it even better. I did wanna mention something about the method.

So I got this tablet here where-- - Wow. - Where I do the first writing of concepts, okay? So-- - And what language is that then? (Lex laughing) - Right, so take a look at it but here, you randomly say, explain how to draw such skewed pixel diagrams, okay?

So I got this paper about 40 years ago when I was visiting my sister in Canada and they make tablets of paper with this nice large size and just the right-- - Very small space between lines. - Small spaces, yeah, yeah, take a look. - Maybe I'll also just show it.

- Yeah. - Yeah, wow. - You know, I've got these manuscripts going back to the '60s. And those are when I'm getting my ideas on paper, okay? But I'm a good typist. In fact, I went to typing school when I was in high school and so I can type faster than I think.

So then when I do the editing, stand up and type, then I revise this and it comes out a lot different than what, for style and rhythm and things like that come out at the typing stage. - And you type in tech. - And I type in tech. - And can you think in tech?

- No. To a certain extent, I have only a small number of idioms that I use, like, you know, I'm beginning a theorem, I do something for, displayed equation, I do something and so on. But I have to see it. - In the way that it's on paper here.

- Yeah, right. - For example, Turing wrote, what, The Other Direction. You don't write macros, you don't think in macros. - Not particularly, but when I need a macro, I'll go ahead and do it. But the thing is, I also write to fit. I mean, I'll change something if I can save a line.

You know, it's like haiku. I'll figure out a way to rewrite the sentence so that it'll look better on the page. And I shouldn't be wasting my time on that, but I can't resist because I know it's only another 3% of the time or something like that. - And it could also be argued that that is what life is about.

- Ah, yes, in fact, that's true. Like, I work in the garden one day a week, and that's kind of a description of my life, is getting rid of weeds, you know, removing bugs from programs. - So, you know, a lot of writers talk about, you know, basically suffering, the writing processes, having, you know, it's extremely difficult.

And I think of programming, especially, or technical writing that you're doing, can be like that. Do you find yourself, methodologically, how do you, every day, sit down to do the work? Is it a challenge? You kind of say it's, you know, it's fun. (laughs) But it'd be interesting to hear if there are non-fun parts that you really struggle with.

- Yeah, so the fun comes when I'm able to put together ideas of two people who didn't know about each other, and so I might be the first person that saw both of their ideas. And so then, you know, then I get to make the synthesis, and that gives me a chance to be creative.

But the dredge work is where I've got to chase everything down to its root. This leads me into really interesting stuff. I mean, I learn about Sanskrit, and I, (laughs) and, you know, I try to give credit to all the authors, and so I write to people who know the people, authors, if they're dead, or I communicate this way.

And I got to get the math right, and I got to tack all my programs, try to find holes in 'em. And I rewrite the programs after I get a better idea. - Is there ever dead ends? - Dead ends? Oh yeah, I throw stuff out, yeah. One of the things that I, I spend a lot of time preparing a major example based on the game of baseball.

And I know a lot of people who, for whom baseball is the most important thing in the world. But I also know a lot of people for whom cricket is the most important, in the world, or soccer or something. - Soccer, yeah. - And I realized that if I had a big example, I mean, it was gonna have a fold-out illustration and everything.

And I was saying, well, what am I really teaching about algorithms here, where I had this baseball example? And if I was a person who knew only cricket, wouldn't they, what would they think about this? And so I've ripped the whole thing out, but I had something that would have really appealed to people who grew up with baseball as a major theme in their life.

- Which is a lot of people, but. - But just, yeah. - But still a minority. - Small minority. I took out bowling, too. - Even a smaller minority. (laughing) (upbeat music) (upbeat music) (upbeat music) (upbeat music) (upbeat music) (upbeat music)