Skip to content

Category: General

Python for Kids

I previously reviewed a book intended to teach programming to kids, Super Scratch Programming Adventure. That book used a self-contained editor and language that was easy to understand, easy to use, but confined its usefulness to a very limited set of roles. This is because of how Scratch is run and written.

It is no secret that I like Python. Even though I really don’t write code anymore, at least not very often, for most purposes I am still a big fan of Python over any other programming language I have learned. I’ve reviewed two Python books in the past, Learning Python and Python for Unix and Linux System Administration. While I know people who use Python as a beginner’s language for kids, I had not done any reading nor read any curriculum used for teaching programming to kids using Python that I felt I could recommend freely. Until now.

Python for Kids: A Playful Introduction to Programming is by Jason R. Briggs. It is the book that fills the hole in my Python library. It starts with a nice introduction and installation instructions for Windows 7, Mac OS X, and most importantly to me, Ubuntu (on which you are really only checking to make sure you have Python 3 installed, since Python is installed by default, although Ubuntu releases older than 12.04 may still have Python 2.x installed as default). Perhaps it is because we started in a similar era, but I found Briggs very easy to read and follow; like me, he started out by learning BASIC on a TRS-80. More likely, the clarity and tone are the result of an intentional focus so that kids can comprehend the complexities of the material. In either case, he did a wonderful job.

The book is broken down into logical chapters, each building upon the previous ones. It starts with foundational concepts like variables and calculations, adds types like strings and lists and tuples, then begins with an introduction to graphic interaction using the turtle module. This is much sooner than typical, and I think it is beneficial because it gives kids a quicker jump to that fun moment of power, “Hey! I just made that thing move on the screen.”

Then the book builds understanding with explanations of if and else statements and loops. On top of that are added the concepts of functions, modules, classes, and objects. We are now a mere third of the way through the book.

From here on, the simple explanations given will be expanded upon in easily-absorbed chunks. Built-in Python functions and useful modules each get a chapter. Then, we revisit turtle graphics to play some more. Once the basic graphic concepts are taught with turtle, tkinter is presented.

The last third of the book is focused on games. Specifically, using some fun game examples to flesh out the concepts more completely, developing greater fluency with the concepts, grammar, and vocabulary already presented.

One weakness of many beginning programming books is that once you finish the book you have to do further research on your own to figure out what to do next. I love that Python for Kids does not end this way, but instead includes a useful Appendix titled Where to Go from Here. This Appendix is short, but gives enough information to help the reader learn just a little bit about some Python resources and other programming languages to make those next steps just a little bit easier.

This book is suitable for kids in upper elementary school and older. The only real prerequisites are the ability to read and understand the concepts and a computer that will run Python. While the book is clearly written using suitably simple vocabulary, it is not watered down and never talks down to the reader. For this reason, despite the title, this book could be just as useful for the adult programming novice, too.

Disclosure: I was given my copy of this book by the publisher as a review copy.

LEGO books for all

This time around I have a real treat: three books about LEGO. These bricks were a staple of my childhood. They are well made and foster creativity in ways no other toy does. My LEGO collection has been handed down to my kids (who allow me to play with them sometimes) and added to many times.

These books give interesting insights and ideas that LEGO aficionados may enjoy. Each book is focused on a different segment of this audience. All are from No Starch Press. All the books are nicely printed on quality paper and include amazing color illustrations throughout. I’ll say right up front that, while I really liked all three of these books, I am reviewing them in order of preference. This preference reflects my personal tastes more than my feelings about the quality or content of any of the books, though. I think each deserves a high rating.

The first book is The Unofficial LEGO Builder’s Guide, 2nd Edition by Allan Bedford. This book has a lot of words, but they are not wasted words. It communicates the philosophy behind the engineering of LEGO and then builds on that knowledge the skills necessary to design and create anything you can conceive of using LEGO. That’s an amazing feat! There are some step by step directions to build a few things, but these are used more to illustrate good and useful techniques rather than give examples of what to build. The information given is deep, interesting, and would give a great foundation to anyone wanting to learn to build using other materials later in life. I recommend this book to anyone from older elementary school all the way through adulthood.

