5 ms·
I've certainly been bitten by hardcoded values in some of our "business apps" before. One notorious example I can think of is a Laboratory LIMS system that had
by bigger_cheese 9y ago
I've certainly been bitten by hardcoded values in some of our "business apps" before.
One notorious example I can think of is a Laboratory LIMS system that had hardcoded sample pick up point locations every time there was an equipment breakdown or similar and the sample would get diverted a bunch of automated reports and database triggers would fall over.
Nowadays I prefer to use a database table to store values. I guess SQL could be considered as a kind of DSL.
I tend to use some schema like "Key: Value : Date Applied" it is often useful to keep the historical rules so you can rerun events using the business rules that were in place "at the time" not easy to do if you rely on hard coded constants.
- flukus 9y ago> Nowadays I prefer to use a database table to store values. I guess SQL could be considered as a kind of DSL. For user configurable options this is great, for system configuration it's awful. If you copy your production database you may end up reading/writing to places you shouldn't be. It also sucks if you use a shared development database (which is awful too, but unrelated).