From 3.5 billion comments
Popularity since 2010
I recommend reading a book called "Clean Code", it helped me a lot. It's impossible to work with people that have different coding practices, and this book introduces you to everything you need to know.
No problem. It's a really good exercise to write something small like this, then spend time refactoring it based on best practices. I always recommend reading Clean Code by Robert C. Martin. You can find pdfs of it online. Excellent read. Would definitely help you out.
"Clean Code". Your future self will thank me later. Honestly I had learned such bad practices in college when it comes to structuring code, methods, classes, etc. People will always love to debate which style is "good" but you can't go wrong with starting from this book's tips and then branching into your own comfort zone someday.
Popularity since 2010
Complexity management.
Everyone can make software development, but the key to sustainable support, quality and extensibility is the complexity management. I recommend you the book "Code Complete: A Practical Handbook of Software".
On speed: "You save time when you don’t need to have an awards ceremony every time a C statement does what it’s supposed to."
-- Code Complete, Steve McConnell
I really enjoyed Code Complete if you haven't read that already, it's not dry at all and I've made use of/incorporated the concepts I've read from it.
Popularity since 2010
The Head First series is great cause it makes dense subject matter very easy to read. I use Head First Java and Head First Design Patterns in a class and they're great. They are not a reference book, but rather a engineering/OO/pattern book.
O'Reilly "Head First Java" (2nd Edition, Dec.2007) is the book that gave me my "Ah-ha" moment with OOP. Simple to follow, written humorously. I flicked between that and Ivor Horton's "Beginning Java" (2011). Best of luck.
Once you read Head First Java from cover to cover you're qualified for the position of Java Programmer at the programming company of your choice
Popularity since 2010
The C Programming Language, 2nd Edition. It's the most readable, informative book I've ever read for any programming language.
When I was in Grade 8, my Dad gave me his copy of The C Programming Language by K&R and said: "learn this now and you will thank me later."
"The C Programming Language", by Kernighan and Ritchie, is an excellent book, both as a tutorial and as a reference.
Popularity since 2010
Effective Java, by Joshua Bloch. That and Clean Code, which someone has already mentioned, will put you far beyond your 700-line method colleagues whose if-else statements career from one end of the monitor to the other.
First, the book Effective Java 2nd Edition is great, and worth the read 10000%.
Second, my favorite OS Java project as far as code cleanliness goes is ElasticSearch. It's pretty complicated, but isn't that difficult to read:
Popularity since 2010
Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein (referred to as "CLRS") is a good choice for a first course in algorithms.
Computer Science: Algorithms
Introduction to Algorithms AKA CLRS by Cormen, Leiserson, Rivest and Stein
It covers everything an undergrad to graduate level.
I'd recommend The Algorithm Design Manual instead of Introduction to Algorithms. CLRS is really theoretical, the Design Manual is full with real-world examples and exercises.
Popularity since 2010
If you'll be working with C++11 then I'd recommend "C++ Primer" (not C++ Primer Plus!). That book explains most of the relevant C++11 features throughout the text, unlike some other books which simply have most of the text unchanged and a chapter added to the end about C++11.
It's very large however, so you might have to skim through some of it.
Popularity since 2010
To anyone not sure of what this stands for, it is Structure and Interpretation of Computer Programs and is a very good read for those looking to learn about comp sci. It does require commitment in that it is not a book you rush through, rather you take your time and make sure you understand it bit by bit.
Structure and Interpretation of Computer Programs is nice to read and gives you a good perspective of what goes on behind the execution of code, and explains its structures and concepts well.
Popularity since 2010
In my opinion, The Pragmatic Programmer should be mandatory reading for all software development professionals. The lessons learned from that book are simply invaluable. Algorithms aren't the only prerequisite to writing successful software...
The Pragmatic Programmer - one of the best books on software development I've ever read. The book is about the tools, techniques and mindset you can use to become a better programmer, none of which require being in front of a computer.
It's also relatively short, clocking in at about 300 pages, so it's not heavy. Easy on the wallet, too!
I am currently reading The Pragmatic Programmer, which I'm sure many of you have heard of. For those that don't know, however, it's about essential practices, techniques, and methodologies in a production environment.
A great book, one that everyone who's not already a professional software engineer with years of experience should read.
Popularity since 2010
I always liked The Art of Computer Programming which, in an effort to establish the scale of problem difficulty and to discourage people from trying to do all the exercises, has the third exercise be (paraphrased) "Show that there are no positive integer solutions to a^n + b^n = c^n for n ≥3."
The first volumes of The Art of Computer Programming by Donald Knuth has an extensive overview of many of the algorithms that are part of a CS curriculum.