// NATURE NEWS — SPAZIO & SCIENZA
In the AI era, coding means thinking like a systems architect
Jacques Cornwell is a PhD student in pathology at the University of Cambridge, UK.
Search author on:
PubMed
Google Scholar
Until just a few years ago, my journey in learning to code as a wet-lab clinician-scientist was marked by frustration. I regularly found myself staring at a flashing cursor, scouring jargon-filled forums for clues to why my script had crashed and spending hours hunting down a single missing comma or mismatched bracket. For scientists whose work bridges the gap between experimental observation and computational analysis, the barrier to entry was steep.
The release of advanced large language models (LLMs) and autonomous artificial-intelligence agents has since completely changed the situation. Now, anyone can prompt an AI model to construct complex computational pipelines that would otherwise require days or weeks of troubleshooting, and more patience than any researcher could reasonably be expected to have. This begs the question: if AI can generate these complex statistical analyses and bespoke data visualizations in seconds, do you still need to learn to code?
The answer, to my mind, is an emphatic ‘yes’. But the way we learn must change. The bottleneck is no longer mastering coding grammar and syntax; it is learning how best to prompt and guide AI tools to answer our scientific questions. In many ways, early-career scientists are now stepping straight into roles historically reserved for senior software engineers: supervising, critiquing and refining output generated by others, or, in this case, an automated assistant.
Here are six tips to help get the most out of the process.
When I started using AI to help me code, I worried that I would quickly lose the skills I had developed. I had spent years learning how different functions could be used to merge data sets, generate figures and run statistical analyses. Using AI felt like cheating, even if the answers to my problems were already available online and LLMs were simply quicker at finding them.
Eventually, I realized I didn’t need to remember the exact syntax required to run a hierarchical clustering algorithm or pivot a table using Python’s pandas library (a collection of data-analysis tools in the Python coding language). I simply needed to know that these methods existed, roughly how they worked and when best to use them. By reading the function documentation, I learnt what different functions could do, but using AI meant I didn’t have to worry about exactly how to make them do it.
By thinking like a systems architect, I could direct the AI system towards robust, reproducible solutions without getting bogged down in syntactic minutiae.
When you have an AI model capable of writing hundreds of lines of code instantly, the temptation is to ask for a miracle: a single monolithic script that ingests your raw data, cleans them, runs the statistics and outputs a formatted figure for publication.