Sign in to confirm you’re not a bot
This helps protect our community. Learn more

Introduction

0:00

Ask Duo Chat how to setup C

1:30

Move Duo Chat to the right panel in VS Code

2:35

Install C# VS Code extension

5:00

dotnet new console CLI

8:55

Code Suggestions in C#: Query REST API

10:55

Use /explain to explain generated code

12:40

Organize code with .gitignore, add CI/CD, ask Duo Chat

14:54

Chat Beta feedback: Context missing, suggestions improvements

16:10

Refine prompts with more context, or start over

18:50

CI/CD broken - use Root Cause Analysis

22:25

Fixed CI/CD

26:00

refactor code into testable function

26:30

Explain await/async in C

28:50

tests to generate tests

32:00

Test project? Help needed

33:30

Chat Beta feedback: Refined prompts

35:30

Test directory in the solution

40:35

Debug Test import errors with Chat

47:00

Dogfooding thoughts

51:12

Confused by structure, test and app should be side by side

56:05

Explain the compiler error with Chat

58:50

Refined prompts for code tasks: /refactor into public class

1:00:00

Add more C# tests

1:05:50

Run tests in CI/CD

1:15:18

Success and conclusion

1:19:15
GitLab Duo Coffee Chat: Get started with C# and use code task /explain, /refactor, /tests prompts
6Likes
829Views
2024Jan 30
We asked GitLab Duo Chat how to start a new C# project and learned how to use the dotnet CLI. The first Code Suggestions challenge is not tiny - query the GitLab REST API and print the response. The code works -- we asked Chat for help with .gitignore and CI/CD configuration for C#. The CI/CD jobs fail, and Root Cause Analysis helps out. Next, we explore code tasks and let Chat /explain the REST API calls in the source code. To create tests later, we ask GitLab Duo to /refactor the selected code into a function. We refined the prompt to `/refactor into the public class` to get code that can be accessed from the test project. The code gets /tests generated using a code task in Duo Chat. We also learned that C# solutions should contain the application and test project side-by-side to avoid import inception problems. After solving them, we added more tests with the help of code suggestions. The coffee chat concludes with running tests in CI/CD, our first C# solution with the help of GitLab Duo. Guest: Lee Tickett, Fullstack Engineer, Contributor Success, @leeticket-gitlab Resources Table of Content 0:00 Introduction 1:30 Ask Duo Chat how to setup C# 2:35 Move Duo Chat to the right panel in VS Code 5:00 Install C# VS Code extension 8:55 dotnet new console CLI 10:55 Code Suggestions in C#: Query REST API 12:40 Use /explain to explain generated code 14:54 Organize code with .gitignore, add CI/CD, ask Duo Chat 16:10 Chat Beta feedback: Context missing, suggestions improvements 18:50 Refine prompts with more context, or start over 22:25 CI/CD broken - use Root Cause Analysis 26:00 Fixed CI/CD 26:30 /refactor code into testable function 28:50 Explain await/async in C# 32:00 /tests to generate tests 33:30 Test project? Help needed 35:30 Chat Beta feedback: Refined prompts 40:35 Test directory in the solution 47:00 Debug Test import errors with Chat 51:12 Dogfooding thoughts 56:05 Confused by structure, test and app should be side by side 58:50 Explain the compiler error with Chat 1:00:00 Refined prompts for code tasks: /refactor into public class 1:05:50 Add more C# tests 1:15:18 Run tests in CI/CD 1:19:15 Success and conclusion

Follow along using the transcript.

GitLab Unfiltered

38K subscribers