HNHacker News
TopNewBestAskShowJobs

jefferickson

586 karma · joined November 4, 2016

submissionscomments
jefferickson··on Algorithms by Jeff Erickson (2019)
It's a fantastic book, but it's not worth $186.65.
jefferickson··on Algorithms by Jeff Erickson (2019)
Well, I can tell you why I think my book is not good for that — it isn't designed to be that!

My book grew out of lecture notes that I wrote for my algorithms classes at Illinois. My students are almost exclusively juniors and seniors. In particular, they already have several semesters of programming experience, a full semester of discrete math, and a full semester of data structures (which includes things like sorting and searching and the basics of algorithm analysis). They are the audience I wrote the book for.

Equivalently, I have very little experience teaching those prerequisite classes, which makes me the wrong person to write a textbook about that more foundational material!

At a more basic level: Different people are going to find different sources more or less useful. Different authors are better matches for different readers' backgrounds, intuition, and needs. My book ain't gonna work for everyone, because no single book works for everyone.

I'm not familiar with Common Sense Guide — thanks for the suggestion! — but the other books listed above are all fantastic (for different reasons, and for different audiences).

jefferickson··on Algorithms by Jeff Erickson (2019)
Thanks for the kind feedback. I'm glad I could help!
jefferickson··on Algorithms by Jeff Erickson (2019)
> the style seems more targeted towards someone with a bunch of time reading through it slowly rather than gulping it down quickly like for most undergraduate courses.

Yep. That's intentional.

If you try to gulp this subject down quickly, you're much more likely to choke.

jefferickson··on Algorithms by Jeff Erickson
The book evolved from lecture notes that I've been publicly posting since at least 2005.
jefferickson··on Algorithms by Jeff Erickson
> And there it is, your argument comes down to gatekeeping

Bullshit. If you want to play basketball in the NBA, you have to practice your ass off to develop the necessary skills. If you want to be a successful car mechanic, you have to practice your ass off to develop the necessary skills. If you want to be a successful cook, you have to practice your ass off to develop the necessary skills.

The homework is a vehicle for practice. Effective practice is real work. Real work is hard. Therefore, the homework must be hard.

jefferickson··on Algorithms by Jeff Erickson
Thanks for the kind feedback!
jefferickson··on Algorithms by Jeff Erickson
Not any more; see my comment here: https://news.ycombinator.com/item?id=26096052
jefferickson··on Algorithms by Jeff Erickson
> I'm happy to see that the top comment is about his 25% credit for I Don't Know. That willingness to fold with grace is something that gets lost with standardized testing

I'm afraid I'm going to disappoint you. After using the "I don't know = 25%" policy for fifteen years, I was finally convinced to abandon it. Not because of pressure from administration, but rather from an honest evaluation of actual student behavior.

