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.
Share
How to Design an AWESOME Function Header in Python | Issue #19
Published over 1 year ago • 3 min read
Hi there,
This week’s video covers tips you probably haven’t considered—ones that can make or break your code and potentially save you hours of debugging. 🕵️♂️
Today I’m breaking down the art of designing function headers—because a good one makes your life 10x easier, while a bad one… well, you’ll wish you had known sooner.
👨💻 I’ll walk you through the essentials of function naming, and why using verbs in your function names can make all the difference. You’ll also learn how to streamline your function arguments to keep your code clean and readable, plus, I dive into type annotations to make sure your IDE catches issues before they become a problem. Enjoy the video and happy coding!
Cheers,
Arjan
# News
The API Gateway Reinvented
Forget about wrestling with complex configurations and clunky editors. With Zuplo today’s sponsor, you can leverage your coding skills to build powerful, customizable APIs.
Built to natively support OpenAPI, Zuplo eliminates the hassle of syncing your spec with your deployment. What you define is what you get. Plus, their global edge network ensures lightning-fast performance and frees up your backend resources.
Zuplo simplifies secure API key authentication, adhering to industry best practices. With a built-in, high-quality developer portal to ensure you deliver an exceptional developer experience and empower your users with self-service key management for streamlined access.
Need more control? Zuplo lets you write any custom policies that you need to handle any edge case imaginable.
Ready to take your API development to the next level? Click here and try Zuplo today.
Simplifying Python Data Validation
Real Python has just launched a new course on how to streamline data validation in Python using Pydantic! 🚀
Pydantic is one of the most popular libraries for data validation in Python (I’ve even created a few videos on it—check one out here).
This course covers everything from basic data validation to handling complex cases with custom validators. You’ll also learn to validate function arguments and manage application settings, all with minimal boilerplate. If you want to make your Python data handling more robust and efficient, this course is a fantastic resource. Dive into the details here.
Everything I Learned About Technical Debt
In his article, Erik Bernhardsson compares technical debt to real debt. He explains how you borrow resources now but pay back more later. 💸
Bernhardsson talks about the “interest rate” of technical decisions. He stresses how important it is to acknowledge and manage technical debt. Using practical examples, he illustrates when to take on or avoid technical debt, ensuring you make informed decisions that benefit your projects in the long run.
Want to learn how to strategically handle technical debt? Click here to read the full article.
# Community
Synacktra, one of our community members, has shared a post about the tool-parse library, which makes calling tools for LLMs simpler and more efficient. If you’re into Python, AI, or working with LLMs, this could be right up your alley! 💡
Curious to dive in? Head over to our Discord server and take a look for yourself. Feel free to drop your feedback or join the conversation in the thread! 💬
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.
The Software Architect Mindset - Learn the mindset that will allow you to effortlessly build and maintain scalable software systems. Become a software architect.
The 30-Day Design Challenge - Get the practice you're missing. Learn to deal with a wide variety of software design problems.
💡 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.
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.
Have you ever looked at a Python script and thought: “Why is this slow? The logic is trivial.” Very often, the problem isn’t what your code does, but how often it does expensive work. In this week’s video, I start with a deliberately inefficient example: parsing a large CSV file multiple times. From there, I use it as a vehicle to introduce 10 powerful Python features that many developers either don’t know about or don’t know when to apply. I look at things like: • caching expensive...
I almost didn’t publish this week’s video. It’s about the Specification design pattern, and if I’m honest, the final version of the code scared me a little. It’s complex, abstract, and in many cases… absolutely overengineered. But there’s a reason I still decided to share it. In the video, I explore how the Specification pattern tackles a very real problem: business rules duplicated across different parts of a system, slowly drifting apart and becoming harder to change safely. Is this...
Most Python developers know dataclasses. Or at least… they think they do 🙂. You add @dataclass, define a few fields, and enjoy writing less boilerplate. But dataclasses hide a lot more power than most people realize and some of that power can quietly bite you if you don’t understand what’s really going on. In this week’s video, I walk through 7 lesser-known dataclass features that make your code safer, clearer, and easier to maintain. I start with common pitfalls like mutable defaults, then...