I’m the computer person at work, so I get asked computer things. Today I was asked by a colleague to evaluate the orphan grinder/sea boiler/penguin evictor, to see if it could help them maintain some analysis code they don’t understand.
I do not, and have not used the orphan grinder so far. #DontGrindOrphans
The colleague had a PhD student who wanted to convert some old Fortran code to Python, and the colleague was concerned they might end up with a load of Python they don’t understand after the student finishes and leaves.
If I’m going to grind orphans, I decided I’d try it on a project I needed to solve. I gave the ChatGPT variant of the orphan grinder a try, as it is the one I’ve heard most about, and it didn’t demand payment, just an email address (I fed it a disposable one).
I’ll refer to the LLM behind all this as “it”. I do not ascribe any intelligence or motive to it. Just an ability to form sentence-like objects based on mathematics.
I started by asking it nicely (no harm in being polite) if it could convert a git repo to Python. It couldn’t access the repo. I had to upload a zip file of the repo. It correctly identified what the repo was supposed to do (it’s in the readme). It identified the language too (typescript). It told me it could make a desktop GUI version of the code in Python, so I gave the OK.
A short while later – a quarter of an orphan or so – it informed me it needed an example file to test against, so I uploaded one. I added a C++ version of the file header, too.
Another orphan later, it provided me a zip file download that claimed to do what I asked. Inside was a Python script that, at first glance, seemed to load the data and display it, but offered none of the extra functionality I actually needed. I ran it in a sandbox, it downloaded a bunch of QT stuff and crashed on line 57, with an error about unknown characters and a link to a website that explains how to set your character encoding in Python.
Side note, why isn’t UTF-8 the standard now? This is code “written” today on an absolutely up-to-date OS on a very recent computer. I’d actually have to try to produce text that wasn’t UTF-8.
I edited the Python to placate it and tell it what encoding it was written in (Python seriously can’t figure this out?). It crashed due to a syntax error on the same line. I took a look; it’s some Python thing for printing a string. To be honest, if the orphan grinder can’t output code to print a string without a syntax error, I doubt it can actually produce working code to crop a CT dataset (what I asked it to do).
I gave up. I don’t like Python, I don’t want to waste my time fixing code that won’t do what I want anyway.
I will tell my colleague that I don’t think it’s up to managing their code.
All in all, I raised the sea a few hundred nanometres, evicted a penguin from an ice floe and ground up a couple of orphans all for nothing.
It turns out an LLM is just as bad at writing Python as I am, but at least I don’t pretend to be good.
If you are happier to grind orphans than I, and think you can persuade the orphan grinder to produce better code, the code I was trying to convert is at : https://github.com/UnlockingHistory/ct-cropper






