Language Books/Tutorials for popular languages

249

It wasn't that long ago that I was a beginning coder, trying to find good books/tutorials on languages I wanted to learn. Even still, there are times I need to pick up a language relatively quickly for a new project I am working on. The point of this post is to document some of the best tutorials and books for these languages. I will start the list with the best I can find, but hope you guys out there can help with better suggestions/new languages. Here is what I found:

Since this is now wiki editable, I am giving control up to the community. If you have a suggestion, please put it in this section. I decided to also add a section for general be a better programmer books and online references as well. Once again, all recommendations are welcome.

General Programming

Online Tutorials
Foundations of Programming By Karl Seguin - From Codebetter, its C# based but the ideas ring true across the board, can't believe no-one's posted this yet actually.
How to Write Unmaintainable Code - An anti manual that teaches you how to write code in the most unmaintable way possible. It would be funny if a lot of these suggestions didn't ring so true.
The Programming Section of Wiki Books - suggested by Jim Robert as having a large amount of books/tutorials on multiple languages in various stages of completion
Just the Basics To get a feel for a language.

Books
Code Complete - This book goes without saying, it is truely brilliant in too many ways to mention.
The Pragmatic Programmer - The next best thing to working with a master coder, teaching you everything they know.
Mastering Regular Expressions - Regular Expressions are an essential tool in every programmer's toolbox. This book, recommended by Patrick Lozzi is a great way to learn what they are capable of.
Algorithms in C, C++, and Java - A great way to learn all the classic algorithms if you find Knuth's books a bit too in depth.

C

Online Tutorials
This tutorial seems to pretty consise and thourough, looked over the material and seems to be pretty good. Not sure how friendly it would be to new programmers though.
Books
K&R C - a classic for sure. It might be argued that all programmers should read it.
C Primer Plus - Suggested by Imran as being the ultimate C book for beginning programmers.
C: A Reference Manual - A great reference recommended by Patrick Lozzi.

C++

Online Tutorials
The tutorial on cplusplus.com seems to be the most complete. I found another tutorial here but it doesn't include topics like polymorphism, which I believe is essential. If you are coming from C, this tutorial might be the best for you.

