Live data from Hacker News

For Donald Knuth, good coding is synonymous with beautiful expression

quantamagazine.org

191–200 of 229 posts

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

#191

Earlier quoted context omitted.

> is a program from December 2019 that "finds n-bit binary squares that are palindromic". No dis-respect for Donald Knuth (who of course I found orders and orders of magnitude above programmers such as myself) and no dis-respect to people that found those types of programs interesting, but there are also programmers (like me) for whom those programs are just simple riddles, with almost no interest whatsoever. They're…

Is this your way of saying you're a programmer not a computer scientist? Because his job is as a scientist. Calling his exercises simple riddles is disrespectful. It's like calling doing a 5km run every morning, simple walking. The proof is in the pudding, he has impacted the world in a profound way. But on a more positive note. Which non-cs programmer heroes exists today? I'm thinking John Carmack.

Many people praise Fabrice Bellard. Not sure if he's counted as a non-scientist, but his achievements are astounding.

Although I think that many heroes are hidden behind corporations. Those people who contributed most to Google Search or architectured Chrome. Those people who built systems everyone relies on. For example almost every Java project uses Spring Framework, but I'm sure that it was founded by one or few very talented people. And those examples are many, but not very public or exposed.

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

#192

Earlier quoted context omitted.

Is this your way of saying you're a programmer not a computer scientist? Because his job is as a scientist. Calling his exercises simple riddles is disrespectful. It's like calling doing a 5km run every morning, simple walking. The proof is in the pudding, he has impacted the world in a profound way. But on a more positive note. Which non-cs programmer heroes exists today? I'm thinking John Carmack.

Many people praise Fabrice Bellard. Not sure if he's counted as a non-scientist, but his achievements are astounding. Although I think that many heroes are hidden behind corporations. Those people who contributed most to Google Search or architectured Chrome. Those people who built systems everyone relies on. For example almost every Java project uses Spring Framework, but I'm sure that it was founded by one or few v…

Fabrice Bellard seems like an awesome guy!

Do you guys think programmers don't recognise each others work as much as in other fields?

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

#193

> 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…

I misunderstood how to use git before college and used to commit everything to master, on GitHub you get this fancy flame graph when you do this and so it acted as a kind of “gamification” for me. I don’t think anything else has so dramatically improved my abilities as a programmer.

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

#194

Earlier quoted context omitted.

Tortured artists have produced some great work, true. J. S. Bach had some hardships in his life, but he wasn't tortured. J. R. R. Tolkien, similarly, was not tortured. da Vinci's life doesn't seem to have been horrible either. I think they stand as strong counterexamples to the idea that tortured artists make the best art.

Tolkien wasn't tortured, but he fought in WWI.

I guess people (particularly Tom Shippey, IIRC) do argue that's a lot of what made his work what it is. I tend to forget about that part of his history.

Certainly it would have been a traumatic experience.

Definitely a relevant point. Thanks for mentioning it.

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

#195

Earlier quoted context omitted.

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…

> is a program from December 2019 that "finds n-bit binary squares that are palindromic". No dis-respect for Donald Knuth (who of course I found orders and orders of magnitude above programmers such as myself) and no dis-respect to people that found those types of programs interesting, but there are also programmers (like me) for whom those programs are just simple riddles, with almost no interest whatsoever. They're…

Checkout his latest fascicles on applications of zero-supressed binary decision diagrams to all sorts of problems. From beautiful tiling problems to travelling salesman.

His latest fascicles are bleeding edge when it comes to a general algorithm that solves a wide variety of problem instances very efficiently. (much similar to his Algorithm X, but superior in almost every way)

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

#196
post #4

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.

"An amateur practices until he can do a thing right, a professional until he can't do it wrong." -- (probably by) George W. Loomis

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

#197

Earlier quoted context omitted.

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…

> is a program from December 2019 that "finds n-bit binary squares that are palindromic". No dis-respect for Donald Knuth (who of course I found orders and orders of magnitude above programmers such as myself) and no dis-respect to people that found those types of programs interesting, but there are also programmers (like me) for whom those programs are just simple riddles, with almost no interest whatsoever. They're…

I think others have already done a good job of describing how programs like that help make you a better programmer, and can be inspiring.

I'd like to add that something that I find interesting and inspiring about programming is managing complexity. That's something that's not as easily explored with programs like the above. But for example, you could try to create as much of a spreadsheet program as possible in a few hours. Do that 4 times starting from scratch. How can you organise the code in such a way to make it easy to read, performant, maintainable, and fast to write? What language features will you take advantage of? Maybe try making a part of a word processor, an IDE, a raytracer, an HTML viewer, an FTS engine, a relational database, etc. Try implementing mvc, or reactive, or two way binding UIs. I would consider these sort of a different genre of poem, that let you explore a different problem space. Maybe this might be the genre that you're more interested in?

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

#198
post #187

Earlier quoted context omitted.

With Matlab, you can immediately create a Matrix and transpose it, find the inverse...etc. I think it is optimized really well for undergraduate excercises that are really simple (I have two numerical methods textbooks which use Matlab fine). I agree that anything more complex than a couple of functions and a loop is probably better off somewhere else in a lot of cases. With that being said, it has built-in support f…

You seem to not consider a major player in the field: Python. There's probably a reason Andrew Ng switched from Matlab to Python for teaching.

I literally mentioned Python in one of my above comments lol and it is my daily driver. Still, as an undergrad with zero programming experience, Matlab was very easy to use for the kind of things that undergrads do in engineering and physics (play with matrices, differential equations, make charts...etc). I would agree that machine learning is likely to be easier in Python, but then again, ML students already know how to code, understand OO, and other concepts. Matlab is popular where people are good at math, but have no clue what objects are.

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

#199
post #71

> 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…

Something that I found useful is taking the concept of katas from martial arts. Writing the "same" program multiple times, but trying to refine the parts I didn't like in the previous iteration (e.g. try writing in less code, with smaller functions, with less libraries, in a more testable way, etc). It's specially rewarding to do this exercise with utility libraries, as it teaches you about the nuances one abstractio…

This concept of Code katas are well established. I learned it from the pragmatic programmer book [1]

[1] https://en.wikipedia.org/wiki/Kata_(programming)

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

#200
post #78

Earlier 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…

I feel like solving leetcoe problems would fall somewhere in the category of programs you're describing. (They seem like small problem solving programs.)
Post reply on HN