owned this note
owned this note
Published
Linked with GitHub
# Getting the Most Out of AI Coding Assistants
## Blurb
AI tools are changing the way software developers work, but using these assistants effectively can be challenging. This workshop will help you to unlock the full potential of AI in your development workflow.
Whether you're new to these tools or have been using them for a while, join us to explore the wide range of AI coding assistants available, discuss best practices for using them in your projects, and discover when and how to use them to maximize your productivity. You will not need any more than a basic understanding of programming. Plus, if you're already comfortable with AI tools, this is a great opportunity to share your experiences and insights with others!
## Questionnaire to send to students before the course
https://forms.vib.be/anon/#/forms/5a2d2e22-0020-4d40-b994-6b107c23f4e4
## Goal(s)
> [name=James Collier] Todo: discuss what the goals should be (and make these clear to students on the day)
* What tools are available (services, local tools, ...)
* Discuss what works / what doesn't, Pros and cons
*
## Tools to explore
Categories:
* Chatbots (ChatGPT, Phind, https://jan.ai/, Claude)
* In-editor assistants/autocomplete/integrations (Codeium)
* Online editors (Replit)
* Shell tools (Butterfish, https://two-wrongs.com/q, Ollama)
* PR Review / code review?
* www.coderabbit.ai
* Lot's on integrated products (e.g. https://snyk.io/platform/)
## Ideas
* In what situations is a chatbot tool useful?
* Recommend an approach to solve a problem
* Recommend alternative tools or libraries
* Maybe useful / it depends
* Understanding error messages
* Code review / describe a block of code
* Unit test generation
* In what situations is an AI tool _not_ useful?
* Questions specific to a project (private) that youre working on.
* Code generation other than simple boilerplate (turn off automatic completions)
*
* Privacy: sharing private data and secrets
* Ethics:
* Open source / open training data
* What data was used to train the model
* Slavery used to label data
* Legal issues (ongoing lawsuits)
* How much longer the service will be around
* Environmental cost
* Self-hosting AI
* Present a plan (access to GPU compute)
* Specialised to own purposes / training
* Specialised models (self-trained, Claude)
* Utility of general ones like ChatGPT
* Practical ideas:
* Demos of where tool is useful
* Demos where it is not useful
* Code generation / find issues
* Present case studies
* Tips:
* First (or something limited) query to chatgpt has internet access
* Change the
## Plan
4.5 hours total (- 30 min break): 4 hours
### Introduction
1. Introduce the trainers and ask students to introduce themselves
1. Talk about the goals of the workshop
* What tools are available (services, local tools, ...)
* Discuss what works / what doesn't, Pros and cons
* Ethical and privacy issues
* Practical application of tools on real projects to get experience
1. What are LLMs, what is AI (need to know how much knowledge students already have)
1. What tasks are part of software dev?
* From scratch
* Adding features to existing software
* fixing legacy software bugs
* refactoring
* Testing
* deployment
* maintenance
* code review
* design
* documentation
* Learning new tools/libraries/techniques/...
* trying to understand Jos' code from last year
1. What tools are do software devs use?
* Editors
* static analysis (linters, type checkers)
* dynamic analysis (tests, valgrind, CPU profilers, heap profilers,... )
* tests
* version control
* build tools
* debuggers
* code generation (usually based on some specification)
* logging / monitoring
* dev environment (docker, nix, guix)
* project management (Jira)
* documentation tools
* database tools (DBeaver)
1. What AI powered tools are available? Where do they overlap with existing tools?
* Code generation
* In-editor autocomplete (Codeium, Github Copilot NOT FREE, ...)
* Chat (ChatGPT, Claude, Phind)
* Chat
* Pair programming
* Search engine
*
* Documentation generation
* Code review (Treat the LLM as an agent not a tool)
1. Ethics and privacy issues (as a interactive; brainstorming with students)
* sharing private data and secrets
* Open source / open training data
* What data was used to train the model
* Slavery used to label data
* Legal issues (ongoing lawsuits)
* How much longer the service will be around
* Environmental cost
(45 min)
### Workshop
1. Marine: Demo ChatGPT to see how it works (suggestion: Ask general questions about unfamiliar technologies). (5 mins)
2. Set custom context in chatgpt : " you are a machine learning developper in python. You use lightning-pytorch. You work in research field. "
2. Describe the problem. "I have eye tracking time-series data for patients with a certain age. I want to classify this time series based on age. Please suggest a list of good deep learning models."
4. Generate the python code to test this model: "Generate python code with the LSTM model"
1. James: Demo asking a quetion to `q` (5 mins)
* `q "How do I compress a text file with tar?"`
1. James: Demo using Codium in VSCode. (5 mins)
* Generate a test for some function (convert a list of dates into UTC timezone)
> [name=James Collier] Todo: will pre-write the function to do this
3. Spare time to install whatever tools (q, ollama, ...), and to explore any tools they're interested in. (30 min)
4. Students should find a project to work on (suggestions as a backup; 2 hours)
* [Ollama](https://github.com/ollama/ollama/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+-linked%3Apr)
* [Polars dataframes](https://github.com/pola-rs/polars/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+-linked%3Apr)
* [Biopython](https://github.com/biopython/biopython/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+-linked%3Apr)
* [GGPlot2](https://github.com/tidyverse/ggplot2/issues/6178)
* [YAML](https://github.com/MaybeJustJames/yaml/issues?q=is%3Aissue+is%3Aopen+-linked%3Apr)
*
> [name=James Collier] Todo: will make something easy for students to click on
1. Ask the AI how to run it / how does it work (maybe????)
* Prompt: How can I download and run the project in this git repository? https://gitlab.com/structural-fragment-search/super
* Are the installation and usage instructions correct?
1. GROUP DISCUSSION: What did you find that worked well? What didn't work well? What do you still want to find out?
* In what situations is a chatbot tool useful?
* Recommend an approach to solve a problem
* Recommend alternative tools or libraries
* Keep in mind what the model has access to / when the model was trained
* Maybe useful / it depends
* Understanding error messages
* Code review / describe a block of code
* Unit test generation
* In what situations is an AI tool _not_ useful?
* Questions specific to a project (private) that youre working on.
* Code generation other than simple boilerplate (turn off automatic completions)
*
1. Reminders before closing:
* Do not give online models private or sensitive information
* Do not blindly trust the output
* Explore your options: things in this domain change very quickly
* Ask: are any of the students planning to use any of the tools in this workshop?
## TODO
* Marine: send name of specialised (wizard coder for Python; Requires 32GiB!)
* James: Look for suitable projects
* Marine: How to install local tools on Windows
* James: Explore availablity of code review AI (generally with a system prompt like, "Review the following code and make concise suggestions:") [e.g.](https://github.com/s-kostyaev/ellama/blob/main/ellama.el#L253C48-L253C103)
* James: what model is Codium using (ANSWER: Custom self-built code models)