Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Looking for a reliable way to learn how to program on your own, without being overwhelmed by confusing concepts? Head First Programming introduces the core concepts of writing computer programs -- variables, decisions, loops, functions, and objects -- which apply regardless of the programming language. This book offers concrete examples and exercises in the dynamic and versatile Python language to demonstrate and reinforce these concepts. Learn the basic tools to start writing the programs that interest you, and get a better understanding of what software can (and cannot) do. When you're finished, you'll have the necessary foundation to learn any programming language or tackle any software project you choose. With a focus on programming concepts, this book teaches you how to:

  • Understand the core features of all programming languages, including: variables, statements, decisions, loops, expressions, and operators

  • Reuse code with functions

  • Use library code to save time and effort

  • Select the best data structure to manage complex data

  • Write programs that talk to the Web

  • Share your data with other programs

  • Write programs that test themselves and help you avoid embarrassing coding errors

We think your time is too valuable to waste struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First Programming uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.

Subscriber Reviews

Average Rating: 4 out of 5 rating Based on 4 Ratings

"learn programming ;)" - by Michal Konrad Owsiak on 06-AUG-2011
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I have read Head First series for quite some time. These books are just amazing. My first book was Head First Servlets and JSP and I liked the series from the very beginning. Now, I have few of them on my book shelf – I like the style of the series: well served knowledge. I know how to program and by reading Head First Programming I din’t meant to actually learn programming – I wanted to get into Python. And I think, this is quite good way to achieve that. You not only get the idea of what programming is, you also learn basics of Python. This is a good start for people who have never used it. David and Paul go through all important topics for every beginner: branches, data structures, functions, file access, basic of the GUI and much, much more.

The way book is organized is very similar to other titles from Head First series. Authors utilize recent concepts related to cognitive science – not only what, but also how is important. By introducing image based explanations (we humans base our cognition on pictures) and by explaining everything with very basic language (authors are not afraid that avoiding academic fuss will make them look “less competent”) David and Paul go straight into what is most important – knowledge presented such way, that everybody can learn it. I know people who doesn’t like this series – they assume that books like these are simply silly. They have right to think that way. In my opinion, Head First Programming is as good as other titles from Head First series, and if you want to lear Python and learn how to program – you have to buy it.

Report as Inappropriate

"A good introduction" - by Pragmatopian on 07-MAY-2011
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
A good introduction to basic programming concepts using Python.

I'd recommend checking the errata before you read: unfortunately the example in Chapter 3 was spoiled by changes at Twitter.

Report as Inappropriate

"Great beginner book" - by jd on 26-OCT-2010
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This book was written for those new to programming, and I'd recommend it for those interested but inexperienced in writing code, and anyone who'd like a humorous refresher.

The book unapologetically uses Python as its tutorial language of choice, and that's fine; it also includes several disclaimers about this choice, and explains that it is not "Head First Python", but simply uses Python as what the authors feel was the best option for new programmers.

Unfortunately, there are a few glitches: the choice of using pygame as the basis for Chapter 7 is somewhat difficult to swallow, as this "module" is known for its problems as a cross-platform staple.  There are also incompatabilities between Python versions that may not be adequately explained for new users: the book chose Python 3 for its examples, and for many folks still running Python 2.x (2.6.6 was recently released), the example code requires adjustments that are not adequately explained (but simple for existing programmers to modify).

But if you're running on a compatible platform and can install the software called for by the book (Windows systems just need a few click-and-go installation packages for Python and pygame), the book may serve as a rewarding tutorial on beginning programming, which is exactly what it claims on the tin.

Report as Inappropriate

Table of Contents



The publisher has provided additional content related to this title.


Visit the catalog page for Head First Programming

  • Catalog Page

Visit the errata page for Head First Programming

  • Errata

Download the supplemental electronic content for Head First Programming

  • Supplemental Content