Too Many Parameters? Use This Pattern
ArjanCodes
???? Build software that lasts. Join the Software Design Mastery waiting list → https://arjan.codes/mastery.
Functions with long parameter lists often become harder to understand and maintain as a codebase grows.
In this video, I show how the Parameter Object Pattern can help by turning related parameters into a meaningful concept. I look at the benefits, the trade-offs, and why you should be careful not to introduce unnecessary coupling. I’ll also show how this pattern works nicely with Python’s structural pattern matching.
???? GitHub Repository: https://git.arjan.codes/2026/param.
???? 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:32 The Problem: Parameters Spreading Everywhere
2:54 The Missing Concept: VideoSearchQuery
4:54 Add Validation to the Object
7:03 Easier API Evolution
8:04 Sometimes the Boundary Is Wrong
8:46 The Caveat: Stamp Coupling
10:12 Pattern Matching Becomes More Expressive
12:50 Final Thoughts
#arjancodes #softwaredesign #python
Functions with long parameter lists often become harder to understand and maintain as a codebase grows.
In this video, I show how the Parameter Object Pattern can help by turning related parameters into a meaningful concept. I look at the benefits, the trade-offs, and why you should be careful not to introduce unnecessary coupling. I’ll also show how this pattern works nicely with Python’s structural pattern matching.
???? GitHub Repository: https://git.arjan.codes/2026/param.
???? 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:32 The Problem: Parameters Spreading Everywhere
2:54 The Missing Concept: VideoSearchQuery
4:54 Add Validation to the Object
7:03 Easier API Evolution
8:04 Sometimes the Boundary Is Wrong
8:46 The Caveat: Stamp Coupling
10:12 Pattern Matching Becomes More Expressive
12:50 Final Thoughts
#arjancodes #softwaredesign #python
0 Comments
No comments yet. Be the first to weigh in.