Live data from Hacker News

Algorithms by Jeff Erickson

jeffe.cs.illinois.edu

141–150 of 162 posts

Re: Algorithms by Jeff Erickson

#141

I think there are more than enough books to learn algorithms now. But there are a very little amount of resources that teach how to use them to solve problems.

what about leetcode?

Good practice tool, not for learning though.

Re: Algorithms by Jeff Erickson

#142
post #5

From https://jeffe.cs.illinois.edu/teaching/algorithms/hwex.html#... > Please do not ask me for solutions. With very rare exceptions, I will say no, even if you are an instructor. I recognize that my stance limits the utility of these materials, especially for self-learners, but I'm trying to optimize the learning experience of my own students at Illinois. The point of homework is not to solve that particular homewor…

I like the awesome-algorithms link, but some of the code linked is definitely not perfect. A few questionable things from one of the header files [0] in https://github.com/TheAlgorithms/C:

- Defines a macro with no parentheses

- Uses unsigned for length and capacity (should be size_t)

- Uses () instead of (void) for an empty parameter list

- Useless use of "extern" for function declarations

- I think that leading double underscores and structures ending with _t are reserved identifiers, but I don't really have a good source for this

[0]: https://github.com/TheAlgorithms/C/blob/master/data_structur...

Re: Algorithms by Jeff Erickson

#143

Earlier quoted context omitted.

Why are you so mad. Your argument is so overblown that even the modicum of value that is in your argument is rendered useless. Why don’t you ask people to invent math, then, and not show them the way? Why even teach anything? Of course people learn by checking their proof and being thorough, but it’s up to them. Solutions can provide certainty for people, much like how peers and peer review system can in science. Eve…

I TAed for this course. That's why I'm so mad. I have a personal stake in this game and you're talking out of your ass. I ain't asking them to invent math any more than I ask a painter to invent painting, or a writer to invent writing. Do they have solutions guides? I'm not asking anyone to invent math. I'm asking them to work through the solutions and attempt to find a proof themselves. A _proof_. Not a solution. Ch…

Your analogies are actually terrible. If you can’t see it, I am sorry.

And also, this is not reddit or Twitter. Hell, the reason why you are being this angry is probably because it’s a forum like this. People here won’t respond to your anger like a troll. If you like the response, keep going. Everybody has their own psychological quirks.

I honestly don’t have time to read the entirety of a book I am commenting on. I never said I read the book. So you clearly know more about the book, more about the professor, etc.

But that doesn’t give you the fucking right to rage, does it.

Out of personal curiosity, I have read your comments in other threads. You get angry. A lot. For no reason. If you are educated and have a lot of stake and experience, you should at least pretend to be humble so that you don’t throw dirt on educated people like yourself (e.g. your professor).

You are making us all look bad :)

Re: Algorithms by Jeff Erickson

#144

Earlier quoted context omitted.

> Instead textbook writers seem to have this adversarial approach against readers, thinking they’ll “cheat themselves” if they look up solutions or attempt to verify their work. I agree that worked problems make a text much more valuable and useful; even students in a class may spend a lot of time doing self-study. And for self-study, without worked problems the book is only useful as a reference while working proble…

Is it really cheating. If the goal is to learn the material using someone else's solution is incredibly helpful and can expedite the learning process. If there is a process to master a skill in 20 hours and another way to master it in 5, only the fool would chose the 20 hour process. When I took electrodynamics the first semester I worked through all the problems myself. I started on Sunday would ask questions Monday…

If your only goal is memorizing the material, then sure. But usually it is a goal in of itself, to apply knowledge to novel problems and develop a solution. There are no solution manuals to unsolved problems. If you went your whole graduate education not working on the ability to approach problems you haven't seen, you will not do very well in research, and many aspects of professional life.

But sure, if you do a first pass without a book, spend sufficient time trying to figure it out, then a solution manual is helpful if you are not getting the feedback loop of a professor.

Re: Algorithms by Jeff Erickson

#145
post #49

Not proving solutions to textbooks seems to be a common theme in mathematics and theoretical computer science. It makes it difficult for those outside of the traditional classroom to learn the material. Instead textbook writers seem to have this adversarial approach against readers, thinking they’ll “cheat themselves” if they look up solutions or attempt to verify their work. Experts make mistakes, beginners would pr…

Hi, I'm the author.

You're of course welcome not to recommend my book to anyone for any reason. But in my own defense, my reluctance to release solutions is not a moral stance, or a belief that I know what's best for all learners. I completely agree that a textbook with solutions would be a better resource for independent learners than a textbook alone.

But my first allegiance is to my students at Illinois. My textbook grew out of course materials for the algorithms classes I've been teaching at UIUC for more than two decades, and it's still the primary reference for those classes.

