Head First Python

This book teaches the reader how to write programs in using the head first style that might not be for everybody, but it does seem effective.

Head First Python is a new book in the O’Reilly’s Head First series that aims to teach readers the Python language and includes coverage of running Python code on two platforms that support it: Google Android OS and App Engine.

If you’re coming to Python from a PHP/Javascript background, then there are a lot of habits to unlearn. Keep in mind that many modern languages like PHP, Java or JavaScript base their syntax on a style that can be traced back to C, a massively-influential (and still used) language that dates from the early 1970s. While Python doesn’t completely throw out C’s syntax, it was designed from the start to be readable, so it does things its way, including its use of indentation that makes it unique among mainstream computer languages.

The first six chapters take users through the Python language and cover all the usual things an introductory book is expected to follow: the fundamentals of the language, file access and even using Python’s built-in SQLite database is covered later in the book. The last five chapters cover mostly building online and mobile applications using Google’s App Engine and Android OS.

Like other books in the Head First series, the layout is black, white and grey with plenty of cartoons and characters, plus listings that look like notes have been scribbled around them. The look is pretty unique, but I initially thought it was a gimmick that devoted a lot of space to 1950’s-era clip-art. What I found more useful was the “interviews” with characters like JSON and the question and answer sections. However, in the introduction, the author does explain the reasoning behind this style: primarily it’s meant to keep the reader’s brain engaged; since I did learn Python from this book it must work on some level.

See also  Sam's Teach Yourself Drupal in 24 Hours

Python seems to be a preferred language at Google, evidenced by support for it in the Android OS, via support for it and other languages in the Android Scripting Environment (ASE), and App Engine. So it was a pleasant surprise to find this book covers how to create applications on both these platforms. The section covering Android development includes how to build and test using the Android SDK and how to install your new app on an actual Android phone.

Python has been around for over 20 years now and is used in many areas ranging from desktop applications, games, web development (Django, Plone and others) and mobile applications. This book teaches the reader how to write programs in using the Head First style that might not be for everybody, but it does seem effective. After explaining the language, readers are shown how to put that knowledge to use developing web applications and port an application to run on Android using the ASE.