From Boring Object-Oriented to INSANE Functional Code | Issue #13


Hi there,

Ever wondered whether you should go functional or stick with object-oriented programming? Today I’ll dive into the pros and cons of both and show you how to blend them for the best of both worlds! 🔥

In this week’s video, I refactor some tricky code with surprising results, exploring the eternal debate of functional versus object-oriented programming. I’ll show you a fun word puzzle generator powered by Python and AI and explain why it’s called a “Philippine” puzzle—it involves almonds, believe it or not! 🥜

Learn how moving methods out of classes can simplify your code, discover the power of function composition and closures, and learn to avoid the dreaded “God class” for cleaner design. 🤓

Enjoy the video and happy coding!

Cheers,

Arjan

# News

Python Metaclasses

This week’s blog dives into the world of metaclasses in Python! 🐍 Learn how metaclasses act as blueprints for defining classes, enabling the customization of class behavior, enforcing coding standards, and more.

Explore practical examples and discover built-in metaclasses like type, ABCMeta, and EnumMeta from Python’s standard library. 🛠️

The article will help you understand when and why to use this powerful feature in your projects, including specific use cases and scenarios where metaclasses can significantly enhance your code. 💡 Click here to read the full blog.

Why Facebook doesn’t use Git

Greg Foster recently published an interesting blog post on why Facebook chose Mercurial over Git for its version control system. 🖥️

He dives into Facebook’s need for better performance and extensibility and how Mercurial’s architecture and community support led to this pivotal decision.

If you are a tech enthusiast interested in the history and evolution of source control tools, click here to read the full post.

# Community

Having trouble scaling your FastAPI service?

Recently, a member of our Discord community asked for help to boost the performance of their FastAPI service. This sparked an engaging discussion with valuable insights and practical advice from several of our community members.

Join our Discord server to read the full thread on optimizing FastAPI for handling concurrent requests, improving performance with async routes, offloading heavy tasks, and more. 🌟


Do you enjoy my content on YouTube and would you like to dive in deeper? Check out my online courses below. They've helped thousands of developers take the next step in their careers.

🚀 The Mindset Online Course Series

The goal of this series is to help junior developers grow their skills to become senior developers faster.

💥 Other Courses

💡 If you’re part of a development team at a company, I offer special packages for companies that give your team the tools to consistently write high-quality code and dramatically increase your team's productivity.

🪄 Learntail

My team and I created an AI quiz generator designed to accelerate your learning, called Learntail. You can try it for free or unlock even more capabilities and features with the monthly subscription. Take a look here.

Unsubscribe | Send by ArjanCodes

Wolvenplein 25, Utrecht, UT 3512 CK

The Friday Loop

Every Friday, you'll get a recap of the most important and exciting Python and coding news. The Friday Loop also keeps everyone posted on new ArjanCodes courses and any limited offers coming up.

Read more from The Friday Loop

Hey everyone, I love it when I come up with a design that uses exactly the things I thought were a sign of bad design. In this week's video I show you how to build a clean Python SDK for a REST API. The idea was simple: create a reusable base model that handles all the CRUD operations so you can just write User.find() and user.save(), without duplicating logic all over your codebase. Sounds great, right? Well, after recording the video, I realized something: not all APIs will have all CRUD...

Hey everyone, Python’s flexibility is great, but if you're working on a larger project it becomes hard to make sure not everything depends on everything else. There is a way to avoid that trap, and that's by using abstractions. Unfortunately, I often see production code with way too much coupling that can be easily improved by relying on abstractions. This week’s video shows simple abstractions using Callable, ABC, and Protocol. You’ll learn how to: Reduce unnecessary imports Decouple your...

Hey everyone, I was reviewing some of the projects I’ve worked on over the past year, and I noticed something interesting: I almost never use Python’s @dataclass anymore. Not because it’s bad. In fact, dataclasses are still a great feature of the language. But as my projects have grown more complex, especially with tools like FastAPI, Pydantic, and SQLAlchemy, I’ve found that dataclasses just… don’t fit the way I design software anymore. In my latest video, I dive into this in detail. You’ll...