Welcome to the 61st issue of Python Monthly!
If it’s your first time here, welcome, I like you already. If you want the full back story on this monthly newsletter, head here.
The quick version: I curate and share the most important Python articles, news, resources, podcasts, and videos.
Think the Pareto Principle (80/20 rule) meeting the Python world. I give you the 20% that will get you 80% of the results.
If you're a long time reader, welcome back old friend.
Alright, let's not waste any valuable time and jump right into this month's updates.
Does your Python code need to work with files? Then it's a no brainer that you should be using the pathlib
module.
It's the recommended way to work with file-related code in Python, especially when needing to construct or deconstruct file paths or ask questions of file paths. Learn how to use it here.
A good short overview of best practices when it comes to web security and python: “The absolute minimum every Python web application developer must know about security”... if you aren't doing these, you're helpless.
Python decorators are one of the best language feature (some would say) - they allow you to extend the functionality of existing functions or methods in a reusable and elegant way.
Here are this author's favourite decorators and why they are so useful.
For those that enjoy building web apps with Django, check out this guide: The Ultimate Guide to Django Performance: Best Practices for Scaling and Optimization.
Django, being a high-level Python web framework, simplifies the creation of complex, database-driven websites. However, with this ease comes the challenge of ensuring that the applications built on it perform optimally under various loads. Performance tuning for Django involves a multitude of strategies aimed at different components of the application stack—from the way database interactions are handled, to how content is delivered to end-users.
Do you really love Django? Here is a fun project for you: Building a Chat Backend for Wikipedia Articles in Django.
A bit of news here: On 2024-12-17, the Astral team took stewardship of python-build-standalone
, Gregory Szorc's foundational project for building and installing portable Python distributions.
You can read Gregory's own announcement here. It's one of the main ways Python gets installed out there, so this is pretty important news.
This is probably the coolest Python news of the month. Use your inflight headrest data to track your flights with Python: PySkyWiFi (“completely free, unbelievably stupid wi-fi on long-haul flights”).
From the author: "Not paying for airplane internet is kind of my signature move. We’d need a different, offline strategy, here comes PySkyWiFi".
The team at Meta wrote up a great post on the current status of Typed Python. 88% of respondents “Always” or “Often” use Types in their Python code... which is surprising.
Here is more of their findings.
An interesting article that will make you think: Egoless Engineering. I liked these comments from a reader:
Really resonated with this, reminded me of the journey I went on over the course of my dev career. By the end, my advice for every manager was roughly:
Don't add process just for the sake of it. Only add it if seriously needed.
Require ownership all the way to prod and beyond, no matter the role. (Turns out people tend to really like that.)
Stop making reactive decisions. If something bad happened on a total, extremely unlikely lark, don't act like it's going to happen again next week.
Resist the urge to build walls between people/teams/departments. Instead, build a culture of collaboration (Hard and squishy and difficult to scale? Yup. Worth it? Absolutely.)
Never forget your team is full of actual humans.
There are so many buzzwords and best practices out there, but most of them have failed. We need something more fundamental, something that can't be wrong.
Sometimes we feel confusion going through the code. Confusion costs time and money. Confusion is caused by high cognitive load. It's not some fancy abstract concept, but rather a fundamental human constraint. It's not imagined, it's there and we can feel it: Cognitive Load.
This article makes a very good point on how we should think about software and code and I tend to agree. It also reminds me of this quote I read once:
The best way to achieve a good abstraction is to recall what the word meant before computer science: namely, something closer to generalization.
In computing, we emphasize the communicational (i.e. interface) aspects of our code, and, in this respect, tend to focus on an "abstraction"'s role in hiding information. But a good abstraction does more than simply hide detail, it generalizes particulars into a new kind of "object" that is easier to reason about.
If you keep this in mind, you'll realize that having a lot of particulars to identify shared properties that you can abstract away is a prerequisite.
The best abstractions I've seen have always come into being only after a significant amount of particularized code had already been written. It is only then that you can identify the actual common properties and patterns of use.
Contrarily, abstractions that are built upfront to try and do little more than hide details or to account for potential similarities or complexity, instead of actual already existent complexity are typically far more confusing and poorly designed.
Big news from the chess world: Gukesh becomes the youngest chess world champion in history with an epic final battle.
Good cultural news: Notre Dame is reopening its doors for the first time since a fire in 2019 nearly destroyed Paris’ beloved 12th-century cathedral. Apparently it's more beautiful than ever.
This is probably the coolest A.I. product to come out this month. It's the first step towards spatial intelligence: an AI system that generates 3D worlds from a single image. This lets you step into any image and explore it in 3D... check out the demo here.
Not to be outdone in the above story, Google Deepmind team came out with something really impressive too: Genie 2, a foundation world model capable of generating an endless variety of action-controllable, playable 3D environments for training and evaluating embodied agents. Based on a single prompt image, it can be played by a human or AI agent using keyboard and mouse inputs. They also announced Veo 2, their state-of-the-art video generation model.
Big news out of OpenAI is the new o3 system which isn't publicly available yet is trained on the ARC-AGI-1 Public Training set. A high-compute (172x) o3 configuration scored 87.5%. This is a surprising and important step-function increase in AI capabilities, showing novel task adaptation ability never seen before in the GPT-family models. For context, ARC-AGI-1 took 4 years to go from 0% with GPT-3 in 2020 to 5% in 2024 with GPT-4o. All intuition about AI capabilities will need to get updated for o3. This is a big deal, and you need to read about it here.
OpenAI also released ChatGPT Pro for businesses (it's expensive). Why? A comment on this post from a hackernews user explains it best:
OpenAI is racing against two clocks: the commoditization clock (how quickly open-source alternatives catch up) and the monetization clock (their need to generate substantial revenue to justify their valuation).
The ultimate success of this strategy depends on what we might call the enterprise AI adoption curve - whether large organizations will prioritize the kind of integrated, reliable, and "safe" AI solutions OpenAI is positioning itself to provide over cheaper but potentially less polished alternatives.
This is strikingly similar to IBM's historical bet on enterprise computing - sacrificing the low-end market to focus on high-value enterprise customers who would pay premium prices for reliability and integration.
The key question is whether AI will follow a similar maturation pattern or if the open-source nature of the technology will force a different evolutionary path.
Weather has been one of the most important and valuable datapoints for the world. Weather prediction was one of the main uses for computers and complex computation. Now, Google says AI weather model masters 15-day forecast.
Google had a busy month because it has even more announcements: they launched Gemini 2.0. According to them, it's ready for the agentic era. If you want to play around with some of their AI tools, I recommend this one which I think has the biggest potential: https://aistudio.google.com/live.
US lawmakers tell Apple, Google to be ready to remove TikTok from app stores Jan. 19. We'll see if this happens or not.
Between 2009 and 2012, iPhones had a built-in "Send to YouTube" button in the Photos app. Many of these uploads kept their default IMG_XXXX filenames, creating a time capsule of raw, unedited moments from random lives. Inspired by this, this one person made a bot that crawled YouTube and found 5 million of these videos. Watch them, ordered randomly.
Enjoy booking the rest of the day off of work so you can just play with this amazing website and look at world maps over history.
SmartHome, a text based mysterious adventure.
To end the year, I have a great resource for you this month.
As you know, AI was a big theme of the year and there was no shortage of innovation in this field, but also paranoia around what this means for humans in the workplace. The resource this month explains where we are at, and the biggest problem of AI.
The 70% problem: Hard truths about AI-assisted coding.
Every generation has to learn that “there is no silver bullet”. AI is a fabulous tool that is way more flexible than previous attempts because you can just talk to it in English and it covers a lot of capabilities. But it can’t do the essential work of complexity management for the same reason it can’t reason complex problems properly.
As it stands, we still need human brains to do those things.
The way to stay at the top of industry? Learn to use it to increase your productivity. Not to learn.
Bonus: You can also check out my top 10 articles from the past year.
There are too many A.I. models to keep track of. Which one should you use? Lucky for you, the trick of the month is this: See and compare every AI model easily. 100% free & open-source.
New Terminal for you to try out: Ghostty
Happy New Year! See you next month everyone... also share this with your friends... pretty please! ❤️
By the way, I teach people how to code and get hired in the most efficient way possible as an Instructor at the Zero To Mastery Academy. You can see a few of our courses below or see all ZTM courses here.