DEV Community

Constantinos Stathis
Constantinos Stathis

Posted on

AI Assisted Software Development

Co-authored by @stacon and ChatGPT

Table of Contents

  1. Introduction
  2. But why AI?
  3. What is AI Assisted Software Development (with GitHub Copilot and ChatGPT)
  4. How to leverage such technologies
  5. Productivity benefits and metrics to measure them
  6. Next steps
  7. Bonus: How this article was written
  8. References

Introduction

In an era where AI seems to reach a commercial level, meaning work along with humans with daily tasks, we should strongly consider hiring our new robot assistants. As Garry Kasparov in his Ted talk (Kasparov, 2017) said “Don't fear intelligent machines. Work with them”. But what does daily tasks mean exactly? AI has been present in our lives for more than two decades and I’ve learned a lot from a book named “Artificial Intelligence: a subtle demystification” (Giannakopoulos, 2021) regarding the simple concepts behind AI (btw the book is only in Greek so far).

There are a lot of things that AI does nowadays, but that’s not the purpose of this article. Watching ChatGPT's (OpenAI, 2022) power and having worked along with GitHub Copilot (GitHub, n.d.), I felt the urge to warn and encourage software developers to work along with AI.

But why AI?

From a software engineer professional perspective and personal experience:

  • Faster development (even faster when you get accustomed to communicating with your AI assistants). Personally I felt my productivity rose around 30% especially when writing tests for my code which are mostly redundant.

  • Learning through paradigm. AI is being trained with a billion lines of code and datasets generally, meaning that the auto-completed code that you just received in your IDE IntelliSense will probably improve your way of thinking or trigger you to start a research.

  • Our domain transforms. We, software developers who still code, are actually the connection between business requirements and machine utilization to create mechanisms/engines that run the requested business. AI Simplifies our roles and possibly it will be taking over in the future. Is this bad? Depends. A positive side effect is that we still keep doing our job by being the people who still contact the machines through AI and we can be way more productive with them. Hence still be competitive and useful for the market

From a business perspective and personal experience

  • Improved productivity. As explained above it felt that my productivity rose by 30% with GitHub Copilot working along. If this proves true this translates that 3 developers can now do the work of roughly 4. Now do the math and keep in mind that this is an early stage AI Software development assistance. ChatGPT will add up to that.

  • Competitive advantage. I believe that the previous point explains why leveraging AI increases our competitive advantage.

What is AI Assisted Software Development (with GitHub Copilot and ChatGPT)

ChatGPT is a powerful language model that can generate human-like text. It can be integrated with other tools such as Copilot, which is an AI-powered development assistant that can help developers with tasks such as code completion, error checking, and debugging. Together, ChatGPT and Copilot can provide developers with a more efficient and streamlined development experience.

One of the ways that ChatGPT and Copilot can enhance the development experience is by providing developers with quick and accurate code completions. ChatGPT can generate code snippets that match the developer's intention, while Copilot can provide suggestions based on the context of the code. This can help developers save time and avoid errors by providing them with the right code at the right time.

Another way that ChatGPT and Copilot can enhance the development experience is by providing developers with instant code feedback and error checking. ChatGPT can analyze the codebase and provide suggestions for improvements and best practices, while Copilot can check the code for errors and bugs in real-time. This can help developers catch and fix errors early on in the development process, which can save time and resources.

For example, ChatGPT and Copilot can be integrated with VSCode's IntelliSense feature to provide developers with context-aware code completions and error checking. Additionally, the ability to customize the VSCode environment with various extensions and plugins can enhance the capabilities of ChatGPT and Copilot.

How to leverage such technologies

First of all, don't be afraid to try things. If you are using the currently popular IDEs/Code editors such VS, VSCode, IDEA do the following.

  1. Install GitHub Copilot plugin and start a 60 day trial from your GitHub account.
  2. Install ChatGPT plugin and create an API key to link your plugin with your OpenAI account.

