Technical debt is 'debt' you accumulate when you write code and build tools quickly, but which later slow you down when trying to add additional functionality. With Large Language Models like GPT-4, you can reduce this debt upfront with better code and coding practices. In this workshop, we’ll leverage GPT to transform 'runnable' code into code that is easier to worth with and extend via version control, documentation, and code refactoring.
These materials are for use with October 18 workshop at the 2023 Government & Public Sector R Conference.
The target audience is:
-
Comfortable writing code in R to solve data problems like reading in files, aggregating data, and making graphs
-
Interested in improving their code and processes to take "code that runs" and make it "code that other people (or you in the future) can understand, run, and build on" via practices like documentation, code refactoring, and version control
-
Wants to learn how to use chatGPT to get there faster in order to reduce technical debt upfront
Which large language models we're using and the mechanics of how you access them (like in-browser vs. in-IDE, like RStudio) are hugely in flux, but there are going to some constants:
-
Good coding practices are still those which make your code more understandable, less error-prone, and easier to build on (by yourself or someone else)
-
Large language models can assist you to get there faster and more easily, but they require oversight at each step, so you need to know what you want your end result to look like
This is an interactive workshop. Please bring a laptop and do the following ahead of time:
- Have the latest version of R and RStudio installed
- Have git installed and an account on GitHub
- Have access to an Large Language Model. The easiest way to get this is to sign up for OpenAI or Anthropic.