Programming with Generative AI (GenAI)
What is going on?
In April 2025, Microsoft said that around 30% of its new code is generated by AI. Google also made a similar statement in October 2024:
Today, more than a quarter of all new code at Google is generated by AI, then reviewed and accepted by engineers. This helps our engineers do more and move faster.
Shopify went as far as to require its software engineers to use GenAI in their work. Meta also now allows using GenAI tools during interviews. Several reports also show high adoption rates in the software engineering industry (see this example). What is clear is that the shape of how software engineers in the industry are programming is changing very rapidly due to GenAI.
Will programmers be replaced by GenAI?
Remember that we are talking about high rates of adoption of GenAI by programmers. In other words, the programmers are still there, but how they program and what tools they use have changed!
How does programming with GenAI look like?
Think of it as a spectrum with two ends:
Left End: No coding skills needed. The ‘programmer’ describes what they want, GenAI generates the entire software, and the ‘programmer’ reviews the final product (not the code).
Right End: Minimal use of GenAI. The programmer writes all code themselves, but occasionally uses GenAI for small tasks or for understanding. I.e., the programmer operates very similarly to how they have always operated before GenAI.
We refer to the left end as vibe coding (some use this term to describe things further right on the spectrum). In the most recent StackOverflow Developers’ survey, more than 50% of the respondents said that they use GenAI daily in their work, but around 80% said that they do not vibe code.
In this course, programming with GenAI means a middle ground, where GenAI is integrated throughout the process, but the programmer retains full control of the code. For example:
Design. The programmer chooses a design/architecture for their program. They may use GenAI for comparing alternatives, critiquing and improving their design, etc. However, they fully understand their design, why it is suitable for their application, and the tradeoffs that come with it.
Code-writing. The programmer directs GenAI to write every piece of code, reads the generated code, and decides whether to keep it, modify it, regenerate it again using other instructions, or rewrite it from scratch.
Testing. The programmer creates and runs test cases (with GenAI’s help), and is responsible for ensuring testing quality and iterating on design and code based on the test results.
What does this mean for me in the course?
Historically, teaching programming has focused on teaching code-writing. However, much of the code-writing now can be done by GenAI. While you will still learn how to write code, this course will also focus on the skills you need as a programmer who does not type every line of code in their program!
Here is what we will do:
Prompting, reading, testing, and documentation. Much of the class activities, homework, and assessments will focus on reading code (understanding its purpose and knowing its output), testing code (ensuring programmatically that it is correct), and describing requirements and functionality using clear and precise language (prompting and documentation). These skills are critical for programming with GenAI.
Exploring CS Applications. We will use GenAI to explore programming applications across different areas of computing. In the past, the need to write every line of code limited us to small, simple examples. With GenAI reducing this bottleneck, we can now take on larger and more interesting projects, including problems from computer security, graphics, and artificial intelligence.
Policy. The course is structured so that you get ample opportunities for using GenAI to learn and innovate. At the same time, passing this course is almost impossible without practicing self-restrain against unhealthy uses of GenAI. We will not police how you use GenAI and you will not be penalized for using it in any coursework activity. However, 80% of the course grade comes from GenAI-free proctored assessments.
What is considered ‘healthy Use of GenAI’?
When solving practice exercises:
| Do | Don't |
|---|---|
| Try the exercise first without GenAI and keep Copilot turned off. | Paste the problem directly into GenAI and ask for an answer. |
| When stuck, use GenAI to get hints on how to proceed, hints on how to fix your solution, and explanations for why your solution is incorrect. | Ask GenAI to spit out a complete solution immediately after your first failed attempt. |
| After solving the exercise, use GenAI (or Copilot) to see alternative solutions. | Consider it 'mission-accomplished' if you understood the GenAI-generated solution. The mission is accomplished when you get back to the same exercise later and succeed in solving it without GenAI help. |
| Redo the exercise later if you feel you were over-helped by GenAI. |
When solving self-assessment quizzes:
| Do | Don't |
|---|---|
| Complete the quiz without GenAI first to test your knowledge. | Use GenAI while taking the quiz. This defeats the purpose. |
| Review wrong answers with GenAI to understand your mistakes. | Just accept wrong answers without checking why. |
| Ask GenAI to re-explain concepts you struggled with. |
When working on your assignments:
| Do | Don't |
|---|---|
| TBA. | TBA. |