5 ms·
I mostly work with data mining on my personal projects(which is a couple of hours every day), and I'm pretty sure I didn't have to write a single regex since I'
by vain_cain 5y ago
I mostly work with data mining on my personal projects(which is a couple of hours every day), and I'm pretty sure I didn't have to write a single regex since I've started using Copilot. It's hard for me to even imagine how I used to do it before, and how much time I've wasted on stupid mistakes and typos. Now I just write a comment of what I want and an example string. It does the job without me having to modify anything 99% of the time, even for complex stuff. Sure, sometimes it gives an overly complicated solution but it almost always works. Exciting times.
- mark_l_watson 5y agoThanks for the good example. The first time I tried OpenAI's assistant (before I had access to GitHub CoPilot) I wrote a comment in Javascript code that read something like "perform SPARQL query to find out where Bill Gates works" and code was generated using an appropriate library, the SPARQL (like SQL) query was correct, and the code worked. Blew my mind.
- 37ef_ced3 5y agoHow do you know the regular expressions are correct, without understanding them?
- incrudible 5y agoAll regular expressions are incorrect, but some are useful.
- 37ef_ced3 5y ago
- alar44 5y ago
- incrudible 5y ago(It's a reference) https://en.wikipedia.org/wiki/All_models_are_wrong https://en.wikipedia.org/wiki/All_models_are_wrong
- whatshisface 5y agoWho cares if they're correct? If they fail a test, you can fix them. If they turn out to be wrong in production you can isolate the example and add it as a test. Producing regexes that pass all current tests but contain a subtle bug satisfy 100% of what programmers are incentivized to do. Producing them very quickly will get you promoted.
- nradov 5y agoYou're not wrong, but hopefully someone is at least doing a code review.
- deleted 5y ago[deleted]
- nlitened 5y agoI think we will very soon start seeing a clear separation between programmers ("co-pilot operators") and software engineers (those who do the thinking and understanding when there's someone "who cares").
- ThrowawayR2 5y agoWe already have that bifurcation in the sense that the majority of programmers can use frameworks, libraries, etc. to get work done but don't have the deeper knowledge to build them well.
- p1esk 5y agoThis separation has existed since the first computer was built.
- oh_sigh 5y agoI feel like you only see programmers as cogs, and not programmers as invested in the success of their product with the statement like "satisfy 100% of what programmers are incentivized to do" Generally the people using regexes care if they're correct. Frequently, all possible input variants are not enumerated in tests. Frequently, companies want to have confidence in their production code. Imagine this regex is deployed on a sign up flow, and its failures invisibly increase your churn rate. Can it happen with a hand crafted regex? Yes, of course. But I'd imagine it will happen even more frequently with an AI produced custom regex plus a person who doesn't actually understand regexes.
- vain_cain 5y agoI never said anything about not understanding them. If it's something simple, like getting a date from a string, a quick glance will tell me if it'll work. If it's more complex, a quick glance or two will give me the general idea and then I can test it against what I think will be edge cases. If you don't know what kind of a string you'll have to process then you can't really know if any regex is correct, and if you do testing it in most cases is pretty easy and quick. You'd have to test even if you write it yourself. And in the cases where it's wrong it usually gives me a good starting point.
- jonas_kgomo 5y agowould like to talk about the paintpoints you experienced while doing data preparation and mining
- vain_cain 5y agoI have an e-mail in my description, you can ask me what you'd like to know there.