🧱 Build software that lasts. Join the Software Design Mastery waiting list → https://arjan.codes/mastery.
In this video, I refactor a Python booking system from loose dictionaries into a strict domain model using dataclasses, enums, and value objects. I show where stronger types improve maintainability, and where a simple string is still the right choice.
🔥 GitHub Repository: https://git.arjan.codes/2026/flexible.
🎓 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:30 The Working Before Version
1:42 The Core Design Lesson
2:55 Step 1: Replace the Dictionary
6:04 Step 2: Split Out Domain Concepts
8:38 Step 3: Replace Magic Strings
10:18 Step 4: Add a Money Value Object
13:46 Step 5: Move Rules Near the Concept
15:19 Step 6: Clean Up the Business Function
15:36 Step 7: Validate at the Boundary
17:52 Keep One String on Purpose
19:04 Why This Improves Maintainability
19:44 The *kwargs Design Smell
20:20 Final Thoughts
#arjancodes #softwaredesign #python
On this page of the site you can watch the video online Why dict[str, Any] Slowly Destroys Your Code with a duration of hours minute second in good quality, which was uploaded by the user ArjanCodes 31 July 2026, share the link with friends and acquaintances, this video has already been watched 14,160 times on youtube and it was liked by 678 viewers. Enjoy your viewing!