How to use GitHub Copilot and AI support tools for engineersHow to use GitHub Copilot and AI support tools for engineers

How to use GitHub Copilot and AI support tools for engineers

AI coding support tools such as GitHub Copilot have gone beyond mere “key input assistance” and have established themselves as pair programming partners. However, if you look around the field, there is a clear polarization between engineers who just casually accept code completion using the Tab key and engineers who redesign the entire development process and produce overwhelming output.

We will organize practical recipes for using AI to further improve the speed and quality of daily development.

“Context preparation” that guides the code as intended

The output accuracy of AI-assisted tools strongly depends on the file the editor is opening and the previous context information. Preparation is essential in order to come up with highly accurate proposals.

  • Write the type definition and interface first: If you write type information such as TypeScript first, AI will accurately read the constraints and present implementation logic that meets the requirements.
  • Specify assumptions in JSDoc or comments: Just by commenting one or two lines of preconditions such as Arguments must be sorted in ascending order'' or Result type should be returned without throwing an exception in case of error’’, rework of generated code can be drastically reduced.

Delegating roles to test code and refactoring

AI tools are most cost-effective when writing tedious and extensive test code.

After implementing a function, immediately issue an instruction using Copilot Chat or an inline prompt to ``cover not only normal test cases, but also boundary value and abnormal test cases.’’ There are many cases where it becomes clear that edge cases have not been taken into consideration. It is also extremely useful as a wall-to-wall person asking for suggestions on how to divide the responsibilities of large, complex functions, or to improve naming.

The final breakwater is “the engineer’s own aesthetic sense”

Even if AI-generated code appears to be perfect, there is a risk that it may contain security vulnerabilities or deprecated library methods. The condition of being a truly trusted engineer in the AI ​​era is to maintain the discipline to review the output code at a level that explains the responsibilities and operating principles of each line, without committing them as is.