views:

304

answers:

7

I'm currently giving myself a self-taught crash course in computer science, half for fun and half for continuing education. I'm just about finished with John Zelle's Python Programming: An Introduction To Computer Science (http://amzn.com/1887902996), and now I'm looking for a second book to pick up for when I do finish this one.

Just to make clear, what I like about Zelle's book are the problems at the end of each chapter. I looked through quite a few intro books, but a lot of them fell into the encyclopedic category with more details of language components than practical applications, e.g. Learning Python, while maybe great for a CS grad, wasn't for me. The Zelle book, meanwhile, finished every chapter with a string of assignments related to finance, physics, etc. Since I learn better by doing than by reading, this was unimaginably helpful.

It looks like the same author has another book out intended as a second step and transition from Python to C++ (http://mail.python.org/pipermail/edu-sig/2009-January/009046.html) but before I dropped 85 dollars on a book, I wanted to get a second (third, fourth?) opinion:

Given that I now have a basic, basic understanding of computer science and python, is there a next step you would recommend? Keep in mind that being assigned problems to complete is a hugely important component for me.

Thanks a lot for your suggestions!

+6  A: 
Jacob
Jacob, I saw that title and cover floating around, but I checked it out on Google Books and it appears to be entirely in pseudocode. That means I suppose I'd continue working entirely in Python while going through it.I thought one advantage of the other book was that it would also (in theory) teach me C++. Would it probably be better to get a handle on C++ then start Introduction To Algorithms? Or am I overestimating the importance of one language?
IanWhalen
You are overestimating the importance of a language.
dmeister
As one of the authors said, you can be a great programmer if you code in 10 years or code for 2 years and take an Algorithms course. The pseudocode is designed to transcend the language and teach you core concepts of algorithms.
Jacob
There's a good reason why CLRS is one of the hardest CS books to find used in my school's bookstore. A Computing Scientist should be able to understand and take the algorithm, and implement it as necessary. Showing you the code in a specific language merely pollutes its contents with the idiosyncrasies of that language. The pseudocode is no more annoying than if the authors chose C++, and now you have to implement it in Ruby or something.
Calyth
definitely one the best books I bought during my undergrad days. A must read for anyone thinking about getting into programming.
nsr81
A: 

I've found these two books to be a great introduction.

Learning to Program and Practical Programming: An Introduction to Computer Science Using Python

They might be "too basic" after the first book you've read, but I found the Learning to Program great because of the exercises at the end of each chapter. It might be nice for you to do a comparison of Python and Ruby, too (Learning to Program uses Ruby). With Django and Ruby on Rails so popular, it's not a bad idea.

Samuel Matlin
A: 

If what you primarily want is to learn C++, Accelerated C++ would be a good choice. If you really want to learn computer science, it's hard to beat Structure and Interpretation of Computer Programs (but be aware that it uses Scheme as its teaching language). Introduction to Algorithms is a fine book, but based on what you've said, I suspect that at the moment you'd find it more intimidating than helpful.

Jerry Coffin
+1  A: 

It's Scheme, not Python, but SICP is oriented around exercises and will expand your knowledge in a whole new direction. You could get a fair amount of mileage out of translating the exercises in it to Python, but ultimately, you'll get the most benefit out of it by working through it in a Lisp of some sort, if not Scheme. It was written as an introduction to programming for MIT freshmen so it should be at about the right level for you now that you have a little bit of CS and Python under your belt. There are also a complete set of videos of the classroom lectures corresponding to the book online for free.

thraxil
The course is now python but the python course material isn't available. I also wouldn't say it's an intro course. Yes it's a freshman course - taught to the very best ugrads with a lot of TA assistance (ps most students don't get through the whole book)
Martin Beckett
+1  A: 

I'm going to list two books that, while old, are really great. These are the two books that had the most impact on my development as a software developer.

Software Tools in Pascal teaches you how to write small, simple code that works well with other code to solve problems. It teaches you to start with a simple part of the problem, solve that, then extend the solution into a full working program. (And this book was written years before the whole "agile"/"extreme programming" movement.) It also discusses what is good and bad about the Pascal language; it will be interesting for you to compare Pascal with C and C++.

The Elements of Programming Style is so old its examples are all FORTRAN and PL/I. That doesn't matter because the lessons are timeless. This book takes examples of code from programming textbooks of its day, rips them apart, and puts them back together again; and in so doing it teaches you important lessons. This is a small book, deliberately modeled on the classic The Elements of Style, and you can get it used for cheap. In the early 1990s, Microsoft used to give out this book to newly hired software developers!

I'll also second the idea of you working your way through a data structures book. Having the example code written in pseudocode is actually a good idea; you can then write, test, and debug actual working code based on the examples in the book. That's a great way to learn the data structures. You need to learn how linked lists, hash tables, and trees work, in order to understand the basic underpinnings of the high-level libraries and tools you use. You will learn more if you do your data structures work in C or C++ than Python, I think, because Python is too powerful. (You will appreciate the power of Python more after trying to get along without it!)

If you want to advance yourself and learn C, one way to do both at the same time would be to get The C Programming Language and work your way through that. It does contain exercises and they are useful.

So, in summary, my suggested plan for you now is:

0) Read The C Programming Language book and do its exercises.

1) Read Software Tools in Pascal.

