I do not know if it's correlation or causation, but almost all code using regular expressions I encounter is horribly broken.
I do not know if it's correlation or causation, but almost all code using regular expressions I encounter is horribly broken. 1. Regular expressions are often used instead of existing parsers. XML, CSV, file paths, URIs etc. all already have fast, well tested and correct parsers. 2. Often the thing worked on should not be a string in the first place. For example comma separated string is used instead of a list and regular expression emulate list operations. 3. Some things could be processed much easier with different tool - for example recursive descent parser. Yet the developer still tries to parse arithmetic expressions with a hammer. 4. They are often developed via trial and error. They are either first thing which worked for a simple case or are 10 line monsters riddled with exceptions from exceptions. 5. They are often part of hacks and workarounds. For example User-Agent is matched to work around bugs in browsers. 3. They give very limited feedback to user. There is either a match or no match. There is no way to tell what and where is broken. There are valid use cases for regular expressions. It's even possible to write correct code with them. It's just a rare sight.
Posted by banthar on Jun 21, 2015, 11:28 AM
Tags
Related issues
- This is my biggest problem with agents, they constantly defensively code for cases that have no chance of happening and in most cases a p...
- I wish there was something like LEAN for biology.
- The issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
- I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
- I hate that I'm in deep enough to know what you mean.
- The biggest problem with “AI” is that big corps are shoving it down our throats.
Raise real-world problems, find people facing the same issue, and discuss solutions.6,000 issues0 comments
reliability (Other)
This is my biggest problem with agents, they constantly defensively code for cases that have no chance of happening and in most cases a p...
NewI wish there was something like LEAN for biology.
The issue is really the extreme difficulty of programming them, especially for anything sequential (rather than combinatorial).
I probably could have beared with it if it was only limited to programming, but it showing up in creative fields has made me feel all sor...
I hate that I'm in deep enough to know what you mean.
The biggest problem with “AI” is that big corps are shoving it down our throats.
in the middel of a coding session with 5.6 sol.
[Hero Run] 535B-A23B on 18T tokens
I do not know if it's correlation or causation, but almost all code using regular expressions I encounter is horribly broken.
I do not know if it's correlation or causation, but almost all code using regular expressions I encounter is horribly broken. 1. Regular expressions are often used instead of existing parsers. XML, CSV, file paths, URIs etc. all already have fast, well tested and correct parsers. 2. Often the thing worked on should not be a string in the first place. For example comma separated string is used instead of a list and regular expression emulate list operations. 3. Some things could be processed much easier with different tool - for example recursive descent parser. Yet the developer still tries to parse arithmetic expressions with a hammer. 4. They are often developed via trial and error. They are either first thing which worked for a simple case or are 10 line monsters riddled with exceptions from exceptions. 5. They are often part of hacks and workarounds. For example User-Agent is matched to work around bugs in browsers. 3. They give very limited feedback to user. There is either a match or no match. There is no way to tell what and where is broken. There are valid use cases for regular expressions. It's even possible to write correct code with them. It's just a rare sight.
Comments (0)
No comments yet. Start the discussion.