So, I was initially dubious when A.I started writing scripts for people. I’d think it was somehow cheating if you didn’t do the work yourself. My views have somewhat changed over the past year though. I now see such tools as very complex search engines.
My number one criticism of such tools for coding tasks is my worry that people who didn’t understand the generated code would request such code and then blindly run said code, possibly against a large environment containing data or objects, such as an Azure\Entra directory for example. This, I haven’t changed my mind on and I do think that such tools are dangerous in the wrong hands but so is Google I guess.
I decided to write this little post after requesting ChatGPT write me a bash script to convert 6,000+ rar format archives to 7z format to make them more retroarch friendly. I made my request and within 20 seconds I had in my possession the very shell script I needed to perform my tasks. I checked the script, which looked fine and then ran the script on a test directory full of rar archives and what do you know? It worked flawlessly. No tweaking required.
As I then set it running against the full set of archives I thought about how long it would have taken me to write the script, including getting distracted by many other things I have going on and I realised that doing this coding job manually probably would have been a non-starter, as I would have always had something more important to do. Within the space of five minutes though the job is now underway and the script is re-useable across all my folders containing such archives. Essentially, it has not only saved me hours, but it’s actually got me to start the task that otherwise would have remained on a “to do” list.