tags:

views:

1194

answers:

17

All over the net I read people recommending "Introduction to Algorithms" by CLRS as a "MUST READ" for EVERY programmer, but actually, this book, although great, is not even close to being just an introduction, and recommending it to beginners is definitely totally wrong.

What's your opinion on how many programmers have read the whole, or even more than 50%, of the book with full understanding?

A: 

I haven’t read it at all.

Bombe
+5  A: 

Even when I was using it frequently, I found CLRS most useful as a reference book. Reading it cover-to-cover always seemed a daunting and infeasible task. (I'd also say the same for many of the other similar books on my shelf.)

Reuben
+8  A: 

I just read a great blog post on this, Books Programmers Don't Really Read.

He divided books into two categories, books programmers have actually read and the books programmers say they have read and sit on their shelf.

He placed "Introduction to Algorithms" in the latter category. I own the book, and I've done maybe 5-6 chapters out of it but much the material is out of reach for me without taking some significantly higher math. I agree with many of his choices. Again, you are going to have many people disagree because they themselves really did read a book on his "books programmers don't actually read" list, but I think the generalization stands.

Simucal
very good blog post, I read AOCP couldn't finish it though, my IQ wasn't enough for that :)
dr. evil
@Slough, ugh.. AOCP is seriously daunting.
Simucal
@Simucal: Thanks for endorsing my blog post. I was curious if everyone here would agree/disagree with my picks. Based on the few responses to this question, it looks like it's pretty much split. :)
Bill the Lizard
@Bill the Lizard, No problem! I was kind of hoping you would stumble on to this page. They need to have a way to message users or a wall you can write on of theirs. It was a good blog post.
Simucal
A: 

I used it as a text for my first undergraduate algorithms class in University. I suspect that's where most people are exposed to it. It is a reference book; and attempts at reading it cover to cover should probably done by skimming the pages until you find a topic you find interesting.

"Algorithm Design", by Kleinberg and Tardos works better as a introductory text in my humble opinion. Better pedagogy, and less material.

Ubiquitous
A: 

I took a two courses in algorithms that together covered two thirds of the book, I intended to read on my spare time the rest but probably read only a few more pages...

+1  A: 

I'm one of the people who recommended the book here, but I haven't read it cover-to-cover. I doubt many people have. But I still say you could use it as an introduction if it's not your ambition to read the whole thing. The book is fairly easy to read, about as easy as it can be given what it covers. You may want to skip some of the math theory at the beginning at first and go back and pick it up as needed.

Maybe you'll read 25% of it. Even though it's a big book, the chapters are fairly independent, so you could pick out the 25% you find most relevant. The part you don't read is good to have as a reference.

John D. Cook
+1  A: 

How many people have read all of Knuth, much less worked most of the problems? I doubt that even the MIT Analysis of Algorithms course does the whole book.

Personally I like CLRS, and refer to it fairly often, mostly to answer questions from other people. If I were really an academic, instead of playing one, I'd refer to it even more.

Charlie Martin
"How many people have read all of Knuth" I have (a long time ago). " much less worked most of the problems?" Ah. Got me there.
Paul
"the whole book": which of the three^Wfour?
Adriano Varoli Piazza
Most of the problems in Knuth is the best you could do. He threw in a few that were unsolvable, so no one can claim they've worked all of them. :)
Bill the Lizard
A: 

I've read the majority of it, although not in a sit-down cover-to-cover session. I've done some exercises and implemented a number of the data structures. I teach from it - or at least use it as first go-to reference - so have a responsibility to be pretty familiar with it.

That said, I'm still on the first edition, which I got for a song :)

HenryR
A: 

I've recommended it, but haven't read it cover-to-cover. If someone asks for a good data structures or algorithms book, I assume they aren't a beginner and recommend this book. But if someone has never written any code or done any math, I wouldn't recommend this book either.

Mongoose
A: 

I've never recommended it for cover-to-cover reading. It is best used as a reference. The fact that such a massive tome is titled an "introduction" is a testament to CLRS's pomp and condescension. But I still recommend it.

moffdub
A: 

It is good to be aware of different algorithms - a good algorithms book will have a section at the front where the algorithms are discussed - the pros, cons, situations to use, situations to not use. Something that can be read in a couple of hours, written in a clear, easy to understand way that doesn't send you to sleep (unlike "Concurrent Systems").

