You might recall my experiment to use ChatGPT to write drafts of blog posts. Quick recap: the results of that experiment were dismal.
Believe it or not, those results didn’t put me off ChatGPT (and large language models in general). At least, not for tasks other than writing.
Recently, I gave ChatGPT another go to help me create scripts to automate a few tasks. You see, I’ve been moving my blogs to a new home and a hefty chunk of that process is manual. Or, at least, it could be if I decided to embrace my inner masochist and do all of the work file by file in a text editor.
Instead of subjecting myself to needless tedium and drudgery, it struck me that I should automate those manual bits with a bash script or four. In case you’re wondering, bash scripts are text files, containing one or more commands, that you run in a terminal window. The scripts, in turn, can run the commands over several files at once. Using bash scripts, I could (theoretically) save myself a pile of time and effort — no mind-numbing editing of individual file after individual file.
The problem? I’m not the most technical person. I know enough about some things, including scripting, to be dangerous. But when more complex tasks arise I hit a high, thick wall. And, to be honest, I’m a bit too lazy to try to learn the nuances of bash scripting so I can occasionally cobble together a script. So, taking a page from some of the software developers I know and work with, I decided to turn to everyone’s favourite large language model for help.
As I did in my writing experiments, I carefully crafted prompts for ChatGPT that explained what I wanted the scripts to do. The results? While better than anything I could have come up with, those results were mixed. Most of the scripts worked as expected. A couple worked, kind of. The others failed. With the latter two sets of scripts, even my follow-up prompts didn’t help to iron the kinks out. I’m still not sure whether that was down to me or to ChatGPT.
Still, the scripts which did their jobs saved me more than a bit of time and effort. That was time I could devote to my family, to continue reading The History of the Decline and Fall of the Roman Empire, to sample a few new whiskies, and to relax. You know, the important things in life.