Illegal developer life pro tip: Make sure you write your code with tons of regex without any comments, and now the employer can't fire you. They are now stuck with you. muahahaha
@nixCraft
Unfortunately they always fire you first and only notice that they need you a month after.
@nixCraft I knew someone who put an apparent innocent condition in a mile long query that made never fullfill it, and once a month when it was used he commented it each time

@filobus @nixCraft

Still could be a win as then you can become a "consultant" for twice the price

@nixCraft Pesky X stealing our jobs!
@nixCraft not so much anymore since we have regex debugger like https://regex101.com/
regex101: build, test, and debug regex

Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.

regex101
@nixCraft *only if it works and somehow infiltrated to the production.
@nixCraft but but but I won't understand it either a week from now.
@GromBeestje @nixCraft Store commented regex on an encrypted disk image somewhere for additional ransomware vibes.
@nixCraft plus it gives an easy means to go scorched earth if necessary
@nixCraft
Did an awk script for backup scheduling for some sql-files on Windows for a job once. Could not get case-insensitive matches to work, so I generated regexes like [aA] for a whole bunch of strings. Deployed the generated script, threw out the generator. Sad to say I don't work at Adcom (Nidaros data) anymore :( .
@nixCraft isn't this just perl with less steps?
@nixCraft ah yes, the job where I spend all my time trying to decipher my own regex. I think I'd rather just be fired please
@nixCraft I knew a guy whose job was programming robots to destructively test automotive parts. He wrote all his code and test suites in Postscript. Try to find another engineer who can do that!

@stevendbrewer @nixCraft
Postscript is a GREAT programming language :)

I used to wrote Postscript code to format reports, which is what it's good for.

If you REALLY want job security, write it in Common Lisp! :)

All those parentheses drive people crazy!

@nixCraft well except chatgpt can write a better regex and explain it to you like a 5 year old in 3 seconds.
@nixCraft Confession: I'm not good about commenting my code.

Don't get me wrong, I try to make sure I comment anywhere I do something obscure and inscrutable, or that is not immediately obvious and requires additional explanation as to what it's doing or why. But I try to write all my code clearly enough that if you don't understand what it's doing, you probably shouldn't be fucking around with it.
@nixCraft honestly, it only takes one or two good ones to lock in that sweet sweet job security....

@nixCraft these are the first one you want to fire, before they do further damage, don't look at their code, reimplement whatever they did from scratch.

In all seriousness, code that your coworkers can't understand shouldn't get merged, code reviews are there for that.

@nixCraft Truth be told, the only surefire thing Iโ€™ve found ChatGPT useful for is writing regex ๐Ÿ˜‚
@nixCraft I wonder if ChatGPT is already asked frequently "What does this Regex mean...?". Probably is.
@nixCraft and you are stuck with code you no longer understand. No thanks. Been there, done that.
@nixCraft โ€œSome people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems."