You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Who is this for**: Any tecnologist that is looking to apply AI pair-programming techniques with GitHub Copilot to perform challenging upgrade scenarios for legacy code.
10
+
-**Who is this for**: Any technologist that is looking to apply AI pair-programming techniques with GitHub Copilot to perform challenging upgrade scenarios for legacy code.
11
11
-**What you'll learn**: You'll use advanced GitHub Copilot techniques that are specifically useful when upgrading projects. These techniques and patterns can be applied to upgrading and revamping projects as well as developing from scratch.
12
-
-**What you'll build**: A full revamped Python project that used Python 2.5 using legacy and deprecated constructs into the latest version of Python 3 available.
12
+
-**What you'll build**: A fully revamped Python project that used Python 2.5 using legacy and deprecated constructs into the latest version of Python 3 available.
13
13
14
14
## Requirements
15
15
@@ -25,7 +25,7 @@ In this workshop, you will:
25
25
26
26
- Use advanced GitHub Copilot interaction techniques to deal with a legacy project
27
27
- Iterate, validate, and refine answers to upgrade the legacy project and validate its correctness
28
-
- Apply generic concpets that can improve suggestions and select from different strategies that can yield better results.
28
+
- Apply generic concepts that can improve suggestions and select from different strategies that can yield better results.
29
29
- Build a thorough testing strategy to help you identify potential issues and
30
30
validate the project in its final state after upgrading.
31
31
@@ -50,7 +50,7 @@ Identify limitations or exclusions. For example, large language models (LLMs) ca
50
50
51
51
### 2. Break Down the Problem into Components
52
52
53
-
Decompose the problem into smaller, manageable pieces. For exampple, start with the core application components and then test a single API endpoint or library function. This makes it easier to understand and solve the problem step-by-step:
53
+
Decompose the problem into smaller, manageable pieces. For example, start with the core application components and then test a single API endpoint or library function. This makes it easier to understand and solve the problem step-by-step:
54
54
55
55
- Single Public, exposed functions, or API endpoints
56
56
- Tests, test setup and validation scripts
@@ -87,15 +87,15 @@ For instance, with legacy code, you could explain what the inputs and expected o
87
87
### 6. Identify Patterns and Reuse Solutions
88
88
Recognize common patterns in your problem and reuse solutions where applicable. An obvious example of this in legacy Python projects is the use of exception handling in Python 2.5 would create a `SyntaxError` in Python 3+.
89
89
90
-
Sometimes in legacy projects it is common to create functions that handle either case, or even modules that can do imports depending on the Python version. This is a common pattern in legacy projects that can be reused in other projects.
90
+
Sometimes in legacy projects it is common to create functions that handle either case or even modules that can do imports depending on the Python version. This is a common pattern in legacy projects that can be reused in other projects.
91
91
92
92
> [!TIP]
93
93
> Recognizing patterns is a hallmark of experience. As you encounter similar problems repeatedly, you'll start to see similarities that can speed up your process.
94
94
95
95
### 7. Use Constraints and Edge Cases for Robustness
96
96
Think about edge cases and exceptions. Complex problems often involve handling not just the "ideal" data, but also the "edge" or "outlier" cases that might break a naive solution. Ensure that your prompt or solution accounts for these edge cases.
97
97
98
-
In legacy code, this might mean considering how the code behaves with unexpected inputs which would guide you to write new tests or modify existing ones.
98
+
In legacy code, this might mean considering how the code behaves with unexpected inputs, which would guide you to write new tests or modify existing ones.
99
99
100
100
> [!TIP]
101
101
> Thinking through edge cases helps you build more resilient, generalized solutions. Always put an added emphasis in testing and creating a robust test suite to validate your changes.
@@ -125,7 +125,7 @@ For AI model prompts: When asking for something complex (like generating code, t
125
125
For design or content generation: Define the purpose, break down design elements, and provide examples or inspiration, then refine based on feedback.
126
126
127
127
Final Thoughts:
128
-
Complex generation problems often involve a balance of clarity, decomposition, iteration, and validation. Whether it's a SQL query or any other task, keeping these concepts in mind will allow you to generate more accurate, efficient, and reliable results.
128
+
Complex generation problems often involve a balance of clarity, decomposition, iteration, and validation. Whether it's an SQL query or any other task, keeping these concepts in mind will allow you to generate more accurate, efficient, and reliable results.
129
129
130
130
131
131
@@ -156,4 +156,4 @@ This project may contain trademarks or logos for projects, products, or services
0 commit comments