Live data from Hacker News

For Donald Knuth, good coding is synonymous with beautiful expression

quantamagazine.org

41–50 of 229 posts

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#41
post #5

Man for an older person he is using a really small font on his screen! Also: looks like a GNU/Linux variant not windows or macOS.

Knuth does indeed use emacs. There are some elisp modules on his site somewhere. He has also said that he uses other OSes, but only trusts GNU/Linux with the "crown jewels".

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#42
post #24
post #3

People often say "TAOCP is a dense, technical book, you don't just sit down and read it cover to cover." It is dense and it is technical, but it's also a joy to sit down and read and this is why. Knuth doesn't present an algorithm and annotate it with (Foobar 1968) and that's that. He says "Bazquux came up with an early version of this algorithm in 1962 while working on missile trajectories for the Department of Defe…

I feel like this is often a distinction between engineering and science books. I'm used to reading books on physics where the authors (even the Russians) give a bit of background and (usually made up) history but when I go to read a book on something like Finite Element Analysis (For engineers) it feels like the author is literally just dumping his life's work into LaTeX without any thought beyond A->B. Don't get me…

These are issues that a good editing process would resolve. Unfortunately the market for advanced engineering textbooks is so small that it's tough to justify paying an experienced editor to work through multiple revisions.

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#43

Earlier quoted context omitted.

I've heard it said (maybe by Frank Zappa? can't remember for sure) that the difference between a professional musician and an amateur is not how well they play at their best, but how well they play at their worst.

my personal favorite (which I don’t know where I picked up from is): the difference between good programmers and average programmers is in how they cut corners. average ones will mostly walk themselves into a corner where the amount of effort required to fix it means it will never get fixed. good programmers will leave it such a way that it can be improved/fixed given more time.

There is a statement very like this, about construction workers--masons or carpenters--in Christopher Alexander's A Pattern Language.

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#44
post #3

People often say "TAOCP is a dense, technical book, you don't just sit down and read it cover to cover." It is dense and it is technical, but it's also a joy to sit down and read and this is why. Knuth doesn't present an algorithm and annotate it with (Foobar 1968) and that's that. He says "Bazquux came up with an early version of this algorithm in 1962 while working on missile trajectories for the Department of Defe…

I agree that Knuth's exposition is a joy to read, and there are a lot of significant mathematical insights to be had within those volumes. I just wish he could get away from MIX/MMIX. I don't find it very useful or interesting as a pseudocode, and I think it gets in the way of understanding.

On the contrary, I think it's extremely useful to have the algorithms realized in a form that has a cost model free of handwaving. The books are to a great extent focused on computational costs, and high-level languages obscure those costs.

The only exception is that the books only rarely dive into the variable computational costs due to operating on values of different sizes; heapsort, for example, is only O(N log N) time if comparisons take constant time, while, in fact, as key cardinality approaches infinity, key size grows as O(log N). (Which is why O(N) time sorting is possible.) This kind of thing is growing more important as hardware design becomes more accessible; there are probably more people writing VHDL and Verilog now than were writing any kind of software when Volume 1 came out.

So I think using a high-level language would get in the way of understanding those costs, and even to some extent how to implement the algorithm in other contexts.

If you just want to implement a red-black tree or something, then sure, the MMIX code isn't going to help you. But he also presents all the algorithms in pseudocode, so you can use that.

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#45
post #32

A thing I never knew before: Donald Knuth, the paragon of scholarship and of a life well spent, not only cleans his own toilets but bought a specific janitorial uniform to make the process more efficient. I find this inspiring enough that I am going to clean my toilet now.

Who else would clean his toilets? Is he wealthy? I assumed no.

Wealthy enough to have a pipe organ in his home on the Stanford campus! I'm sure he could afford a housekeeper if he wanted one.

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#46
post #32

A thing I never knew before: Donald Knuth, the paragon of scholarship and of a life well spent, not only cleans his own toilets but bought a specific janitorial uniform to make the process more efficient. I find this inspiring enough that I am going to clean my toilet now.

Who else would clean his toilets? Is he wealthy? I assumed no.

Yes, that's how he was able to build his house around a custom-built pipe organ. Also, though, many men of his generation leave the toilet-cleaning up to their wives. But he says he and Jill each have uniforms for this purpose.

(My toilet looks and smells much better now.)

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#47
post #21

Has anyone read his books? Seems like an interesting way to get into programming. I enjoy reading, but I never thought that a book about programming would present it's ideas and technical details through stories.

My first major programs were written under the influence of Knuth—I spent a lot of time reading the source code of TeX and its related programs and learned a lot from that. In fact, I only ever took one computer science class in my life (I went three times and got a C), so I'd have to say that Knuth was by far the most formative influence on my early programming. The other day I was actually looking to see if there w…

How do you get pixels on a screen from VM/CMS?

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#48
post #20

Has anyone read his books? Seems like an interesting way to get into programming. I enjoy reading, but I never thought that a book about programming would present it's ideas and technical details through stories.

> Seems like an interesting way to get into programming. This would be an iconoclastic route into programming, to say the least. If you are looking for a more approachable or practical book that gets you programming and introduces some theory I recommend “Classic Computer Science Problems in Python” by David Kopec. Reading TAOCP to get into programming is sort of like reading a physics textbook in order to build a do…

Iconoclastic? What idols are being smashed by our hypothetical TAOCP-reading novice?

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#49
post #44

Earlier quoted context omitted.

I agree that Knuth's exposition is a joy to read, and there are a lot of significant mathematical insights to be had within those volumes. I just wish he could get away from MIX/MMIX. I don't find it very useful or interesting as a pseudocode, and I think it gets in the way of understanding.

On the contrary, I think it's extremely useful to have the algorithms realized in a form that has a cost model free of handwaving. The books are to a great extent focused on computational costs, and high-level languages obscure those costs. The only exception is that the books only rarely dive into the variable computational costs due to operating on values of different sizes; heapsort, for example, is only O(N log N…

There's no reason you can't take into account things like varying key size, memory allocation, etc. in your computational model when it matters. For comparison sorting, the reason it isn't done is that if you're comparing keys of the same length, in the worst case, you have to look at the entirety of both keys. O(n log n) might be misleading, but it's a white lie at best.

Re: For Donald Knuth, good coding is synonymous with beautiful expression

#50
post #47
post #21

Earlier quoted context omitted.

My first major programs were written under the influence of Knuth—I spent a lot of time reading the source code of TeX and its related programs and learned a lot from that. In fact, I only ever took one computer science class in my life (I went three times and got a C), so I'd have to say that Knuth was by far the most formative influence on my early programming. The other day I was actually looking to see if there w…

How do you get pixels on a screen from VM/CMS?

There were two graphic output options in the previewer. There were specialized graphic terminals using the GDDM protocol (this code was actually written by someone in Germany who sent me their changes). The original code that I wrote used Tektronics graphics protocols available in the terminal driver that connected to the mainframe via a protocol converter that enabled the use of cheap ASCII terminals instead of the standard dedicated IBM terminals.
Post reply on HN