Found in 36 comments on Hacker News
panta · 2017-10-09 · Original thread
I can't recommend courses, because I don't have direct experience of any, but given what you say, my suggestion would be to take a bit of a pause from pragmatic problems, and dedicate some time to learn the foundations of computer science, in particular about algorithms and data structures. I'd recommend a couple of books: "The Algorithm Design Manual" by Steven Skiena if you want something not too theoretical, or "Introduction to Algorithms" by Cormen, Leiserson, Rivest, if you want a bit more breadth and theory:

As a second suggestion, I'd recommend to learn a language somewhat different from JavaScript-like (or C-like) languages, something that challenges your mind to think a little differently and understand and create higher order abstractions. There are many choices, but to avoid confusion and being my favourite, I'll point to one: read the "Structure and Interpretation of Computer Programs" by Abelson and Sussman. It teaches Scheme in a gentle and inspiring way but at the same time it teaches how to become a better programmer:

Or if you want made of dead trees:

I can't recommend it enough. If you read it, do the exercises, don't limit to read through them.

Maybe it's even better if you start with this, and THEN read the books on algorithms and data structures.

Enjoy your journey!

As a follow up to this resource I recommend,

Algorithms unlocked:


Both include the same author as the one in this article (Thomas Cormen).

gressquel · 2016-12-19 · Original thread
Excellent article, I really love algorithm and datastructure. if anyone else is interested like me, I recommend this book
I recommend learning discrete mathematics, then data structures and algorithms.

I cannot stress enough how important mathematical foundations is. It'll make everything else much easier to learn. I haven't read the book but heard good things about: as a beginner text.

Coursera has multiple offerings on Data Structures / Algorithms -- find one that works best for you.

For instance:

By doing all of those you'll get a good introductory exposure to the topics.

You should also look at a rigorous course offering of Algorithms. MIT has a few online to view.

Some readings for a beginner are: (not beginner level but classic)

After all of this you should be fine with diving into interview books. You'll want to whiteboard solutions and be able to do all the difficult problems. Look into sites like leetcode, glassdoor and be able to do the difficult problems posted there.

bra-ket · 2016-10-08 · Original thread
I learned programming without a computer in the 90s with Kernigan & Ritchie "C Programming Language", one of the best coding books ever written:

I'd also learn SICP:

and algorithms from either CLRS or Skiena Algorithm Design

aditya · 2015-10-11 · Original thread
CLR is probably the easiest to get started with:
nostrademons · 2015-04-10 · Original thread

That's basically your bible of basic data structures & algorithms. There are, of course, many many other domain-specific ones, but that textbook is taught in the vast majority of data structures & algorithms courses, it covers most of what people would expect in an interview or in basic programming, and it teaches you how you might implement them. The book itself uses pseudocode, but if you're a halfway competent programmer you should be able to translate it into your language of choice.

(For a fun exercise, it can be interesting to translate them into a programming platform of choice. For example, how would you implement a priority queue with an SQL database? How would you do reservoir sampling? How do you implement sorting on disk, where the dataset is >>> RAM size? How do you implement a graph algorithm on a cluster of 5000 machines? These are the sort of "Google level" problems that you end up facing in industry, but they require a full understanding - not just familiarity - with what the underlying algorithm is doing.)

jkubicek · 2015-03-08 · Original thread
Also self-taught with an ME degree (also from Rose-Hulman. Hi Keith!).

I'm an engineer at Twitter. Due to the interview process, I have yet to encounter anyone (myself included) who doesn't have a pretty sound understanding of algorithms and data structures. The biggest difference I've noticed between self taught folks and CS majors is comfort level with bit-twiddling. All the high-level stuff I know I've had to learn to do my job. All the algorithm and data structures stuff I've had to learn to pass interviews. Moving bits and bytes around is hard for me because it's so rare for me to encounter it in my day-to-day work.

As for how I learned all this stuff? Read Steve Yegge's Google interview post[1], buy the Algorithms book[2], learn everything Steve suggests you learn.

1: 2:

mindcrime · 2014-10-30 · Original thread
Through most of my life I always looked at any form of rejection as a form of motivation, and adhered to a sort of "next time, be so damn good they can't ignore you" mindset. I think one can take that too far, to a point where it isn't healthy, but if you channel the emotion the right way it can help you keep moving forward and keep climbing to progressively higher heights.

If you want to take that approach, and say "f%!# it, I'm going to buckle down and work my ass off so I do get the job next time" there are a few concrete steps you can take.

