Picking a textbook that won't waste your time
Most people buy the wrong computer science textbook on the first try. They look at the cover, check the publication date, maybe glance at the table of contents, and hit buy. That approach produces a book sitting on a shelf for three years while they quietly copy-paste solutions from some forum to pass their course. Don't be that person. I spent six months testing books across data structures, algorithms, operating systems, and computer architecture before I stopped overthinking it. The pattern is always the same: the book you actually finish is rarely the one with the highest ratings or the most prestigious author. It's the one whose pacing matches how your brain works when you're tired after a full day of lectures.
What to look for in a Computer Science Textbook
Start by opening the index. Flip to a topic you're already familiar with and read two pages. If the author assumes knowledge they never defined, that's a red flag. A good textbook makes its assumptions explicit. It tells you what prerequisite concepts you need before diving in. Bad ones just start writing code like you already speak C++ fluently. Check the exercises. This is where most books reveal their true quality. The problem set should progress from mechanical drills to actual reasoning tasks. If every question is just "fill in the blank" or "predict the output," the book is teaching you to recognize patterns, not to solve problems. I once bought a popular algorithms text because of its reputation, opened chapter four, and realized every single exercise was a trivial variation of the example in the preceding section. I returned it and picked up a different one. Lost an afternoon, saved myself three months of going nowhere. The edition matters less than you think. A 2018 book on data structures is fine for learning binary trees. A 2018 book on distributed systems is probably already outdated. Core topics like sorting and graph traversal don't change. Systems topics do. Match the subject area to the age of the book.
Here's the part nobody mentions: check how the book handles proofs. If you need them, make sure they're actually there and not just referenced as "left as an exercise." I wasted two weeks trying to work through omitted proofs in a widely recommended algorithms book before I realized the author expected you to fill them in independently. That's fine if you're doing it for practice. It's a nightmare if you're reading this on your own time without a professor guiding you.
Get the Full Details

How to actually use a textbook instead of just reading it
Reading a CS textbook passively is almost useless. You need to implement things as you encounter them. When the book introduces merge sort, you write merge sort. Not a copy of the example code. A version from scratch, in whatever language you're comfortable with. If you can't reproduce the algorithm without looking, you haven't learned it, you've recognized it, and those are very different states. The standard recommendation is to read ahead of your lectures. That advice assumes you have the energy to do it. Most of the time you don't. A better approach for working students is reverse reading: do the exercises first, then go back and read the sections you need to figure them out. It's slower initially but the material sticks significantly harder because you've already encountered the problem the solution addresses. I kept a running list of definitions in a separate notebook while working through my OS class. Not the ones from the book verbatim, but my own rewritten versions in plain language. When I hit a wall with virtual memory and page tables, those rewrites became my first reference point before I went back to the actual textbook. It cut my review time from hours to about twenty minutes per chapter.
Which books are actually worth buying
For introductory computer science broadly, Kleinberg and Tardos covers the right breadth without drowning you in detail. It's dense in places but those dense sections are where the actual learning happens. If you find it impenetrable, pair it with a simpler companion rather than switching textbooks entirely. The cognitive friction from the harder book is what builds real understanding. For algorithms specifically, Cormen, Leiserson, Rivest, and Stein — CLRS — remains the reference standard. It is enormous and occasionally reads like a dictionary written by committee. You will not finish it cover to cover. That is fine. Use it as a reference while working through a more pedagogical book like Dasgupta, Papadimitriou, and Vazirani, which is shorter and far more readable even if it skips some topics. Operating systems is where textbook quality varies the most. Silberschatz, Galvin, and Gagne is thorough but the examples lean heavily toward Linux and older architectures. If your course uses a different environment, you will spend extra time mapping the concepts. Tanenbaum's Modern Operating Systems covers more ground including distributed systems, but the microkernel debate in later editions will make you lose patience. Pick whichever aligns with your course and move on.
For computer architecture, Patterson and Hennessy is the default. The latest editions are expensive and the RISC-V version has a different problem set than the MIPS version. Make sure you get the right one for your curriculum. The content is essentially the same.

When a textbook is the wrong choice
Textbooks are inefficient for learning specific tools or frameworks. If you need to learn Docker, Kubernetes, or a particular ML library, a published book will be outdated by the time it hits the shelves. Use documentation, official tutorials, and concrete projects instead. Textbooks excel at foundational concepts that don't change — mathematics, abstractions, system design principles, algorithm analysis. They fail at anything tied to a specific technology stack. There's also a point where reading more textbooks creates the illusion of progress without actually improving your skills. I watched several peers who collected textbooks the way some people collect gym memberships. By the end of their first year they'd purchased maybe six substantial books and finished none of them. They could quote definitions but couldn't implement a linked list without looking at a reference. The fix was stopping the purchases and committing to one book until the exercise set was done. That alone differentiated them from everyone else in the cohort. Free resources exist for most topics. OpenStax offers free introductory CS texts. lecture notes from MIT and Stanford are publicly available. The tradeoff is curation — you have to build your own learning path instead of following someone else's. For self-disciplined learners this is fine. For most people starting out, a paid textbook with a clear progression is worth the money because it removes the decision fatigue of figuring out what to study next.
The Computer Science Textbook you actually use will be different from the one your classmates recommend. That's normal. Buy one, commit to it for a semester, and if it's not working, swap it out. The book itself matters less than the consistency with which you work through it.