Donald Knuth on the rewards of computer programming
@palmin I had never seen that, it’s lovely
@palmin this did not age well.
@dl4mat @palmin the 3rd an less important part took over the other 2
@dl4mat @palmin In what way would you say it didn't age well, please?

@palmin Our company motto is: Create value, Do good, Have fun.

I never knew it was a Knuth paraphrase.

@palmin Fun being highly subjective. Knuth's thought that littering your code with comments in latex made it fun to read.

https://ctan.uib.no/web/c_cpp/cwebx/examples/wc.w

For quotes I prefer "Beware of bugs in the above code - I have only proved it correct, not tried it."

@nf3xn @palmin Who hasn't just hammered out a quick, untested example in literate programming when someone asked a question?
@palmin I.e. theoretically.
@palmin He's not working in a corporate environment. He doesn't know the Jira shuffle. :p

@crazyeddie 😏

The quote predates Jira by ten years but one could also argue that all the corporate rituals aren’t really computer programming.

@palmin "There was a dream that was programming".
@palmin This is why I haven’t moved to Swift 😄

@palmin I respect Knuth's opinion on this, but I think one of the biggest stresses in software engineering is that the people who find computer programs fun to read are not only a minority, they're a vanishingly-small minority.

I've never done a formal poll, but my gut suggests if I ask people "Would you rather spend more time writing code or more time doing peer reviews" the answer tilts very heavily.

... oh wait, I'm on Mastodon.

@mark @palmin There’s an ocean-sized gap between reading a well-written program as a pleasurable experience and CRring someone’s ground-out hit-a-deadline nonsense grafted onto an existing monstrosity.

@disappearinjon @palmin I don't know my poll question is phrased well enough to tease out that gap... But I'm not sure the gap is as wide (for most devs) as many believe.

I've read Knuth, for instance. He's inscrutable. It is, perhaps, the case that his programs in his tutorial language don't count as "well-written programs" in this sense (perhaps partially because his example language is one step removed from assembly).

@palmin

Substitute program for proof, and I agree, except for the last item, economic reward.

@palmin He had to have written this prior to Silicon Valley startup culture taking over

@palmin

[#Knuth asserts #programs can be pleasing to write, to read, and can serve humanity whilst incidentally making money.]

The reality is rarely this. Most programs grow into monsters as you add features sales wants and don't always benefit the end user. The foundation of a three story house is different from a building designed with one floor, but time constraints get in the way of planning and doing it right. You get an unstable remudddle. Most programs aren't pleasing to read, aren't pleasing to write due to constraints, and in the end don't fully serve the slice of humanity they target. They make money though. I wonder what #Google search looks like on the inside...

#Programming #Coding #Retired #Programmer #Author

@palmin Knuth is amazing. I recommend everyone to listen to his interviews with Lex Fridman

@palmin Computer programs are annoying to write, and badly-written computer programs are annoying to read. One of life's greatest miseries can be the composition of a computer program that you know will be frustrating for other people to read, and for yourself to read.

Computer programs can also impede useful work. One of life's greatest sources of despair is the knowledge that something you have created is contributing to the regress or poverty of society.

@palmin
Some people even get under-paid for writing bad computer programs! Programming can therefore be triply degrading on aesthetic, humanitarian, and economic grounds.
@cliffordheath maybe it is time for a professional change of scenarie if that is your personal experience with computer programming 😬
@palmin I see you don't understand irony
@palmin I was inspired to use this quote at the start of the lecture I delivered today, which was the final lecture of my course on intro programming. Funnily enough this is the right ordering for programming education; the programs they write for class are not put to practical use, and the experience *costs* them money, but hopefully they do get fun and satisfaction
@palmin I mean **in theory** this is all true. But. BUT
@palmin I wonder if he would still think that if he ever came across modern "enterprise" software. 😅
@palmin we should reframe this as “Knuth’s Test of Programming Value” or something: if the thing you do does not pass these three requirements, then it failed. It could be a requirement for when you are looking for jobs: i want paid vacation and Knuth’s rewards…

@palmin yeah… but… "can"

most gigs I had were neither of those three things

@palmin
#PostOfTheWeek (season 1):
“The Art of Computer Programming" by Donald E. Knuth (American computer scientist), has had a profound impact on the world of computer science. It is considered a milestone in the field of computer science and algorithms. In this work, Knuth not only explains how to write a program but also provides an in-depth examination of fundamental algorithms. These algorithms help us understand how programs can be executed more effectively and efficiently.
@AlexaFontanilla2024 These are great books but nothing has required me to read as slowly and deliberately to understand it as these.
@palmin Some people confuse fun with typesetting. 
@palmin this is a great quote. In my data structures and algorithms lecture I like to show these two quotes that are somewhat related.

⬆️ @palmin

Interesting juxtaposition of #Sudoku and #Knuth. Remarkable how the order is completely reversed in the modern programmers' #hierarchyOfNeeds

1. Get paid for computer programming

2. Even make your programs do useful work — May be sudoku grid from a dependency graph qualifies

3. Embrace #LiterateProgramming —Make well-written programs FUN to read.

No #TeXLaTeX, but my #Swift toolchain does supports #Markdown in code comments to capture joy for posterity

https://www-cs-faculty.stanford.edu/~knuth/lp.html

Knuth: Literate Programming

@palmin I want to post this on other social media. Would you like me to attribute it to you?

@amca Feel free to do that and please just attribute it to Knuth.

Thanks for asking.