2) Read The Elements of Programming Style.

3) Read a data structures book, and code up all data structures in C.

At that point, decide whether you want to tackle C++, or LISP/Scheme, or just more advanced Python, or what.

Good luck and I hope you have fun!

steveha
These are some of the first programming books I read. Great stuff, although I haven't looked at them in over 20 years. +1 for nostalgia.
foosion
+3  A: 

I believe a good programmer is the guy who knows algorithms better than any language he knows. That is because if he knows algorithm very well, he will program in any language he decides do learn, any. Simply because algorithms can be applied in any language, that's why they transcend the language and are given in pseudocode. Although, I do recommend reading a language book while you read an algorithms book, because you will want to implement what you are learning, but don't overstimate a language. That's a mistake.

I recommend you to read Structure and Interpretation of Computer Programs. You will understand how every language works and you will therefore program better in any language. I'd recommend reading C How to Program by Deitel meanwhile. After you are done with SICP, read an algorithm book, like Introduction to Algorithms.

I usually recommend learning a low-level language before you learn high-level like Python or Java, but it's never too late to catch up... I think you can't be a good programmer if you do not understand what your code is doing. You need to understand memory allocation, pointers, registers and everything. Buy a C book, I recommend the Deitel's one in the last paragraph, and have fun!

If you want to implement something for fun once in a while, which I recommend, go to UVa Online Judge, pick a problem you think you can solve, and try it. Then, submit to the judge. The interesting here is that the judge will not accept any solution you send. If you send a solution that will get to the correct answer, but there is a solution that would get there too in one-tenth of the time, the judge will not accept the first. You can train thinking on optimization, or test an algorithm you learned in the book you are reading.

If you are willing to really learn Computer Science, though, really learn it, I'd say you should read The Art of Computer Programming. It's not an easy ride, you will need to come back to read again eventually, but once you are done, you will have a very complete idea of almost everything there is to know.

jpmelos
Thanks for the tip on UVa Online Judge - I'd seen Project Euler but hadn't seen that yet. Once I start to get more comfortable I'll probably use both to 'test' myself on occasion.
IanWhalen
A: 

A lot of good books have been mentioned already on algorithms so I won't touch that (you should definitely get introduction to algorithms, it weighs a tonne but should be in every developers library). The only thing really missing from the algorithms book is a solid definition of Big-O notation and what it means. You may need to read up on this first as it is pretty fundamental to evaluating algorithms and the book seems to assume you know it already.

I really recommend Object Thinking by David West. This book covers object oriented programming but does it from a historical perspective. It is very rare to find a book that provides a context of how we arrived with object oriented practices. The book introduces the major contributors and changes in approaches over the years from functional Abstract Data Type thinking useful in C, to more modern languages. It also gives the sense that OO programming is not the end of the line which is nice, as many object books are very dogmatic. In addition to a historical perspective it gives some pragmatic ways of problem solving using objects. It's useful for a computer scientist to understand the evolution of the craft.

I'm surprised it hasn't been mentioned because I do not know a software engineer who doesn't own Design Patterns. I have heard these patterns referenced in just about every job I've ever worked. It's good to know them.

Another classic book (which is much more difficult) is the dragon book Compilers Principles and Design. This covers how a compiler converts your code into machine language. Although you will unlikely write a compiler yourself (although i recommend it, very fun) it is a worthy read as perhaps your 3rd book (maybe even later, this stuff is tough). This book shows how the data structures you learned from the algorithms book can be applied to solve a common problem.

reccles