Too Many Function Arguments? Use This Pattern
💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. Tired of passing five arguments to every function? In this video, I clean up a realistic Python codebase using the Context Object Pattern. You’ll see how to go from messy, repetitive function signatures to a cleaner and more maintainable design. We’ll introduce context objects, explore how they help reduce parameter bloat, discuss the trade-offs (like increased coupling), and show how to use Protocols to keep things decoupled and testable. 🔥 GitHub Repository: https://git.arjan.codes/2025/context. 🎓 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:07 The Before Version: Too Many Arguments 3:43 Introducing the Context Object Pattern 9:35 But Wait — Aren't We Adding a Bunch of Coupling? 10:56 Making a Distinction Between High-Level vs Low-Level Code 13:33 High-Level Convenience, Low-Level Clarity 15:07 Using Abstraction 17:22 When Should You Use Context Objects? 18:51 Final Thoughts #arjancodes #softwaredesign #python

I Hate Long If-Elif Chains: This Design Pattern Solved It Once and For All

Why Your Code Isn’t Pythonic (And How to Fix It)

Data Analysis and Coding with AI

11 New JS Features You Can Use Today!

Stop Hardcoding Everything: Use Dependency Injection

This Design Pattern Scares Me To Death

Python 3.14: The NEW T-strings are Awesome

7 Python Mistakes That Instantly Expose Junior Developers

Why AI Can Never Escape Turing's 1936 Proof

10 Python Features You’re Not Using (But Really Should)

Don’t Use Boolean Flags in Python, Use Policies Instead

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains

The Lazy Loading Pattern: How to Make Python Programs Feel Instant

Tuscan Cottage Wildflowers Oil Painting | 4K Vintage Wallpaper Art Screensaver | Vintage Frames

I’m done with the AI hype

Co-Creator of Haskell: Useless vs Useful Languages, Rust vs C, Functional Programming | Simon Jones

The Builder Pattern in Python: Finally Explained!

Stop Building Ugly APIs: Use the Fluent Interface Pattern

Listen and Feel the Peace | Tibetan Healing Sounds for Deep Meditation, Inner Peace & Soul Healing

