When he convinced me to learn Python, Bob (co-creator of pybit.es) recommended I start by reading the book Automate the Boring Stuff by Al Sweigart, which is free to read online.
I loved it!
What Makes it Different?
Automate the Boring Stuff (ATBS) is unlike most other “learn to program books”. As expected it starts by showing you the basics (Expressions, Data Types, etc) but very quickly moves into more exciting concepts such as Lists, Dicts and Regular Expressions.
It’s also worth noting that while these sections are purely around learning the concept of the chapter, Al does throw in a heap of exercises and challenges to keep things interesting. Not once did I find myself falling asleep while reading which for me is saying something!
The book really comes into its own in Chapter 8. This is where Al stops with the raw learning and starts with the projects. Each chapter onward has at least one nifty little project to make.
I don’t mean a run of the mill Celsius to Fahrenheit converter but Web Scrapers and scripts to automatically resize images.
Actual useful stuff!
Thus the name, Automate the Boring Stuff!
Easy to Follow
The most important quality of an educational book is its ability to teach. ATBS would be like your favourite teacher in school – it teaches you in such a way that hours, days, weeks later, you’ll recall the exact sentence or problem mentioned in the book.
I keep it handy as a reference tool at all times. It’s that good!
Al’s language is easy to relate to as well. This isn’t someone talking down to you, teaching you a hardcore curriculum. This is a bloke who clearly loves his code, enjoys python and legitimately wants to teach you.
It’s also super handy that he uses food as his variable names! Mmmm bacon…
Favourite Part
My favourite chapter in the book was the chapter on Web Scraping. I’ve wanted to create my own web scraper ever since I saw Bob create one of his own. (I was blown away!).
I always figured it was something that was going to be super complex and way out of my league but not so! This chapter allowed me to create my own scraper to parse a site and find out when the latest episodes of my tv shows were being aired!
It’s such a useful tool with unlimited possibilites when you think about it!
Not-So Favourite Part
There’s one thing that’s irked me about ATBS. Al’s naming convention differs greatly to what I’ve seen in current python circles.
These days, best practice in python would be to create your multi-word named variables all in lower case with an underscore separating the words:
# this_is_a_variable = []
Al, however, teaches that you should be using Camel Case:
# thisIsAVariable = []
It may not seem like a big deal but it totally ruined my day when I finally had the guts to show people some of my early code and there was a concesus that camelCase wasn’t really used in python!
Conclusion
GO. READ. THIS. BOOK. NOW!
As mentioned before, it’s available for free on Al’s website but can be purchased so you can show your support.
I totally recommend this to anyone learning Python as well as the old hats. The projects alone are awesome and will inspire you to create other handy tools to make your life easier – and isn’t that what coding’s all about?
Keep Calm and Code in Python!
— Julian