The second book is The LEGO Adventure Book, Vol. 1 by Megan Rothrock. This hardcover book includes a series of about 25 step-by-step building guides that are similar to what is provided when you buy a LEGO kit and pictures of about 200 built models for further inspiration. The illustrations in this book are stellar and the models are outstanding. Anyone looking to be inspired to build more interesting and more beautiful things will find this book thrilling. The book follows a loose story line focused on an adventure, a quest to learn how to build interesting and complicated things with LEGO. The story line is neither vital nor distracting, it just gives an fun excuse to move from idea to idea. This is the book that I expect my kids to enjoy most (ages 7, 9, and 10), with the older kids graduating to the book above very soon. This book includes “Vol. 1” in the title. I haven’t seen any other volumes, but will be watching for their appearance.

The third book is The Unofficial LEGO Technic Builder’s Guide by Paweł “Sariel” Kmieć. This is the most technical of the books in this review. Not everyone moves from standard LEGO bricks and kits to the Technic series. Those with a bent toward engineering, toward learning the mechanics of systems, love Technic kits and what can be done with them. I remember building my first car with a working steering wheel that actually turned the front wheels using Technic pieces back when I was in middle school (say 12 or 13 years old). I loved learning how this stuff works and the flexibility that comes from building with the even-more-precise-and-flexible gears, beams, and technical pieces available. I remember building a model of an internal combustion engine and tons of other stuff of this sort. Not everyone finds this interesting, and this smaller audience is the only reason this book is listed last. If you like this sort of thing, this book will expand your palette in ways you never imagined. You will learn about all the types of pieces available, how to use them to even greater effect, and learn some great mechanical science at the same time.

Disclosure: I was given my copy of these books by the publisher as review copies.

Ubuntu on a Mac

With every copy of Ubuntu Unleashed 2013 Edition we include a DVD of Ubuntu 12.10. This is similar to what we have done with past editions. The contents of the DVD are identical to and taken from the main Ubuntu download page. In the past, this disc has been sufficient to boot live or install on either a Windows machine or a Mac. However, this time around, anyone putting the disc in a Mac will find that the machine will not boot from the disc.

Bummer. We didn’t discover this until after the book was printed, the DVDs were created and attached, and the book shipped. When I read through the install documentation for Ubuntu while doing the editing for the new edition of the book, I failed to see any note of there being a problem. In fact, as I looked today (20 December 2012), there is still no note of any special needs when using Apple Mac hardware on http://www.ubuntu.com/download/desktop or in the install instructions at http://www.ubuntu.com/download/help/install-desktop-latest.

I have found that there is a different install DVD image available for 64 bit Mac that anyone can download from http://releases.ubuntu.com/quantal/, but this is not mentioned anywhere else that I can find and is not available from the main download page. I found it by searching Google and discovering the problem is common and that a new iso was created to circumvent a Mac-specific issue (details below on the actual issue).

If you bought my book and own Mac hardware, I apologize for the inconvenience. The DVD attached to the book will not boot on your machine, but you can download the Mac image mentioned just above and it should work.

For those interested in the technical details of the problem, here is a high-level description.

In past years, computers used a BIOS, or Basic Input/Output System, to load some software necessary for the hardware to then read and load an operating system. The industry has been moving to the UEFI, or Unified Extensible Firmware Interface, which serves a similar purpose to a BIOS but communicates differently and with greater flexibility. Most UEFI software includes legacy support for BIOS services to ensure compatibility across a wide range of hardware. Linux supports UEFI, and as a result, so does Ubuntu.