Another useful tutorial, C++ Annotation. In Ubuntu family you can get the ebook on multiple format(pdf, txt, Postscript, and LaTex) by installing c++-annotation package from Synaptic(installed package can be found in /usr/share/doc/c++-annotation/.

Books
The C++ Programming Language - crucial for any C++ programmer.
C++ Primer Plus - Orginally added as a typo, but the amazon reviews are so good, I am going to keep it here until someone says it is a dud.
Effective C++ - Ways to improve your C++ programs.
More Effective C++ - Continuation of Effective C++.
Effective STL - Ways to improve your use of the STL.
Thinking in C++ - Great book, both volumes. Written by Bruce Eckel and Chuck Ellison.
Programming: Principles and Practice Using C++ - Stroustrup's introduction to C++.
Accelerated C++ - Andy Koenig and Barbara Moo - An excellent introduction to C++ that doesn't treat C++ as "C with extra bits bolted on", in fact you dive straight in and start using STL early on.

Forth

Books
FORTH, a text and reference. Mahlon G. Kelly and Nicholas Spies. ISBN 0-13-326349-5 / ISBN 0-13-326331-2. 1986 Prentice-Hall. Leo Brodie's books are good but this book is even better. For instance it covers defining words and the interpreter in depth.

Java

Online Tutorials
Sun's Java Tutorials - An official tutorial that seems thourough, but I am not a java expert. You guys know of any better ones?
Books
Head First Java - Recommended as a great introductory text by Patrick Lozzi.
Effective Java - Recommended by pek as a great intermediate text.
Core Java Volume 1 and Core Java Volume 2 - Suggested by FreeMemory as some of the best java references available.
Java Concurrency in Practice - Recommended by MDC as great resource for concurrent programming in Java.

The Java Programing Language

Python

Online Tutorials
Python.org - The online documentation for this language is pretty good. If you know of any better let me know.
Dive Into Python - Suggested by Nickola. Seems to be a python book online.

Perl

Online Tutorials
perldoc perl - This is how I personally got started with the language, and I don't think you will be able to beat it.
Books
Learning Perl - a great way to introduce yourself to the language.
Programming Perl - greatly referred to as the Perl Bible. Essential reference for any serious perl programmer.
Perl Cookbook - A great book that has solutions to many common problems.
Modern Perl Programming - newly released, contains the latest wisdom on modern techniques and tools, including Moose and DBIx::Class.

Ruby

Online Tutorials
Adam Mika suggested Why's (Poignant) Guide to Ruby but after taking a look at it, I don't know if it is for everyone. Found this site which seems to offer several tutorials for Ruby on Rails.
Books
Programming Ruby - suggested as a great reference for all things ruby.

Visual Basic

Online Tutorials
Found this site which seems to devote itself to visual basic tutorials. Not sure how good they are though.

PHP

Online Tutorials
The main PHP site - A simple tutorial that allows user comments for each page, which I really like. PHPFreaks Tutorials - Various tutorials of different difficulty lengths.
Quakenet/PHP tutorials - PHP tutorial that will guide you from ground up.

JavaScript

Online Tutorials
Found a decent tutorial here geared toward non-programmers. Found another more advanced one here. Nickolay suggested A reintroduction to javascript as a good read here.

Books
Head first JavaScript
JavaScript: The Good Parts (with a Google Tech Talk video by the author)

C#

Online Tutorials
C# Station Tutorial - Seems to be a decent tutorial that I dug up, but I am not a C# guy.
C# Language Specification - Suggested by tamberg. Not really a tutorial, but a great reference on all the elements of C#
Books
C# to the point - suggested by tamberg as a short text that explains the language in amazing depth

ocaml

Books
nlucaroni suggested the following:
OCaml for Scientists Introduction to ocaml
Using Understand and unraveling ocaml: practice to theory and vice versa
Developing Applications using Ocaml - O'Reilly
The Objective Caml System - Official Manua

Haskell

Online Tutorials
nlucaroni suggested the following:
Explore functional programming with Haskell
Books
Real World Haskell
Total Functional Programming

LISP/Scheme

Books
wfarr suggested the following:
The Little Schemer - Introduction to Scheme and functional programming in general
The Seasoned Schemer - Followup to Little Schemer.
Structure and Interpretation of Computer Programs - The definitive book on Lisp (also available online).
Practical Common Lisp - A good introduction to Lisp with several examples of practical use.
On Lisp - Advanced Topics in Lisp
How to Design Programs - An Introduction to Computing and Programming
Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp - an approach to high quality Lisp programming

What about you guys? Am I totally off on some of there? Did I leave out your favorite language? I will take the best comments and modify the question with the suggestions.

This question is tagged with programming-languages

~ Asked on 2008-08-22 16:59:56

53 Answers


33

I know this is going to seem old-fashioned, but I don't think much of using online tutorials to learn programming languages or platforms. These generally give you no more than a little taste of the language. To really learn a language, you need the equivalent of a "book", and in many cases, this means a real dead-tree book.

If you want to learn C, read K&R. If you want to learn C++, read Stroustrup. If you want to learn Lisp/Scheme, read SICP. Etc.

If you're not willing to spend more than $30 and a few hours to learn a language, you probably aren't going to learn it.

~ Answered on 2008-08-22 17:18:47


20

These are all really good, written by academia and (some) are books (an unpublished oreilly book --translated from French, but no issues I've found), for example). I've *'d my favorite ones that helped me the most.

ocaml :

  1. *Introduction to ocaml
  2. Using Understand and unraveling ocaml: practice to theory and vice versa
  3. *Developing Applications using Ocaml - O'Reilly
  4. The Objective Caml System - Official Manual
  5. A Concise Introduction to Objective Caml
  6. Practical Ocaml

Haskell :

  1. Explore functional programming with Haskell
  2. *Real World Haskell
  3. *Total Functional Programming

~ Answered on 2008-08-22 17:19:38


10

~ Answered on 2008-09-02 07:40:10


8

For C++, I suggest Accelerated C++ by Koenig and Moo as a beginning text, though I don't know how it would be for an absolute novice. It focuses on using the STL right away, which makes getting things done much easier.

~ Answered on 2008-08-28 18:36:54


7

Haskell:

O'Reilly Book:

  1. Real World Haskell, a great tutorial-oriented book on Haskell, available online and in print.

My favorite general, less academic online tutorials:

  1. The Haskell wikibook which contains all of the excellent Yet Another Haskell Tutorial. (This tutorial helps with specifics of setting up a Haskell distro and running example programs, for example.)
  2. Learn you a Haskell for Great Good, in the spirit of Why's Poignant Guide to Ruby but more to the point.
  3. Write yourself a Scheme in 48 hours. Get your hands dirty learning Haskell with a real project.

Books on Functional Programming with Haskell:

  1. Lambda calculus, combinators, more theoretical, but in a very down to earth manner: Davie's Introduction to Functional Programming Systems Using Haskell
  2. Laziness and program correctness, thinking functionally: Bird's Introduction to Functional Programming Using Haskell

~ Answered on 2008-08-30 00:09:40


5

Effective Java is a must but I recommend being comfortable with Java first to fully understand the examples.

~ Answered on 2008-08-25 18:07:50


5

Ruby

~ Answered on 2008-08-30 10:55:13


4

I'd add Bruce Eckel's programming books:

In general, his "Books" page (http://mindview.net/Books/) is a good resource. The freely availabe books can also be found at http://www.ibiblio.org/pub/docs/books/eckel/

~ Answered on 2008-09-26 10:34:25


4

Can't believe nobody has mentioned the Perl Best Practices. There's also a Twitter feed that delivers one PBP per day.

I learned Perl from Robert's Perl Tutorial, which I recommend, but it hasn't been updated since 1999. A newer recommended tutorial is Steve's Perl Tutorial.

For web development with Perl, the clear winner is Catalyst, and the Catalyst wiki is the starting point for learning.

~ Answered on 2009-07-19 11:43:19


3

check out the programming section of wikibooks

Many of them are fully formed, and quite a few have more advanced sections (which are in varying states of completion) on specific functionality.

also, w3 schools has a great php tutorial and reference section

their html and css sections are good for reference too.

~ Answered on 2008-08-26 14:56:51


3

For Lisp and Scheme (hell, functional programming in general), there are few things that provide a more solid foundation than The Little Schemer and The Seasoned Schemer. Both provide a very simple and intuitive introduction to both Scheme and functional programming that proves far simpler for new students or hobbyists than any of the typical volumes that rub off like a nonfiction rendition of War & Peace.

Once they've moved beyond the Schemer series, SICP and On Lisp are both fantastic choices.

~ Answered on 2008-08-25 16:30:23


3

C++

The first one is good for beginners and the second one requires more advanced level in C++.

~ Answered on 2008-08-27 16:19:11


3

For Javascript:

For PHP:

For OO design & programming, patterns:

For Refactoring:

For SQL/MySQL:

~ Answered on 2008-09-04 09:19:10


3

  • C - The C Programming Language - Obviously I had to reference K&R, one of the best programming books out there full stop.
  • C++ - Accelerated C++ - This clear, well written introduction to C++ goes straight to using the STL and gives nice, clear, practical examples. Lives up to its name.
  • C# - Pro C# 2008 and the .NET 3.5 Platform - Bit of a mouthful but wonderfully written and huge depth.
  • F# - Expert F# - Designed to take experienced programmers from zero to expert in F#. Very well written, one of the author's invented F# so you can't go far wrong!
  • Scheme - The Little Schemer - Really unique approach to teaching a programming language done really well.
  • Ruby - Programming Ruby - Affectionately known as the 'pick axe' book, this is THE defacto introduction to Ruby. Very well written, clear and detailed.

~ Answered on 2008-08-30 19:00:39


2

Common Lisp

For a good reference of CL check out Common Lisp the Language, 2nd Edition

~ Answered on 2008-08-30 18:48:40


2

C Primer Plus, 5th Edition - The C book to get if you're learning C without any prior programming experience. It's a personal favorite of mine as I learned to program from this book. It has all the qualities a beginner friendly book should have:

  • Doesn't assume any prior exposure to programming
  • Enjoyable to read (without becoming annoying like For Dummies /
  • Doesn't oversimplify

~ Answered on 2008-08-25 16:02:00


2

Let's not forget Head First Java, which could be considered the essential first step in this language or maybe the step after the online tutorials by Sun. It's great for the purpose of grasping the language concisely, while adding a bit of fun, serving as a stepping stone for the more in-depth books already mentioned.

Sedgewick offers great series on Algorithms which are a must-have if you find Knuth's books to be too in-depth. Knuth aside, Sedgewick brings a solid approach to the field and he offers his books in C, C++ and Java. The C++ books could be used backwardly on C since he doesn't make a very large distinction between the two languages in his presentation.

Whenever I'm working on C, C:A Reference Manual, by Harbison and Steele, goes with me everywhere. It's concise and efficient while being extremely thorough making it priceless(to me anyways).

Languages aside, and if this thread is to become a go-to for references in which I think it's heading that way due to the number of solid contributions, please include Mastering Regular Expressions, for reasons I think most of us are aware of... some would also say that regex can be considered a language in its own right. Further, its usefulness in a wide array of languages makes it invaluable.

~ Answered on 2008-08-29 07:45:37


2

~ Answered on 2008-09-13 21:35:38


2

For Objective C:

Cocoa Programming for Mac OSX - Third Edition Aaron Hillegass Published by Addison Wesley

Programming in Objective C, Stephen G Kochan,

~ Answered on 2008-09-11 01:00:17


2

Given recent developments I think it's important to include the recent explosion of free online course offerings from universities and private companies. The new boston is a tutorial site i've always used for numerous languages for years, great beginner point.

http://www.udacity.com/

https://www.coursera.org/

http://www.coursehero.org/

http://www.codecademy.com/

http://mitx.mit.edu/

http://www.khanacademy.org/

http://thenewboston.org/

~ Answered on 2012-04-25 11:54:40


2

Head First Javascript is a good intro to JS for beginning programmers - it creatively explains basic programming concepts using JS syntax. The Head First series is based on researched techniques for helping you learn and remember new information. They have you do a lot of exercises and puzzles which might seem juvenile, but really help cement the knowledge in your brain.

One exercise I really liked was after they explained data types, they show a picture of a city street and say "label all the data types you can find in this picture." So the blinker on a car is a boolean, the sign on the store is a string, and the address is a number. That helped me get the idea of how to translate real information into a program.

Based only on this book, I'd say the Head First series is a great way to learn something the first time, but the story-like format they have would make them difficult to use as references.

~ Answered on 2008-09-12 18:26:52


2

Python: http://diveintopython.net/

JS: a re-introduction to JavaScript is the introduction to the language (not the browser specifics) for programmers. Don't know a good tutorial on JS in browser.

Great idea by the way!

~ Answered on 2008-08-22 17:13:27


1

hmm, I don't know if I would say that online materials are useless, but I do agree that there is something about books. Maybe they are better written, or maybe it is the act of forking over $50 that makes you more inclined to study the material.

Either way, I agree that books should be part of this question. If anyone has any suggestions for books for languages I will edit the post with the best suggestions.

~ Answered on 2008-08-22 17:41:51


1

I second Kristopher's recommendation of K&R for C.

I've found the "Essential Actionscript 2.0" book quite useful for AS coding (there's an AS3 version out now I believe).

I've found that having real books to thumb through is more helpful than an online reference in some cases. Not really sure why though.

~ Answered on 2008-08-22 17:37:25


1

For Java, I highly recommend Core Java. It's a large tome (or two large tomes), but I've found it to be one of the best references on Java I've read.

~ Answered on 2008-08-25 15:47:07


1

I know this is a cross post from here... but, I think one of the best Java books is Java Concurrency in Practice by Brian Goetz. A rather advanced book - but, it will wear well on your concurrent code and Java development in general.

~ Answered on 2008-08-25 18:26:43


1

The defacto standard for learning Grails is the excellent Getting Started with Grails by Jason Rudolph. You can debate whether it is an online tutorial or a book since it can be purchased but is available as a free download. There are more "real" books being published and I recommend Beginning Groovy and Grails.

~ Answered on 2008-08-26 14:49:56


1

C#

C# to the Point by Hanspeter Mössenböck. On a mere 200 pages he explains C# in astonishing depth, focusing on underlying concepts and concise examples rather than hand waving and Visual Studio screenshots.

For additional information on specific language features, check the C# language specification ECMA-334.

Framework Design Guidelines, a book by Krzysztof Cwalina and Brad Abrams from Microsoft, provides further insight into the main design decisions behind the .NET library.

~ Answered on 2008-08-29 08:11:06


1

I'll second Real World Haskell. After visiting the #stackoverflow IRC Channel (irc.freenode.net) As of now I have spoke to two authors, one on Reddit and one on the #haskell channel on the same server as the SO channel and they have been nothing but helpful in my quest to learn Haskell. It's the first time I would highly recommend a book on programming to anyone.

~ Answered on 2008-10-13 12:59:45


1

Some books on Java I'd recommend:

For Beginners: Head First Java is an excellent introduction to the language. And I must also mention Head First Design Patterns which is a great resource for learners to grasp what can be quite challenging concepts. The easy-going fun style of these books are ideal for ppl new to programming.

A really thorough, comprehensive book on Java SE is Bruce Eckel's Thinking In Java v4. (At just under 1500 pages it's good for weight-training as well!) For those of us not on fat bank-bonuses there are older versions available for free download.

Of course, as many ppl have already mentioned, Josh Bloch's Effective Java v2 is an essential part of any Java developer's library.

~ Answered on 2009-03-29 03:13:18


1

For J2EE you have a very comprehensive tutorial at: http://java.sun.com/javaee/5/docs/tutorial/doc/

~ Answered on 2008-08-24 15:45:45


1

For Python, I would like to suggest 'A Byte of Python'.

Disclosure: I'm the author of this book, but the user feedback on the main page and the book should hopefully speak for itself :)

~ Answered on 2008-09-12 18:13:21


1

The reference you have listed for Ruby is for Ruby on Rails. While still ruby deep down, it is definitely not a place to start for people wanting to learn Ruby.

For Ruby tutorials, I would suggest Why's (Poignant) Guide to Ruby as a great starting point for anyone interested in the language.

If you would want to get into more detail, I would recommend the book Programming Ruby, which has become the standard for all things Ruby. The third edition is currently being written, highlighting Ruby 1.9 features, so I would hold off for a while if anyone is considering buying this book.

~ Answered on 2008-08-23 04:51:43


1

~ Answered on 2009-12-12 00:11:45


0

C

K.N. King has a list of recommended C books in his personal page:

  • The C Puzzle Book (Revised Edition)
  • C: A Reference Manual, Fifth Edition
  • C Unleashed
  • C Traps and Pitfalls
  • Expert C Programming

~ Answered on 2009-12-17 00:33:15


0

~ Answered on 2008-08-25 18:49:39


0

For C++ I am a big fan of C++ Common Knowledge: Essential Intermediate Programming, I like that it is organized into small sections (usually less than 5 pages per topic) So it is easy for me to grab it and read up on concepts that I need to review.

It is a must read for me the night before and on the plane to a job interview.

~ Answered on 2008-08-28 18:55:42


0

Common Lisp

I would add "Practical Common Lisp", by Peter Seibel to the lisp list. It is particularly good at providing examples (MP3 parsing, shoutcast server, HTML compiler) that are topical.

http://gigamonkeys.com/book/

~ Answered on 2008-09-16 18:09:16


0

Java

Java In a Nutshell.

The name is a bit of a misnomer because it's quite thick but it really has everything you need to learn Java.

~ Answered on 2008-09-26 19:13:58


0

C: “Programming in C”, Stephen G. Kochan, Developer's Library.

Organized, clear, elaborate, beautiful.

~ Answered on 2009-07-25 16:01:45


0

For PHP, I'd recommend Advanced PHP Programming by George Schlossnagle. If you're just getting started in PHP, it's probably not the best book to start, but after you have an idea of what you are doing, it's a book that (in my opinion) tells you a lot of best practices and tips that you might miss out on otherwise.

For learning Lisp, I've been recommend to read Practical Common Lisp by Peter Seibel. This one is available online at http://www.gigamonkeys.com/book/.

For Lua, I recommend Programming in Lua by Roberto Ierusalimschy. This book is not the best programming book out there, but among the current selection of Lua books, this would be the best. This first edition of the book is also available online at http://www.lua.org/pil/. As the back cover of the book mentions, the book is oriented towards those who already have some programming experience in another language.

~ Answered on 2008-12-25 01:17:59


0

Java

Java Notes - Very Neat for novice java programmer

~ Answered on 2009-08-12 07:57:25


0

Core Java Vol 1 and 2.

By Cay S. Horstmann and Gary Cornell

Best Java book EVER!!!!!!

~ Answered on 2010-07-01 15:58:31


0

Erlang

I've found Programming Erlang to be an excellent book for learning Erlang. It's written by the guy who created the language, and covers both basic and advanced topics very well. It has some great examples, too.

~ Answered on 2009-05-11 21:30:37


0

~ Answered on 2009-05-11 20:21:19


0

For REALbasic:

Buginning REALbasic, From Novice to Professional by Jerry Lee Ford

Very basic, but a good way to get started

~ Answered on 2008-09-11 01:02:53


0

For C and C++ online tutorials (and other topics),

http://www.cprogramming.com/tutorial.html

~ Answered on 2012-07-17 18:12:46


0

Perl Core Language - Little Black Book - excellent reference!

~ Answered on 2010-08-22 14:50:07


0

~ Answered on 2012-03-12 15:44:24


0

One site I keep coming back to is http://www.javapractices.com. It covers most of the techniques that are discussed in the Effective Java book. Also another good site to check up coding examples (from basic to advanced) is http://www.java2s.com

~ Answered on 2009-02-04 11:16:14


0

~ Answered on 2008-09-04 09:23:12


0

Java: SCJP for Java 6. I still use it as a reference.

~ Answered on 2008-09-04 09:28:39


0

For Java EE 5 there's a separate tutorial JEE tutorial. That's useful, as people often ask about persistence and xml binding in java.

~ Answered on 2008-09-02 08:13:06


Most Viewed Questions: