Join Nostr
2025-08-12 09:50:27 UTC

Benjamin Balder Bach on Nostr: If you need to convince someone about the importance of "Locality of Behavior" (LoB) ...

If you need to convince someone about the importance of "Locality of Behavior" (LoB) in #Django, show them a large project that attempted to do "don't repeat yourself" (DRY) on a bunch of Django Rest Framework serializers 🍝

It's a pattern I've seen repeated with both models, forms and class-based views. Class-inheritance invites DRY'ing of loosely related objects that often turn out to diverge once the project has evolved.

Anyways good luck out there with the DRY'ing, LoB'ing and YAGNI'ing 🤹‍♂️