by nathell · 6y ago · 0 comments
> Now, you think and design abstractly for a living, and that repetition will feel uncomfortable. It will call to you like a Siren: "refaaaaactoooor meeeee". "Maaaake it DRYYYY". So here's my tip: tie yourself to the mast and sail on. That repetition is good. It is serving a purpose. Just sail on.
https://github.com/Day8/re-frame/blob/master/docs/Subscripti...
findItems(db)
findWidgets(db)
and refactoring to findAnything(db, items_tablename)
findAnything(db, widgets_tablename)
So the repetition is good because it's a data access layer and you shouldn't know the storage details, not because repetition is always good.