Think Python by Allen B. Downey
~/.bnux
September 20, 2024
Think Python by Allen B. Downey starts off very basic, but I didn't mind the slow ramp. Even if you've written code before, revisiting fundamentals like variables, conditionals, and loops in a new language has a way of further solidifying things you thought you already knew.
The book is structured around short chapters, each building on the last, with exercises at the end. I did all the chapter exercises, which I'd recommend. Reading about recursion or string slicing is one thing. Writing it yourself is where it actually sticks.
One highlight was the chapter on functions and interfaces, which uses jupyturtle to draw shapes with turtle graphics. If you remember Logo) from back in the day, it's that same idea. You start by drawing squares, then generalize into polygons, arcs, and eventually flowers. It's a fun way to teach encapsulation and refactoring, and it brought back some good memories.
I bounced between reading it as a hardcopy and an ebook, which led me to discover Pythonista (for iPhone or iPad). Writing Python on a phone keyboard might make some people cry, but it actually worked well enough for following along with lessons and writing simple scripts. Not something I'd use for anything serious, but for learning on the go it got the job done. An iPad and a bluetooth keyboard actually works pretty well for this sort o thing.
Think Python isn't going to challenge an experienced developer. But if you're picking up Python for the first time or just want a clean, well-paced introduction to programming concepts through Python, it's a solid choice. I came away feeling more comfortable with the language and glad I worked through it.
Discussion in the ATmosphere