I religiously release solutions to my homework, exam, and discussion problems every semester, but only after the homeworks are due, exams are taken, or discussion sections are over. (Experience strongly suggests that having homework solutions _after the fact_ significantly improves later exam performance on similar questions.) I also include at least one solved problem in every homework assignment, to help students calibrate the level of rigor and detail that we expect, and to give a worked example of the type of problem that the assignment is covering. (This pisses off several of my colleagues, who really wish I wouldn't publish solutions at all.)

But whenever I've assigned homework or lab problems whose solutions are readily available _in advance_—either from me or elsewhere on the web—students have performed worse on average on similar exam problems later in the same semester. I take that as strong evidence that they didn't learn the material as well. This isn't a philosophical or moral stance about what students _should_ do; it's an empirical observation.

tl;dr: In practice, releasing solutions in advance hurts my primary audience. That's why I don't do it.

"Why not just make up new problems every semester?", I hear you ask. I do make up new homework and exam problems every time I teach, which is why the textbook has so many problems, but not enough to fill an entire course. Developing problems that are substantively new (not merely old problems in new clothes), focused on the target skills, and neither too easy nor too difficult to be pedagogically useful, is *HARD*. (Most competitive-programming and interview-practice questions are terrible, because they're not designed for the same purpose.) I do it, because I have to, but it's one of the hardest parts of teaching this material, and I don't always succeed. Other parts of my job life also require time and attention, and I'd really like to sleep, so yes, I do rely on good problems that I've used before,after they've been fallow for a few years. (The same goes for the other algorithms faculty at Illinois and elsewhere.)

Similarly, collecting all (or even a significant fraction of) the problem solutions and polishing them into a common publishable form, even just for instructors, would require a serious amount of work, especially without a professional editor (because I'd want to self-publish, so that I could give it away free). Finishing the textbook required a full-year sabbatical, free from my usual teaching and committee work. Again, I'd like to sleep.

I completely understand and sympathize with your frustration, but I still believe I made the right choice. I'd like to think that my textbook and other course materials are useful even without solutions; otherwise, I wouldn't have published it. But it can't be all things to all people.

Re: Algorithms by Jeff Erickson

#146

Earlier quoted context omitted.

> Instead textbook writers seem to have this adversarial approach against readers, thinking they’ll “cheat themselves” if they look up solutions or attempt to verify their work. I agree that worked problems make a text much more valuable and useful; even students in a class may spend a lot of time doing self-study. And for self-study, without worked problems the book is only useful as a reference while working proble…

> If you give homework that takes multiple hours each week I think I found the problem. Educators have such an obsession with homework and stealing more class time from their students they can't imagine different models where having the answers in front of you doesn't detract from learning. Have you never used flash cards? My answers are on the back and yet...

Nobody learns learn how to design algorithms from flash cards.

Mastering any skill requires sustained practice: driving writing, basketball, auto repair, carpentry, banjo, gardening, combat juggling, web development, teaching, and yes, even algorithm design. The multiple hours of homework each weak is that sustained practice.

If anything is a waste of time, it's the lectures.

Re: Algorithms by Jeff Erickson

#147

Earlier quoted context omitted.

The author of this particular book made his choice based on his experience teaching the course. While, of course no one can stop you from criticising his choice, on any day, I'd respect his opinion more than that of an angry internet commenter as he (the author of the book) has more invested in it _and_ has given free resource to the community after putting a lot of work into it.

I mostly agree with your sentiment. But I don't necessarily see it as a question of respecting one opinion more than the other. The author of the book didn't make a statement like "books without solutions are universally" better or anything. But he did make it clear that he optimized for one particular audience (his students at Illinois) over another possible audience (self-learners). And on that, he totally has the…

> OTOH, just because something is free doesn't mean that people can't criticize, IMO.

I couldn't agree more!

Re: Algorithms by Jeff Erickson

#148
post #49

Not proving solutions to textbooks seems to be a common theme in mathematics and theoretical computer science. It makes it difficult for those outside of the traditional classroom to learn the material. Instead textbook writers seem to have this adversarial approach against readers, thinking they’ll “cheat themselves” if they look up solutions or attempt to verify their work. Experts make mistakes, beginners would pr…

I think the ideal would be something like an autograder, rather than a solution. There used to be a Coursera class from Princeton that relied on Sedgewick and Wayne algorithms book, and the class was very, very good. Then we must hope people don't publish solutions on github!

> I think the ideal would be something like an autograder, rather than a solution

Me too! But I don't know how to write a useful auto-grader for free-form English text and pseudocode, and neither does anyone else.

Even a pedagogically useful auto-grader for actual _code_ — one that doesn't just check a bunch of test cases, but diagnoses the code to identify design errors and offers specific feedback for improvement — would be utterly revolutionary.

Re: Algorithms by Jeff Erickson

#149
post #49

Not proving solutions to textbooks seems to be a common theme in mathematics and theoretical computer science. It makes it difficult for those outside of the traditional classroom to learn the material. Instead textbook writers seem to have this adversarial approach against readers, thinking they’ll “cheat themselves” if they look up solutions or attempt to verify their work. Experts make mistakes, beginners would pr…

Is that Computer Concrete Roman?! I guess I'll have to go through this one.

Nope. It's Bitstream Charter.

Re: Algorithms by Jeff Erickson

#150
post #5

From https://jeffe.cs.illinois.edu/teaching/algorithms/hwex.html#... > Please do not ask me for solutions. With very rare exceptions, I will say no, even if you are an instructor. I recognize that my stance limits the utility of these materials, especially for self-learners, but I'm trying to optimize the learning experience of my own students at Illinois. The point of homework is not to solve that particular homewor…

> See also https://github.com/tayllan/awesome-algorithms for more learning resources, practice problems, visualizations, etc.

Oooo, nice. Thanks for the link!

Post reply on HN