The Invent with Python Blog

Writings from the author of Automate the Boring Stuff.




Sun 07 November 2021

How, As a Kid, I Taught Myself to Code

Posted by Al Sweigart in programming   

I was one of those kids in the 90s who taught themselves how to code by making video games in the BASIC programming language. Later, I majored in computer science, moved to Silicon Valley, became a software engineer, started writing programming books including Automate the Boring Stuff with Python, and then quit my job to write full-time. I now wake up whenever I want and work from home or nearby cafes. I'm financially secure while being my own boss.

This is a completely true story.*

Read more...




Sat 06 March 2021

Calm Programming Video Series

Posted by Al Sweigart in programming   

I've started a new video series of me silently coding a small game project from scratch. The Calm Programming series are meant to be coding videos that you can watch while playing the music of your choice. They aren't quite the same as tutorials: they don't have screen capture and aren't narrated, though you can turn on captions for some explanations.

Read more...




Tue 12 November 2019

Book Review: Code This Game! by Meg Ray (Odd Dot 2019)

Posted by Al Sweigart in programming   

5 Stars: An excellent project-based book for young readers who want to move beyond Scratch

Code This Game is an excellent book that teaches Python programming by guiding the reader through making a tower-defense game from scratch. This is a book that doesn't shy away from programming detail, but manages to remain fun and engaging. If you have a student or child who wants to move beyond MIT's Scratch programming tool and do "real" programming, this is a great book.

Read more...


Sun 09 December 2018

Book Review: The Little Schemer

Posted by Al Sweigart in programming   

Alternative Title: The Little Schemer Wears No Clothes

Perhaps a software engineer or MIT professor friend of yours recommended this book to you. “Oh, you want to learn how to code? You should read The Little Schemer,” they’ll say. Your friend means well, but is completely wrong to recommend this book.

Read more...




Tue 30 September 2014

No, Seriously, Why Should I Learn to Code?

Posted by Al Sweigart in programming   

The geeks have inherited the earth. A couple decades ago if you talked with friends in a chat room, you were cast as a socially-awkward nerd. Doing the same today just means you're a typical Facebook user. Broadband Internet connections and smartphones have taken the Information Age that technically started in the 1970s with PCs and pushed it into daily mainstream life.

Don't get me wrong: You should learn to program. But lost in this hype is a plainspoken reason: NO, SERIOUSLY, WHY SHOULD I LEARN TO CODE?

Read more...


Sun 15 December 2013

Why Is HTML Not A Programming Language?

Posted by Al Sweigart in programming   

HTML is not a programming language. You can't write a "program" that, say, calculates the average of ten numbers with HTML. While some may point out that HTML is a "markup language", this doesn't clarify how that is different from a programming language. This isn't meant to be a thorough argument, but rather a brief explanation that goes just a bit more in detail than "HTML isn't a programming language but instead a markup language."

Read more...


Thu 20 June 2013

Decimal, Binary, and Hexadecimal Odometers

Posted by Al Sweigart in programming   

It can be difficult to see how other number systems (such as binary and hexadecimal) work since they have a different amount of numerals than the ten numerals of decimal. But imagine that you are counting in these number systems using an old-fashioned analog odometer that has a different amount of numerals for each digit.

Read more...





Fri 17 August 2012

How Does Compression Work?

Posted by Al Sweigart in programming   

"Zip" programs that can compress multiple files into one smaller .zip file are fairly popular for downloads since the fewer bytes you have to download the faster it will download. But how do you compress files? Files are made up of ones and zeros, which can't be squished like clothes into a tight suitcase.

Read more...