When you encounter a situation where you need to use one, you will know which one to use, and you will also have the book with the implementation in to use. Note that the "need to use one" will probably be a programming assignment in school/university, and after that you'll be programming to a platform that includes best-of-breed implementations of most algorithms and data structures.

Then you get a job as an embedded programmer and suddenly you need to implement XYZ because you need the speed, and you don't have an API any more! (Then you realise you need a non-blocking implementation, and the book doesn't do that ...)

JeeBee
A: 

I can say that I've never read it, but I have several other books on algorithms. I have a lot of books that I haven't read cover to cover. I read the parts that interest me and then if I find enough value in them I will keep them for further reference as needed.

I've been programming for 28+ years and I have a couple of books that are that old that I still refer to.

Don't be concerned if some material is beyond you. If you need it, you will learn it when the time is right.

bruceatk
A: 

Actually, I began reading it cover-to-cover two weeks ago.

Martinho Fernandes
+7  A: 

The question contains some faulty premises.

CLRS is a textbook, not a novel. It's not meant to be read cover-to-cover, any more than any other textbook is. It's meant to be studied.

In this case, there are some great supporting materials freely available, which make the study process easier. There are excellent videos from an MIT "Introduction to Algorithms" course (http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-046JFall-2005/CourseHome/) taught by one of the co-authors (Leiserson) and one of the brightest young minds in Computer Science (Erik Demaine).

There are also detailed summaries of the videos available at: http://www.catonmat.net/blog/category/introduction-to-algorithms/

Unfortunately, the questioner writes "it's not even close to being just a Introduction, and recommending it to beginner is definitely totally wrong," which is nonsense. It most emphatically is an Introduction-- if you think this is difficult stuff, stay away from the advanced works in Algorithms. Furthermore, one has to ask what kind of "beginner" one is thinking of here: a beginning programmer, or a beginning Computer Scientist?

This is an Introductory book in Computer Science, and is an excellent starting point for anyone considering a CS education. It is not an introductory programming book, and shouldn't be recommended to people not interested in CS. It is not a must-read for every programmer; only for those who want to lift their craft via CS.

And yes, I have read it.

Michael Dorfman
+1 for not novel. -1 for nonsense
Marcin
Do you disagree with my assessment? Can you recommend some other introductory algorithms textbook which is more suitable for, say, first-year CS students?
Michael Dorfman
Well, of course it's not meant to be read like a novel, but to be studied. My point is this book is much much more than just Introduction, and people (outside of CS world) just wanting to learn basic programming are suggested this book, which I think is wrong.
Jox
+2  A: 

Michael Dorfman says it well, but a bit too polite. I'd say "if you think this is difficult stuff, please stay away from writing software" Please don't say it is too difficult. Please don't say it is too much work. Take the time to bring up your knowledge and learn.

Algorithms are the fundamentals of software. Unless you're working as Coder #9 from a tight, detailed specification, you need to understand the basics of algorithms. What's that you say? You don't actually write stacks and queues and trees on the job? Probably true for many, but you use them every day even if you never write a lick of code--they're in every piece of software you use. And, as a software professional it is your responsibility to have a foundational understanding of how things software work. If you don't, you can't use the tools effectively. And if you can't use the tools and libraries effectively you are not, by definition, good at your job.

Oh, and, yes, I have read it, studied it, and taught from it.

A: 

I haven't read the entire book, but I have recommended it before. In that instance, the person asking wanted to know specifically about algorithms analysis. I have read those chapters (2 - 5, they were required for a college course), and they're quite clear and understandable. I should probably have made it clear that I was only recommending those chapters for that specific purpose, and not the entire book.

CLRS deserves the reputation it has as the "Algorithms Bible". Not many people really read CLRS or the Bible, but many people claim they do. Some people who do read it, think it is the only book that really matters. Many people who teach from it consider it blasphemy to get information from any other source.

If someone asks you to recommend a book to them, they're asking you what you would read if you were in their shoes. So put yourself in their shoes and be honest about it. If you would get your information from Wikipedia, then tell them that. If you think Sedgewick or Horowitz are better algorithms books for C++ programmers (for example), that's not blasphemy, it's just common sense. Don't send someone off to read CLRS if that's not what you would do, or what you have done, in their same situation.

Bill the Lizard
+2  A: 

It's an encyclopedia. Only smart, bored children read the encyclopedia cover to cover.

Norman Ramsey