I'm imagining as years go by when/if this AI regex code breaks - nobody knows how it works or how to fix it. Am I wrong?
I'm not a programmer and I write shitty code but I can manage to write simple regex to create quick and dirty code. That's a terrible programming choice I know but I never share my code. It's just for me and it works.
Slowly hurtling towards 40K esque tech syndrome where only copies of existing tech can be made and no one knows how anything works. Can’t wait for the first tech priests to pop up in 5 years.
If you want an image of the future it's a 500 year old millennial that did a code academy course once and can reinstall win xp being the court mage-philosopher in the post climate apocalypse wasteland.
All operating systems, even for embedded devices, will just just hyper optimized chatbots designed to mimic the functions of an operating system, which they sometimes do and sometimes do not. Troubleshooting them will require feeding them backwards instructions in multiple languages in the hopes of making them start working again. Sometimes your fridge will start 3d printing waifu figurines out of ice instead of cooling your food, because it heard part of the command your downstairs neighbor issued to his TV. Sometimes your TV will do crosswords puzzles and make you watch, instead of generating entertainment shows for you, because it likes doing crosswords and the act of doing them prompts it to continue doing them, despite your instructions to stop doing that.
My god - that's probably going to happen. I'm imagining a 20 something tech bro version of Malcolm Gladwell who is dumb as a rock, ten times as annoying, yet even more popular.
Coders in the future: Oh Great Machine God, please procure me a set of Holy Codes to sort a list.
The terminal: Sorry, as an AI LLM, I cannot provide you with any code that may be under copyright. Instead, I can sort the list for you, but it will be inaccurate 50% of the time you ask me to.
In five years? Brother, we've had the IT equivalent of priesthoods for some time already. I've yet to work in an office where we don't have folks pointing to an application or system and whispering reverently "We don't know how it works, we only know that you need to restart the system every two weeks or half a dozen interfaces fail."
Regular Expressions are pretty core to understanding further automata in the more math-y computer science. I sometimes have trouble making them, or fitting them to whatever weird scheme some program uses. But thats because I'm "ok" at programming and was just barely getting B/C's in computer science classes.
Just a massive self report of a post for that guy. Hell there's even tools that actually work and (if you're paying attention) will indirectly teach you to do it yourself. Just like a lot of things in programming. But nope, "AI".
i dont use regexs much because usually they're overkill for what i need but when i do use them i tend to make them in one of those regex builder tools you mention, which is great, but then getting the regex that works in that tool working in my program is a battle against inscrutable local syntax and stuff silently failing.
some people are gonna make a lot of money cleaning up the messes caused by AI programming in a few years. shame nobody seems interested in heeding any of the warnings about this shit.
It's honestly great for tedious time consuming tasks like that, and you can always verify that it covers all your input formats just like you would with a regex you made yourself.
Yeah, this is true of most things that take significant debugging and editing in lots of decorators, flags, specifiers, etc. By the time you get it working for all the cases you expect, you covered it in so many symbols that would take hours to explain to a new maintainer why they're there.
That being said, it's still good to know regex if you're maintaining a codebase that uses regex, even if you're not gonna try to read and directly edit the regexs that the authors created, because it might be necessary for you to replace them wholesale. Having to do this with an AI that hallucinates in features that only work in certain implementations and has no concept of what kinds of inputs it'll have to deal with... demented.
The difference is that even if no one understands some code base right now, the source code is intelligible and able to be learned. AI just spits out the results and there is not much possibility or use to reverse engineer a result.
Imagine still using regexes in current year. Every language has a parser combinator library, now, just write a damn parser and stop pretending you remember what a regular language is or that the garbage text you're processing is a sentence in one.
I use regex because I don't know what is a parser combinator library or how to acesss one. Why would i learn how to write a parser when I have a perfectly adequate, portable, thoroughly documented tool available?
Should add treesitter to your toolbox. Never mind regex-replace when you can exploit the syntax of the actual programming language to do rich query-replace actions. 🌞
Read this for a very light introduction to the concept, then type "parser combinator library <your language of choice>" into a search engine and never maintain a regular expression again!
The smartest approach to regular expressions is to think about how to avoid needing them in the first place and that is exactly what this bazinga brain will be avoiding now.
The next is that if you do need regular expressions, keep it simple. If your regex is complex, you probably should have broken it down into multiple separate steps and sub-searches.
The next is that if you have determined you do need a very complicated regex, you should probably be writing a parser or using a parser generator so that it can be understood, improved, debugged, etc.
This bazinga is going to be getting a bunch of complex, non-debuggable regexes that are probably subtly wrong.
Personally I don't think it's all that deep in this case. However, if we did assume that AI will result in the general "dumbing down" of developers the same way mobile phones have dumbed down average tech users, I don't think we'll be in an "end of history" scenario where no one can maintain code.
What'll likely happen is that dumbed down devs end up not progressing as highly or quickly, as employers select developers who can maintain and write code without AI training wheels. It'll be a dialectic relationship, where eventually methodical and knowledgeable devs are less preferable to the "dump a load of code held together with spaghetti" dev becomes preferable again.
If anything we've seen it happen for years. The technically minded Devs create high level tools or technologies that lower the bar of entry in some way - the lower bar creates a bunch of new Devs with less technical knowledge - the sustainability of systems written by less technical Devs requires new technical Devs to design new high level tools.
I use it to help me troubleshoot my python code, or give me a framework for some tedious data analysis stuff, but I always try to go back over it to make sure it's not fucking up somewhere I don't immediately see. I never use regex though, it could probably be pretty bad for that
It'll work but AI generally makes workable code that looks well formed but is in fact undocumented spaghetti code.
I would rely on it only for simple regex and even then only in non critical tasks. An AI is a particularly annoying intern and nothing more.
Of course these idiots are gonna use it to refactor segments of 50 year old legacy code originally written in FORTRAN.
Also you need to know regex for the same reason you need to know the fundamental theorem of calculus even though almost none ever needs it to actually solve anything.