This Is Why Your Python Code Turns Into Spaghetti

ArjanCodes July 4, 2025
Video Thumbnail

About

No channel description available.

Video Description

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. Why do Python projects turn into spaghetti so easily? In this video, I show how using abstraction (with Callable, ABC, and Protocol) can dramatically clean up your code. We’ll take a simple image processing example and refactor it step by step, making it more flexible, testable, and maintainable. Even small projects benefit from the right abstractions early on. 🔥 GitHub Repository: https://git.arjan.codes/2025/abstraction. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 💬 Join my Discord server: https://discord.arjan.codes. ⌨️ Keyboard I’m using: https://amzn.to/49YM97v. 🔖 Chapters: 0:00 Intro 1:54 Why Abstraction Matters 2:44 Reducing Import Overload with Abstraction 4:25 Using ABC – When You Need a Real Interface 11:43 Protocol – Structural Typing Without Inheritance 14:00 Using Callable – Functional Abstraction 19:56 Final Thoughts #arjancodes #softwaredesign #python