this post was submitted on 20 Dec 2024
98 points (93.8% liked)
Programming
17672 readers
63 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I’ve always understood DRY to be about not duplicating concepts rather than not duplicating code.
In the example here, you have separate concepts that happen to use very similar code right now. It’s not repeating yourself as the concepts are not the same. The real key is understanding that, which to be fair, is mentioned in the article.
IMO, this is where techniques like Domain-Driven Design really shine as they put the business concepts at the forefront of things.
Do you have a resource on where to learn DDD? I feel like I never understood the concept well.
If you can work with python cosmic python (http://www.cosmicpython.com/book/preface.html) is a great resource