Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
I Hate Long If-Elif Chains: This Design Pattern Solved It Once and For All
Play lesson

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

4.0 (1)
31 learners

What you'll learn

This course includes

  • 31.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

💡 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

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere