A couple of key principles guide choices around AI usage:
There are lots of different AI systems, models, and agents that can be used for software development. We're going to start with CoPilot because it's easy to enable in VS Code and we can get started for free.
https://code.visualstudio.com/docs/setup/copilot
Remember to turn off the AI features when working on problem sets!
OpenCode is an open source AI coding agent. It can be configured to work with many different models (CoPilot, Claude, etc -- also lots of free and even local models).
OpenCode runs as a terminal process (you chat in the command line), but that can be open through VS Code.
Remember to turn off the AI features when working on problem sets!
Install via npm
npm install -g @opencode/cli
CoPilot and OpenCode distinguish between "Ask"/ "Plan" mode, and "Agent"/"Build" mode.
In Plan modes, the AI will propose changes to your code without actually modifying files. This allows you to review and consider what it will be doing. You can then switch to Build mode to execute the changes.
From an educational perspective, working in Plan modes is probably better (but only if you actually review it!)
To have the AI Agent generate some code, we'll need to give it a prompt describing what we want. Before doing anything with the agent, lets write the prompt!
Individually, have your agent build using your prompt!
Discuss the following with your group (and to share out):
Pick one team member's version to use as the "starting" version for the project.
Everyone should be at the same place now!
Now to start improving/fixing problems!
Identify one or two things that need to be changed in the draft. Note those down somewhere.
These could be anything from a small style fixes to major design adjustments
Importantly, you can make changes yourself! You don't need to tell the AI to do it--you have control over the code! Sometimes its better/faster to do it yourself than try to shape the AI into doing that work.
Keep working on the project draft. We'll take 10-15 minutes to debrief and discuss the process before the end of class (I want to hear from everyone!)
Task list for Week 4 (all items)
You may need to catch up with textbook/videos!
Read: Chapter 10
Problem Set 04 due Friday
Next: JavaScript!