Wednesday 26 October 2011

Some questions about learning to program from a book?

Hi, I would like to learn how to program but I'm having a little bit of trouble finding the right resource to do it.



There are just so many books out there, and so many routes to becoming a programmer!



I took a semester of computer science in college, but I figure it would probably be best to start clean from the beginning.



What I want is a really well written book or online tutorial. I don't really care what programming language it is, as long as it is one of the big ones, like Java, C, C++, or python, I'm open on that. I just want to be able to learn algorithms and all the concepts I need to know to tell a computer what to do and be able to easily learn other languages.



I'm willing to put in the time and hard work.



Quality and ease of learning are what is important to me.



Should I consider the age of a book when deciding what book or tutorial to learn from? I've always enjoyed books that are kind of lighthearted, and Head First Java (http://oreilly.com/catalog/9780596004651 ) seems to really fit the bill for me. But the last edition was released in 2004, and it goes by an outdated version of Java. Is there any reason I should not use that book because of its age?



Another example of the kind of writing I learn well from would be Joe Burns' incredibly old tutorials on HTML (which I followed in elementary school). www.htmlgoodies.com



For dummies books kind of capture the writing style I want, but it is my understanding that the quality of information presented is very low in that series.



So to recap, I'm looking for a book or online tutorial that meets the following criteria:



- Will teach me what I need to know to program well in some language (with a time and work investment)

- Is oriented towards beginners

- but most importantly, IS DARN WELL WRITTEN. I'm looking for the kind of book that is mind-blowingly life changing. The kind that is written by somebody obviously so in love with the subject they're writing about that there's no possible way they could ever present the information in an uninteresting manner.



So what books would you suggest? Why?
Some questions about learning to program from a book?
The only book I ever read that fits that criteria for me is Learning Python by O'Reilly Books, but I'm not convinced that's the best book for someone new to programming, if only because I think Python is a terrible language to learn programming on (as much as I absolutely adore Python). The reason is that Python syntax is perhaps a bit too powerful for the new user; when you can express very complex and powerful ideas with only a single line of code, you can have a hard time trying to understand all the things that one line is doing. Most classes that purport to teach programming via Python seem to force their students to restrict themselves in how they solve the learning exercises...because they're usually forced to re-write something that's already built-in!



In my opinion, C and C++ are excellent languages for learning the very basics of programming, like variables, arrays, conditionals, loops, functions, recursion, and so on. You really have to learn how to solve problems using these basic constructions before you can learn shortcut syntax like what Python provides. I also don't think you need to start with a purely object-oriented language like Java and C#, since objects tend to muddy the waters a bit when you're first learning how to think like a programmer (because seriously, that's the biggest hurdle when starting out, just learning how to think like a programmer when you approach a problem).



Since I learned C and C++ in a classroom environment and didn't teach myself how to program with a book, I'm unfortunately unable to offer you a specific suggestion with regard to what book to pick up. I hope you'll consider my advice when you do pick a book, though. When you learn how to solve problems in C and C++, it's really quite easy to move on and pick up just about anything else.
Some questions about learning to program from a book?
try wikibooks they have plenty options and online books with examples
  • columnheader
  • get rid of red eye on picture
  •