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.
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
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.
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?
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
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.
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
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});
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
Yes but. I used to declare variables overly large as a kludge to help out when error-trapping was consuming too much time and I knew that the compiler wasn't good with overflows. So I'd do input error checking up to the point where it started to take too much time, then declare a variable larger than reasonable input would be, and then attempt to trap and reject input at a length between reasonable input values and the declared variable size. Declaring a variable just larger than the input buffer was one specific way to address attempts to force overflows through buffer overruns. Yes it was a horrible kludge and can't survive any sort of dedicated attack, but it served to deter casual probes looking for exploitable boundary condition errors.
Of course the better answer is to not use an OS and compiler that sucks so bad that the basic io buffers and basic overflows are exploitable, but sometimes you gotta use what you have.
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.
"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.
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.
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.
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.
He hasn't even started volume 7 on APPing APPs in APPOS 10.
'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.