4 ms·
Doing this in SQL is absolute insanity. I’ve seen many pieces of code grow in this way and I understand how it happens but still surprises me to see how scrappy
by Hippocrates 5y ago
Doing this in SQL is absolute insanity. I’ve seen many pieces of code grow in this way and I understand how it happens but still surprises me to see how scrappy things are under the hood at some big-time companies.
- who-shot-jr 5y agoHello, what would be a better way to do it? In code? Regex?
- Hippocrates 5y agoProbably yes, in code with regex. To name a few advantages: 1. Better readability and organization. Rules and word lists can be abstracted to more of a config format. 2. possible to easily store in a database and support dynamic additions/changes to the rules and words 3. Better accountability of performance. Able to use profiling to catch any perf issues in the rules. 4. Testable with unit tests