The promise and perils of AI-assisted coding in science

AI-assisted coding tools have become ubiquitous in science within just a few years of their introduction. Building on lessons from my openly available book Better Code, Better Science I will outline a toolbox for scientists who wish to take full advantage of these tools while also ensuring that their results remain reproducible and valid. I will highlight a number of common failure modes of current AI coding tools, and argue that scientists must ultimately take final responsibility for the code that they generate for research through robust testing of AI-generated code.