|
| 1 | +## Step 1: Help me modernize Copilot |
| 2 | + |
| 3 | +Welcome to Merginton High School's IT team! You've joined at a critical time. The school has been using the same COBOL-based accounting system since the early 1990s to manage student fees, cafeteria accounts, and school supplies purchases. The original programmer retired years ago, and the current IT staff struggles to maintain the system whenever changes are needed. |
| 4 | + |
| 5 | +### 📖 Theory: Educational Legacy Systems Modernization |
| 6 | + |
| 7 | +> [!NOTE] |
| 8 | +> Legacy code modernization in educational settings means transforming outdated systems into modern technologies while preserving essential school business operations and data integrity. |
| 9 | +
|
| 10 | +Many educational institutions still rely on legacy COBOL systems for critical administrative functions. While these systems have reliably managed school finances for decades, they now present significant challenges: |
| 11 | + |
| 12 | +- Few IT staff with COBOL knowledge remain in the education sector |
| 13 | +- Limited integration with modern school management systems and online payment platforms |
| 14 | +- Difficulty supporting new educational programs and fee structures |
| 15 | +- Rising maintenance costs eating into limited school technology budgets |
| 16 | + |
| 17 | +Modernizing the school's accounting system will provide numerous benefits: |
| 18 | + |
| 19 | +- Seamless integration with student information systems and online payment portals |
| 20 | +- Better reporting capabilities for administrative decision-making |
| 21 | +- Easier maintenance by the existing IT team |
| 22 | +- Ability to quickly adapt to new educational programs and fee structures |
| 23 | + |
| 24 | +GitHub Copilot can transform this modernization process by: |
| 25 | + |
| 26 | +1. Helping decipher the decades-old COBOL code that lacks documentation |
| 27 | +1. Translating COBOL structures to modern Node.js equivalents |
| 28 | +1. Suggesting modern approaches to student account management |
| 29 | +1. Assisting with test creation to ensure student financial data remains accurate |
| 30 | + |
| 31 | +### ⌨️ Activity: Setting Up Your Environment |
| 32 | + |
| 33 | +To get started, we will set up a GitHub Codespace with the necessary tools and extensions to use GitHub Copilot effectively. |
| 34 | + |
| 35 | +> [!TIP] |
| 36 | +> You can learn more about current and upcoming features in the [GitHub Copilot Features](https://docs.github.com/en/copilot/about-github-copilot/github-copilot-features) documentation. |
| 37 | +
|
| 38 | +1. Left-click the below button to open the **Create Codespace** page in a new tab. Use the default configuration. |
| 39 | + |
| 40 | + [](https://codespaces.new/{{full_repo_name}}?quickstart=1) |
| 41 | + |
| 42 | +1. Confirm the **Repository** field is your copy of the exercise, not the original, then click the green **Create Codespace** button. |
| 43 | + |
| 44 | + - ✅ Your copy: `/{{{full_repo_name}}}` |
| 45 | + - ❌ Original: `/skills/getting-started-with-github-copilot` |
| 46 | + |
| 47 | +1. Wait a moment for Visual Studio Code to load in your browser. |
| 48 | + |
| 49 | +1. In the left sidebar, click the extensions tab and verify that the `GitHub Copilot` and `Python` extensions are installed and enabled. |
| 50 | + |
| 51 | + <img width="350" alt="copilot extension for VS Code" src="https://github.com/user-attachments/assets/ef1ef984-17fc-4b20-a9a6-65a866def468" /> |
| 52 | + |
| 53 | +1. At the top of VS Code, locate and click the **Copilot icon** to open a Copilot Chat panel. |
| 54 | + |
| 55 | + <img width="150" alt="image" src="https://github.com/user-attachments/assets/5e64db46-95cb-415d-badc-b6b8677f10c1" /> |
| 56 | + |
| 57 | +1. If this is your first time using GitHub Copilot, you will need to accept the usage terms to continue. |
| 58 | + |
| 59 | +### :keyboard: Activity: Use Copilot to help remember a terminal command 🙋 |
| 60 | + |
| 61 | +Great work! Now that we are familiar with the app and we know it works, let's ask copilot for help starting a branch so we can do some customizing. |
| 62 | + |
| 63 | +1. If not already there, return to VS Code. |
| 64 | + |
| 65 | +1. In the bottom panel, select the **Terminal** tab. On the right side, click the plus `+` sign to create a new terminal window. |
| 66 | + |
| 67 | + > **Note:** This will avoid stopping the existing debug session that is hosting our web application service. |
| 68 | +
|
| 69 | +1. Within the new terminal window use the keyboard shortcut `Ctrl + I` (windows) or `Cmd + I` (mac) to bring up **Copilot's Terminal Inline Chat**. |
| 70 | + |
| 71 | +1. Let's ask Copilot to help us remember a command we have forgotten: creating a branch and publishing it. |
| 72 | + |
| 73 | + >  |
| 74 | + > |
| 75 | + > ```prompt |
| 76 | + > Hey copilot, how can I create and publish a new git branch called modernize-legacy-code? |
| 77 | + > ``` |
| 78 | +
|
| 79 | + > **Tip:** This is a simple example, but Copilot is great at providing more tailored commands that might involve loops, pattern matching, file modification, and more! Don't be afraid to ask Copilot for a suggestion. Just remember it is a suggestion and you should always verify it first to be safe. |
| 80 | +
|
| 81 | + ```shell |
| 82 | + git checkout -b modernize-legacy-code |
| 83 | + git push -u origin modernize-legacy-code |
| 84 | + ``` |
| 85 | +
|
| 86 | +1. Now that we are happy with the command, press the `Run` button to let Copilot run it for us. No need to copy and paste! |
| 87 | + |
| 88 | +1. Now that your branch is pushed to GitHub, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson. |
| 89 | + |
| 90 | +<details> |
| 91 | +<summary>Having trouble? 🤷</summary><br/> |
| 92 | +- If you don't see the Copilot icon, make sure you have the GitHub Copilot extension installed and enabled. |
| 93 | +- If you don't see the Copilot chat panel, try reloading the codespace or checking your extension settings. |
| 94 | +- If Copilot doesn't understand your command, try rephrasing it or providing more context. |
| 95 | +- If you encounter any issues with the terminal, make sure you have the correct permissions to create branches in the repository. |
| 96 | +</details> |
0 commit comments