Because the version of UEFI that is included with Mac hardware only has to support a very limited range of hardware, it does not include that BIOS legacy support (and perhaps other support). This means that Mac hardware using UEFI can not read the files from the disc that are needed to boot Ubuntu. This is a direct result of Apple making a decision to use only the parts of the UEFI standard that support their Apple hardware. While it is not my preference as a geek and tinkerer, it is a reasonable business decision as Apple seems to prefer to control the entire user experience so that everything will “just work” for their users. The downside is that it becomes difficult to use any hardware or software they do not produce or directly sanction. Booting any operating system that is not OS X on Mac hardware is a use case that Apple does not support, so it doesn’t work easily. The workaround is to download the Ubuntu-community-provided modified DVD image linked above and use it as it has received some modifications that enable the version of UEFI on this Mac hardware to recognize the DVD and allow Ubuntu to boot.

Advent 2012, justice, and God stuff

Advent really starts in a couple of days, but I’m already thinking about it. Here’s my thought for the season. Feel free to ignore this if it isn’t your thing. If my religious post makes you feel a little grumpy, please read it in the light of my post from 2007 about Holiday Greetings and hyper sensitivity.

The season of Advent is about waiting and anticipation. We believe these things, but are waiting for their full arrival…just as we believe in faith that Christ’s actions brought about our justification, but we are still waiting for the completion.

Christianity too often seems to teach the Gospel in terms of punitive justice, as if to say that because God is being kind, he chose through Christ to die in your place and take the punishment you deserve.

What if the real message is one of restorative justice, one that turns the entire idea of “an eye for an eye” upside down? What if the real message is that God saw the problems that result from sin and chose to come through Christ and take all those problems upon himself, along with the sin that causes them, and have them die with him?

The upshot then is that we can be justified, not merely in the sense of “the jury decided to call you innocent,” but in the sense that we who were unclean were loved and accepted and cleaned from the inside out so that there is no longer anything within us that keeps us from being with God?

That is a much more beautiful reading of the Gospels, of Romans, of the entire message of the Bible.

I think it is also the message Christ taught and which earned him the moniker “friend of sinners,” originally intended as an insult, and that message is a large part of why he was perceived as a threat by the religious powers of his day.

I think it is the real message intended by Saint Paul for the readers of his letter to the Romans and why he felt he had to so strongly and completely renounce his former belief in religiously motivated violence.

In my opinion, this is the beauty of Advent and this time of year–God sees each of us as we are, loves and accepts each of us, and as we let him, gently changes us to become more and more pure, as we allow ourselves to die with Christ so that Christ may live in and through us.

I once heard an Eastern Orthodox priest say that God has sanctified us (made us holy), God is sanctifying us (is making us holy), and that God will sanctify us (will make us holy). For one outside of time, these can happen “concurrently.” For those of us bound by time, that is nearly inconceivable. I think the phrase in the first sentence sums it up as well as it is possible to sum it up. Advent is a beautiful celebration of that mystery, of waiting for what will come even though it has already happened (and is happening). It celebrates anticipation and hope, expectation and wonder, a looking past the flawed things that are and toward an ideal hoped for future, both personally and for those around us.

Whether you believe the same as me or not, I hope that I can display to you the same love, acceptance, and gentle desire for ever-improving good things for you. This is my wish for this time of year.

Economix: How Our Economy Works

I live in the United States of America. It is an election year. The election is next month. The atmosphere is charged with political conversation and rhetoric. Some of it is based on knowledge. Some of it is based on fancy. Some of it is so obviously false that it is stunning that the speaker/writer believes that anyone will buy in to what is being said/written. On many occasions it is obvious that too many people have no understanding of economics, how an economy works, or even basic history. This book weaves all three together beautifully.

Economix: How Our Economy Works provides an up to date, well researched, well presented, and detailed look at the economy. The book presents multiple economic theories clearly and with a flair that is hard to describe but which will thrill all but the most dry-textbook-loving reader. It is a comic that is also a better textbook than most I have read, especially for people who do not already know the history of Western economic thought. Ever wonder what differentiates a free market from a controlled market? What has historically caused economies to grow or shrink? Why government spending, inflation, and interest rates matter and how each can affect an economy? This is the book to get you started.

