Interview with Al Sweigart – Invent Your Own Computer Games with Python
Hello everyone! Welcome again to our weekly featured post! Our featured author today is Al Sweigart and Invent Your Own Computer Games with Python is our featured book. Al Sweigart has written many books, and Invent Your Own Computer Games with Python is in top 100 as one of his best selling books in Games, Open Source, and Python sub-categories. His other book, Automate the Boring Stuff with Python, is also one of his best selling books in the main category under 10,00 ranking, it is also in top 10 in Phyton, Web Programming and Introductory & Beginning categories.
Al has so much to share in this interview so we won’t make this long. Enjoy reading and don’t forget to share this with your friends!
GET TO KNOW THE AUTHOR
Name: Al Sweigart
Background: Software developer and UI designer
Favorite gadget: My Sony PRS-500, which I got as soon as it was released in 2006. It’s actually a terrible e-reader with a poorly designed interface and it eventually bricked itself. But it was the first E Ink reader and I saw e-readers as the future. I loved that thing. These days I just have a regular Kindle, and I’ve never been a person who prefers the smell of paper books or whatever. The paper is just the box the book’s content comes in. Print books do have a much longer battery life than e-readers though, I’ll give them that.
Hobbies: Writing books, recording screencasts, volunteering, and folding origami.
What is Invent Your Own Computer Games with Python about, and why should our readers read it?
“Invent” was my first book. I wrote it back in 2008 or so. My girlfriend at the time was a nanny for a 10-year-old who wanted to learn to code. There was a ton of information out there on programming and Google made it accessible, but it was hard to know where to start. You were just drowning in random tutorials of varying quality. I remember books like David Ahl’s BASIC Computer Games and Byte magazine listing the source code to small games, and I thought that format was great. So the book has several small game programs and then explains how the source code works. It’s much better than just learning programming concepts, then trying to figure out how to apply them on your own. People don’t want to program for the sake of programming, they want to create software. “Invent” is now in its 4th edition from No Starch Press, but still free to read online at https://inventwithpython.com.
What, in your opinion, is the current most exciting technological advancement and why?
I still think the advent of smartphones is incredible, even though I can’t imagine that 10 or 20 years from now we’ll all still be looking at tiny glowing rectangles in our hands. Trying to predict the future has always eventually made a fool of me, but I have doubts that VR, blockchains, and the Internet of Things will go very far. And I mean “exciting” to also mean “fearful dread” as well: smartphones are incredibly locked down compared to PCs and are unprecedented as a tool of mass surveillance. I worry that as empowering as smartphones are, they’ll also take away our right to tinker with the gadgets we physically own.
How much code do you still write on a daily basis?
It varies. These days I’m mostly writing small one-off scripts that, to quote my book’s title, automates the boring stuff. Or I’ll be writing code examples for the tutorials and books that I make. I have a few open source projects that I maintain, but these days its more evaluating other people’s code contributions than writing my own. Anyway, I don’t see quantity as a good metric for programming. I created a joke Tic Tac Toe program where every possible game is hard-coded into the source. The game is 18,000 lines of code (which was generated by another a program I created), and if you measure by quantity this was the most productive day of my career.
What inspired you to write your book/s?
Back in the late 2000s I saw that there was a lot of content out there, but it was mostly for experienced software engineers or it was the same dumbed-down beginner tutorials that every website had. I thought offering examples of complete programs would help people see the actual end product they could make with programming. So I wrote Invent Your Own Computer Games with Python because games are an easy and interesting starting point for coding. People liked my books, so I kept making more. I moved on to 2D graphical games with Pygame and ciphers with Making Games with Python & Pygame and Cracking Codes with Python, which were extensions of ideas I covered in Invent. At this point, I pitched the idea of Automate the Boring Stuff with Python to No Stach Press, and that turned out to be the start of a career change for me.
It was a lot of working on the side while I had my full time software engineer job, but I got lucky and the books became popular. I mostly attribute their success to using a Creative Commons license so that people could freely share it online and generate word of mouth. So you can go to https://inventwithpython.com and read the entire book online to see if you want to buy a print book or nicely-formatted ebook. Otherwise, my books would just be yet another self-published book on Amazon that no one reviewed or bought.
But one of the main things I like about writing software is how much of a force multiplier it is. We take them for granted, but it really is incredible how powerful yet common computers are in our world. You can write a program that does a task much faster than any human could, and you can easily share it with millions of people over the internet. I saw writing books the same way; instead of me just producing software, I could produce many new programmers who produce software. I get a kick out of the idea.
If there’s one chapter in your book people should have read, which one should it be, and why?
Well another benefit of releasing my books under a Creative Commons license and free to download from the web is that I can see which chapters get the most traffic. People seem to really enjoy the web scraping chapter from Automate the Boring Stuff with Python, which makes sense. Most of what we do “on the computer” is really what we do “on the internet”. So writing programs that can automatically interact with websites is going to be relevant for a lot of folks.
As an author, which book made the most impact on you?
It’s silly to say, but Jurassic Park. There’s nothing great in particular about the book, but I was pretty young when the movie came out and I loved it. I noticed another kid reading the Jurassic Park novel on the school bus, and I checked out a copy from the library. It had an impact on me because it was the first book I read that wasn’t a book for young adults. I sort of had this idea that 400-page novels weren’t for kids and that I wasn’t “ready” to even try to read them. But reading Jurassic Park made me realize I didn’t have to be “qualified” to read any book; I could just start reading it. I also realized there’s a lot more cursing in adult novels than kids books.
If there’s one subject you’d like to see a book about, what would it be?
What would you like to ask the next author being interviewed?
Do you think books are still a viable medium for explaining technical concepts? Or will they make way for interactive websites, Khan Academy videos, and online courses?