Coupling 101: Design Choices That Make or Break Your Code | Issue #47


Hi there,

You’ve probably heard the phrase: “Coupling is bad.” But what if I told you that coupling is actually necessary? The real issue isn’t that your code has coupling—it’s that some types of coupling are worse than others. 🚨

In this week’s video, I dive into three real-world examples of bad coupling and show you how to refactor them into better designs. We’ll tackle:

  • Global coupling – Why global variables cause headaches and how to avoid them
  • Content coupling – When modules dig too deep into each other’s business
  • Stamp coupling – The sneaky way dependencies make your code harder to maintain

Plus, I’ll explain why AI struggles to fix these problems for you (spoiler: design is more than just code generation). 🤖❌

Happy coding and enjoy the video!

Cheers,

Arjan

# News

Python’s GIL: A Step Closer to Removal? 🐍

Big news in the Python world: the Global Interpreter Lock (GIL) might finally be on its way out! LWN’s latest article dives into PEP 703, which proposes making Python truly multi-threaded. No more GIL bottleneck—just faster, more efficient concurrency. ⚡

The catch? It’s a massive change with big implications for compatibility and performance. Curious how this could reshape Python development? 🧐 Read more here.

Duck Typing in Python: Type Less, Do More!

“If it walks like a duck and quacks like a duck…” you know the rest! 🦆 Python’s duck typing lets you write flexible, dynamic code without worrying about strict types. But when should you embrace it, and when does it become a maintenance nightmare? 🤔

Real Python’s recent course dives into duck typing, showing you how to balance flexibility and safety in your code. A must-watch for Pythonistas! 🐍💡Check it out here.

# Community

Ever used a decorator and noticed it messes with your function’s signature or docstring? 🤯 One of our Discord members ran into this exact issue when trying to preserve function metadata while decorating a method.

🛠️ What went wrong?

  • The function’s signature disappeared from tooltips in the IDE.
  • The docstring wasn’t showing as expected.
  • Even using @wraps didn’t fully resolve the issue.

👀 What’s causing it?

After some deep debugging (and a few rabbit holes 🐇), the community discovered a sneaky interaction between type hints and decorators. A small change made all the difference!

Want to know the fix? Curious if this might be affecting your decorators too? Join the discussion on Discord and see the full breakdown! 🚀


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.

Unsubscribe | Send by ArjanCodes

Jan van Eijklaan 2-4, Bilthoven, UT 3723 BC

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

Hi there, Ever looked at your old code and felt secondhand embarrassment? Yeah, me too. Keeping your code simple and maintainable is an art. In today’s video, I break down 10 essential tips that will help you write cleaner, more efficient Python code. 🚀 Some key takeaways: 🛑 Stop overengineering—simple solutions are often the best. ✂️ Cut the copy-paste habit—DRY code is maintainable code. 🧹 Refactor before your code turns into a horror movie. Happy coding! 🐍 Cheers, Arjan # News How Do...

Hi there, Have you ever hesitated before hitting git merge or git rebase because… well, who actually understands Git? 🤯 Good news! In this week’s video, I walk through a real-world FastAPI project and show exactly how to merge, fast-forward, and rebase—step by step. No fluff, just practical Git skills you’ll actually use. Plus, I’m sharing some advanced Git tricks to make your workflow smoother. Happy coding and enjoy the video! Cheers, Arjan # News Build TUI Apps with Python’s Textual Ever...

Hi there, Ever had a function work most of the time but randomly break when you least expect it? That’s a sign your code is brittle. And brittle code means debugging nightmares. The good news? You can avoid this! In this week’s video, I break down: 🔹 Why checking types at runtime is a bad idea 🔹 The best way to handle value constraints without making a mess 🔹 Whether your function should return None or raise an exception 🔹 Why failing fast is the best approach to writing reliable Python And...