As a bonus, you will also learn what differentiates capitalism from socialism from communism and other systems, what has influenced each, and what is driving and influencing the current worldwide and U.S. political and economic climates. Want to understand the basic ideas of the big and influential people in economic theory like Adam Smith, Karl Marx, or John Maynard Keynes or maybe the basic ideas that drive past and present Chairmen of the Federal Reserve Bank like Alan Greenspan or Ben Bernanke? This book will give you enough detail to help you understand the theoretical underpinnings of their policies and recommendations and it does so in a way that my (admittedly really smart) 10 year old can understand most of it.

If you ever mention the economy, but don’t really know with certainty what you are talking about, read this book. If you hear people being called “socialist” or “fascist” and wonder what that means, read this book. If you have heard of oligarchies and monopolies and don’t really know what they are or why they would matter, read this book. If you only read one book on the economy, read this one. Yeah, I’m recommending it that strongly. I got my copy for free, and I’m thinking of giving it away so that I can go pay for one and help support the author so that the book stays in print and finds a wider audience.

Oh, and the comic art is quite good, too, but suddenly that seems anticlimactic. Too bad, because that really isn’t fair to the artist, who is quite talented in his own right.

Disclosure: I was given my copy of this book by the publisher as a review copy.

Are All Book Reviews Positive?

No, not all my reviews are positive, but it has been a while since I have posted even a lukewarm review. That is intentional. I got tired of making half-hearted recommendations for things I wasn’t thrilled about. Especially over the last two years, I have become more and more picky about what I am willing to recommend. So, as a result, all my reviews are pretty positive. If I don’t mention a book that I have been asked to review, I either haven’t read it, or I’m not willing to recommend it strongly.

EDIT, 23 Nov. 2013: Over the last year since this post was written, I have chosen not to publicly review several books. However, I have contacted the publishers directly in those instances where the book was sent to me as a review copy and have submitted my lukewarm or worse comments directly to them, in the hopes of both sparing them public shame and of improving a second edition, should one be created. I thought that was worth sharing.

Super Scratch Programming Adventure!

My parents bought my first computer for me in 1981. I was 11. When my TRS-80 Color Computer was turned on, it booted up into a BASIC editor. What it did afterward was up to me. That computer came with a whopping 4K (not a typo, K) of RAM and no storage. We bought a cable to connect the computer to a cassette tape deck so that I could store programs on cassettes. It took several minutes to load an entire program into memory.

I’m feeling nostalgic, but this article is not about that computer. It is about learning to program as a kid. I learned BASIC because I didn’t know anything else existed. I had this cool machine and I wanted to bend it to my will, to make it do my bidding. It started with simple things like accepting text input and repeating it on the screen. Later I learned how to save a Christmas card list and print it using an early dot matrix printers, the DMP-100, which had a really amazing 5×7 matrix (which meant no true descending characters, those ys and gs and stuff all got moved up and looked weird…sorry, feeling nostalgic again).

Super Scratch Programming Adventure! provides a much easier and extremely fun entry into programming. It doesn’t make the learner focus on the really gritty details, like people in my generation had to do. That’s okay. What it does do is give kids a way to do the parts that I loved about owning a computer in the early 1980s, it gives them a chance to bend it to their will, to make the computer do what they want it to do.

I have three kids, ages 6, 9, and 10. Each of them has read this book. Each of them enjoyed the clever comic narrative that introduces each chapter. Each of them, even the youngest, found the book enjoyable and interesting as well as easy to understand and follow. The software used for programming, Scratch, is freely available from MIT, where it was created, and runs on several platforms including our family’s beloved Ubuntu. I installed it on their computer and off they went. They haven’t finished the book or the exercises yet, but they are doing what I did as a kid, having fun with a powerful toy that they can control.

