High-level architecture first
When writing code with GitHub Copilot, instead of suddenly starting with the details, design the high-level architecture first, then give clear instructions in comments and code, so that GitHub Copilo
Last updated
When writing code with GitHub Copilot, instead of suddenly starting with the details, design the high-level architecture first, then give clear instructions in comments and code, so that GitHub Copilo
Last updated
When developing a complex system, it is common to dive into the details of the code and lose sight of the overall architecture of the program. When this happens repeatedly, GitHub Copilot also loses sight of its overall architecture. This can lead to misunderstandings and errors. By designing the high-level architecture of the program first and commenting on the function and purpose of each piece of code during development, GitHub Copilot can better understand the context and make more precise suggestions.
Consider an API endpoint file in a web application. Suggesting the design in natural language early on will help GitHub Copilot understand the functionality of each endpoint.
Exercise: Create an outline of the high-level architecture for a login and registration system, including comments for each endpoint.
Have you established a clear roadmap before writing code details?
Does GitHub Copilot understand the purpose of a file just by reading the high-level comments?
Are you applying this pattern consistently throughout your codebase?