
Alvin Starr via talk wrote on 2025-02-04 12:37:
The AI tools are good for giving you answers to things that have already been answered.
I've had great experiences where I spent *hours* (possibly double-digit hours) trying to join 3 tables in a peculiar way. No amount of searching on any search engine gave anything but, "here's how to join tables". Useless. If the answers existed out there, I couldn't find them, and search engines couldn't match them to my situation. I asked ChatGPT and it was able to parse out the table schema from a columnar representation and spit out a query with a cross-join that worked perfectly. In seconds. Also have seen it debug problems with asynchronous code that trips up a lot of people, something like: ``` for (var x = 1; x <= 5; x++) { let z = setTimeout( () => {console.log(x)}, 100) } 6 6 6 6 6 ``` It explained why the problem happened (6 is output 5 times, not 1,2,3,4,5), and how to fix it. Maybe the answers are out there, but if your code is misbehaving, it can be nearly impossible to find a solution via search alone. According to skilled developers, guys like Martin Wimpress (creator of Mate desktop), they can be excellent at adding code *and comments* to projects in one's own coding style. Which he (among others - I just recall him and Hayden Barnes of EFF discussing early CoPilot Github integration) found immensely helpful.
The worse part of questions like that is that the current AIs will give you an answer that looks good but often is 100% wrong.
Sounds like humans. I do wish they'd say, "I don't know" more often instead of BS-ing, but again, humans have that problem too.
Still if you want a small script to do something that you know can be done but don't want to look it up yourself then they can be great.
Or when you cannot look it up because the results are not specific enough to your situation. Also, I appreciate that it does signal trapping and other niceties in bash scripts; something 99% of programmers don't bother with (I'm guilty of that). I discovered that when asking it to write a web server in bash. Something I thought impossible, yet it spat out some really nice code that included named pipes, traps, etc. I seem to recall the code required a single character modification in a couple similar statements. So, not perfect code, but it got 99.9% of the way there and I got approximately 0% of the way to an answer. Really useful stuff, in my experience. Not infallible, but neither are humans, StackOverflow, etc.