code, politics, and life

Python Crash Course

Python Crash Course is really two books in one. The first half of the book teaches the basics of programming in Python, and the second half includes three in-depth projects. I wrote the book for anyone old enough to not want a kid-focused book. I’ve heard from readers as young as 10 and people in their 80s and 90s, and everyone in between.

The first half of the book aims to give people a solid introduction to programming, as efficiently as possible. Concepts are explained clearly and in simple terms, without dumbing anything down. I included all the topics that people need to know in order to start working on interesting projects, such as how to store information in a variety of ways and how to organize code into cleanly-structured blocks. I also included topics I wished I had leanred much earlier in my career, such as handling errors and testing your code.

The second half of the book walks readers through three projects - a video game, a series of data visualizations, and a web app that gets deplooyed to a live server. The video game is a Space Invaders clone, and the projectt is structured in a way that you can adapt it to just about any 2D game you might want to build. The data visualizations start with computer-generated data and then expand to focus on data that you can download. Readers leran to analyze and visualize weather data, and generate a map showing global earthquake activity. The last visualization focuses on accessing data through an API.

In the final project readers build a web app called Learning Log, an online learning journal. You learn how to store users’ information in a database, manage user accounts, add an appealing visual style, and deploy your project to a live server. When you’re finished you’ll have a meaningful app that anyone in the world can use.

Python Crash Course is the best-selling Python book in the world, and for good reason. It’s helped hundreds of thousands of people go from knowing nothing about programming at all to building the projects they’ve been wanting to build. It’s helped people experienced in other languages pick up Python quickly and efficiently. It’s helped many people start on a career they weren’t sure was available to them. It’s helped students with unavailable teachers and dry textbooks get up to speed quickly, and it’s helped mid-career people expand their capabilites.

You can buy Python Crash Course directly from No Starch Press, in which case you’ll get an ebook with the print copy. You can also buy it from Barnes and Noble or Amazon. If you’re working through the book, there’s also an extensive set of online resources.

Python Flash Cards

No Starch Press publishes a set of Scratch Coding Cards for kids, and they asked if I’d develop a set of flash cards focusing on Python for learners of all ages. This was a really interesting project to work on; it’s interesting to come up with meaningful bite-size chunks of Python to focus on.

The first group of cards covers Concepts and Vocabulary, to help you understand many of the essential terms that are thrown around regularly by programmers. The rest of the groups focus on specific kinds of syntax and tools, such as Simple Data Types and Lists and Tuples. You can see a table of contents for the entire set here.

The cards haven’t made a strong impression online, but when I’ve spent time at the No Starch booth at PyCon many people bought a set after seeing the cards in person. Teachers have also been enthusiastic about them, as there are a number of ways they can be used in the classroom. If you like working with offline learning materials at times and like your learning in bite-size chunks, you might like the flash cards. You can buy them direct from No Starch Press or through Barnes and Noble or Amazon. You can also see them in person at Barnes and Noble stores.

The Road to Alaska

When I was in my early 20s, I decided to ride my bike across the US. I had been teaching for two years, I had the summer off, and I wanted to see the country outside the northeast corner where I had grown up. I flew from my home in NYC to Seattle with just a bike and some camping gear, and headed back east. I loved the bicycle travle lifestyle - wake up outdoors, ride through beautiful landscapes meeting people in their everyday lives, and go to sleep outdoors again at the end of every day.

I loved that journey, and wanted more. I wanted to try something harder, so I decided to cross the country again, but taking a southern route instead. So I flew to San Francisco the next summer, and headed through the southwest deserts and southeastern US to Tybee Island in Georgia. That trip was much harder, with 114-degree days in the desert and 95-degree, 95% humidity days in the southeast.

I liked these cross-country trips, but I wanted something that would last longer. I wanted to live on a bike, not just take a trip. So the next year I left my job at the end of the school year and lived on my bike for a full year. I flew to Seattle and headed east to Maine, south to Florida, west to California, and north all the way to Alaska. I met people from all walks of life, all over the US and Canada. I rode through snow and rain, made 100-mile desert crossings during the spring blooms, and lived alongside bears in the Yukon and Alaska. Living outside for a full cycle of the seasons was a wild and absolutely grounding experience.

The Road to Alaska is the story of the places I went, the people I met, and the lessons I learned along the way. I reread it every few years, and it continues to ground me as I grow older. I hope to cross the country by bicycle at some point again in the next few decades, and see how much has changed and how much has stayed the same in my lifetime. You can read The Road to Alaska on Kindle devices, or you can order a paperback copy.