4 ms·
Why? I wrote a regex in 45 minutes the other day that would have taken me days to get right without AI. It’s an enormously underpriced production boost right no
by dools 3y ago
Why? I wrote a regex in 45 minutes the other day that would have taken me days to get right without AI. It’s an enormously underpriced production boost right now.
- spamizbad 3y agoTo me this a huge signal that a regex was not the correct approach and that AI just steered you directly into (or passed) Kernighan's Law.
- dools 3y agoNo, it’s a very specific regex for parsing a very finicky file format. It’s definitely the best tool for the job, although funnily enough ChatGPT couldn’t get it right in a single regex but Claude could. ChatGPT chickened out and kept giving me functions that looped through applying various filters and regexes.
- daymanstep 3y agoHow do you know that the AI got it right?
- dools 3y agoThe the code parses the files correctly.
- add-sub-mul-div 3y agoMaybe the LLM prevented an intervention where you were asked why the thing you were working on was taking days, surfacing the need for a better approach.
- dools 3y agoNope, about a year or so ago we had a similar problem with the same piece of code and instead of fixing it I said “that’ll take me a couple of days the get right” and the guy I was doing it for just went and manually fixed the file format which took him a few hours. This time when a similar thing happened I was able to fix it before he even had to ask how long it might take and the solution is more robust and able to handle several different formats now. It was a definite win.