1. Find, read, and do the exercises in two or three of the various popular books on "programming interviews". I'm thinking of books like Cracking the Coding Interview[1], Programming Interviews Exposed[2], Ace the Programming Interview[3], etc.

2. The companies you mentioned are well known for asking lots of detailed questions on fundamental computer sciences concepts. If doing "big o" analysis and talking about algorithms in detail isn't your forte, get a couple of good Algorithms course books and go through them. Personally, I'm a fan of the Robert Sedgwick books[4][5][6][7], and the CLR[8] book is a standard in this area.

3. Look over the many various articles / blogs / etc. written about preparing for Google interviews.

I have never applied to Google myself, so I can't speak to that from first-hand experience, but this Steve Yegge blog post always struck me as being excellent:

4. Take as many interesting Coursera, EdX, Udemy, etc. courses as you can find time for.

5. Write code any chance you can. Get involved in, or start, an open source project (or two). Volunteer to code for a non-profit / charity or something in your area. Write an app for yourself, to fill a need of your own.

6. Make sure you broaden your horizons and challenge yourself. If you've always written, say, Java or C++ or Ruby code, then make an effort to learn Go, or Erlang or Haskell or Prolog.

All of that said, as I've gotten older, I probably feel a little bit less of the "I'll show you!" thing. I've developed more of a stoic approach, and almost a bit of a zen mindset. There's a lot to be said for a sort of calm, peaceful acceptance of things, even when they are negative. There's a lot more one could say about this, but I don't want to get too philosophical here. I'll just point out that you applied to two... TWO.... companies. Out of like a BILLION possible companies you could work for. Ok, maybe not a billion, but certainly millions, or thousands, depending on where you live and your willingness / ability to travel.

My point is, don't put too much weight on what happened with Google or Amazon. The whole "dream companies" thing is a crock of shit, IMO, looking back on it with hindsight. I've worked for two companies in my career that I once thought of as my "dream" destinations, and neither experience was anything special (neither was bad either), and not worth getting all worked up over.

Final last bits of advice.

1. Read Nietzsche

2. Read Ayn Rand

3. Get drunk

4. Listen to some Queensryche

5. Profit???









oldbuzzard · 2014-10-17 · Original thread
OK. So Cormen's "Intro to Algorithms"[1] or Knuth[2].., but be prepared to be gobsmacked and have a graduate level math background...



philipDS · 2014-09-25 · Original thread
I've felt the same way for a long time... and the only way to get over it is to practice. Buy a whiteboard and practice at home. Buy some books (e.g. and/or You can also subscribe to

Not exactly an answer to your question, I know. Most startups I know in SF/Bay Area at least do a technical test (either coding or just regular questions) on the spot. It is stressful, but as anything, you can learn how to do it.

jpsim · 2014-03-19 · Original thread
If you're Mexican/Canadian, a TN Visa might be a better option than H1B since there's no annual limit.

I'm currently in Silicon Valley from Canada on a 2.5 day trip, with 4 interviews in that timeframe, and it's quite fun yet intense.

I'd also say that if you're a self-taught programmer (I'm an EE), it's worthwhile to read a book like Intro to Algorithms[1] cover to cover before you start doing technical interviews. There are just too many CS101 concepts that you'll never run into even after years of programming.


doorhammer · 2014-03-04 · Original thread
Code Complete 2 [1] was one of the first coding books I've read. As with anything else, it's good to look around (HN is a good place) for people who have problems with the book. I think I learn as much reading the commentary people make about books like that as I do from the book itself.

I think I've listened to every podcast on software engineering radio a few times [2]. The older ones are especially nice because they usually pick a specific topic and cover the high points. I liked that I could listen to it while I was driving, or otherwise not in front of a computer.

It's specific, but Javascript: The Good Parts is probably the most used book I have on my shelf. It has such a perfect amount of usable information in it. It's pretty great. Again, it's definitely worth looking up critiques and counterpoints.

I've also got Introduction to Algorithms, which I use as a reference, sometimes. I switched over to The Algorithm Design Manual [5] after I saw it referenced in an older Steve Yegge post [6]. I read through the intro and it seemed like a book that would be more appropriate from an autodidactic standpoint. I really have no idea if that's going to pan out, since I'm not that far into it, but we'll see, for sure. Doesn't kill me to have an extra algorithms book laying about, though, and I've always got intro to algorithms for cross reference. I've found that I really need to have as many sources available as possible when I'm learning alone. Usually I don't get something until the fifth person describes it from the tenth different angle.

That's most of what I can think of off hand. I really enjoyed The Joy of Clojure [7], though haven't checked out the newer version. Programming Collective Intelligence [8] is a fun book, and is what made me want to go back down the maths route to get more into machine learning.

And of course habitually reading hacker news for an hour or three every night :)

