top | item 3380141

Ask HN: Best Intro Programming Book?

26 points| pg | 14 years ago | reply

I want to get my 17 year old nephew an introductory programming book for Christmas. Probably about Python, but it doesn't have to be. What's currently considered to be the best intro to programming?

17 comments

order
[+] anthonyb|14 years ago|reply
It might help to have a bit more background on your nephew and his interests.

If he's generally geeky, then Learn Python the Hard Way is excellent - but you need to already be very motivated to sit down and work through the exercises.

Similarly, Hello World! is a good book for the complete beginner, but a 17 year old might find it a bit easy.

And based on the reviewers who've looked at it so far, Hello Python! tends to do well with relative beginners, but complete novices find it a bit hard, and it annoys the hell out of some experienced programmers - not sure why, I think it's because I don't explain everything in detail and gloss over to the interesting bits :)

Have you considered something along the lines of an Arduino + book? Some people seem to get a kick out of making things actually happen, rather than just appear on a screen...

[+] rcamera|14 years ago|reply
I second the arduino + book suggestion. I had a tough time learning how to program, I had trouble motivating myself because all the things I wanted to do were complex, and "Hello World" programs aren't motivating, just letters on a screen...

After I got my first Lego Mindstorm robot (13 yrs-old), I got more interested, but it was a pretty limited robot. It wasn't until I started playing Second Life (15-16 yrs old) and learned their scripting language (and even made some money) that I got highly motivated, because I could see things happening and it was quite easy.

I would say an Arduino + book would have motivated me even further than SL. I know Wiring (Arduino's programming language, which is pretty similar to C) isn't as pretty as python, but when you are coding for the first time, you don't mind syntax, all you care is being able to finish the challenges you (or someone) set for yourself.

EDIT: I don't know any beginner arduino book, but Make magazine and some Make books available in O'Reilly seem to be good resources.

[+] xiaoma|14 years ago|reply
I strongly suggest Learn to Program by Chris Pine. http://pragprog.com/book/ltp2/learn-to-program

I saw a non-technical friend go through it in the course of about a month last year. Though the book doesn't teach in Python, it does teach general programming concepts and my buddy is currently doing a lot of Python coding as a grad student. In fact he credits his programming skills as a giving him a huge edge in his research job.

The author did an excellent job of making even basic exercises in the earliest chapters as engaging as they reasonably could be.

[+] sheff|14 years ago|reply
This is a good suggestion , as the Chris Pine book is a very easy, quick read.

Also, the O'Reilly Head First books are usually good - with a fairly light-hearted, humorous approach for starters - and their "Head First Programming" book is Python based. ( http://shop.oreilly.com/product/9780596802387.do?sortby=publ... )

Does it have to be a book ? Maybe a subscription to something like Code School ( http://www.codeschool.com ) would also be quite cool, as they have courses like "Try Ruby" and "Rails for Zombies" .

[+] aridiculous|14 years ago|reply
It wasn't bad, but I don't agree with this being recommended as a best first book.

Pine's code uses a fair amount of personal coding preferences without explaining them. To a beginner, this can be extremely confusing.

How to Think like a Computer Scientist was a superior introduction in my opinion. It got me excited about learning a language comprehensively.

[+] anthonyb|14 years ago|reply
I'm just putting the finishing touches on Hello Python (http://manning.com/briggs). It's not out in print yet, so I don't know whether it's what you're looking for, but you can get it on Manning's MEAP program.

The basic theme of the book is that I replicate the path that most programmers follow when they learn how to program - start with something small and build up. I cover games and a couple of Python's more important tools, like Twisted, Pyglet and Django.

[+] kennystone|14 years ago|reply
An arduino board with an intro book might be a good gift for beginner programmers.

http://shop.oreilly.com/product/9780596155520.do

It's incredibly difficult to learn to program if you are doing it just for the sake of learning. Most people learn best and stay motivated with a real project.

[+] cschmidt|14 years ago|reply
My son liked "Hello World! Computer Programming for Kids and Other Beginners", which teaches python. He preferred it to Zed Shaw's "Learn Python the Hard Way".
[+] benkant|14 years ago|reply
I currently recommend "Python the Hard Way". I learnt using the MicroSoft BASIC manual that was around circa 1986 and I turned out ok.
[+] billpatrianakos|14 years ago|reply
Depends on what the goal is. Considering who's asking I'd assume the other commenters options would seem more attractive but I'd honestly never discount a good old "For Dummies" book. Seriously! I was about 17 when I deciding to move from online tutorials to books and I found that I really couldn't appreciate the O'Reilly books or any of the other suggestions you'd expect from this crowd until after I got through a couple of "For Dummies" books. "PHP for Dummies" was my favorite of the ones I read.

I'm sure I'll be laughed at for suggesting it but they're really amazing at explaining things in layman's terms, there's usually some project that's useful that you build throughout it, and you actually retain the information when you're done. I know they don't teach you the latest greatest but as a beginner you don't need that stuff anyway and the fundamentals are what it's really about. "For Dummies" books are underrated. They're not cool but they work.