Ask Slashdot: Have You Read 'The Art of Computer Programming'? (wikipedia.org)
In 1962, 24-year-old Donald Knuth began writing The Art of Computer Programming, publishing three volumes by 1973, with volume 4 arriving in 2005. (Volume 4A appeared in 2011, with new paperback fascicles planned for every two years, and fascicle 6, "Satisfiability," arriving last December). "You should definitely send me a resume if you can read the whole thing," Bill Gates once said, in a column where he described working through the book. "If somebody is so brash that they think they know everything, Knuth will help them understand that the world is deep and complicated."
But now long-time Slashdot reader Qbertino has a question: I've had The Art of Computer Programming on my book-buying list for just about two decades now and I'm still torn...about actually getting it. I sometimes believe I would mutate into some programming demi-god if I actually worked through this beast, but maybe I'm just fooling myself...
Have any of you worked through or with TAOCP or are you perhaps working through it? And is it worthwhile? I mean not just for bragging rights. And how long can it reasonably take? A few years?
Share your answers and experiences in the comments. Have you read The Art of Computer Programming?
But now long-time Slashdot reader Qbertino has a question: I've had The Art of Computer Programming on my book-buying list for just about two decades now and I'm still torn...about actually getting it. I sometimes believe I would mutate into some programming demi-god if I actually worked through this beast, but maybe I'm just fooling myself...
Have any of you worked through or with TAOCP or are you perhaps working through it? And is it worthwhile? I mean not just for bragging rights. And how long can it reasonably take? A few years?
Share your answers and experiences in the comments. Have you read The Art of Computer Programming?
Unfortunately no and I have a reason:
Reading those books requires high degree of mathematical sophistication, particularly, knowledge of complex analysis, which I lack.
Two decades THINKING about buying books? Jesus Christ. Just go buy them. You are ridiculous.
empress? memcached? redis? You guys have strange names for programs.
I read the first three books in University and did examples from the first two when I started debating with myself, friends and professors, is it better to have the ultimate reference or be able to create code on your own as the requirements come up?
Over the thirty plus years since, I'm happy to say that volume two and three have gotten pretty ratty as I've used them as references (along with "Programming in C", 2nd edition) so I feel like I've struck the right balance (for me) between reading them, using them as reference and creating my own code/algorithms.
Mimetics Inc. Twitter
Although she preferred his other works, like The Land Before Time and Anastasia.
#DeleteChrome
Just buy it (the entire and updated book set) and read it ;) and continue to use it as a permanent reference for whatever you want to do with programming...
It's really great reading if you do stuff like program low-level (think C, Assembler), efficient programming or do stuff close to the hardware level (such as microprocessors). It describes the very low level of a program and a computer.
If you're into a higher level of programming (Java, C#, Python etc), unless you're building libraries for it, it is probably going to confuse you, most of the 'hard stuff' is (double precision, floating point, sorting and searching through lists ...) abstracted away. Obviously 'someone' has to know how it works in the end, someone has to write the compilers, I haven't started on the rest of the volumes because that's not "me".
You should understand how computers work before you start reading these, I've been in the 'business' for 20 years, I've read it 3 times just to get a basic grasp on the first volume.
Custom electronics and digital signage for your business: www.evcircuits.com
It isn't terribly complex now that geniuses like Knuth have spent literally decades simplifying it for you, sure. Step deeper into the world and you'll be truly amazed at how deep it is ... and likely staggered that it works as well as it does.
"Glory is fleeting, but obscurity is forever." - Napoleon Bonaparte
I read the three volumes like I read any book in SkyRim: I opened the cover, got my +1 level in computer science, dropped it and hit it with a fireball.
It's definitely worth reading, and working through at least some of the exercises. It is an excellent example of rigor, depth, and attention to detail. You may not have time to work like that every day, but it's very useful to be capable of doing it and to have a good mental model of what it's like.
You think anything written by anybody 77 years old is relevant?
So I take it you think K&R is irrelevant as well.
#DeleteChrome
TAOCP is a great reference. There are some really important things that are pretty good for someone who wants to be a professional software engineer.... 0) understanding how algorithms execute on a processor. While MIX is behind the times, (and MMIX is ahead of the times in many ways) understanding how an algorithm executes on a processor is important. I think Knuth really did the right thing in not selecting the language of the day. 1) algorithm reference. If you need to understand an algorithm, or choose between a family of algorithms, it is often a great place to find the art. 2) The humor is pretty good, at least to me. Done get me wrong, it's on a humor book, but there is wittiness and puns and some running gags... 3) It's always good to have some humility, and reading TAOCP always makes me a little more humble. It's worthy of a place on your shelf.
-- Erich
Slashdot reader since 1997
Driving a car isn't hard millions do it. But how many drive in NASCAR?
Sure, yeah, you could take a few weekend courses and bang out some stuff and possibly even find a job paying decent money.
But if you want to move up in the world you need to turn your hack and slash techniques into a refined art.
The kind of crap commodity programmers write is the stuff that skilled developers get paid a lot of money cleaning up or just re-implementing.
It the difference between dime store trashy romance novels and real actual novels. The different between the the Divergent movies and Hunger Games.
If you're content being a direct to DVD wholesaler of crap sure, just get to work.
If you want to work in the big leagues on important things, you need to be open to learning some things and respect the craft.
Work Safe Porn
It's not complex if you merely want it to run, but if you want flexible, maintainable, and readable code, then it is complex.
Table-ized A.I.
I thought everyone learned from a Dummies book and building a few cell phone flashlight apps.....
I used Vol. 2 to improve the multiply algorithm in an open source program.
I have them. I have studied small parts of some of them. I have been delving into them over 30 years.
For day to day programming, I do not need or use the detail in those books.
At various times in the past, I have delved into library writing, and then they were very helpful, mostly in understanding issues and problems that I had not thought about. But I think time has moved on. Hardly anyone needs the details in those books, and in many cases, some classes of problems are well solved.
Looking back, I am glad that I studied some parts. But today I would not recommend them. Unless you really wanted to look back at history.
Your closed source code is full of malware. No one should use it.
It isn't terribly complex now that geniuses like Knuth have spent literally decades simplifying it for you, sure. Step deeper into the world and you'll be truly amazed at how deep it is ... and likely staggered that it works as well as it does.
+1. Programming isn't terribly complex if you always do it with your training wheels on, and if you never write anything that hasn't been written a hundred times before.
When all you have is a hammer, every problem starts to look like a thumb.
Nah, I've been programming longer than Knuth has, starting with machine language. You just need to think procedurally.
In your case, it sounds more like "sporadically".
When all you have is a hammer, every problem starts to look like a thumb.
Nah, not really. It might be hard for you, but you might be a muddled thinker.
It depends on what you mean by "work through it". Do all the exercises? Some are unsolved problems, so that's not terribly realistic.
There's nothing in the books that's not also discussed elsewhere (with the possible exception of the very thorough discussion of out-of-core sorting with tapes, which is a bit unusual these days), but it takes quite a few other books to equal the series.
I have read it at length, and it's definitely full of good stuff to know, but it really depends on your field. It's still dedicated to single-threaded algorithms, so concurrent and functional data structures aren't touched. If you're slinging matrices around for computer graphics, not so much.
But I definitely feel that it covers a greater span than, say, the CLR textbook Introduction to Algorithms.
Why don't you read some in a library (or download some of the torrents floating around) and see what you think? It's a reference book, not a mystery novel which isn't nearly as good if not read in order.
Don't get me wrong, Knuth is a genius. If you need to do deep research on sorting algorithms, definitely read it. If you want to do CS research and need to learn how to read research papers, its a good start. But you aren't going to get any deep insights on how to write a good program from it. Its too academic and far too focused on deep research. And even for the topics it does cover, unless you want to do research on how to really optimize the hell out of them you're better off using tutorials written for a more practical level.
I still have more fans than freaks. WTF is wrong with you people?
Nah, it's easy if you're as smart as I am.
Driving a car isn't hard millions do it.
I've waited until I was 37-years-old to learn how to drive. My father wasn't going to teach me as a teenager to drive stick on his one-ton flatbed that he put a million miles on in ten years. Since Silicon Valley has a well-developed transit system, I got around just fine without having a need for a vehicle. One day my father abandoned his old car in my carport. I had not choice but to get my driver license and take possession of the car. Took me three years to find out about all the repairs that he didn't tell me about. It's easier to own a car when you're more mature and financially responsible, especially if your father is DIYer who doesn't believe in mechanics.
I wasn't sure if I'd read 'em. I know a friend/colleague (who I regard highly) who has - and I think he thinks highly of them. But he also has terrible taste in movies.
A quick google search landed me at http://broiler.astrometry.net/...
I have not read it.
I've been coding professionally for 25-30 years, depending on how you count. I studied CS in college. I've read a few outstanding books on the subject since then.
I don't have the patience for these, and I suspect I'm not going to miss out on much.
On the other hand, I long ago came to the conclusion that I'm really not interested in low level code. Give me a nice high level language with nice high level functions and features and I'm a happy coder. That's not to say that I don't understand O notation or the costs behind the complexity - but it is to say that I know when to use a drill and when to use a power saw - but I don't want to build either of 'em.
Maybe you're into the nitty gritty. Or maybe you like bad movies.
Check your local tech library and see if you can check out a copy. Or ebay 'em for $20-40/volume. Or if the pdf strikes your fancy, maybe take the plunge.
My wife and I each had a copy of the first three volumes when we married. Yes, there are female computer nerds. B-)
I first encountered it when assigned one of the volumes as a text back in 1971. Of course the class didn't consist of learning EVERYTHING in the volume. B-)
I use it from time to time - mainly as a reference book. Most recently this spring, when I needed a reference on a data structure (circular linked lists) for a paper. I've found it useful often when doing professional computer programming and hardware design (for instance, where the hardware has to support some software algorithm efficiently, or efficient algorithms in driver software allow hardware simplification).
I don't try to read it straight through. But when I need a algorithm for some job and it's not immediately obvious which is best, the first place I check is Knuth. He usually has a clear description of some darned good wheel that was already invented decades ago, analyzed to a fare-thee-well.
I only see him about once a year. He's still a sharp cookie.
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
110010001000 caught at work
I've read the 1973 editions, cover to cover. I skimmed a few fasciles. Haven't kept up since then.
Do I recommend it? You bet I do, just like I recommend Structure and Interpretation of Computer Programs, The Mythical Man-month, and The Psychology of Computer Programming. That's not to say you have to have read classics like these to be a good programmer, but if you haven't internalised a lot of the material that's covered in books like these, I question how much you care about what you do. And if you don't care about what you do, it will show in the quality of your software.
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
We should all chip in and get a complete set for the US Patent office. It might help them get rid of some bad patents they have issued over the years.
Or if you say you are using a computer in a patent app and don't cite Knuth as prior art for something you get tossed for that as well.
I checked out my code base. I couldn't find that text in any of my library files. :P
CPU and memory are still very expensive, especially on the mobile market and efficient programming and memory management is still very relevant especially as large swathes of memory is becoming scarcer. But there are still plenty of people using microprocessors that have no more than a few MHz and several kilobytes of memory.
Even the Arduino libraries themselves are rife with examples of such 'bad' programming, some operations unnecessarily take many more cycles than necessary while using a simple example in Knuth's books shows how to do it in one (such as bit shifts).
Custom electronics and digital signage for your business: www.evcircuits.com
While I haven't read the books, and doubt I ever will now, the content is similar to the uni course I did in computer science back in the 80s. Knuth covers everything in higher detail than I can recall being taught, but I'm pretty certain my foundations are just fine. It may just be that I'm forgetting some things too, it's been almost 30 years now for most of it.
I might go back and revise a topic or two in those books or a similar source if I felt I needed a refresher. For most cases though, what I can recall is good enough to get through to the solution - or lead me to an online source to crib up on how best to form the solution.
I think if they spent more time today teaching this foundational science in classes, and less time on the latest languages and frameworks, then we'd be seeing a much better class of programmer emerging from education today.
All those moments will be lost in time, like tears in rain.
Hmm. Have you taken Numerical Analysis?
It's quite clear that he (she, it?) has never studied computer science at all.
When all you have is a hammer, every problem starts to look like a thumb.
It's that kind of mentality that has given birth to a plethora of buggy, unmaintainable code that's ridden with security holes.
I can program in Z80 and 6502 assembly,
Rodnay Zaks deserves a great deal of thanks -.o;
I've been programming longer than Knuth has, starting with machine language.
If it's not a rude question, how old are you, exactly?
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
Well, you have to start somewhere. Why not by reading TAOCP? Can't be terribly complex.
Folks, we live in an age where programmers declare integers that are going to count from 1...10 as LONG INTEGERS, eating 8 bytes of RAM, where only 1 byte is needed.
We live in an age of cloud computing, load balancers, containers, and distributed databases with stored procedures. When code runs, you have no idea where it is running and how it is spread out over cloud services. Most of the time you don't even know what country the physical box is in.
I have a pure CS degree, but as long as we can keep making things faster and bigger, I am not sure if this book will ever be a top seller. In the brave new world of computing I am not even sure what optimization means anymore. Optimize for CPU, network, compiler, database, cloud architecture??? It is maddening!
As for me, I am currently doing an embedded systems project. Am I doing it in 'C' and ASM like in the good old days? Heck, no, I am using python on a quad core ARM SOC with 1GB of RAM. Even at max processing load I am barely hitting 10% CPU while coding in Python. As long as hardware is fast and cheap, there is no need to spend this kind of time optimizing every cycle and byte. BTW, this is my first Python project. Easy-peasy language that is great for hardware interfacing projects, most libraries exist for common chips like the MCP3008 (AD convertor).
To the kids out there. This is a great time to be alive. You can build anything, learn anything, and talk to anyone. Do cool stuff. Learn everything. There are no limits and powerful hardware is cheap. Look around at how lucky you are to be alive right now. It is an amazing time!
I get laughed at when I suggest memcached because all the cool young programmers "know" that redis is where it's at.
I had to look up this "redis" thing. I saw on the front page that it supports geospatial data. Then I looked up what constitutes "geospatial data" as far as redis is concerned. Then I cried a little.
It might be a fine product at what it was designed for, but any time I see people throwing around big words that they don't understand, it's a safe assumption that what they're trying to sell me is a toy.
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
Is that you Nike/Shia? :P
Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
In that case you're probably better off reading this book...
Writing is easy. Lots of people do it. Writing a Ph.D. dissertation is hard. Because details.
OP is being a bit flippant.
Conceptually, the idea of using alphanumberic characters to give computers instructions is "simple" and getting a computer to do basic operations is fairly simple with a good tutorial or guide.
The idea that the codebase for a web app like Yelp's website or a phone app like Snapchat is "simple" or "easy to learn" is of course patently ridiculous...I think it boils down to whether or not you give OP the benefit of the assumption.
Seriously OP really didn't say much other than, "No it is easy"
Thank you Dave Raggett
Great analysis thanks
Thank you Dave Raggett
Vol. 1-3 were my bible during my early programming career and they, along with vol. 4, have an honored place on my bookshelf. I still refer to them to this day, 30 years after I got the first volumes.
Sometimes, real fast is almost as good as real-time.
Please rest assured that absolutely no-one wishes they were you.
Il n'y a pas de Planet B.
I have sometimes compared those who have studied computer science (as opposed to learning how to program) with those who have studied music. You can be a very successful programmer without any computer science just as you can be a very successful musician without music theory. Mastery of the advanced studies of your discipline will make you a better than merely someone who can just get the job done.
This is a boring sig
OP said other books have covered these needs better, in OP's opinion.
You do make a good point however, there will always be people cramming circuits into smaller and smaller things and some code has to run them.
Thank you Dave Raggett
interesting comment
Thank you Dave Raggett
> Programming isn't terribly complex. If you want to program, just do it.
You really, really should know better than that by now. In the 1980s, if you wanted to write a really crappy macro and use it on your computer, fine. Today, most software is exposed on the internet and runs on devices connected to networks that people depend on, networks that contain private information of one kind or another. "Don't worry about knowing what you're doing, just do whatever" is an extremely foolish approach.
The modern version is much more of a reference than textbook. While exercises still are part the book, it really for testing knowledge. Also, the field has just exploded and the task is really daunting. Satisfiability is an example, the current fascicle is 320 pages, but a more in depth look at the problem could run to twice that much and more. And there is new work being done on the topic every day.
Frankly, less and less programmers will need it, as it is easier and easier to create and use algorithmic libraries. Also, optimization just isn't what it used to be. Modern embedded silicon is quite roomy and complete control of the hardware leads to more problems (think buffer overflows) than it often solves. Finally, code that is verifiable is of more overall value, and so simpler algorithms and more constricted languages may be the future of a lot of code bases.
But, it's an awesome project and always will be.
I found his books difficult to use. I read them to understand particular algorithms, but when it came to actually writing code to implement an algorithm I had to go to other people's books.
Contribute to civilization: ari.aynrand.org/donate
I don't think I've read any college text book cover to cover. I open up TAOCP when I need to get into the theory on a particular topic.
“Common sense is not so common.” — Voltaire
But can you program in Z80 and 6502 machine code? You really only need to know a few instructions, because the details are in the bits.
Wish I had mod points.
Code, Hardware, stuff like that.
Side note: Knuth's books predated electronic publishing and were typeset, necessitating careful proofing of the galleys prior to publication and many months of delay between completion of the manuscript and actual publication of the book. The errors made by human typesetters weren't always caught, which led to bugs in the published book (and in some of the algorithms and code). Knuth offered a reward of $1.00 to anyone who was the first to find and report an error. No email then, so you had to write a letter or make an expensive long distance phone call. Knuth actually sent out hand-signed written checks, but not many people cashed them, preferring instead to display the signed check as proof that they had found an error in one of these volumes. If you were wondering about Knuth's inspiration for creating LaTEX, this note should help explain that.
Back when I was at AOL in Vienna, VA, there was a bookstore called Computer Literacy Bookstore, a few doors down from the headquarters of Ringling Brothers & Barnum & Bailey Circus (who annually would show off their elephant-de-jour).
I bought the first two editions there the moment I became aware of them. They're signed in pencil by Knuth himself. The fact that he used pencil I found amusing.
I bought the third edition, which was a huge, huge event as it was much anticipated, and enjoyed it better than the first two since I have rather poor mathematical ability and could relate more to the fuzzy concepts of sorting and searching than some of the more mathematical concepts in the earlier two editions.
Since I left the software engineering community in favor of what we used to call "systems programming" and now call "DevOps," I didn't become aware of the "4A" edition until this evening. Thanks for the heads-up. Maybe it will encourage me to get back into software engineering and overcome my weakness in math.
Kriston
Not mentioning efficient algorithms.
Slashdot, fix the reply notifications... You won't get away with it...
Those dumb names, like the silly "MongoDB," were just created to encourage the hyping of their technologies, even though they are simplified and inadequate versions of what was earlier well-tested and battle-proven.
Kriston
I did however read the Notepad help file.
If you're working for Oracle and coding the Oracle database and are looking for an algorithm to squeeze a bit more performance out of the engine, go ahead and buy the book, you might find something in there. But most programmers are using sets and dictionaries in their chosen programming language that has a decent implementation of algorithms and won't be helped by some algorithm which might squeeze a few more cycles out of the computer but nobody will reward you for. The Knuth book is for high fliers and hard core computer science projects, not for your average programmer.
I started reading them around 2001 and went through the three books, a little bit at a time. Went through most of the exercises with 30+ difficulty, but couldn't really solve all of them.
A lot changed to myself - back then, I was a newbie undergrad programmer with undergrad-level math skills. Fast forward 15 years, I went through grad school and then couple of years of industry experience. My main programming languages moved from C++/Java to VHDL, then moved on to SystemC and SystemVerilog, and back to C++ with a bunch of bash scripts.
So, did I get to use the knowledge that I gained from reading it? Not much, I didn't even have to write a single data structure or algorithm because there are perfectly good (or at least, good enough) libraries for most of the issues that I had to deal with. Neither did I have a good usage of the math courses I learned (remember things like Laplace transformation or L-U decomposition?), nor did most of the non-engineering courses I took helped much. Still, all of them helped shape myself on understanding the world and helped gaining problem-solving skills.
Would I recommend it to other people? Depends, if you find your data structure and algorithm textbook easy enough and you want more challenging stuff, TAOCP is a perfectly good motivator to train yourself to solve complex problems. However, I think there are other ways to train complex problem-solving - e.g., a lot of advanced math/physics textbooks. However, for people who tend to fall asleep once they see those weird characters (and would rather live with pseudo-assembly code) TAOCP is a much better solution.
If you want to learn practical programming skills, then don't bother reading.
Programming isn't terribly complex.
Awesome that you think so! Now, program some realtime flight surface control software for a fly-by-wire jet and sleep well knowing that your program will never, ever, kill anyone... (Or, substitute any other safety critical software you can think of - and theres a lot!)
"Programming" (by which I really mean software engineering) is one of the most complex activities in existence...
Galileo: "The Earth revolves around the Sun!"
Score: -1 100% Flamebait
"Real programmers don't use PASCAL!" http://web.mit.edu/humor/Compu... I picture 110010001000 toggling the OS into the front panel while the rest of us have already bootstrapped the machine with kixtart a month ago. It's ok to stand on the shoulders of giants, but at the same time, it's good to look down and see how the foundation is you're standing on is really laid. There are times in my storied career where I have actually benefitted debugging c# or ruby code because I understood how parsing and execution worked. I have written better database queries in 4GL by knowing what was happening on the metal. So, before you get overly dismissive of knowing soup to nuts, I'd say that you should be aware that YES you can get by without it. But knowing the whole shebang, all the way down to the machine code, at least in broad strokes, DOES help you out occasionally, if not all the time.
Speak for yourself.
“Computer Science is no more about computers than astronomy is about telescopes.” - commonly attributed to Edsger Dijkstra, but disputed.
[...] Mastery of the advanced studies of your discipline will make you a better than merely someone who can just get the job done.
The caveat being here that a good portion of what goes for CS at universities is essentially "How to use the vast resources of a supercluster as a glorified pocket calculator". I had the dubious honour of suffering through four semesters of so-called CS at my uni, and I can attest that you can be an incredible computer scientist and still be unable to program even modestly simple applications. And that is said without even touching upon the vast difference between CS and software engineering (and the equally vast difference between software engineering and programming, to be fair).
All three disciplines have their place. But CS is not exactly the 'advanced study' of programming.
Rudolf Hess edited Mein Kampf. He was the very first grammar nazi.
I can program in 6502, Z80, x86 and 680x0 assembly languages. Knuth doesn't deserve any thanks.
Me too. Rodney Zaks gets my thanks.
I use TAOCP as a handy authoritative reference for algorithms in specs. It's not a great read though.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
But can you program in Z80 and 6502 machine code? You really only need to know a few instructions, because the details are in the bits.
I wrote my own assembler and debugger for programming my Apple //e. I got fed up of typing in hex.
https://github.com/dj-on-githu...
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
>rich base classes
are complex.
Machine code is simple. There's much less to know,
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
And You should as well. It would give you the right knowledge to understand the whys and the hows.
Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
NASCAR is easier than, say, driving in Amsterdam. In Amsterdam you find bikes and pedestrians on your path, and, Oh! The horror! Right turns!
-- Cheers!
Programming isn't terribly complex.
Awesome that you think so! Now, program some realtime flight surface control software for a fly-by-wire jet and sleep well knowing that your program will never, ever, kill anyone... (Or, substitute any other safety critical software you can think of - and theres a lot!)
"Programming" (by which I really mean software engineering) is one of the most complex activities in existence...
Just because it can be doesn't mean that it always is. The avionics-software programmer is working very differently to the muh-first-website programmer. It can be complex like avionics, but it can also be simple like javascript text-adventures.
"Programming" can be, at times, one of the most complex activities in existence. It can also be, at other times, one of the simplest activities you can find paying high salaries. Lets not pretend that programming is always more complex than brain surgery. It can (on rare occasions) be, but it's usually not much more complex than arithmetic.
I'm a minority race. Save your vitriol for white people.
My check from Knuth, for finding an arithmetic typo in Vol. 2, is for the amount of $5.16 which includes accrued interest.
Regarding the original question: These books are fantastic, but they are challenging and the bit-miserly focus does not map well to today's typical programming needs. They are frankly too detailed and difficult for many readers. My advice is have a look at them and decide whether you need them to complete your life. If so buy the set and enjoy! If not, you probably won't miss them.
Just don't ask for mine. I'm keeping these books.
As surveys go, it would be as good as most of the recent ones.
Anyway, I've never read even one volume of the series, though I'm pretty sure I consulted it at various times. It was certainly available in the university libraries where I was teaching or studying. Also I remember seeing it in the research library when I was supporting the researchers. However, I can't really remember any details after all these years. The place I should have been introduced to it was when I was earning my CS degree, but I don't think I even knew about it until afterwards... At that time I think I primarily associated Knuth with TeX.
According to my records, the only Knuth book I've read in it's entirety was Surreal Numbers , but I'm suspicious of my memories of that book... Did he construct an entire number system starting from the empty set? Was it based on a lunchtime conversation he had with a pure mathematician, and he basically reconstructed the discussion at book length?
Freedom = (Meaningful - Coerced) Choice != (Speech | Beer^2), and sad sock puppets' bad mods avail them naught.
It's a book to be used as a reference when you need some depth in a particular subject. I refer to "semi numeric algorithms" quite often as an enginner implementing DSP. Kudos if you have read and understood the whole 4 tomes, but that was not the way Knuth is expecting one to use his book.
I've only skimmed TAOCP, but I feel like the mystique around it has more to do with its historical significance than being a real learning resource.
You wouldn't pick up learning physics from Newton's Principia (Feynman's Lectures on Physics might be a better start) but it could be worth reading to gain an appreciation for the process of discovery. For TAOCP, perhaps a newfound appreciation for typesetting.
That's not a name I see often! That's how I learned assembly too. "Programming the Z80".
Hahahaha, funny! Sorry, do not have mod-points, but this is sarcasm done extremely well!
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
It's not like a novel you read front to back. If you need an algorithm you look it up.
I had to write a math library for a DSP that didn't have compiler support yet. TAOCP came in handy then. The parts I did read I went over again and again and once again. It wasn't fun by any means.
Interestingly, despite being in CS for now 30 years and doing some quite algorithm-intensive and complicated work even today, the only time I consulted them was for an exercise in CS 101 that referenced something in there. I have always found easier to read and better references, quite a few of them research papers. Don't get me wrong: I think it is good that they exist, but they are more a reference for fundamental research than a handbook for an engineer or applied scientist.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
Every program written today is in way shape or form another program from an earlier age with one more level indirection. There is a saying in the K&R world, that there is no problem that cannot be further simplified than with one more level of indirection. The difference today is that we no longer want to choose that level of indirection. We want to have it given to us. What was once syntactic sugar has become semantic necessity through reward for the deeper understanding of the subject. Being faster to market wins over being better.
"Because " is not a complete thought. Could you please expound for those of us that don't think a noun covers the gamut of possibilities that you wish to cover? Since we are all geeks here, it stands to reason that the universe of the set covered by "details" is larger than your intent and indicating that your intent is universal assumes we have the same level of understanding as you.
"Because <noun>" is catchy in journalism because "for news - it shows an all encompassing view to attract audiences." (See what I did there?)
I for one would like to know what details you mean. Please and thank you.
I took CS. I was required to program algorithms and do proofs in a multitude of languages. And none of the languages used were taught. The basis was trial by fire. Computer scientists were supposed to be able to learn any language at any time in order to solve the problem at hand. We learned to be language agnostic and pick up the language required every 2 weeks. It worked.
Nah, not really. It just requires logical thought.
Seems unlikely you'd find it as easy as you claim then!
SJW n. One who posts facts.
I have the first three, and I have read parts of all of them. Especially "Sorting and Searching".
It's reference material. You read it when you need it to get a much (much) better understanding of what you need to do to solve a problem. That's the point of reference material -- you don't have to read it except for the parts you need. That leaves your brain free to think of important things, like where you left your coffee cup.
In fact, I keep re-reading parts just for the imaginative spark.
OK, I admit to being an assembly language addict. I think describing tasks in machine language is as stimulating as a book full of logic puzzles. (But let me still recommend ANY book by Raymond Smullyan, such as, "The Lady or the Tiger?" https://www.amazon.com/Lady-Ti... )
I also admit to programing in LISP and using Jan Lukasiewicz's notation for symbolic logic.
I suppose you should keep these things in mind while evaluating my recommendations.
"The mind works quicker than you think!"
These are books about algorithms. I've read them all, and worked the problems.
At the risk of exposing myself as an elitist snob, I wonder about the people who don't think one has to understand the basis of an algorithm, and what makes for an algorithm as opposed to a heuristic.
Decades of research went into understanding how computing machinery accomplished the things that they did. A certain Bill Gates came along and decided none of that highbrow stuff applied to the new paradigm of PC's. That's one of the reasons that we had fifteen years of the worst memory manager on Earth, in Windows. In point of fact Knuth talked in detail about this memory management as a counterexample of how it should not be done. But it was simple amd worked on PC's and hey, memory is cheap.
Knuth's books are about the Fundamentals. They're not practical guides and they never were practical guides. They are insight into how a certain variety of stochastic machine operates and the kind of things one must think about to design proper algorithms that work all the time, as opposed to work most of the time. They are the Zen of computer programming, a philosophy of thought and a discipline for creating algorithms. This is not how to write code.
It certainly isn't for people who confuse how to speak a language with how to converse.
Don't take life too seriously; it isn't permanent.
I imagine that's something like how constructing buildings (architecture) relies on engineering, and often it helps to know why a column has to be where it is, and what other possibilities there may be, to support the floor in some other way, but most of what the architect does is actually planning the layouts and elevations and how the building relates to the site and the people and their activities.
So I would imagine that a lot of the "discipline" in large projects isn't so much about pure engineering, it is often more about organising parts into systems which can be developed over time.
Like how the architect knows that where they put the hotel restaurant is going to affect where the kitchen goes and therefore where the store room goes and hence where the service entrance will likely be, and that you don't want to end up having to tear up the plan and start again because you've ended up with the service entrance being located right next to the main entrance.
If an abstraction is clean, and has zero leakage then it is fine to not understand what it is hiding. I don't know of any such things in CS, but sure in theory it would work.
Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
Yes, my UID fits in an unsigned short. So?
It does not.
CLI paste? paste.pr0.tips!
Oops, actually, it does. Never mind, I was thinking the smallest allowed range of unsigned short was [0,255].
CLI paste? paste.pr0.tips!
I used to. When the only tool you have is a sector editor, all your problems are solved with 21, 00, 00
“Computer Science is no more about computers than astronomy is about telescopes.” - commonly attributed to Edsger Dijkstra, but disputed.
[...] Mastery of the advanced studies of your discipline will make you a better than merely someone who can just get the job done.
The caveat being here that a good portion of what goes for CS at universities is essentially "How to use the vast resources of a supercluster as a glorified pocket calculator". I had the dubious honour of suffering through four semesters of so-called CS at my uni, and I can attest that you can be an incredible computer scientist and still be unable to program even modestly simple applications. And that is said without even touching upon the vast difference between CS and software engineering (and the equally vast difference between software engineering and programming, to be fair).
All three disciplines have their place. But CS is not exactly the 'advanced study' of programming.
I went through 4 years of computer engineering, some classes were shared with the CS students and some were CE specific. I found that the CE classes seemed to do a better job on focusing on making something and forcing us to learn the theory on our own so we could make that thing. In any of the shared classes the CS students were great in tests but struggled in projects, while the CE students rarely had trouble. The CS students were just as smart but I don't think the focus on theory, rather than application, handicapped them.
I've gone back for advanced degrees in CS after working in development for a few years and the theory courses make more sense as I have the background to see how they could be applied. I really wish colleges would focus more on practical work, rather than theory. Though I have noticed somewhat of a shift in that direction over the past 15 years.
I like TAOCP, a lot; mainly, because the material is so coherent, precise, well justified, and understandable enough. I spent many weeks reading sections of TAOCP; especially volume 2, on Semi-numerical algorithms; my copy has several post-it marks on techniques useful in my field (applied cryptography): wide multiplication algorithms, modular arithmetic including exponentiation, statistical tests.
I also had significant uses of volume 1 (Fundamental Algorithm), which covers things such a tree, and hash tables; even purchasing the third edition, on top of the second.
That said,
- _reading_ TAOCP from start to end is not something to consider lightly; perhaps if one has a year to spend.
- I never caught on the use of MIX in some programs; I just skip this, and advise contemporary readers to do so, even if that's missing a part of the beauty.
I agree; anyone can program, with no special effort required.
Programming so you deliver working and maintainable code on time and to budget, on the other hand...
Quidnam Latine loqui modo coepi?
As many above have pointed out, there is little reason to read the entire series "like a novel" from cover to cover, in addition to the fact that yeah, it would take a while to WORK through it like a textbook as opposed to read through it quickly to see what is there. And yeah, there are better books now in profusion on many of the topics covered, although AFAIK there is no book or book series that is as encyclopedic on the subjects he covers.
However, many people will find some of the sections very useful. I personally found "Seminumerical Algorithms" useful indeed when learning about random number generators and testing random number generators. It isn't the last word, and it certainly isn't the latest word as we move into a 64 bit world and beyond, but it is an excellent starting point. In other parts of the series there are other gems or nuggets well worth studying or reading, even if you move on to actual research papers or better books afterwards.
To sum up, it is a useful thing to own if you are doing a lot of very widely spread code development and need to acquire literacy quickly in subjects it covers, even if you are going to end up looking for an O'Reilly text on some of those subjects to get a more modern perspective. Those OR books are probably going to reference, rewrite, and augment Knuth.
Note well that I'm an Old Guy (tm) and actually did write a lot of code in Fortran once in the long ago before abandoning it for C and Unix and beyond. TAOCP was one of the ONLY really good encyclopedic references for people who were NOT CPS majors and who needed to learn about algorithms of one sort or another or some aspect of coding covered in one of the many CPS courses they never took. They (I) didn't need a course with the best textbook of the day -- we needed to get started. Once started, we knew how to learn and go beyond the start. 1.5 cubic feet of shelf space wasn't too high a price to be able to learn something about everything or anything to get started.
Even when the experts all agree, they may well be mistaken. --- Bertrand Russell.
Using books as a list of algorithm references- sure why not.
Studying these books line by line is a monumental effort which is hard to justify, if the only thing you are after is coding.
Real programming happens in your head or on a white-board with pseudo-code. Pseudo-code writes exactly the same today as it did 100 years ago, one logical step at a time. If Knuth has made pseudo-code easier to write, then I will agree with you, that he made programming easier.
Step deeper into the world and you'll be truly amazed at how deep it is ... and likely staggered that it works as well as it does.
You make it sound like some mystical complex thing. I do think that it is amazing how far computer have come, but I refuse to believe that logic, the cornerstone of programming, is some " deep and mystical" thing. The only thing I am surprised at is how difficult logic is for most programmers and how the state of programming isn't worse than it is.
But the first three (all I have read) are excellent. Yes, it takes time to work through. But it is worth it. Knowing what has gone before helps in figuring out answers to new problems. Knowing whether something is a new problem saves a lot of time.
I keep meaning to jump back in and catch up.
Of course.
And I won't be sending any resumes to Microsoft, that's for sure.
Only a person who didn't understand programming would make such a ridiculous statement.
Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
Nah, I've been programming longer than Knuth has, starting with machine language. You just need to think procedurally.
That's a major challenge for most people and the more abstract the procedure the more challenging. A lot of us here "just get it" because our brains are wired that way, if your brain isn't wired that way it's extremely difficult to learn.
Apocalypse Cancelled, Sorry, No Ticket Refunds
It isn't terribly complex now that geniuses like Knuth have spent literally decades simplifying it for you, sure. Step deeper into the world and you'll be truly amazed at how deep it is ... and likely staggered that it works as well as it does.
I've spent a good chunk of my career performing optimization of code using these types of principles and I hate to say this but we now live in a world where this knowledge is limited in its application. You have several movements most notably the cloud movement where when you have a performance problem you just spin up more VM's and scale them. On a side note, that's more financially beneficial for cloud providers but we'll leave that for another discussion. Up until about 10-15 years ago, hardware was very limited and you had to make good use of it to get scalability. The next one that's happened over the past 15 years is the wide adoption of "even more higher level languages". Remember when C used to be considered a much higher level language because assembly language was so tedious? Well guess what we have now. We have languages like java running inside of code compiled in C++ which then compiles your java code down into byte code which can directly translate to assembly language. What does this mean? It means that we are now far more removed from access to the metal to even do a lot of the optimizations that we've done in the past. With all these layers of languages you have other problems where compiler/interpreter optimization occurs in different places and that you don't have access to enough of the metal to be able to do adequate optimization anyway.
I don't mean to sound like I claim that attention to optimization is misplaced today. What I'm saying is that the old methods of optimization such as those described in this book that I learned in Computer Science, are not really applicable to programming today. The concepts are sort of useful. If you can understand the mindset required to do effective optimization you can still find creative ways to apply it in today's technology, but it doesn't directly translate. What I do find interesting is that when I look at what we had to do in ye olden days I realize it's a lot less frustrating to be a programmer today than it was 30 years ago.
We'll make great pets
He hasn't even started volume 7 on APPing APPs in APPOS 10.
It's convincing a review panel that it is valid is hard.
And you will have a hard time convincing them if the dissertation was not written with sufficient academic rigor and quality.
Dude, NASCAR, you turn left, over and over ...
Apocalypse Cancelled, Sorry, No Ticket Refunds
Have You Read 'The Art of Computer Programming'?
Once, when I was in grad school, and I kept plowing through them for a year or two after I left. I still have them somewhere in the attic. I wouldn't do it again, but I would recommend any one in CS to give it a shot. It is a good exercise (just as it is a good exercise to try at least some parts of MIT's SICP.
I wouldn't use them as a reference, though. For that, I hit CLRS, Algorithms by Sedgewick or O'Reilly's Algorithms in a Nutshell.
TAOP will make you a programming demigod as much as reading The Art of War will make you a warlord.
Open Source Network Inventory for the masses! Kuwaiba
I don't question this, but I wonder how you manage to keep the skill. I used to program Z80 assembly in the late 90s (Sharp organizers) and 8086 in the early 90s, but I can't say that I know Z80 and 8086 assembler anymore.
Or have you managed to keep up the memory by continuing to program antique devices (not a terrible idea)?
Programming isn't terribly complex.
Awesome that you think so! Now, program some realtime flight surface control software for a fly-by-wire jet and sleep well knowing that your program will never, ever, kill anyone... (Or, substitute any other safety critical software you can think of - and theres a lot!)
"Programming" (by which I really mean software engineering) is one of the most complex activities in existence...
Just don't cross the International date line east to west
Apocalypse Cancelled, Sorry, No Ticket Refunds
Really? I remember covering recursion for maybe 1-2 weeks and have been using it off and on for a couple decades. It's not complicated, just different, like almost every other aspect of programming. Head, tail, combinations of both - it's all basically the same logic as you would see in a loop, just organized differently. Some solutions are easier to express recursively. And if they're not, don't use recursion.
--- Most topics have many sides worth arguing, allow me to take one opposite you.
I've read the 3 initial volumes, and they remain a useful reference. I don't need to look there often, but when I do, TAOCP is the best reference I own.
I don't pretend to have read every word, of course. Some of the stuff on random numbers is only of mild interest, I don't really care about tape sorting, etc. I've skimmed nearly all of it, and read maybe 1/4 to 1/3 of the text in detail.
I've not yet ventured into Volume 4, although I think I'll want to do that sometime reasonably soon.
One of the most important things is knowing when you don't know enough.
TAoCP is a never-fail personal Dunning–Kruger removal tool.
I never finished the mathematics degree I once started, but I always found the larger concepts easy enough to understand when sitting beside a real mathematician.
I certainly would have difficulty completing most of the HM exercises (this despite also owning Concrete Math). I rarely have difficulty understanding the form of the solution if I cheat and look it up.
Another book I'd put into the same category, roughly, was the original Applied Cryptography where it ought to be far more obvious that one shouldn't naively roll one's own, but somehow, for too many DK-impervious DK-permeable programmers out there, it isn't. (I'm looking at you, Wi-Fi Alliance; and every idiot who ever used the speedy MD5 to hash a password database, with or without salt, or worse.)
There's little wrong with Knuth's exposition that actual competence wouldn't fix.
You do the math.
PHP's ease of use and widespread popularity has certainly allowed for the creation of some very hideous abominations. However, PHP itself doesn't deserve the rapp that was brought on by the "know enough to be dangerous" wannabe programmers.
The GP may mean that it's difficult (complex) to write noncomplex, but good code.
I read the three volumes in college. I was a chemistry major, so this was all my own doing. I had built an eight bit computer in high school, a SWTPC 6800 machine. During college I became an assistant sysadmin on a DEC system- 10 minicomputer in one of the chemistry professor's lab. I still have to this day a deep interest in both chemistry and computers. These three volumes were the basis of my informal computer science education. (My formal education resulted in a Ph.D. in Physical Chemistry.) I was especially intrigued by the sorting algorithms and coded several of them in different languages for comparison of their operation.
The books are a fine examples of mathematical typography and I became an early adopter of Knuth's typography software TeX and Lamporte's LaTeX. I was the first person in the UIUC chemistry department to digitally typeset their dissertation and print it on the department's laser printer attached the the VAX-780. I investigated WEB (the self documenting language that TeX is written in) as a possibly useful programming tool, but found it to be much too cumbersome.
Others in this thread have commented on how miserly the algorithms are in their use of bits. The powerful processors and gigabytes of RAM available in desktop computers and even some portable devices can lead to bloated and sometimes inefficient programs. With the increasing tide of IoT devices with limited computational resource and available power, a miserly mindset can lead to more functional programs and better battery life. Even GPU programming lends itself to being miserly in the use of resources.
This set of books is not something to read to learn how to program. These are the volumes you read to become a craftsman and more than just competent at programming.
$60 for the Kindle edition? It's hard enough to slog through without having the nagging feeling you're being milked.
Mission: To provide products that consume time and energy as entertainingly as permitted by the laws of thermodynamics.
It's hugely useful for that. You can read it in snippets. Reading it as if it were a novel would be about as smart as reading a dictionary that way--not necessarily a terrible use of time, but more of a slog than the average geek is going to be able to manage.
You're just nybbling away at the parent's ego now.
I've fallen off your lawn, and I can't get up.
Its irrelevant these days, since commercial programming is no longer an art.
Programming used to be an art. Art implies using innate skill to create something intrisically elegant/beautiful and mostly intended to be around for a while. Since this book was written, most institutions have done all they can to remove all creativity from programming, turn it into a braindead dumbed down repeatable process so companies can get away with hiring even the cheapest most clueless people to write software. Ive seen time and time again that there is no reward or recognition for writing elegant, stable code.
All the rewards/recognition goes to those who bodge together a quick unstable hack not suitable to be maintained or to last longer than the 10 minutes required to convince the boss to check the "done" box. They move on after blowing their own trumpet and leaving a "TODO: rewrite this" comment for other more careful people to find and repair their damage. But the managers don't see that part.
Yes. But more importantly, I can program in 6809 machine code. Including building all the index modes. Which, back in the day, is one of the things that saved me from having to design in, and then program, CPUs like the 6502 and z80, both of which are seriously anemic by comparison. But I prefer to program in assembler. Because I'm sane.
My affection for the 6809 ran so deep that I wrote the 6809 emulator you'll find here, which required me to implement the entire instruction set from the ground up.
But yeah, I can write machine code for about 10 microprocessors. And you know what? In the day... that was useful. I could read (E)(P)ROM dumps, I could cold-patch... but today, I just wish I could get the brain cells back. :)
I've fallen off your lawn, and I can't get up.
Well... no, it means that you are, perhaps. Some of us still write in c or c++, and keep our attention on the details. You can tell you've run into one of us when the many-functioned app you get is a couple megabytes instead of 50, runs faster than the fat ones, and doesn't suffer from black-box bugs inherited from OPC.
I always thought that the user's CPU cycles and memory were things a developer was obligated to treat as the user's valued resource, and so not things to waste.
I know, totally out of date thinking. It's ok, I'm old, I'll die soon. :)
I've fallen off your lawn, and I can't get up.
Not necessarily. For one, you should make the code readable by a typical developer, not an ideal developer. You cannot control all future staff. That means you have to try to think like a typical developer, not an ideal developer, and that may exclude ideas that are "logical" to you.
Second, having a feel for how things tend to change over time helps one design code that is better able to handle future changes (fewest code changes and disruptions). That often requires experience in both coding and the domain at hand, and a feel for how and when fickle managers/customers change their minds.
That's not direct logic, per se, but a combination of general experience, domain experience, and experience in human nature.
I wish it were merely about logic. Life would be easier, especially for us nerds who tend to have sub-par people skills.
Table-ized A.I.
My preferred book is: https://www8.cs.umu.se/kurser/...
I basically bought it because it is a superb hand craft (I mean cover, paper and print).
The contents is an easy read. When I bought it, it was the most expensive book I ever bought ...
To sad that the announced second volume never was published.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
I still have Volumes 1, 2 and 3...gathering dust.
I first started programming in 1962, on IBM 1401 (dearly loved it's variable-length memory management) and IBM 704 (briefly, before it was replaced with a 709, then the 7090). I used to take a massive printout of the IBSYS operating system for the latter to understand how real people wrote code to achieve an outcome; that was back when programmers still felt it was essential to write comments to explain what/why that specific code was there, and its' purpose). At the same time, I was a junior member of a group of "code sharers" at C-E-I-R; we evolved a punched-card deck for the IBM 1401 that became the basis of every program we subsequently wrote (I ran into the deck, called "CELIB"--for CEIR Library--several years later in a consulting gig in Australia, where they'd been using it for more than a decade after originally getting as part of a contract delivery...which my name in some of the comments). I was also engaged in running huge "linear programming" models on the 7090, such as one that forecast the likely economic consequences to the U.S. of removing the tobacco industry (i.e., abolishing the manufacture and sale of products), but the code was written by my more mathemathically endowed superiors, Eli Hellerman and William Orchard-Hays and you may know it as LP90, which was posted to the SHARE library at IBM; I just wrote some utilities.).
So, by the time Knuth published, I was an experienced programmer, and I devoured his books with interest. Like many programmers and professionals in allied fields, there were lessons to glean (like, "Wow, that's clever," or "Hmm, that's an interesting way to look at that problem"). I'm sure they influenced me, but it was not a "cookbook" to me. After I read them, they went on a shelf, and moved from home to home, and they still reside in a prominent place on my bookshelf, but gathering dust.
Programmers, today (especially those under 35 years of age) seem to eschew the idea that anybody else's code could be educational, and I find that an odd and juvenile approach to the world. We must stand on the shoulders of giants, and I still, to this day, learn new techniques and insights (and folly) in others' code. But, I got here (now aged 75, and still writing the odd bit of code; even CMD language) by learning from others, for no ONE of knows as much as ALL of us.
Driving a car isn't hard millions do it.
I've waited until I was 37-years-old to learn how to drive. My father wasn't going to teach me as a teenager to drive stick on his one-ton flatbed that he put a million miles on in ten years. Since Silicon Valley has a well-developed transit system, I got around just fine without having a need for a vehicle. One day my father abandoned his old car in my carport. I had not choice but to get my driver license and take possession of the car. Took me three years to find out about all the repairs that he didn't tell me about. It's easier to own a car when you're more mature and financially responsible, especially if your father is DIYer who doesn't believe in mechanics.
I'm calling BS on Silicon Valley having a well-developed transit system. You may be confusing SV for SF. VTA transit routes (e.g., the transit agency responsible for mess that is silicon valley) have decided that the only viable transit corridors/routes are south san jose to downtown san jose and mountain view to cisco (aka north-sanjose). Ever other place gets fragmented bus service with no-transfers (I guess if you are a monthly pass owner you don't care about cost of transfers). With the current frequency, each transfer can cost you 15-20 minutes, it can take hours to get to where you are going. Local companies have pretty much given up on VTA and fund their own shuttles to Caltrain for the last mile, but that doesn't fix the "first-mile" issue (getting from your apartment to Caltrain or light-rail).
For example, in my old place, I tried to commute by bus for a couple weeks when my car was in the shop. Luckily I lived only 3 blocks from the nearest bus service, but that's because that bus winded through neighborhoods to get to the Great America transit area (where lots of bus lines intersect/terminate) just to get another bus to my job in Santa Clara (in the heart of Silicon valley) which terminated in a walk of about 15 minutes to my office. Total transit time by bus during commute time 1.3 hours vs average time in car 20 minutes. Needless to say, after 2 days, decided to rent a car. I used to also used leave my car at the office and got to SJC airport for weekend trips. The office to SJC (which is 10 minutes by car) required a 10-min walk, two buses to eventually get to Santa Clara Caltrain station where I could take the VTA flier (bus route 10), took about 50 min to an hour (again because of transfers)...
Because Silicon Valley is so spread out, the bus transfers and the frequency are total killers in trying to get from point-A to point-B (unless those points are walking distance to light-rail or caltrain). Even on medium frequency routes, there is little bus service because it centers on community college routes and retail locations like the El Camino Real corridor (which they are looking to upgrade) and the 87-to-cisco corridor. Unfortunately, it's a pain in the ass for any other potential user because sub-urban sprawl makes the population density sucks for bus service.
Yeah I voted for the VTA tax increase, but I have the suspicion they are probably just gonna spend it on prep-work for the California high-speed rail project, not making any better transit system in the valley...
This is difficult to answer, since TAOCP is tied in with my early education. I went through all three volumes more than once, although I never solved all the problems. (The third exercise is to prove Fermat's Last Theorem. In my copy, it's listed as difficulty HM50 (HM for Higher Mathematics, 50 was a major large-scale research project on his more or less logarithmic scale), and I've heard it has been demoted to HM47 in later editions.).
A lot of TAOCP is excruciatingly detailed analysis of stuff approximately nobody actually cares about anymore. Some of it is completely inapplicable nowadays, such as exact timings of programs. The half-volume on sorting is primarily concerned with in-memory and tape sorts, for example, and the intricacies of different sorting methods with multiple tapes are of no use today. In the original three volumes, everything was single-threaded, although coroutines were in Volume 1. There are good algorithms books nowadays, and I don't remember any but TAOCP back then.
Most of TAOCP is of little practical use nowadays. Pretty much everything it covers is taken care of in libraries in modern computers (or even in hardware, such as floating-point numbers). There's much that's useful for someone who wants to understand how the libraries do what they do, or even create one. I used Volume 2 as the foundation for my entry into a programming contest to do 32/64-bit multiplication and division efficiently on a Z80 (about the only time I used the dual register banks)..
What I gained from it was partly fundamental education and deep understanding and partly mindset. I can't honestly say what anyone would get out of it, although I'd suggest anyone who's interested in what's underlying what they do read part of it and give it a good shot.
"When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
Knuth is giving his annual Christmas lecture on Thursday, Dec 8, 2016, at 6:00 pm PST in the Huang Engineering Center's NVIDIA Auditorium. It will be webcast. See: http://www-cs-faculty.stanford... All of the previous lectures are online.
Volume one was my textbook for Algorithms many, many years ago, so I read it. I read volumes two and three when they first came out. I read some of the bits of volume four A. When I read 1-3, they were the best or only sources of their content. One of the key features is the use of assembly language for a mythical computer (later revised to be more RISC-like). i wrote an interpreter for MIX for my computer architecture class. Possible programming languages in the 1960s were FORTRAN, COBOL, ALGOL-60, IBM's PL/I, and IBM-s APL, and compilers did not optimize. The obvious real computer architecture to use was the original IBM 360 instructions set (Principles of Operation). Choosing any one of those would obsolete the books in five to ten years after publication.
My fantasy is to publish the draft of the original two volume Art of Computer Programming, started in 1962. When he started rewriting it, he planned for seven volumes, which are outlined on the end papers of the published volumes. The two volume original is a snapshot of Computer Science in the early 1960's.
PHP has many many idiosyncrasies that violate the principle of least astonishment.
Programming is made to be complex. Unlike surgery and aerospace engineering, you make up your own rules with programming. It's like you can make a virtual world with all kinds of useful laws of physics. Of course, the more complex you make these laws, the more difficult it becomes. Most programmers, given enough time, will turn any project into a ball of mud.
https://www.cs.virginia.edu/~evans/cs655/readings/ewd498.html
Dijkstra on Cobol and Basic. Bias worse than yours towards PASCAL, even if it happens to be true.
I only look human.
My mother is a halfling and my dad is an ogre, so that makes me an Ogreling
Don't feel bad. These things build (unsigned) char-acter.
Tee-hee.
Of course, that's still assuming your architecture has eight bits per byte. -PCP
No, none of that assumes anything 8-bit, except by that fact that CHAR_BIT cannot possibly be *less* than 8.
And even then, the minimum allowable ranges of integer types are actually specified in terms of intervals, not in terms of bit widths.
I.e. it's perfectly valid to implement C on a 13-bit platform and still have unsigned char be able to hold values no bigger than 65535. Likewise, regardless of how many bits per byte, signed char need not be able to hold values outside [-127, 127] (no, not -128)
(My brainfart does not mean I don't know my C.)
CLI paste? paste.pr0.tips!
You are correct. Thanks for clarifying that.
It takes a lot of thought processes to write simple (and good) code. It's kind of like writing in general (text). It's easy to write out thoughts, but for most it takes a lot of work to make it clear and compact.
I can re-visit any page of manuscript and code I've written and usually find ways to simplify and improve it: remove redundancies (factor), use better variable names or pronoun references, etc.
And I'm sure if more readers visits it, they will have suggestions for further improvement: more perspectives help. I know how my head processes info, but we are usually writing for other heads.
There is probably a point of diminishing returns, but the first few drafts of code or manuscript are rarely close to being optimized.
Table-ized A.I.
The pascal article was satire, in defense of abstractions by "Ed Post" (whose name I thought was a stand-in for 'editorial post' when I saw it,) in 1982. A lot of the crochetty old nerd guard was getting antsy about making computing into the use of a 'black box' or simply bragging about their arcane skills, and bemoaning that the programmers of today wouldn't be able to hand toggle their way out of a locked filing cabinet. Same as some linux folk (who are becoming increasingly rare,) who insist that anything you can't do on a command line isn't worth doing. Like all satire, there is some merit. But mostly it's just good laughs of the "Get off my lawn" variety. Thanks for that link.
Speak for yourself.
I believe he completely reworked that in the new versions
He plans to, but hasn't yet. The current edition of the first three volumes (the third) still presents all of the examples in MIX. Volumes 4+ are written using a more modern MMIX.
Proud neuron in the Slashdot hivemind since 2002.
I'm calling BS on Silicon Valley having a well-developed transit system.
I live in San Jose and work in Palo Alto. Most mornings it takes me exactly one hour from my front door to take a local bus down the street, pick up the express bus to Palo Alto, and another local bus to the front door of my workplace. The afternoon commute is one to two hours long, depending on 280 traffic. Or four hours if a gravel truck spills across all lanes like it did a few months ago.
http://www.nbcbayarea.com/news/local/Gravel-Truck-Overturns-Blocks-Multiuple-Lanes-on-I-280-394043641.html
VTA transit routes (e.g., the transit agency responsible for mess that is silicon valley) have decided that the only viable transit corridors/routes are south san jose to downtown san jose and mountain view to cisco (aka north-sanjose).
That's correct. Homes in the South and jobs in the North determined the transit lines back in the 1980's. VTA was supposed to have a half-dozen East-West light rail lines but those were never built. When San Carlos got shutdown as a street through San Jose State University in the 1990's, the county built the foundations and covered it up with 18 inches of top soil for a future light rail line. The only major East-West line being built is the BART extension from Fremont.
Santa Clara (in the heart of Silicon valley)
Santa Clara (Intel) haven't been the heart of Silicon Valley in decades. It's Menlo Park (Facebook).
[...] (unless those points are walking distance to light-rail or caltrain).
That's why mixed-developments with stores on bottom and four story of apartments on top are sprouting up along the transit lines. If you don't live near a major transit line and don't work near a major transit line, blaming public transit isn't going to fix it. I live near several major transit lines, so I'm an hour away from work in North San Jose, Mountain View or Palo Alto.
I made it through V1 and half of volume 2 a few years ago, and found myself frustrated.
For myself, Godel Escher and Bach feels to me to be more useful as a programmer mindset book (or is that just me) or Unix Power Tools for practical guidelines,
And yeah - a lot of it is above my level of mathematical sophistication - I topped off at modern algebra, and I concede I fin it frustrating that I can have a reasonable grasp of number theory, encryption, and matrix arithmetic, and still be going "Wait, whut?" in these.
An Invisible Entity of Vast Power whose existence must be taken on faith alone: Liberal Media
It was the best comprehensive collection of information at the time it was published, and it's all still valid (if somewhat dated as far as specific examples). What has changed is the tradeoffs and power of systems. If you're not doing tiny/cheap embedded applications, you don't care about economizing quite as much. OTOH the concepts of algorithmic complexity are even more important than before because of the huge scale of online systems.
I've occasionally thought about reading it, but one of the things that always stopped me is doubts about how relevant it still is today. Could you comment on that?
This book was written when computers only had one core and multithreaded algorithms weren't a thing. When there wasn't such a thing as vector units, to say nothing of massively parallel processors like GPUs. When performance was entirely determined by computation, whereas today it's often dominated by memory access. The factors that go into designing a good algorithm today are really different from what they were in the 1970s.
Even aside from that, there's been a lot of progress since then. Maybe it's a great reference for 50 year old sorting algorithms, but there are better algorithms known today.
"I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."
I own all of them, but to be honest I haven't cracked any book at work since at least 2009. I work on a web services-based POS, a fairly advanced but typical piece of technology for the working world. My comment shouldn't apply to programming in a research environment, but most people aren't doing that type of programming. I'm talking about your average piece of software.
Most programming "in the real world" is maintaining other people's code and making incremental improvements.
The first art of computer programming is figuring out other people's mistakes and correcting them. The second art of computer programming is communicating the work you've done to the next person. The third art is writing code that is so straightforward that an inexperienced programmer can understand what you did so that he can fix your bugs and make his own incremental improvements.
The information in textbooks and books such as TAOCP has been available online for a decade. On the rare occasion that you as a programmer have to do a computer science-y thing, a Google search followed by research is your best course of action. Using books is just outmoded nowadays.
I've been programming since the 1980's so take this with a grain of salt. If you still use your dead tree library then more power to you. There is a different style of programming for every programmer. We have three full-time programmers here and we all have radically different styles but we barely write down anything and there isn't a single programming book in our current office. We barely use paper anymore. I personally write down no more than about 50 words a week.
There is a philosophy I subscribe to that if you can't explain something to your mother, then you don't understand what you're doing well enough. TAOCP is dense stuff. The information is there, and it is conveyed correctly. But that's the science, not the art, of computer programming. Sorry, Knuth.
Back in high school, I thought I was the most badass programmer on this planet. Could hand assemble code and hyper-optimize my programs counting clock cycles everywhere. I got into college. There was a book on algorithms in the small library the computer room had. I learned about asymptotic behavior. So I realized that my cleverly optimized O(n^2) sorting assembly program was going to eventually lose badly to a straightforward interpreted implementation of quicksort. Clearly I had to become good at this. I started reading all books I could find on the topic and very quickly I noticed that they all included a sentence meaning "If you want to understand the subtle underpinnings of this, see TAOCP." So I got a copy of volumes 1 & 3. It was expensive (I was not in USA and books were VERY expensive because of currency exchange issues). Mom & Dad chipped in and I still thank them for that. I borrowed volume 2 from a friend.
I decided to go though the book solving all exercises up to level 30. Saturday was my TAOCP day. I cannot say I read ALL of the text nor that I solved ALL problems of difficulty below 30, but I solved all that I tried and they were way more than a few. I even solve some in the 35 level, whenever I considered them interesting.
FF to the beginning my PhD studies at a good school in the USA: When taking the grad level Algorithms class, I was doing VERY well. The professor, a scary smart guy (now full professor at Stanford) asked me how may courses on algorithms and information theory I had taken. The answer was none. My undergrad degree was in Systems Engineering, from a crappy school in South America. I was never formally taught what a big-Oh was. That professor become my thesis advisor. He used to joke saying I was a walking encyclopedia of algorithms.
Will it work for everybody? Probably not. If you want to do theoretical CS, as I did, you will have to handle that math and some more anyways. CLR is more up to date and time efficient for learning. If you want to be a software engineer, chances are you are not going to be doing the heavy math, you will be using off the shelf algorithms.
Still TAOCP is a hell of a reference. Funny thing is, after finishing my PhD, I browsed through it. It looked simple, not very formal at all. I guess PhD does mean "permanently head damaged" :-)
... you can try Godel, Escher, Bach: An Eternal Golden Braid for some light reading
It's a shame that DK got distracted by Typesetting and TeX for so long.
I'm glad he did. I like TeX/LaTeX.
It is often said that a software architect is your best programmer. The architecture is highly dependent on the implementation and the implementation is highly dependent on the architecture. If the architect is not good at implementation, you get an ivory tower issue.
It is actually part of the architect's responsibility that they make sure the system is implemented the way they envisioned. Leaving the implementation details up to the developer or programmer is just asking for trouble. The responsibility of the architect does not stop at the software. They are also responsible for the hardware and network.
The architect is supposed to take a holistic approach and understand EVERYTHING from security to hardware to optimizations. Ideally, you have exactly one architect and everything is made to fit their vision. In practice, people leave companies, take vacations, and other thing happen. You might have one or two co-architects. It doesn't matter the size of the project, one person to rule them all. If you have more than one person, you will not get seamless integration among the many systems. The end goal is you have one unified vision, and you can't have that with more than one leader.
'supposed to be" ???
clearly you haven't been paying attention. All the attack vectors we currently have in code are because of the lack of coders, er, uh, sorry, I know you prefer the term 'developers' these days, don't do any-damn-thing about doing inputs testing or overflow, invalid input, etc.
So, don't climb on your high horse and lecture about how the 'best textbook' doesn't teach a damn thing about them, when that led to the code we now have to try to make secure.
So, also, if all that is, "... a given...", then why is none of it done reliably????
Ramble ramble, gurrr gurrr, hear me roar.
Oh, I've been paying attention. A significant chunk of my professional experience (22 years) has been involved in secure programming and in scanning and fixing vulnerabilities left by accident (or more often than not, by incompetent developers) in the commercial and defense sectors. I'm not exaggerating that my entire career has been devoted to fixing other people's fuck ups. So when I say something it is (most likely) because I have some experience in the matter. I am not an authority in the matter, nor I claim to know it all, but I sure make sure to check my premises when I speak.
People are sloppy, plain and simple. Cobbling security concerns in an algorithm book accomplishes nothing. There are tomes and tomes of material out there regarding secure development, security and what not. There are online encyclopedias devoted to secure programming in, say, Java or C/C++. A entire web site (https://www.cert.org/secure-coding/) is devoted to canonical attack vectors and remediations. There are industry standards out there, for anyone to read, regarding secure coding. Take the MISRA C guidelines or the Ada Ravenscar Profile for examples.
If people aren't bothered to even do a fucking google on the most common attack vectors when developing a web site or a device driver, what makes you think they will pay attention when technology-specific secure coding details are embedded in text designed for mathematical description of algorithms?
It is called separation of concerns. That exists for a reason, and any secure developer worth a damned shit knows why. Separation of concerns does not mean ignorance of concerns. The fact that you do not know the importance of this (and its implications) made me suspect the quality of the work you (if you do any work at all.)
You do not pick a book about Operating Systems or Hardware Architecture and expect a description of routing protocols, do you? If you pick a book on security, say, attack vectors or public key infrastructure, you do not expect to find a discussion on lower or upper bounds for a distributed hash algorithm, do you?
Same deal with security. You pick a book about security, and you study it. You pick a book about algorithms and you study it. You pick a book about operating systems, and you study it. You pick a book about networking, and you study it. And so on, and so on. And you do so throughout your studies and continue to do so throughout your career.
Expecting all shit to be cobbled together in the same book gets you one of those mediocre "Be a Rock Star Programdude in 24 Hours" kind of a deal.
Sorry to bust your bubble, but it is people like you that litter the software industry with crap that the rest of us have to clean. I guess I should be thankful for it, because fixing shit written by others (specially when it is critical) can be a financially rewarding experience.
These are fantastic books, but they are not meant to be read cover to cover. They are reference volumes. Before the Internet this was what we had.
:-)
Had to laugh at the posters that say the books are too hard. In the early days of software development you wrote your own database...from scratch. Your program started with a loop that read the keyboard... You decided what key did what... You wrote your own screen handler... In the early days of the PC you modified the memory of the video card directly to draw things... So if you wanted a circle, you needed to know geometry!
I'm not saying those days were better by any means but algorithms do to things like maintain tree structures for your database indexes was a VERY hot topic of discussion around the "Dat water cooler.... And yes, I'm old
Murphy was an optimist
Well I was talking about Standard C (de-jure, K&R C was de-facto at best), but interesting real-world reason to violate it regardless. No, I haven't had the pleasure with 4 bit MCUs yet.
CLI paste? paste.pr0.tips!
There are designers, who are creative, and programmers, who are code monkeys.
There are binary thinkers, who are tools, and people with cognitive nuance, who are awesome.
I picked it up again some 5 years ago, and the pseudo-assembly code totally turned me off
Logic is Universal. It does not mean you will come to the same conclusions because of many factors including knowledge, experience, and personal preferences. The logic used to reach the conclusion should be easy to understand for other logical people.
A tip off that you're not thinking logically is if you need to constantly change your mental model. There has been research where a logic test is given to students entering a Computer Science major. They used a pseudo-code language with no rules given and told the students to interpret it. Several examples of input and output for the language were supplied, then a question was asked about a different input, what was the expected output. They gave this test several times throughout the student's carriers. consistency was key. Students who came to the same conclusion, even if they were "wrong", were typically the best programmers. They even tried this test out on students with zero programming background and in other majors, and they got similar results.
Regardless of knowledge or experiencing gained, if you can't come to the same conclusion for a logic test, it's because you're not being logical.