Shop OBEX P1 Docs P2 Docs Learn Events
The art of computer programming by D. Knuth — Parallax Forums

The art of computer programming by D. Knuth

AleAle Posts: 2,363
edited 2010-01-13 09:24 in General Discussion
I want to ask anyone who has read the book(s) if they can give some information about how they found the books, when in their programming career they read it and so on. I am going in circles deciding if I am going to read them or not (and buying).
Edit: I have been programming for some time... some 20 years in several languages and I was asking myself what the books could add... I'm sure quite a bit but some experience may prove useful.

I discovered that they have it at the Institute for Mathematics... but today the library is closed! :-(... unbelievable...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-12-23 09:46
    I obtained Vol. 1, Fundamental Algorithms, as required reading for a graduate-level comp sci class. I still refer to it from time to time, along with Vol 2, Seminumerical Algprithms, which I obtained on my own many years later.

    You may also find one of the Numerical Recipes books to be useful.

    -Phil
  • LeonLeon Posts: 7,620
    edited 2009-12-23 12:57
    Knuth's books are very good. Another good book is Introduction to Algorithms by Cormen et al.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2009-12-23 21:32
    The mathematics in those volumes moves quickly to a high level and is full of theorems to go with the algorithms. It can be daunting to someone lacking the background. However Knuth's writing is excellent and it is possible to get the gist of things even without the details of the math. It is like sitting in a class with a famous professor, yes, yes, and then wondering an hour later or when trying to work the problem set, "how did he do that"? The algorithms themselves are quite interesting and varied to optimize this or that in ways you might not have though of. And it touches on esoteric subjects in detail, things like trinary computers.

    I first bought a copy of the 1st edition of volume 2 (Seminumerical Algorithms) at a used book store when I was in grad school. Not so much for computer programming per se, but it was the time when the idea that a deterministic system could display chaotic dynamics was a forefront research topic in several areas of math and science. Knuth's treatment of the pseudo random number generation and tests for randomness is very deep.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • GadgetmanGadgetman Posts: 2,436
    edited 2009-12-25 20:00
    Leon said...
    Knuth's books are very good. Another good book is Introduction to Algorithms by Cormen et al.

    Leon

    I second that.

    There's no one better than Knuth, but the 'Introduction to Algorithms' is also·a good one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2009-12-28 07:00
    You should definitely read it. I haven't, cause I'm an EE guy, but the CS professor I had this semester is the most intimidatingly brilliant person I have ever met. He referred to those books all the time and made us "stumble upon" some excerpts every now and then...

    Raf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    UC Berkeley '12 EECS
    CalSol: Berkeley Solar Car team
    www.calsol.berkeley.edu
    KJ6AWU
  • AleAle Posts: 2,363
    edited 2010-01-09 12:27
    To give this tale an expected step I bought the first three volumes of the 3rd edition. They are beautiful. I just read a few pages and it is so straightforward reading as I did not imagine. I hope they are as useful as I thought, too. Reading them out of the library at the uni did not work. A special permit to enter the library seems to be necessary, they are at the mathematics' dept library and I'm in chemistry... long story short buying them was easier.

    Thanks again to all.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
  • localrogerlocalroger Posts: 3,452
    edited 2010-01-09 20:07
    You should definitely read Seminumerical Algorithms (#2). There's a lot of stuff in there about pseudorandom numbers and floating point math that is very important in daily life and just isn't commonly taught. The other volumes are interesting if you're into a certain kind of wonkiness but not quite as important; they are a bit dated (nobody really cares about the efficiency of sorting algorithms any more, they just use the QuickSort that comes in the library and don't even wonder how it works) because CPU and RAM have become so cheap. Knuth's example language MIX is also distressingly free of modern concepts like stack frames. I heard he was updating the series and asking his readers to update the examples but I'm not sure how that's going.
  • AleAle Posts: 2,363
    edited 2010-01-10 10:54
    localroger:

    The 2nd volume is really interesting as you said because I really spent quite a while writing floating point implementations for several processors (prop included) and like calculators (designing them) as hobby (what got me restarted in ucontrollers a couple years back). In the propeller due to its limited resources the speed of quicksort may shadow its usefulness due to its recursivity (does this word really exist?)... and some other implementations may work better. When programming of the PC we have a lot of precoded libs but on the prop... or other uCs things are constrained and a good understanding can help find shorter/faster/better ways.
    I'm happy with the books but I have to spend more time with them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
  • localrogerlocalroger Posts: 3,452
    edited 2010-01-12 01:19
    Ale, speaking of sorting, I will make a bit of an admission -- on the PC I work in Windows, because that's what 99% of our customers want, so I work in VB6, because our needs are really very modest and the convenience and protection of data structures outweigh the speed advantages of something like C# (or even .NET, which was a huge step backward for someone like me). And VB has no sort function. So whenever I've needed a sort along the years, I have consistently used ... bubble sort.

    Stop laughing already.

    Bubble sort is extremely easy to write and debug and rewrite and re-rewrite for different styles of data, extremely RAM efficient, and the performance isn't too horrible for modest list sizes. I have never sicced the Bubble on a list with more than a few thousand items and only then when it was safe to put up an hourglass. If you need to sort stuff on a Prop, considering the Hub RAM tent-pole, there probably isn't a better algorithm.

    And one of the many beautiful things about the Prop is that it keeps presenting you with things like this that look like awful limitations (oh noes! quicksort too bloaty!) but are really opportunities.
  • AleAle Posts: 2,363
    edited 2010-01-13 09:24
    localroger, Some years ago when I used to program in Pascal (turbo pascal v4 to 6) I always used shell sort because.. I understood it. qsort was just not for me at the time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
Sign In or Register to comment.