Using generative AI to write code: A guide for researchers

Click for: original source

Generative AI is increasingly used to draft, edit, annotate and debug code. It’s not just industry software developers who are taking advantage of the tools it has to offer. Those who develop and use software for academic research are benefitting from them too. So how do you make the best use of generative AI for coding in a research context? As software engineers with The Alan Turing Institute’s Research Engineering Group (REG) and PhD Enrichment scheme, we’ve been asking ourselves just this question. Here, we share our thoughts, along with some tips for researchers. By Ed Chalstrey and Anastasiia Grishina.

The article answers these questions:

  • How can generative AI help?
  • Which tools can I use?
  • What tasks can I get help with?
  • What should I be wary of?

In the same way that generative AI tools like ChatGPT and Midjourney can be used to generate or modify written text, images or video – based on a “prompt” – they can be used to generate or modify code. For example, using a section of code as a prompt, you can add “explain each line of this code”, to which the AI will respond with a line-by-line explanation, perhaps modifying the code itself with helpful comments. These new tools can help to reduce the time spent trawling through search engine results, reading online tutorials and posting coding questions on websites like Stack Overflow. For researchers, they mean less time spent learning to code and more time on the research questions at hand. Nice one!

[Read More]

Tags ai cloud programming app-development management miscellaneous