Computing Reviews

Learn Raspberry Pi programming with Python
Donat W., Apress,Berkeley, CA,2014. 256 pp.Type:Book
Date Reviewed: 09/26/14

This book is bizarrely titled. What “learn programming” book has a section called “Bonus: Soldering Techniques,” or contains the sentence, “You’ll need to purchase or rent a tank of helium from a party supply store or welding supply house?” It is indicative that the publisher does not class it under Python books. The book would be better described with the title Fun things you can do with a Raspberry Pi, Linux, and Python. And these are fun things. After introductory chapters on the Pi, Linux, Python and electronics, there are ten chapters ranging from “The Web Bot” (the only purely software project) to “The Radio-Controlled Airplane” (where the Pi reads off a global positioning system (GPS) receiver and builds a Keyhole Markup Language (KML) file so Google Earth can plot the flight). This is a good example: there are electronics (GPS receiver, camera, interfacing), changing /boot/cmdline.txt and /etc/inittab to repurpose the universal asynchronous receiver/transmitter (UART), Python to use the logging module to collect the data, a Python program to convert the log into KML, and the use of Python threads (and the thread class) to control the polling.

I have various quibbles with the book.

The book states that /home is your default home directory, whereas it is /home/username. In addition, it uses Python 2 syntax for printing, without a mention that Python 3 is different; indeed, when Python versions are discussed, this point is not made.

The author states that “Python does not distinguish between single and double quotes,” whereas he means “strings can be delimited by matching single quotes or matching double quotes, and the result is the same.”

To get the area of a square, we should square the length of the sides, not the number of sides.

In electricity, “I” does not stand for inductance, but for (current) intensity.

The discussion on parsing confuses the general concept of parsing with the parsing of web pages.

The anemometer experiment asserts that there is an exponential relationship between anemometer rotation rate and wind speed. I know of no physical basis for this, and believe the data could be modeled equally well by a linear model with a start-up effect. There is no explanation of how the reader should fit his/her own data.

In at least one area, bad line breaking destroys the Python. This would have been an excellent opportunity to explain continuation lines.

There are many excellent points as well. There is a strong emphasis on using existing modules rather than programming from scratch. “Electronics” has some excellent health and safety points. The “Web Bot” chapter starts with a good discussion on “bot etiquette.” Page 133 contains a very clear explanation of servos.

Items and instructions are repeated in different chapters. While annoying to the straight-through textbook reader, this makes the practical chapters much more self-contained.

Would I recommend this as a Python programming book? No (I’d recommend Downey’s book [1]). Should it be in every high school’s library? Yes. Would I give it as a Christmas present? Yes, to the right child, or parents.


1)

Downey, A. Think Python: how to think like a computer scientist. Green Tea Press, Needham, MA, 2012.

Reviewer:  J. H. Davenport Review #: CR142769 (1501-0009)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy