▲ | yakshaving_jgt 4 days ago | |||||||
I've noticed that many programmers believe that parsing is some niche thing that the average programmer likely won't need to contend with, and that it's only applicable in a few specific low-level cases, in which you'll need to reach for a parser combinator library, etc. But this is wrong. Programmers should be writing parsers all the time! | ||||||||
▲ | WJW 4 days ago | parent | next [-] | |||||||
Last week my primary task was writing a github action that needed to log in to Heroku and push the current code on main and development branches to the production and staging environments respectively. The week before that, I wrote some code to make sure the type the object was included in the filters passed to an API call. Don't get me wrong, I actually love writing parsers. It's just not required all that often in my day-to-day work. 99% of the time when I need to write a parser myself it's for and Advent of Code problem, usually I just import whatever JSON or YAML parser is provided for the platform and go from there. | ||||||||
| ||||||||
▲ | eska 4 days ago | parent | prev | next [-] | |||||||
I think most security issues are just due to people not parsing input at all/properly. Then security consultants give each one a new name as if it was something new. :-) | ||||||||
▲ | dkubb 4 days ago | parent | prev | next [-] | |||||||
The three most common things I think about when coding are DAGs, State Machines and parsing. The latter two come up all the time in regexps which I probably write at least once a day, and I’m always thinking about state transitions and dependencies. | ||||||||
▲ | nine_k 4 days ago | parent | prev [-] | |||||||
I'd say that engineers should use the highest-level tools that are adequate for the task. Sometimes it's going down to machine code, or rolling your own hash table, or writing your own recursive-descent parser from first principles. But most of the time you don't have to reach that low, and things like parsing are but a minor detail in the grand scheme. The engineer should not spend time on building them, but should be able to competently choose a ready-made part. I mean, creating your own bolts and nuts may be fun, but mot of the time, if you want to build something, you just pick a few from an appropriate box, and this is exactly right. | ||||||||
|