• 0 Posts
  • 116 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle

  • I was working at a company at one point that got a contract to build something I viewed equivalent to malware. Immediately I brought it up to several higher-ups that this was not something I was willing to do. One of them brought up the argument “If we don’t do it someone else will.”

    This mentality scares the shit out of me, but it explains a lot of horrible things in the industry.

    Believing in that mentality is worse than the reality of the situation. At least if you say no there’s a chance it doesn’t happen or it gets passed to someone worse than you. If you say yes then not only are you complicit, you are actively enforcing that gloomy mentality for other engineers. Just say no.
















  • I mean, you shouldn’t really parse any language (markup, script or otherwise) with regex. The point is there are other tools for the job that get you closer to what the actual interpreter is expecting to see. It’s really easy to botch a regex and accidentally create new syntax matches.

    Regex is fine for noncritical parsing. You’ll often see it used for text editor / IDE language syntax highlighting, but you should also have noticed by now how often that tends to break down with more extreme combinations of syntax.

    I do agree that lexers should still be preferred for manual manipulation of existing langues, but do whatever you want. It’s not like any of us can stop you.