The IDK policy was meant to reward self-awareness, but in practice it seems to actually punish lack of confidence. In particular, female students answered IDK more often than male students with similar scores on questions that they both answered in full. (I suspect the same is true of international and BIPOC students, but my rosters don't reveal which students those are.)

I've seen lots of students who lacked confidence get trapped in mind games, wasting time worrying about (and sometimes asking me or the TAs) whether their solution was worth more or less than IDK, instead of putting forward their honest best effort. In particular, I've seen students who were already struggling, who might have scored 30-50% on an exam question, "play it safe" by answering IDK instead, and then after seeing the solution say "I did know that!"

The last time I taught algorithms, five students (out of 300) took the three-hour final exam in fifteen minutes or less. They walked in, sat down, got their exam booklets, wrote their name on the first page, wrote IDK on every other page, handed in the exam and walked out. None of those students passed.

I expect the next time I teach algorithms, without the IDK policy, exam averages will be slightly HIGHER, not lower. (I'd have data already, but the pandemic clouds everything.) I saw a similar score increase years ago when I stopped dropping the lowest problem score on each exam.

> IIRC, he also announced that the top 5% of the class would be automatic (and the only) A+ grades, and the bottom 5% would be automatic F grades.

Oh god no. I've never used grade quotas; that's just evil. My usual policy is that students with course averages above 95% automatically get an A+, students with course averages below 40% automatically get an F, and intermediate grade cutoffs are determined by score distributions that ignore those outliers. (I plan to move to an absolute grading scale the next time I teach the class.) In practice, that usually means about 4-6% A+s and 2-3% Fs, but I don't set those percentages in advance.

jefferickson··on Algorithms by Jeff Erickson
> See also https://github.com/tayllan/awesome-algorithms for more learning resources, practice problems, visualizations, etc.

Oooo, nice. Thanks for the link!

jefferickson··on Algorithms by Jeff Erickson
Nope. It's Bitstream Charter.
jefferickson··on Algorithms by Jeff Erickson
> 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.

jefferickson··on Algorithms by Jeff Erickson
> OTOH, just because something is free doesn't mean that people can't criticize, IMO.

I couldn't agree more!

jefferickson··on Algorithms by Jeff Erickson
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.

jefferickson··on Algorithms by Jeff Erickson
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.

jefferickson··on Algorithms, by Jeff Erickson
No, I've had several students answer "I don't know" to every question on the final exam. (About one every two or three years.) Without exception, they got a 25% on the exam and an F in the class.

Other theory instructors at Illinois do put limits on their IDK policy, like "at most 10% of the total points", or "for at most one question", or "not in my class". So far I've stuck to my guns.

jefferickson··on Algorithms, by Jeff Erickson
Oops. I'd say submit a bug report, but as of yesterday it become moot.

As others have said, the copyright notice is only a courtesy/reminder. I've held the copyright on all this stuff from the moment I started writing it (and distributing it) 20 years ago.

jefferickson··on Algorithms, by Jeff Erickson
You can get an EPUB and MOBI versions from the Internet Archive (auto-converted from my uploaded pdf), but I can't vouch for its quality.

All the fonts are baked into the PDF, so it should be readable anywhere; if it isn't, please submit a bug report!

But if you're looking for a format that lets you reflow the text, by changing the margins or font or text size, you're out of luck. The only way to write something like that is to bake it in from the beginning. That's easy for pure text, but hard to impossible for technical documents with lots of displayed equations, big hard-formatted boxes of text (ie, algorithms), and the like.

(Boaz Barak managed it by writing his Modern Complexity Theory book entirely in Markdown. The mind boggles.)

jefferickson··on Algorithms, by Jeff Erickson
Not so much in the book itself, but definitely in the "Director's Cut" notes on the book web site. I cover bloom filters and the like in my more advanced algorithms courses.

Teaching that material correctly (without the traditional magical thinking) requires serious comfort with probability, which unfortunately isn't early enough in the CS curriculum at Illinois to be used in our data structures and algorithms courses.

jefferickson··on Algorithms, by Jeff Erickson
Exactly. The students should be the masters, not the theorem.
jefferickson··on Algorithms, by Jeff Erickson
Yep, all this. Let me add two more points:

- Own your past mistakes. They happened. Don't pretend they didn't. Figure out the underlying cause of those mistakes, and gather EVIDENCE that you've resolved that cause.

(In my case, I was a LAZY undergrad. I'd never had to work in high school, and so I didn't know how to work in college. And then I got a real job, and it was either do the damn work or it'll be there tomorrow only the boss will be there in my office wondering why the hell I'm costing the company hundreds of thousands of dollars a day and why can't you just get this shit DONE already. And so when I applied for grad school the second time I had "smart but lazy" letters from my old professors, stellar GRE scores, and "smart and works hard" letters from my managers.)

- APPLY WIDELY. You are at a significant disadvantage compared to other students with stronger backgrounds. Do not imagine that your passion and good intentions and maturity are enough to get you into the top programs, or even into any particular program. You're playing a lottery that's stacked against you; buy more tickets.

jefferickson··on Algorithms, by Jeff Erickson
I'm not sure I can answer that question for anyone but myself. I've worked through quite a few pieces of TAOCP when I've needed to understand a particular topic, but I always find that I lose interest.

But then I've never been able to learn anything by just reading. I always have to have a target problem in front of me, and then I'll read (and get frustrated by) every book ever written to figure out the best way to think about that problem. (Which means I've read a few dozen pages from hundreds of books, and I have pretty huge gaps in my math background -- abstract algebra and category theory being two big examples.)

For some target problems, TOACP has been incredibly helpful, but for most of them it really hasn't. Knuth and I just care about different things.

For the same reason, I can't recommend that anyone work through EVERY problem in my book, either. Find the parts that are interesting and/or useful to you, and work on those. If you get tired or frustrated, work on something else; maybe you'll discover another reason to pick up my book again later. Or not.

Climbing the mountain is much more rewarding than studying the trail map.

jefferickson··on Algorithms, by Jeff Erickson
Day made!!
jefferickson··on Algorithms, by Jeff Erickson
"Dijkstra's algorithm for shortest paths can be seen as DP"

Really? Sure, if the graph is a dag, but then Dijkstra is overkill.

Hmm. I'll have to think about this one.

+1 for the Okasaki shoutout.

jefferickson··on Algorithms, by Jeff Erickson
Forget about efficiency for the moment and focus on discovering the underlying recursive problem.

LOTS of people struggle with dynamic programming. But in my experience, 90% of the difficulty with dynamic programming is actually discomfort with recursion, which is why I talk about recursive backtracking first.

Try reading Chapter 2. My goal in that chapter is to show the process of deriving recursive solutions---how to think about the problem, and what questions to ask---rather than just presenting the solution as a fait accompli.

I do have to assume that you believe in the Recursion Fairy, though. That's probably the hardest step. Computer scientists are TERRIBLE at delegating.

jefferickson··on Algorithms, by Jeff Erickson
As I've said elsewhere, I'm looking out for my own students first.

One of my colleagues suggested setting up a "club" on PerusAll (https://app.perusall.com/welcome) or something similar that would allow people to discuss to book and/or work through problems collectively. (They have a club for CLRS, for example.) Right now all their "clubs" are restricted to books with Reputable Publishers (ptui), so they might need some persuasion.

jefferickson··on Algorithms, by Jeff Erickson
Ew. Ew ew ew. No.

Wait, did I say that aloud? Sorry, I meant "I'm already busy enough, thanks."

jefferickson··on Algorithms, by Jeff Erickson
WHAT unit tests? This is not a book about programming. The solutions are not code. None of the homework in my algorithms classes CAN be auto-graded.
jefferickson··on Algorithms, by Jeff Erickson
Of course the student is ultimately responsible for their own learning, but as the instructor, it's my responsibility to help them learn.

Dangling a juicy piece of bacon in front of their noses will not help them eat their vegetables.

jefferickson··on Algorithms, by Jeff Erickson
Yes, I have thought about making it into an open-source project, like Pat Morin did with his Open Data Structures textbook, or Boaz Barak with his Modern Complexity Theory textbook. (Both highly recommended, BTW.)

But I'm hesitant to release the LaTeX source files in their current (rather grungy) form. Too much of a control freak, I guess. Maybe for the next edition.

Also, the figures are all in a closed file format (OmniGraffle). In principle, I could convert everything to an open-source format like svg, but (0) converting everything would be hell, (1) LaTeX doesn't understand svg files directly, (2) in principle, I can connect latex to inkscape to convert svg to pdf, but the translation is always imprfect, (3) using Inkscape makes me want to tear my hair out, and (4) I'm a control freak.

And don't even talk to me about tikz.

Page 1 of 2Next →