3 ms·
Even in boring old business process land, it’s surprising how useful this is. Often you can simplify a code base full of conditional statements with a tidy loo
by gxs 3y ago
Even in boring old business process land, it’s surprising how useful this is.
Often you can simplify a code base full of conditional statements with a tidy lookup table.
I think the reason this isn’t always thought of is because a lookup table might end up with 50k rows even for something that might seem simple. This might some like a lot to end users, but thankfully the computer doesn’t mind.
Also, the look up tables are so repetitive that the tables are usually pretty easy to manage, and still worth it even when they aren’t.
On top of that, they can be configured by end users without code changes.
All in all, a really useful concept, especially for a lot of scenarios that always pop up when coding business logic.
- chii 3y ago> On top of that, they can be configured by end users without code changes. and that is how you end up with a DSL.
- gxs 3y agoHere we go, knew someone would jump in here with their opinions on why this is bad etc. You’re reading way too much into this, this simply solves a particular set of problems well in this context and that’s that. Anything you use can get turned into something ugly given enough time and lack of supervision.
- chii 3y ago> their opinions on why this is bad etc. where did i say it's bad? DSLs aren't inherently bad (or good for that matter). > You’re reading way too much into this i think you're projecting your own ideas onto me!
- gxs 3y agoHa, sorry, guess I was a bit defensive. Forget sometimes not everyone is a jerk by default online.
- oakwhiz 3y agoDouble buffered lookup tables!