I Hate Long If-Elif Chains: This Design Pattern Solved It Once and For All
About
No channel description available.
Latest Posts
Video Description
💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. If your code is littered with endless if-elif chains just to handle different formats, behaviors, or commands, there’s a better way. In this video, I’ll show you how the Registry Pattern can help you clean up your logic, make your code extensible, and even power a dynamic CLI with plugin support. We’ll start with a simple example and then build a real-world textutils CLI using Python and Typer, complete with Rich-powered output and zero hardcoded logic. 🔥 GitHub Repository: https://git.arjan.codes/2025/registry. 🎓 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 0:48 What Is the Registry Pattern? 1:20 Quick Example: The Exporter Problem 8:22 Full Example: CLI text utils 9:50 Registry Implementation. Overview 11:25 Wiring It Up with Typer 12:33 Extending the CLI 13:56 Benefits of This Pattern (Now That You’ve Seen It in Action) 14:18 Pitfalls to Watch Out For 14:48 Final Thoughts #arjancodes #softwaredesign #python
Coding Efficiency Essentials
AI-recommended products based on this video

30 Pack Multicolor Pen in One Easter Party Favors 6-in-1 Fun Pens 6 Colors Cute Pens Easter Classroom Gifts Retractable Ballpoint Pen for Birthday Gifts, Student Rewards, Class Prizes

Zhanmai Open When Envelopes for College Student, Going Away to College Gifts University Gift Card Book, High School Care Package, Birthday Cash Card Holder for Daughter Son Friends Gift(Pastel)

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen



















