"Automate the Boring Stuff with Python", by Al Sweigart
(free to read under a Creative Commons license)
It's never too late
While I'm tech-savvy, an overall geek, have tinkered with computers, and been working in Technology for the last 20 years, I never thought before a few years ago about learning to program, because it seemed "out of reach".
For some reason, I held to the perception that programming requires you to be good at advanced mathematics, and requires years of full-time practice 🤷🏻♂️.
Aged 37 (it's never too late!) and triggered by a critical need, I came round to diving into it because I could not find a Tech co-founder for my 1st startup, and decided to do it myself. More here:
How to bootstrap a Tech startup without a Tech cofounder
I wish someone had told me earlier that programming, and building tech solutions, is not that hard to learn, especially with tools available these days, and for the purpose of a MVP or early stage startup.
And realised I should have done that two decades ago! 🙄
Truth is, programming is just another language. It's computer language.
And contrary to human languages, it's extremely logical (contrary to say, French grammar! 🇫🇷😅).
All you need is good logic - better if innate, though learning to program will also help you think more logically and in a structured way - and perseverance.
I decided to learn Python: https://www.python.org/
It was described as an easy to learn language, extremely popular and gaining even more, and the primary language for all things AI and Machine Learning, which is a topic I'm passionate about.
In that journey of learning how to program - which has led me to build a startup heavily relying on automation, and my current startup, OfficeBots.io, focusing entirely on it - this one book has made all the difference for me.
Perfect starting point for business people
Most books and online courses about learning Python (or other programming languages) focus on the language itself, and in most cases will use the creation of a basic video game 🤓 to illustrate the learnings.
The 1st book I read about Python (for beginners) felt like I was reading chinese! Though I could read the words, so not quite that bad.. but I understood perhaps 10% of it 😅
The 2nd book was similar, though I understood a bit more.
With Automate the Boring Stuff with Python, everything clicked for me. 💡
Because the book is written with a background of automating things with commonly used office files - PDF, Excel, Word, etc..
The use cases made so much sense, and provided the context for me to relate the theory of the language, with its real-life applications.
It "blew my mind" as my mind started to race, thinking about all the potential applications.
Applications
In my case, here are some applications I developed - with help from freelancers to troubleshoot, clean up my code (or redo it!):
Automated invoice processing
Supplier sends PDF invoice to dedicated email address. A bot written in Python, extracts the data, checks a couple things, flags to a human if needed, and provides the data in a format that can be ingested by our system, and that of our client (accounting system or CFRM).
Price engine & custom report generator.
Fetches data from various sources (e.g. in-house CRM database, in-house flight records database) to generate custom internal or external reports in XLSX format.
Data fetching
Daily login to a portal, download of a CSV file and parsing data into our database.
Hyper-personalised spam-safe emailing
Send hyper-personalised emails at scale, sent directly from the actual local email client (no difference with a manually written and sent email, so no more risk to be caught in spam filters).
Email finder
Find email addresses at scale with just first name, last name and company website (from excel list).
KPI Slackbot
Slackbot publishing daily metrics, with data fetched across various systems (e.g. in-house CRM, Dropbox, etc..).
Various scripts
Along with a flurry of useful scripts for my day-to-day, like:
- splits PDFs with many pages into single page PDF files.
- Custom URL shortener (Slackbot).
- Formatting of Excel spreadsheets (so database exports look professional when sending to clients).
- Happy password generator
- etc..
I credit Automate the Boring Stuff with Python for being the seed that has helped me come up and build all of these.
And you can get help from freelancers, when you get stuck, or know what needs to be done, but lack the time to do it yourself. More here:
#CareerPlaybook 009: Outsourcing Tasks
Ultimately, it is not about doing everything oneself. Low-value tasks should be delegated. Tasks for which your skills are not good enough, should be delegated.
Chapters
Here is an overview of its chapters, to give you a better sense of its content:
Chapter 0 – Introduction
Chapter 1 – Python Basics
Chapter 2 – Flow Control
Chapter 3 – Functions
Chapter 4 – Lists
Chapter 5 – Dictionaries and Structuring Data
Chapter 6 – Manipulating Strings
Chapter 7 – Pattern Matching with Regular Expressions
Chapter 8 – Input Validation
Chapter 9 – Reading and Writing Files
Chapter 10 – Organising Files
Chapter 11 – Debugging
Chapter 12 – Web Scraping
Chapter 13 – Working with Excel Spreadsheets
Chapter 14 – Working with Google Spreadsheets
Chapter 15 – Working with PDF and Word Documents
Chapter 16 – Working with CSV Files and JSON Data
Chapter 17 – Keeping Time, Scheduling Tasks, and Launching Programs
Chapter 18 – Sending Email and Text Messages
Chapter 19 – Manipulating Images
Chapter 20 – Controlling the Keyboard and Mouse with GUI Automation
Appendix A – Installing Third-Party Modules
Appendix B – Running Programs
Appendix C – Answers to the Practice Questions
As you can see, if you come at it from a business background, what you learn in chapters 1 to 11, will then completely make sense in chapters 12 to 20, as it puts the theory in the context of things you probably do on a daily basis.
Read
The book is available to read for free under a Creative Commons license at https://automatetheboringstuff.com/
Else, you can buy it (supports the author) on Amazon:
Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners: Al Sweigart:
https://www.amazon.com/Automate-Boring-Stuff-Python-2nd/dp/1593279922/ref=sr_1_1
Obviously there is no audiobook to recommend here! 😂
(All links are clean)
Hope you find the book useful.
Let me know if the book has helped it "click" for you.
Or if you have found other good resources for learning Python when not coming from a technical background.