The meat of the book is impressive. It covers some deep topics but always remains readable and clear for those within its target audience, which according to a note on the back cover is “for ages 8 and up.” I admit it, my 6 year old is advanced <grin>. The book leads the reader through the process of creating games in Scratch. Along the way, you learn about graphics, data flow, sound effects, subroutines, and more. This is done using an interface that is menu driven and easy. The concepts are what are focused upon, not the semantics. This is good, because I’ve known too many programmers who are good at semantics and yet struggle to know when or why certain things are done. I prefer to see the “why” understood first, then the “how” is easily transferred to other languages and contexts.

I’ve given away other programming books to kids, like the time a few years ago when I gave my nephew a book on game programming in Python. Starting now, this will be the book I recommend or give away to kids (to be followed later with Python or other stuff…). If you know a kid or even a young teen who wants to make their computer do stuff, this is a good start.

Disclosure: I was given my copy of this book by the publisher as a review copy.

Think Like a Programmer

I used to write software. I confess, it has been a long time. There are parts about doing so that I loved (problem solving, being creative) and parts I didn’t enjoy (solving problems that I didn’t find interesting, over and over and over again). This book concentrates on the parts I enjoyed most.

Think Like a Programmer came out earlier in 2012. It was published by No Starch Press, which consistently puts out books that impress me. It is one of the more consistent computer-related publishers and when I’m researching a specific topic, I generally look at any they offer, along with O’Reilly, before looking at other publishers’ offerings. I should probably disclose that back in 2009 I talked with No Starch about writing a book about Ubuntu. That didn’t work out and shortly afterward I ended up taking over the Ubuntu Unleashed title for SAMS when the previous author team didn’t want to continue with it, but my email conversations with the head honcho (or as their website says, the “Big Fish”), Bill Pollock, left me with a favorable impression of the company.

This is not a “how to program” book that concentrates on learning the syntax, vocabulary, and grammar of a specific programming language. You will need to learn that elsewhere. In fact, you probably want to learn basic C++ before you read this book. While the concepts in this book will apply across programming languages, examples are given using C++. Those who already know Java or C# and who are flexible will probably be okay, but will need to be experienced enough to translate.

This is a “how to program” book that focuses on figuring out how and when to use the various concepts and tools within a language to creatively solve problems. I have never read another book that covers this topic. The idea is that learning the basics of a language helps you understand what the tools do, but it is usually experience that helps you understand and create strategies for using them. You may know what a pointer is and the mechanics of using one, but seeing when using pointers is most effective only happens after seeing them at work in context. Context is what this book tries to give. The author, V. Anton Spraul, calls the missing skill problem solving, “the ability to take a given problem description and write an original program to solve it.” The cool thing is that the book teaches the sort of problem solving skills that usually require years of experience in a systematic, logical way.

The book starts with a discussion about strategies. Problems almost always have constraints, things that limit the paths you have available for solving them. Good problem solving finds a way to do what must be done while not violating any of these boundaries. This involves creative thinking. This 20-some page discussion is the foundation for the rest of the book.

As the book continues, you will meet up with all your conceptual friends you learned about in your programming class or book. Only this time, the discussion is not about mechanics, but strategy. Why is tracking state important? When should I use scalar variables vs arrays vs multidimensional arrays? What problems are better solved using pointers and dynamic memory? How do I create meaningful classes and objects (and not just “arbitrary bags of leftovers”)? Since C++ is flexible, it affords a nice discussion of when a procedural and when an object-oriented approach may be most suitable. Sequential or recursive? If using recursion, head or tail? What about reusing code?

The book ends with a useful chapter on thinking like a programmer. Yes, that is the topic of the entire book, but whereas each chapter focuses on discrete parts, this chapter brings all the parts together to help the reader learn to synthesize a master plan when solving specific problems.

Bottom line: you probably need a year or two of experience for this book to be really useful. This is because once you have struggled with some of the issues the book discusses you are going to be much better equipped to see how useful the book is. The bare minimum is to either have studied C++ or to have spent enough time programming in another language or two so that you understand what the C++ discussions and samples are illustrating. If you fit here, the book is highly recommended.

Disclosure: I was given my copy of this book by the publisher as a review copy.