In my time as an undergraduate studying Computer Science, I came across several textbooks that were really useful. (This may be a surprise to you; it was to me when I finally started finding them.) I share them here for others who may know how to program, but are not yet confident in their grasp of the things one would learn in a formal Computer Science (CS) curriculum.

Cracking the Coding Interview

by Gayle Laakmann McDowell

This book offers a quick refresher guide on lots of foundational CS topics or algorithms that might come up in an interview. It was recommended to my peers before I interviewed with big tech companies. It's very useful for brushing up on topics you may have learned once and forgotten, and to realize that you can solve seemingly every interview problem with a hash map. Concepts are presented at an overview level, so it would also be a good way to be introduced to the types of things CS students are expected to know.

Code Complete 2

by Steve McConnell

This is the definitive reference book for writing clean, maintainable, and correct software. It's full of the kinds of things I learned from detailed code review by more experienced team members. This book is more than a reference book - this is something you can pick up any time and learn something new.

Good Math: A Geek's Guide to the Beauty of Numbers, Logic, and Computation

by Mark C. Chu-Carroll

Math is beautiful - and before this book, I didn't know! It really opened my eyes to consider math in a new light, and appreciate its philosophical underpinnings. I didn't find this through a class, but it covered topics that higher level math courses might introduce you to.

Introduction to Algorithms, 3rd Edition

by Cormen, Leiserson, Rivest, & Stein

Perhaps not the best for beginners, this is a massive reference book on many of the canonical algorithms that computer scientists have developed. The psuedocode can be difficult to understand at times, but the text explanations were helpful.

Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations

by Yoav Shoham & Kevin Leyton-Brown

This is a very approachable text on game theory and designing systems of agents (autonomous beings that can make decisions, that may be anything from computer simulations to humans). It helped me start thinking about how to structure incentives for individuals and group to cause a desired behavior to emerge. This is the one book from the list that would be helpful for people beyond programmers and computer scientists; people interested in public policy or organizational behavior could also learn new thinking patterns from it.
- The Multiagent Systems book is available for free download online.

Programming Language Pragmatics, Third Edition

by Michael Scott

What does strong typing mean? What are the relative advantages of static vs. dynamic typing? What's the difference between functional, logic, and imperative programming? How does a compiler work? Answers to all these and more are in this very readable text.

Operating System Concepts

by Silberschatz, Galvin, and Gagne

This book provides the answers to questions such as: How does an operating system work? How does the bootloader work, and what stops your web browser from accessing core system files? How does the CPU manage multiple running programs at the same time, that may each be asking for multiple execution threads? It's hard to judge how useful this is for the day-to-day work of programming, but it is a very informative text nonetheless.