So that's my totally inexpert list of random stuff that I enjoy

[1] [2] [3] [4] [5] [6] [7] [8]

mikevm · 2013-12-06 · Original thread
What do you want to learn? Programming or CS? CS is more than just programming, and CS theory is more than just Algorithms & Data Structures.

If you want to learn about Algorithms and Data Structures and you have a strong math background, then CLRS is the book to get:

An undergraduate CS curriculum will mostly cover the parts I-VI of the book (that's around 768 pages) plus a few chapters from the "Selected Topics Chapter" (we covered Linear Programming and String Matching). Mind you, this book is very theoretical, and all algorithms are given in pseudocode, so if you don't know any programming language, you might have to go with a an algorithms textbook that is more practical. In my DS course we had to implement a Red-Black tree and a binomial heap in Java, and in my Algorithms course we only wrote pseudocode.

Maybe Sedgewick's (Knuth was his PhD advisor!) "Algorithms (4th ed)" will be a better choice for a beginner, as it shows you algorithm implementations in Java: (If you decide to go this route, you might as well take his two Algorithms courses on Coursera, they will really help).

There are also a bunch of Python-based introductions to computer science which have a broader focus than just teaching specific data structures and algorithms. Some of them emphasize proper program design, debugging and problem solving. I haven't read any of them, so I can't vouch for them, but here are a few of the more popular ones:


This book was written to go along with John's edX course:


Oh and btw, there's also the Theory of Computation, which is a major part of CS theory. Here are a few MOOCs and recommended books on the subject:






Sipser's book is probably the best introduction to the theory of computation, and I believe its last chapter deals with Complexity theory as well.


I loved this book very much. It has a very informal and conversational style (don't let it fool you, the problem sets can be HARD).


Once you are familiar with some computation models, its time to study computational complexity and this is one of the best books on the subjects. It is used both for graduate and undergraduate courses.

cunninghamd · 2013-11-19 · Original thread
Looks a little more digestible than CLRS :)
alexsb92 · 2013-10-12 · Original thread
As often as this gets recommended, I'd go with Introduction to Algorithms (CLRS)[1]. I'm currently in the process of going through it on my own as I'm taking a semester off, and I find it perfect to study from. It goes in depth, explaining the math behind run times (which some may like about it, while other might not), and it covers a lot of ground. I haven't fully finished it, and I'm only on chapter 6, but so far it's one of my favourite textbooks to study from.


jcurbo · 2013-09-19 · Original thread
Same here, I came in to post about that exact book.

There's also Pearls of Functional Algorithm Design which I have yet to read.

In general you've got stuff like Introduction to Algorithms ( and the Algorithm Design Manual ( both of which I have seen mentioned as good books. I'm in a grad school-level algorithms class that just started using the former (which is language agnostic, but we are doing our implementations in Java) and it looks pretty good to me.

voltagex_ · 2013-05-06 · Original thread
$81 for

No legal DRM free option as far as I can see.

Fifth link was a direct to the PDF.

poof131 · 2012-11-30 · Original thread
I guess the question is what do you mean by advanced topics? What direction do you want to go in? The latter book you mentioned seems to cover a number of topics and is probably a good bet.

If you are interested in the web, both these books were good:

Here are a few books that cover some "advanced?" topics that I'd like to read when I have time (would also like to hear other peoples' recommendations on them):

I'm not sure on your background or the quality of these books, but an understanding of data structures, algorithms, and object oriented programming could be considered important:

Although these and other intermediate to advanced topics tend to be covered better in non-language-specific books such as this shotgun blast to the head. Don't worry, it's just an "introduction":

asalazar · 2012-10-11 · Original thread
I think the problem is that the "right" way is completely subjective. Is Spring "bad" and Scala "good"? Depends on what you're building and for who.

Overall, the best way to be a great developer (not just a good coder) is to: 1) Build a strong theoretical foundation. The curriculum of any top tier CS program is a good starting point. Check out Intro to Algorithms

2) Stay on top of new technologies and models. Read Hacker News, Read Reddit, Follow notables on Twitter. Check out @lhazlewood

3) research, debate, practice, implement, review

