Python for Kids – A fun & efficient how-to book that even grownups can enjoy – #programming #bookreview

Python for Kids
Jason R. Briggs
(No Starch Press – paperback, Kindle)

Subtitled “A Playful Introduction to Programming,” Python for Kids is recommended “for kids aged 10+ (and their parents).”

But what if your kids are grown or you don’t have any kids? Should you ignore this book while learning Python? Absolutely not.

I’ve recently taken two Python 3 classes, and I wish I had had many of the explanations and illustrations in Python for Kids available to help me grasp some of the concepts. I’m keeping this book handy on my shelf for quick reference, right next to works such as Head First Python and Think Python.

Yeah, it contains plenty of silliness for kids, such as a wizard’s shopping list that includes “bear burp” and “slug butter,” and using if and elif statements to create jokes such as “What did the green grape say to the blue grape? Breathe! Breathe!” (I have grandchildren who consider this stuff uproariously funny.)

But Python for Kids also covers a lot of serious topics in its 316 pages and shows—simply and clearly—how to handle many major and minor aspects of the Python programming language. NOTE: This book is for the newer 3.X versions of Python, not older 2.X versions that are still in use and still a focus of some books for beginners.

One Python class I took didn’t introduce tuples until the 7th week of lectures. Python for Kids, however, has the reader using tuples on page 38, right after six pages of learning how to work with strings and lists. And the explanations and examples for these elements are clearer than what I got in a college-level course. (Of course, it helps when exercises involve “bear burp” and “gorilla belly-button lint” rather than boring generics such as “Mary has 3 oranges” and “Jack has 6 pencils.”)

Jason R. Brigg’s new book also shows how to draw shapes and patterns and create simple games and animations—topics not covered in some other beginning Python books I have used.

Another cool feature of this excellent how-to book is an afterword titled “Where to Go from Here.” It provides suggestions and gives links for those who want to learn more about games and graphics programming or take up other programming languages such as Ruby, PHP or JavaScript.

Bottom line, Python for Kids offers education and entertainment for children, their parents, and almost anyone else serious about having some fun while learning Python 3.

Si Dunn

Practical Computer Vision with SimpleCV – ‘Seeing’ with Python – #programming #bookreview

Practical Computer Vision with SimpleCV
Kurt Demaagd, Anthony Oliver, Nathan Oostendorp, and Katherine Scott
(O’Reilly, paperbackKindle)

SimpleCV, or Simple Computer Vision, is “an easy-to-use Python framework that bundles together open source computer vision libraries and algorithms for solving problems,” according to the authors of this useful and informative how-to book.

The subtitle is “Making Computers See in Python,” and the codes examples require Python 2.7.

Why learn computer vision? “As cameras are becoming standard PC hardware and a required feature of mobile devices, computer vision is moving from a niche tool to an increasingly common tool for a diverse range of applications,” the authors note.

Indeed, cameras and computer vision now are being used in everything from facial recognition systems and video games to automobile safety, industrial automation, medicine, planetary exploration, and even agriculture.

“The SimpleCV framework has compiled installers for Windows, Mac, and Ubuntu Linux, but it can be used on any system on which Python and OpenCV can be built,” the authors state.

Practical Computer Vision with SimpleCV shows how to use the framework and simple application examples to get started toward building your own computer vision applications. The 240-page book has 10 chapters:

  • Introduction
  • Getting to Know the SimpleCV Framework
  • Image Sources
  • Pixels and Images
  • The Impact of Light
  • Image Arithmetic
  • Drawing on Images
  • Basic Feature Detection
  • FeatureSet Manipulation
  • Advanced Features (focuses on optical flow)

The book also has three appendices: Advanced Shell Tips, Cameras and Lenses; and Advanced Features (deals with advanced segmentation and feature extraction tools).

Practical Computer Vision with SimpleCV provides a good overview of computer vision basics and shows, using simple but effective examples, how you can put them to work.

Si Dunn

Think Python – A gentle and effective guide to learning Python programming – #programming #bookreview

Think Python
Allen B. Downey
(O’Reilly, paperbackKindle)

First, a confession. My favorite book for learning Python is Head First Python by Paul Barry. It literally does throw you head-first into Python programming. By page 10, it has you working with nested lists. By page 30, you are creating a function that you will save and turn into a module just a few pages later. By the time you hit page 50, you have learned how to upload code to PyPi. And, as the book continues, you keep improving and expanding the functionality of one project that stays in development from chapter to chapter.