And let them work along with you. I use VSCode and added both plugins and the most common tasks that we do together are.

  1. GitHub Copilot provides autocomplete suggestions from a line completion, to function completion or even test suite completion when it has sufficient context. You will find ways to provide such context as the time passes (using descriptive comments that Copilot will try to take in account and provide appropriate codebase.
  2. Also by adding GitHub Copilot Labs you can have some new actions that can be applied to your code snippets which can cleanup, document, make readable, describe, debug, and chunkify your code.
  3. ChatGPT on the other hand works more like an encyclopedia/pair programmer. For example I gave it a snippet and requested to refactor it from Vue 2 deprecated codebase to Vue 3 and I was happy that it also gave me insights about the refactoring context.

If you like it, buy it, but this is the point when I strongly recommend companies to invest for licenses per developer. GitHub Copilot has two options at the moment, 10$/ month or 100$ a year which is almost nothing compared to the outcome. ChatGTP hasn’t become commercial yet but I wouldn’t mind paying another 10 or 20 bucks for it per month or even 50 for a business related license.

Productivity benefits and metrics to measure them

After having some conversation with ChatGPT about what metrics can be used to measure the benefits I got the following answer.

Productivity forecasting metrics can help measure the effectiveness of the integration of ChatGPT and Copilot in the development workflow and track the progress over time. Here are a few examples of metrics that can be used to forecast productivity:

Time-to-code completion: This metric measures the amount of time it takes for a developer to complete a specific task using ChatGPT and Copilot. By tracking this metric, you can see if the integration of ChatGPT and Copilot is helping to reduce the time it takes for developers to complete tasks.

Code quality: This metric measures the quality of the code generated by ChatGPT and Copilot. By tracking this metric, you can see if the integration of ChatGPT and Copilot is helping to improve the quality of the code and how it affects the overall codebase.

Error rate: This metric measures the rate of errors in the code generated by ChatGPT and Copilot. By tracking this metric, you can see if the integration of ChatGPT and Copilot is helping to reduce the number of errors in the code and how it affects the overall codebase.

Developer satisfaction: This metric measures the satisfaction level of developers with the integration of ChatGPT and Copilot. This can be done through a survey or interviews, to get a sense of how developers feel about the integration, and what can be done to improve the developer experience.

Code-review time: This metric measures the time spent on code review, you can use it to see if the integration of ChatGPT and Copilot is helping to reduce the time spent on code review.

These metrics can be collected and analyzed over time to track the progress and impact of the integration of ChatGPT and Copilot in the development workflow. By tracking these metrics, you can identify areas where the integration is helping to improve productivity and areas where improvements can be made.

And I agree with the response above and this is why I decided to share it with you as it is.

Next steps

From a personal perspective AI revolution has started and like industrial revolution, technological revolution (including commercial internet) etc. What do these kinds of revolutions mean? It means that some could shift in a different direction, others will be assisted from our inventions and new roles will emerge to leverage the advantage that AI brings along. So my advice is at least try understanding the change that comes and work your way into the next technological era.

Bonus: How this article was written

So, I have been bloating about AI and how it can be a great assistant in our daily lives. The article that you’ve just read (and thank you for this) has been written with ChatGPT’s cooperation.

It’s been a week since I wanted to share my thoughts in a formal way and inform fellow friends. So this morning I asked ChatGPT for an essay on how to use VSCode, ChatGPT and GitHub Copilot together. “What is AI Assisted Software Development (with GitHub Copilot and ChatGPT)” chapter is entirely written from ChatGPT with literally only removing one initial paragraph. As said in the “Productivity benefits or metrics to measure them” chapter the metrics were provided through a conversation with ChatGPT as well and the quoted text is intact.

References

  1. Giannakopoulos, G. (2021). Τεχνητή Νοημοσύνη: Μία διακριτική Απομυθοποίηση. Ροπή.
  2. GitHub. (n.d.). GitHub Copilot · Your AI pair programmer · GitHub. GitHub. Retrieved January 25, 2023, from https://github.com/features/copilot
  3. Kasparov, G. (2017, May 30). Don't fear intelligent machines. Work with them. TED. Retrieved January 25, 2023, from https://www.ted.com/talks/garry_kasparov_don_t_fear_intelligent_machines_work_with_them?language=en
  4. OpenAI. (2022, November 30). ChatGPT: Optimizing Language Models for Dialogue. OpenAI. Retrieved January 25, 2023, from https://openai.com/blog/chatgpt
  5. Rizèl, S. (2022, April 13). Why Use GitHub Copilot And Copilot Labs: Practical Use Cases for the AI Pair Programmer. DEV Community ‍ ‍. Retrieved January 25, 2023, from https://dev.to/github/why-use-github-copilot-and-copilot-labs-practical-use-cases-for-the-ai-pair-programmer-4hf4

Top comments (1)

Collapse
 
kostispodaras profile image
Kostis podaras

Small and comprehensive, a nice high level view of what it is and it's benefits.
Will give it a try.