Honing the craft.

You are here: You're reading a post

A little Python theory detour

Every year, the Summer season is the one when we travel the most and have the most social and family events. This has resulted in some compromises regarding my work schedule. Reading books to solidify my theoretical foundation in Python was pushed further down on the priority list by other, more hands on activities, like development and writing this blog. I wasn't satisfied with my progress in that area, so I have decided to tweak my plan and dedicate the past week to continue with Mark Lutz's excellent work on the Python language. I am sharing a few thoughts on this book.

Detour

When creating the plan for my career shift, I have dedicated certain types of activities, like learning theory, software development and business development to specific days of the week. In the meantime, I haven't calculated for the increased amount of extracurricular activities, like family events and travel in my plan, which was a mistake. To lessen the compromise from the perspective of actual development work and writing this blog, I rather sacrificed my progress with the books I have decided to read.

I have read numerous books on software development and Python in particular, but since I haven't used this knowledge on a daily basis until now, I really want to have a refresher to solidify the foundations of my theoretical knowledge. My book of choice after careful evaluation of my options and considering the fact, that I am not a beginner, was Learning Python by Mark Lutz. This book is praised for its comprehensiveness and attention to detail by many, which suited me, as I wanted depth.

With depth however, comes volume: Learning Python is weighing in hard with 1648 pages. My progress with the book, with the circumstances layed out above wasn't stellar. As I want to build in all my newfound knowledge into my ongoing projects as soon as possible, I have to be quicker, so I have decided to take a week off from developing dup-composer and keep reading Learning Python all week.

As a result, I made good progress and I am roughly halfway through at the moment. With moving ahead in the book, I have a better feel of what information it conveys and how it is presented, so let me share a few thoughts on the contents of this book.

A few words on the book

I have encountered multiple books of various styles on Python in the past. Some introductory and reference, as well as cookbook style books on more advanced or specialized topics. From all the titles I have read, Learning Python is definitely the most comprehensive from the perspective of context and explanation of how the small pieces fit into a well organized system.

Admittedly, the chapters introducing the basic building blocks of Python aren't exactly exciting for someone, who was already exposed to the language before, so I was tempted to just skim through. Almost every time however, a nuanced detail I haven't known about or an explanation of a relationship between different elements of the language came up, that kept me reading and eventually, patterns started to emerge. I thought I knew Python, but the concepts explained by this book really help you to connect the dots, and this makes picking further knowledge up much easier, as you know where the new pieces go in the puzzle.

The explanations on how the features have evolved through Python versions and what are the techniques that work on both older 2.x and newer 3.x versions make this book very handy for those who have to work both with older and newer versions of Python, which is most developers, or want to migrate their code base to the later versions eventually.

As you can see, this book has many virtues, and it is a great book for developers, who want to immerse themselves in Python. There are a few points however, that I think are worth making, as this book is definitely not for everybody. This is not a good first book, for someone who is just getting started with development in general, there are much better books for a general lead-in for programming. Also, the 5th and currently latest edition of the book was released around when Python 3.3 was, so new features, tools and changes introduced to Python later are not included. A lot of useful things were added to Python since, especially in 3.5, which made the backbone of async programming part of the language core for example. You need to look into those changes yourself in another book or the official documentation. I will certainly do so and let you know if I find some good content.