That said, I hereby declare that Think Python by Allen B. Downey is my new co-favorite book for learning Python.  I intend to keep it handy right alongside Head First Python.

Just about anyone studying or using Python can benefit from having Think Python on their bookshelf, in their computer, on their mobile device or, better yet, accessible in all these places. It is an excellent reference book, as well as a clear, concise and calm how-to guide for beginning programmers.

Think Python takes a gentle yet effective approach to introducing and exploring the language one step at a time. First you learn some basic programming concepts. Then, 13 pages in, you start easing into the language at the level of “Hello, World!”, plus variables, expressions, and statements.

The 277-page book has 19 chapters that carefully explain and illustrate each key point, without overkill. The author is a veteran instructor of computer languages, and he also is the author of a well-known book that has been around since 1999, in one form or another: How to Think Like a Computer Scientist.

Think Python is an outgrowth of the Python version that book. Downey has added materials on debugging and other topics, plus some exercises and case studies. And he has gotten plenty of proofreading help from more than 100 enthusiastic followers of his writings and teaching.

What I like most about Think Python are its short, concise, clear explanations of each new concept and its use of very short code examples. When I’m in the mood to spend just a few minutes reviewing or learning a new concept in Python, I can open Think Python and quickly find a refresher or a new area to try out. Head First Python, on the other hand, suits me best when I have an hour or two to stay focused on reading, keying in a lot more code and making the required changes to the ongoing project.

One minor caution: There are differences – sometimes significant and sometimes merely irritating – between Python 3 and Python 2. Head First Python focuses on Python 3 code and Think Python uses Python 2 code examples. But Think Python’s author has been careful to minimize the conflict and explains what to do when using Python 3.

The main thing to remember is that the print statement in Python 2 has become print(), a function, in Python 3. So if, for example, the book’s code says print ‘Hello, World!’ and you are using Python 3, you type print(‘Hello, World!’), instead.

It’s not hard. But the opportunity to print or print() something does come up a lot in the text.

Si Dunn

Programming Computer Vision with Python – A good introduction to tools & algorithms for analyzing images – #bookreview

Programming Computer Vision with Python
Jan Erik Solem
(O’Reilly, paperbackKindle)

“Computer vision,” Jan Erik Solem states in his new book, “is the automated extraction of information from images.” That information, he adds, “can mean anything from 3D models, camera positions, object detection and recognition to grouping and searching image content.”

His text takes “a wide definition of computer vision and include[s] things like image warping, de-noising, and augmented reality.” But he concedes: “Practical computer vision contains a mix of programming, modeling, and mathematics and is sometimes difficult to grasp.”

Fortunately, Programming Computer Vision with Python stays deliberately light on theory and focuses on providing complete code examples, some fundamental algorithms, and numerous illustrations that help explain and demonstrate key concepts. The book is written well and nicely organized, and the code examples mostly are not very lengthy and can be downloaded from a link provided in the book.

A caution: The code examples are written in 2.x Python (you will need 2.6 or later) and are not compatible with 3.x Python. And a second caution: The author’s idea of “basic mathematics” includes knowing about “matrices, vectors, matrix multiplication, and standard mathematical functions and concepts like derivatives and gradients.” He emphasizes, however: “Readers can skip the math if they like and still use the example code.”

If you want to explore the basics of computer vision and improve your Python 2.x skills, this 247-page book likely can keep you busy and challenged for a good while. The code examples focus on “object recognition, content-based image retrieval, image search, optical character recognition, optical flow, tracking, 3D reconstruction, stereo imaging, augmented reality, pose estimation, panorama creation, image segmentation, de-noising, image grouping, and more.” Whew!

The chapters in Programming Computer Vision with Python are:

  • 1.      Basic Image Handling and Processing
  • 2.      Local Image Description
  • 3.      Image to Image Mapping
  • 4.      Camera Models and Augmented Reality
  • 5.      Multiple View Geometry
  • 6.      Clustering Images
  • 7.      Searching Images
  • 8.      Classifying Image Content
  • 9.      Image Segmentation
  • 10.  Open CV

If you are new to the Python programming language, Solem recommends both the online documentation at and the Mark Lutz book, Learning Python.

Si Dunn