AI Tools in Programming
Description
AI tools promise to make our programming workflows faster and more efficient. If applied correctly, such tools help us write better code, be more productive and learn new techniques easily. In this lecture, I will present some AI tools for programming (mainly GitHub Copilot) and show examples of how they can be integrated into our daily workflows for different purposes. I will also briefly talk about the problems and ethical concerns that come with such tools in science. Join me if you are interested!
Overview of AI tools for programming
Browser-based chat bots
- General-purpose AIs like ChatGPT, Bard, …
- With good prompts they can help with programming
- ChatGPT as a coding mentor: Blogpost explains how learn and improve your python skills and code (works for other languages or chat bots as well)
- Prompt ideas to get coding help: Get code explanations, debugging tips, practice exercises, code review and feedback, project ideas
- In ChatGPT you can set “Custom instructions” for your profile. These instructions will be used for all your questions. By filling out these custom instructions, you can get better answers without having to engineer every prompt
AI powered data-analysis
- Rtutor: Browser-based tool where you can ask questions about R and data analysis. You can also upload a dataset and ask the AI to analyse it. You can then download the corresponding R script or Rmardown report.
- There is also a corresponding R package that you can install to use locally. But for this you need to have your own OpenAI API key, so it is a bit more work to set up.
- Data Analyst GPT: ChatGPT specialized to analyze data. You can upload files (e.g. data) and let GPT analyse it. You can then also download the code. To access the plugin, you need a subscription to ChatGPT (~20$ per month)
Integrated AI tools
- They are integrated into your IDE directly and help you with coding
- GitHub Copilot: One of the most widespread integrated tool. Gives you inline code suggestions and a chat. Great to code faster, write better code, debug, let the AI explain code etc. See below for details.
- Codium AI: Free tool that is great for explaining code, generating tests, improving and refactoring your code.
GitHub Copilot
- Step-by-step guide on how to get Copilot for free for Visual Studio Code or RStudio.
- GitHub Copilot Docs: Useful information and guides on how to use Copilot
- Privacy FAQ of GitHub Copilot
- Prompt engineering with GH Copilot to get better results
Concerns and Guidelines
Please note that the guidelines are constantly changing and evolving. So please check guidelines that are relevant for you regularly.
Most important are guidelines of your university and the journals you want to publish in.
- DFG Rules on the use of AI particularly for proposals
- Nature living guidelines on responsible use of generative AI in research
- EU AI Act
- Universities (German)
- FU Berlin “Eckpunktepapier” (German)
- TU Berlin on AI: Mainly about AI in teaching but contains some general links to other guidelines