Donald Knuth - Literate programming (66/97)

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • To listen to more of Donald Knuth’s stories, go to the playlist: • Donald Knuth (Computer...
    Donald Knuth (b. 1938), American computing pioneer, is known for his greatly influential multi-volume work, 'The Art of Computer Programming', his novel 'Surreal Numbers', his invention of TeX and METAFONT electronic publishing tools and his quirky sense of humour. [Listener: Dikran Karagueuzian; date recorded: 2006]
    TRANSCRIPT: Meanwhile I... I... also coming up with the definitive version of TeX and this idea of literate programming. So now let me go back to the story of... of Weave and Tangle that you brought up a minute ago. In retrospect, I... I think the greatest benefit to me personally out of all this work on typography was the idea of literate pro-... that I decided to call literate programming, which is a way of treating computer programs as literature. Where... where the pr-... a computer program is something that human beings are... are supposed to read and you write that for... for people to read, rather than for a computer to read. And... and... I... so as I'm writing programs, I'm... I'm being a teacher. I love to be a teacher. I'm... I'm not just teaching a computer, I'm teaching a... the reader of my program and I'm, you know, I'm hoping someday there will be a Pulitzer prize for the most literate program, et cetera. I started out experimentally doing this because a friend of mine, Professor Hoare, at Oxford said, 'Don, people don't ever read computer programs'. Oxford University Press was interested in maybe publishing some pro-... computer programs, examples of how it should be done and so that... instead of just having... just having this sort of... this hidden... hidden documents that... that the computer programs would be out there for people to study and comment on, the way... the way other kinds of literature are, you know, musical notation. People, you know, people publish scores of symphonies, they don't just listen to the symphonies, so why can't we publish, you know, computer programs? And he planted this idea but... but it scared me because really computer programs in the real world are so full of compromises. A professor of computer science couldn't admit to having written such a thing. We can write short programs that are really... that are... that really are... look like little gems and we can pretend that when we write a large program, it's all... it's all this jewel-like character, but... but, in fact, I don't think any large program would, you know, the authors wouldn't have been proud to have other people to read it as... as it was done at the time. So, I'm also saying, how could I write a program so that people could... could enjoy reading it? So, eventually this idea of literate programming grew where I... where I could see a format, by which a program could be presented to other people and the great thing that came out of this was that also, I as the writer of the program would be able to understand it better. So, eventually I had this system where I would typeset... where I'd write a program in this... in this web language and then I would... then I had two computer programs going from it, one of them goes from the web language to a... to a computer code in Pascal language at that time, and the other goes from the web language into a document that I can read with... with... nicely typeset in it, cross indexes and expository developments. This... this system is what I... it... it provides weekly delights for me to this day. I'm writing programs in... in CWEB, which is the... which is the descendant of the original web system, and I... it's... it's a continual source of pleasure to me, to be able to program in this way that I feel is so right.

Комментарии • 3

  • @arnav257
    @arnav257 3 года назад +7

    "People publish scores of symphonies, they don't just listen to symphonies."
    What a succinct analogy. One difference between a symphony and program, though, is that the former is considered primarily as an artistic endeavour.
    Both, however, are creative processes, so there's no reason that the artistic nature of symphonies should grant them a higher status in what's considered literature.

    • @MHeymann
      @MHeymann 2 года назад +2

      Donald Knuth’s famous books are called “The Art of Computer Programming” for a reason.

  • @Ipadstands
    @Ipadstands 3 года назад +2

    He needs to get a famous actor to read aloud one of these programs