4 ms·
the problem with code is that the abstraction changes and data needs to be migrated: e.g. a user is enabled if they have paid... time passes... now a user is e
by ilrwbwrkhv 2y ago
the problem with code is that the abstraction changes and data needs to be migrated:
e.g. a user is enabled if they have paid... time passes... now a user is enabled if the team they belong to has paid. now you need to move the logic to another struct / class and the data to another table.
now this is where "payables" and things come in and you start going the path of clean code with 1000 classes.
instead, the best way to do this is immutable data streams and event listeners.
after over a decade of programming, i feel for most software with a customer focus (not low level, embedded etc), immutable data streams where data flows through and listeners do things to themselves is the best way.
- pezo1919 2y agoSame conclusion here. May I ask about your stack/domain?
- charlie0 2y agoI fully agree, but this requires a certain level of experience to organize code in a way that makes it easy to navigate and modify. It's quite easy to end up with with "rube goldberg" code where you don't know what listeners are being triggered by what streams. Or to end up with a ton of edge cases where things aren't handled properly when issues occur.
- leonseled 2y agoYea agree. I feel one of the best books ive read that makes this concrete is Grokking Simplicity by Eric Normand. It’s less about functional programming and more about functional thinking. Lots of concrete great advice in that book.