smanek · 2012-10-08 · Original thread
For algo/datastructures, CLRS ( is the gold standard.

For OS's, Tanenbaum ( is popular.

'Math' is broad - if I can recommend only one book to cover all of Math I'd probably say 'The Road to Reality' ( More practically (for the subset of math most programmers are likely to care about), you'll do fine with one good discrete math book and one linear algebra book. Throw in one each on Stats, Abstract Algebra, Calc (up to ~diffeq), and Real Analysis (in roughly that order) if you're a bit more ambitious ;-)

kruk · 2012-07-05 · Original thread
I would recommend the Introduction to Algorithms by Cormen. It covers not only the complexity analysis but also describes the most important algorithms, data structures and classical problems solutions.
crop · 2012-04-08 · Original thread
i think more important then learning a specific language is getting a understanding of the algorithmic stuff. try theese two books for example:

i wish i had these books 10 years earlier..

I'll start out with the classic:

"Introduction to Algorithms" a.k.a. "CLRS"

I think this is all (and probably more than) you really "need" if you want to know CS for programming, and an enjoyable read too.

doc4t · 2012-03-10 · Original thread
Introduction to Algorithms by Cormen et al would be a good place to start if you're going the theoretical way. Very mathmatical and not so practical - I read this myself at uni and I learned a ton.

The_Sponge · 2012-02-11 · Original thread
Go to amazon, search for data structures and algorithms. Those four words should bring up a whole bunch of results. Choose one that's well reviewed that has familiar elements to you.

Also, wikipedia is a great place to start (of course).

Sorry I can't be more specific, but I don't know your educational background or experience. Fwiw I used . The only thing is that I had a decent, recent math background, and if you haven't done "real" math in a long time, it might be one more barrier to learning what you really want to learn.

scottyallen · 2011-02-12 · Original thread
I'd start with the bible of algorithms:

Read that puppy cover to cover, and try your hand at implementing some of the data structures and exercises in it. I studied it in college, and reviewed out of it before I interviewed at Google. Some of the best interview prep I did.

One more tip: when you're practicing, practice on a whiteboard, with no reference material, and only try compiling it on a computer after you're absolutely positive it's correct and have tried a number of test cases. Nothing like simulating real interview situations to help you prepare...

papaf · 2011-01-15 · Original thread
I don't have a computer science background and I recently read TAOCP and Introduction to Algorithms by Cormen et al for an interview with google. I failed the interview but got through the books finding them very interesting.

Reading TAOCP was a worthwhile experience but I feel the Introduction to Algorithms is of more practical use because it covers a lot more ground (at less depth) and is a much easier read.

nswanberg · 2010-12-17 · Original thread
Here's the slightly modified answer I just posted there (even though it's an old question):

Back when he was still doing podcasts Joel Spolsky answered the similar question, which was partly "Does a good programmer without a CS degree really have a chance to get a job at Fogcreek?[1]" (It's near the end of the page.)

He says that for a good self-taught programmer who began with a high-level language, say PHP or Java, who comes at programming from a practical perspective, there are a few important parts of the CS curriculum the person may have missed out on, and goes on to list some books that would help fill in those gaps.

Off the top of his head he named these books in about this order:

- Structure and Interpretation of Computer Programs[2] (also free online[3])

- C Programming Language[4]

- The Unix Programming Environment[5]

- Introduction to Algorithms[6]

He said that those books covered the aspects of the CS curriculum his company needs in a good programmer, e.g. being able to create algorithms for an uncommon data structure.

Those books all have the added advantage of having exercises, and all being a very pleasant read. SICP is an introduction to many of the big ideas in CS: data structures, streams, recursion, interpretation, compilation, register machines, etc., and their implementation in Scheme (a kind of Lisp). It's a great place to start. The next two focus on implementation details like pointers and memory allocation. They are compact, powerful books. The last, Introduction to Algorithms, seems misleadingly titled, as it is fairly comprehensive and used in both undergraduate and graduate courses. If you work your way through the entire book, chapeau!







cperciva · 2010-07-08 · Original thread
Buy and read:

Once you've gotten through that, consider borrowing TaoCP from your local library.

1331 · 2010-01-24 · Original thread
_Introduction to Algorithms_ (aka "CLRS")
marcamillion · 2009-11-17 · Original thread
Same book for $30 less brand new at Amazon -
Xichekolas · 2009-07-13 · Original thread
I'd also very highly recommend this book, but anyone looking to buy might be interested to know that the 3rd edition comes out this fall (9/30).

"It includes two completely new chapters, on van Emde Boas trees and multithreaded algorithms, and substantial additions to the chapter on recurrence (now called "Divide-and-Conquer"). It features improved treatment of dynamic programming and greedy algorithms and a new notion of edge-based flow in the material on flow networks."

Fresh book recommendations delivered straight to your inbox every Thursday.