Avoid These BAD Practices in Python OOP | Issue #17


Hi there,

Is your object-oriented Python code turning into a tangled mess? 🍝 Yes, this isn’t the kind of spaghetti you want to see on a Friday night.

In this week’s video, I’ll uncover common bad OOP practices and tips for keeping your code clean and maintainable.

Learn why simple functions can replace unnecessary classes and why using modules might be more effective than relying on classes with only static methods. 🚀

I’ll also discuss the pitfalls of deep inheritance hierarchies and the proper use of encapsulation without overusing getters and setters.

Enjoy the video and happy coding!

Cheers,

Arjan

# News

The Software Designer Mindset Update

This week I’ve relaunched The Software Designer Mindset course! 🌟

My team and I have reviewed the full curriculum and added:

  • Completely reworked videos, with a massive improvement in overall production quality.
  • More in-depth material covering Python’s data types and data structures as well as exploring common concepts such as abstract base classes, protocols, and mixins.
  • A brand-new module covering domain analysis and how to turn a problem in a domain into a working software solution (COMPLETE version only).
  • Many small fixes and improvements throughout the course.

To celebrate this massive revamp and the amazing additional value it will bring you, until September, 11th at midnight, you can still get The Software Designer Mindset at its current price (from $229). After that date, I’ll increase the price of the course to reflect the value this course brings and the additional time my team and I spent working on it.

Another BONUS: by popular demand, more subtitles are now available for all my courses, including the updated version of The Software Designer Mindset. 💃🏻🎉

So don’t wait and get the course at its current price while you can!

My First Experience as a Tech Lead

Lucas Matheus recently shared a post about his journey as a Tech Lead, emphasizing how crucial soft skills are alongside technical ones. He breaks down the subtle yet significant differences between junior and senior developers. 📖✨

Matheus highlights that being a senior developer is more than just coding—it’s about problem-solving, working independently, collaborating effectively, and mentoring others. Reflecting on his career, he shares invaluable insights from the diverse senior professionals he’s met along the way.

Click here to read the full post and learn from his experiences. 💡

# Community

Our community member, Wabiloo, is seeking assistance with implementing a mechanism to “wrap” objects with additional information while maintaining their original functionality. 🤔

Wabiloo’s current approach uses a StatedValue class that wraps objects and overrides relevant dunder methods. However, they’re facing difficulties in making type checks recognize both the wrapping class and the wrapped object, which is crucial for maintaining type safety.

Community members have shared their experiences and proposed various approaches to tackle this problem. If you’re interested in helping Wabiloo find a solution or want to explore different perspectives on this topic, check out the full discussion here. 💬


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

Hi there, Most apps only store the final result: the current balance, the current inventory, the current status. But what if you could track every change that led to that result? That’s exactly what the event sourcing pattern allows you to do. Instead of overwriting state, you store a sequence of immutable events and derive the current state by replaying them. It’s like Git (kinda), but for your domain logic. In this week’s video, I show you how to implement event sourcing in Python from...

Hi there, If you’ve been learning Python for a while and still feel like you’re not improving, you’re not alone. Python feels easy at first. The syntax is clean, the barrier to entry is low, and you can build something useful in your first hour. But then… things get weird. You hit a wall. There’s object-oriented programming. Then functional programming. Then decorators, dunder methods, typing, Protocol, mypy, async… And somehow Python lets you write the same thing five different ways, and...

Hi there, You’ve probably heard developers say "That’s not very Pythonic…" But what is Pythonic code, really? Is it about using list comprehensions? Avoiding for-loops? Dressing up like Guido van Rossum? In this week’s video, I answer that question by taking a small, messy Python script and refactoring it step-by-step using the principles behind idiomatic Python. Along the way, I’ll show you what it means to think like a Python developer, using things like: Functions instead of unnecessary...