I like this: "A person’s success in life is determined by having a high minimum, not a high maximum. If you can do something really well but there are other things at which you’re failing, the latter will hold you back. But if almost everything you do is up there, then you’ve got a good life."
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.
For Donald Knuth, good coding is synonymous with beautiful expression
91–100 of 229 posts
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#92Earlier quoted context omitted.
>The ceramics teacher announced on opening day that he was dividing the class into two groups. All those on the left side of the studio, he said, would be graded solely on the quantity of work they produced, all those on the right solely on its quality. His procedure was simple: on the final day of class he would bring in his bathroom scales and weigh the work of the "quantity" group: fifty pound of pots rated an "A"…
Cool but fake.
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#93A 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.
The uniform isn't for "efficiency". For cleaning one toilet, changing in and out of uniform would ruin the efficiency of having a pocket for 409 spray.
The uniform is for fun.
"Jill and I got uniforms that have a slot where the 409 cleaner fits. You go over there and squirt and feel good cleaning the toilet!"
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#94> I write an average of five new programs every week. Poets have to write poems. I have to write computer programs. It seems more obvious now that I read it. A lot of programmers out there, including myself, are looking for ways to improve their skills and I never thought to myself to write more programs. And not just programs for the sake of programs, but programs that force you to explain to the computer that you u…
What does it mean though? What programs? I can't write new programs at work where I maintain existing applications for the most part. What kind of programs, not for the sake of programs, can you actually write almost daily?
A great way to get into this kind of thing if you're stuck for ideas is to go through the Online Encyclopedia of Integer Sequences [2] and just write little programs to print out the first n entries or whatever for a particular sequence. As other comments have suggested, don't worry about making them perfect, just get the numbers right and then move on to the next one.
[1] https://www-cs-faculty.stanford.edu/~knuth/programs/squarepa...
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#95Re: For Donald Knuth, good coding is synonymous with beautiful expression
#96Earlier quoted context omitted.
Totally agree. It doesn't help at all. Pseudocode would have benn sufficient. Fake machine code? Nope.
MMIX programs can actually be run, and MMIX has multiple simulators. Actual MMIX chips can be made. MMIX also allows students to reason about the properties of modern chips without experiencing quite the complexity they'd have to deal with normally. This is valuable for many reasons.
OTOH, pseudocode is easier to understand, partially because you don't have to think about some of those extra things that don't actually matter in the cost model. For an expository text (and, TACOP is an expository text), I think MMIX comes down on the wrong side of the tradeoffs.
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#97Only one of the people has read the book, with even Knuth saying that he hasn't read it. Of course, he is joking.
But this is a fun read.
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#98Earlier quoted context omitted.
What does it mean though? What programs? I can't write new programs at work where I maintain existing applications for the most part. What kind of programs, not for the sake of programs, can you actually write almost daily?
I think what he has in mind are small programs that do some kind of nontrivial computation without much in the way of IO or UI. For example, [1] is a program from December 2019 that "finds n-bit binary squares that are palindromic". A great way to get into this kind of thing if you're stuck for ideas is to go through the Online Encyclopedia of Integer Sequences [2] and just write little programs to print out the firs…
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#99Earlier quoted context omitted.
What does it mean though? What programs? I can't write new programs at work where I maintain existing applications for the most part. What kind of programs, not for the sake of programs, can you actually write almost daily?
We're business application/infastructure maintainers, not programmers. It's a different world from Knuth's expressions of mathematical ideas. Outside of work, it's easy to write whole programs. Project Euler, LeetCode, etc. These are the kinds of programs Knuth is talking about -- example programs to illustrate algorithms from TAOCP.
Under that category, I imagine something where the resulting program itself is of any, however minuscule, use to me.
Re: For Donald Knuth, good coding is synonymous with beautiful expression
#100> I write an average of five new programs every week. Poets have to write poems. I have to write computer programs. It seems more obvious now that I read it. A lot of programmers out there, including myself, are looking for ways to improve their skills and I never thought to myself to write more programs. And not just programs for the sake of programs, but programs that force you to explain to the computer that you u…
What does it mean though? What programs? I can't write new programs at work where I maintain existing applications for the most part. What kind of programs, not for the sake of programs, can you actually write almost daily?
For example, here is a Gist with a shell script I wrote that, given a set of Maven coordinates, works with a few other tools to build out a docset for use in Zeal / Dash.
https://gist.github.com/michaeljmcd/5564758537946963e946806e...
I had to dig into some corners of Maven I didn't know well to pull it together and it formalized some random bits of minutae.
Nothing elegant or crazy, perhaps, but it is a bit of coding apart from the normal day job that taught me a couple of tricks.