A thought on the problem of LLMs and AI coding.
Software-engineering-untrained neuroscientists (meaning 99.99% of neuroscientists) already write terrible code that is fragile and not generalizable. My observation is that the ones who use LLMs are writing even worse code.
I am struggling with code from a colleague that is essentially unusable* because it (1) folds all the loading from files (in their non-standard format) in with engine / processing in a single script, (2) uses hard-coded factors such as smoothing over a number of bins, which makes strong assumptions about the sampling rate, (3) uses incorrect terms for functions (such as "smooth" for detrend), and (4) has no documentation.
* Note - it reproduces the results fine when run on their data, but I can't use it for replication. I am not suggesting that the data is wrong. But the methods are incomplete and the code is atrocious.
@adredish
I dread looking into the code attached to papers nowadays. And the bar was already low, with all those undocumented, just-so all-in-on-file matlab scripts.