Cloud

Pair Programming

Pair programming is a software development technique in which two programmers work together at one workstation. One, the driver, writes code while the other, the observer or navigator, reviews each line of code as it is typed in.

Pair programming with a real person can help team members share knowledge, context, and the best ways to do things. It can also reduce mistakes, improve the quality of the code, and help the team work better together.

AI pair programming is a similar technique that involves the use of AI to assist a developer in writing code. AI pair programming tools like GitHub Copilot can suggest lines of code, and/or even functions based on what the developer is doing and what they tell the tool.

When it comes to AI for software development, there are a number of tools designed specifically to assist, and currently the two main contenders are Amazon CodeWhisperer and GitHub Copilot.

Risks and Benefits

When it comes to the general benefits of both these tools, there are a few big ones.

Both tools:

  • have the potential to show you new ways to solve problems that you might not have considered before.
  • can bring information into your code directly that you would otherwise have to look up with a search engine or other tools.
  • might give junior developers a view of algorithms that they might not otherwise be aware of, and at least give them the opportunity to discuss these options with more experienced colleagues
  • are based on external code written by others, and therefore they could suggest solutions that are common in industry.

When it comes to the risks of each tool, there are some not-so-serious and some very serious ones to be mindful of.

  • Copilot has more potential to use older libraries and older best practices, which could lead to vulnerabilities. You must be very aware of the code that you are accepting and any potential risks with the design and the libraries that it uses.
  • Both tools are using AI/ML that pulls from other people’s code. By definition then, your code could become part of that pool of information that the AI/ML engines use to develop code for others, and that means that anything you write with these tools enabled has the potential to be visible to other unknown users on the web.
  • Over-reliance on any AI pair programming tool at this stage in their maturity is risky. As we will see, although they do often produce good output there are occasions when they don’t. There is still very much a need for a ‘human-in-the-loop’ to check and refine code produced by the AI.
  • Both tools are owned and hosted by American companies. This could mean your code traversing the internet and being processed and analysed on servers in the USA and other countries. If you’re working on something that requires control over the sovereignty of the code and/or data, you should absolutely not be considering using these kinds of tools.

Remote Pair Programming:

Remote pair programming, also known as virtual pair programming or distributed pair programming, is pair programming in which the two programmers are in different locations, working via a collaborative real-time editor, shared desktop, or a remote pair programming IDE plugin.

Remote pairing introduces difficulties not present in face-to-face pairing, such as extra delays for coordination, depending more on “heavyweight” task-tracking tools instead of “lightweight” ones like index cards, and loss of verbal communication resulting in confusion and conflicts over such things as who “has the keyboard”.

Conclusion

In conclusion, pair programming is a highly effective software development technique. It provides several benefits, including improved code quality and faster development times. Although there may be challenges associated with this approach, they can be overcome through careful planning and proactive management.

Loading

Translate »