Tuesday, January 18, 2011

Your Daily Knuth

I keep meaning to write a script that greets me with a Knuth quote when I log in every morning, but I haven't had time.

Today while looking up something else I came across these two gems, though, and thought I'd share:
"Premature optimization is the root of all evil" 
and
"If you optimize everything, you will always be unhappy."
I sometimes think Knuth is like the Mae West of Computer Science. Or maybe Confucius. Which I guess makes Stallman... Sun Tzu? :-)

4 comments:

  1. Not being a computer scientist, I had to read up on Knuth in Wikipedia - including the section devoted to Humor, and now feel that I have missed something utterly profound in my life. I especially loved the quotation, "Beware of bugs in the above code; I have only proved it correct, not tried it." This actually sounds a lot like developing molecular biology protocols.

    ReplyDelete
  2. Don't you mean
    echo fortune /path/to/knuth/quotes >> ~/.zlogin
    or to whatever shell script is run when you login?

    ReplyDelete
  3. Yes, but, first off:

    $ type fortune
    -bash: type: fortune: not found

    Second, I'd have to download the file and format it.

    And third, my shell is already wicked slow, so I should really troubleshoot that before doing anything else.

    Etc. Mostly I'm planning to get a new machine this summer, and then I'll deck it out all pretty with some Knuth :)

    ReplyDelete