3 ms·
What's so strange about regex? Or SQL for that matter?
by coldtea 6y ago
What's so strange about regex? Or SQL for that matter?
- Zelphyr 6y agoBasic regex is readable, at a glance, for the most part, with a little practice. Anything marginally complex and you have to stop what you’re working on and really read the regex to try to understand what it’s doing. SQL isn’t hard, but trying to remember all the use cases for the various ways to query something always trips me up. “Wait, do I do a LEFT JOIN here? Ok, now I gotta to look up the different kinds of joins so I can be sure I’m writing the most efficient query.” Again, it’s just a matter of practice. I’d take SQL over a regex any day.
- offtop5 6y agoAs for SQL, I think I just don't put the time into learn it. At the higher levels, it's definitely it's own programing language with a radically different herritage from the JS/C# I'm used to.
- wpietri 6y agoThey're definitely different paradigms of thinking than typical coding. I enjoy regexes, but definitely get how other people would find them bizarre. Personally, I've never liked SQL, though. As with regexes, a little does no harm. But building anything substantial with it always turns into what feel like absurd bank shots to me. I don't just have to cast everything into the relational paradigm, I have to try to guess how a couple million lines of DB server code is going to map that back into operations I actually understand. That said, as with most technologies that I don't personally like, people seem to build sufficiently effective systems and profitable businesses on top of them. So I think it's down to personal cognitive differences and matters of taste. Let a thousand flowers bloom, I say.