Conf42 DevOps 2024 - Online

AI Integration for Developers: Leveraging ChatGPT and Copilot in Your Long-Term Projects

Video size:

Abstract

This presentation is explicitly crafted for developers aiming to unlock the full potential of AI in their long-term software development endeavors. It lays a comprehensive roadmap for integrating cutting-edge AI technologies into your development processes

Summary

  • Presentation on AI integration for developers with a focus on chat, GPT and copilot. Mihaelaroxana Ghidersa: How artificial intelligence is transforming the way we do software development. We see AI making our work smarter and more efficient.
  • Communication with AI tools is called prompting. The process can be very different depending on the AI tool that you are using. Using a tool like this will teach you more about how to craft effective prompts and communicate more efficiently based on the responses you get.
  • I'm going to give some resources to you for both Chat GPT and copilot and how to install it and how you can use it. When it comes to the integration in our software development processes, first of all we need to understand the capabilities of our AI.

Transcript

This transcript was autogenerated. To make changes, submit a PR.
Welcome everyone to our presentation on AI integration for developers with a focus on chat, GPT and copilot. I'm Mihaelaroxana Ghidersa and I'm excited to discuss with you today some of the ways we can use AI in our everyday tasks. A little bit about myself. I'm a software engineer. Right now I have the role of a technical lead at Signet Health. Whenever I find that I have something interesting to say, or maybe if I learn something new that I find that it would be useful for other developers to use too. I prepare presentations like this one today in order to share the knowledge that I have and also learn from other developers. So I'd like to take thanks to the organizers for having me and giving me the opportunity to do something that I like. When I'm not doing technical tasks of any kind, I like to just go in nature and lose myself in that area. So about today we are going to delve into how artificial intelligence, particularly with a focus on chat, GPT and copilot, are transforming the way we do software development nowadays. This is a huge subject that needs days to be discussed. Therefore, in these sessions we are going to just dive the surface by looking at how these tools precisely can help developers into their day to day work. We are going to discuss how they can be integrated in your development workflow and how they can enhance your productivity. And why not also help you innovate in the work that you are doing. Putting a bit of context, if we think on a general level in today's software development landscape, AI, it's just not only a tool, it's an essential component, that it's reshaping our industry. And when we are talking about reshaping our industry, we can think both in a promising way, but also in the way that we are changing the way we look at our jobs and the way we look at how things are happening and how our day to day work is being transformed by all of this. I'm talking from tools that help us a lot to the fear of losing your job and having an AI that it's so much more faster and that is going to take our jobs and they are going to replace us. And that AI, it's flawless and has no issues. So all of these ways of looking at this evolution and yeah, this is also reshaping the way we are thinking about ourselves and our development. Okay, maybe I should try to learn about this tool instead of being scared of it. So AI streamlines developers processes by automating some repetitive tasks such as code generation, such as testing, and by doing this, accelerates project timelines and minimizes human error. It's not perfect, and we are going to discuss about it and how we can strive for perfection, let's say, or for the best version, while interacting with this tool. But it's not perfect. At the same time, AI's advanced algorithms excel at problem solving and data analysis. They enable us to create sophisticated and adapted software solutions. We see AI making our work smarter and more efficient, and creating all sorts of tools that are showing us the way to this transformation that we were discussing before. So basically, if it is to think in some simple words, is that the role of AI in modern development? It's to transform things, it's to bring evolution. So AI significantly impacts various aspects of software and technology development. And this includes promises, efficiencies, efficiency. AI does some repetitive tasks and is helping in this way developers to focus more on creative and more complex work. Then AI is helping us reduce mistake, the mistake that we are doing in our day to day work, just the human error making software more reliable. Also, the algorithms that AI is using are great at solving problems and determining some patterns in our data. AI, it's not just this image of a robot that is just talking very mechanically, but is evolving a lot to learn from human interaction and fulfill very specific needs. It becomes very personal, the interaction, it becomes very personal. It doesn't feel like you are talking to a robot, it feels like you're just talking to a colleague, exchanging ideas and getting some information. With the help of AI, we can drive innovation in tech with things like machine learning and all sorts of apps and services that are bringing big changes in this field. And the area where we are going to be focused today is the one where AI is giving us very good developers, tools like GitHub and Copilot that offer real time help to developers making work more efficient. And that feels just like you're collaborating with someone. It's not just feeling that you are working alone. So let's see a bit, discuss a bit about each of them. Chat GPT it's an advanced AI language model developed by OpenAI. It uses natural language processing techniques to help us understand and generate humanlike text. This ability to interpret complex queries and provide detailed, relevant, context shaped responses makes it uninvaluable tools for developers. But it's not only for developers. You can get answers from a wide range of subjects, situations, domains and so on. So let's explore some of the, let's say, top features that make Chat GPT so powerful. First would be the fact that it comprehends and produces text that resembles human communication. It's enabling us to engage in conversations and create a very natural feeling around the conversations that we are having with Chat GPT, creating very high quality text contact. Then it demonstrates a strong understanding of context in conversations. It can give answers, recalling previous parts of conversation, enhancing the user experience for the one that is working with it. It's doing a lot of tasks, from generating code, to assisting in debugging, to creating engaging stories to answering complex queries. It brings a lot of values in a lot of professional and creative contexts. For us developers, very important, of course, is the fact that it can understand and generate code snippets in multiple programming languages, which makes it very helpful for us to seek assistance in our day to day work. Explanations for certain contexts, learning new things, getting answers to things that maybe we forgot about or we never knew. So is like having a colleague that you are doing pair programming with and you are discussing and trying to understand the context and trying to find solutions to some problem. And last but not least is the fact that being able to shape responses based on user input and the feedback that we are giving him, it allows Chat GPT to adapt to a wide range of styles and tones and user needs, which makes it easy to use in a large range of use cases. Personally, I use this tool beyond coding, from creating a vacation plan, to seeing exactly what I can visit in certain areas and actually asking it to do it for each day, to helping me create an email in order to give feedback to someone or just trying to get the right tone in a certain situation. So for me at least, chat GBT, it's a great assistant. Then we go to copilot. That on the other side is more focused on the coded part. I'm using it to play in visual studio. The cool thing about it is that it was trained on a vast array of source code. This makes it able to understand and predict coding patterns and requirements from a wide range. What it does behind the scene is analyzing the context of your existing code and comments, and based on that it offers code suggestions and solutions in real time. So some of the features to mention, although I'm sure that you might have a lot of other situations where you used it in your day to day work, and I'm open and happy to learn from you. But some of the features worth mentioning are the fact that it understands the context of your code and it provides suggestions to complete lines or functions and is easily adapting to your style and needs. So basically, if you correct it at some point and you are like okay, no, I'm using this kind of property or doing things this way is going to work with you. And next time the answers that you are going to get or the suggestions that you are going to get are more specific, then has a wide range support for diverse languages and frameworks. Next, it suggests improvements for logic and code readability, aiding in efficient and maintainable code development. On another note, is a great learning and exploration tool because it's very interactive. It's not only for juniors, although I understand that these kind of tools are being regarded more like a help for juniors that don't have all the bases, so they need someone that it's more experimented to give them suggestions. I personally don't feel this way because it's offering all sort of insights into coding patterns and best practices and builds on the complexity alongside with the development of our code. So I think that it's a useful tool for everyone. And you maybe have noticed that for both chat, GPT and copilot, we are discussing a lot about user input and the fact that it interprets human language. Well, as amazing as these tools might be, they don't read minds. We have to learn how to talk to them, we have to learn how to ask things from them, just as we need to do it also with the people around us. So it's about learning how to communicate in order to get the best results. And this communication with AI tools is called prompting. So as the deal with prompting is the process of interacting with an AI tool by giving it some inputs that are also called commands in order to get a specific response. This process can be very different depending on the AI tool that you are using. But there are some general directions, let's say, that we can use in any context, even with people. I was just thinking when I first started learning about this, the fact that learning how to prompt is going to help us a lot in learning how to communicate with people because we have the patience to shape some very specific questions in order to get the desired answer from an AI tool. But we are so impatient with the people around us and we are always wondering like why don't you understand what I'm trying to say? Like I was so explicit, do I have to over explain it to you? And maybe we are going to learn something also about human communication, human to human communication. So going back to the things that we need to take care of is clear instructions, use clear and precise commands so that Di understands what you really want, provide specific details or criteria to consider so that you get a specific response shaped on your needs. Then it's important to know what the AI tool is capable of doing. For example, some AI tools are designed for generating text, others for creating images, and some for processing and analyzing data. You have to understand exactly what you need from that tool and to see if it's precisely the tool for you. Then we have to have patience, as I already mentioned, and understand that it's not magic, it's a process that we need to build upon. The initial response from the AI might not be perfect, so you might need to refine your prompt based on the output that you received and making it better and better, and creating a communication process with your tool. And I think that using a tool like this will teach you more about how to craft effective prompts and communicate more efficiently based on the responses you get. So by analyzing a bit the response that you get from an AI tool, you can see exactly what are you lacking. Maybe you were not very clear with the format that you wanted the response to be like you want it in a specific language, you want it to be more formal, you want it to be in a JSON format. Maybe it depends on what you're asking from it, or maybe you could have created a Persona for that. So for example, you can say to your AI, okay, I want you to answer to this question as you were a highly experimented architect, software architect, and I want you to give me the answer in that specific way, in a very informed and professional way. So you have to also create a context and give feedback to the AI in order for it to answer to your needs. But let's play a bit with it just to see how this works. Let's see, so we have in here Chat GPT four, and for example, let's say that I'm first just going to ask for him, okay, give me the solid principles so we can see that it's giving us a very complex, very explicit answer and with a lot of details, which is good. But for example, let's say that I'm just someone that is learning right now about solid principles. So I want the eye to give me real world examples. So I'm just going to ask him a bit more specific, something like this, okay, explain to me the solid principles with real world examples. And also because I don't want to stay and wait a lot and I need very specific answers, I wanted to keep it short on the explanations. Keep in mind that I am. Let's see you giving also the context as you can see? So it's starting to build things as you asked, in order to get as specific answers as possible. So it's going to give us examples for edge. Great. Now we are going just to see how it keeps track of the context. We are going to say, okay, now give me, let it presentation outline that I can use for the first principle. So I don't have to say again for the first solid principle and so on, because it has the context, it know exactly on what principle am I referring to. So it's building up on that. And right now it's going to give us a context on the first principle and creating a presentation outline for that. And it's amazing also with real world the examples. Great, great. So we can use it in order to build and build. And then if I don't think that this was okay, I can say, for example, make it shorter. It is. And this intended for it, twelve years old, classic. So it's creating it even more specific for our needs. I'm going to give some resources to you for both Chat GPT and copilot and how to install it and how you can use it. More precisely, we're not going to go very much in details because the time is not very long, but let's look also a bit on what we can do with copilot. So for example, let's take it from scratch. I have a very random project in here that I used at some point for a training. So I am connected, I already have an account connected to copilot, so I'm just going to go and activate the GitHub copilot chat. So on one side we can have it like this, we can discuss with it as we are discussing also with Chat GPT. So let's just use one of the suggested commands and say, okay, explain this text that I, I'm trying to, I select it and it's explaining exactly what's the deal with the router provider and with router and what is this supposed to be doing? Another thing that we can do with it, let's see, for example, we can put in here, let's go to home because it's easier. Here we have some comments and then we have some links and so on. But what I wanted to do is, for example, let's say I can activate it with create header component. So it's, let's put it outside so it can get a context. Let's see, let's just, okay, let's try something more. Let's create function that calculates the time between two dates. Yeah, whatever. So function, and it's giving some suggestions to us. Of course it comes to us to correct and see if it's what we need and so on and so forth. Let's see. Okay, great. Another thing that we can do is activating it also from this modify, using copilot, and you can say to it exactly what you want for this code snippet to do. So basically you can use it as you saw, as soon as you started writing something, it began suggesting things to you, giving explanations. Of course we can use, for example, we can create another function, let's close this one. We are going to help it. For example, we are going to do something like this. Create a function that perfect. Okay. It sometimes it's a bit slower. Of course, as I said, we need to be patient with it. I think I interrupted it slow. So it's not giving the answer that quickly. And also I think that my Internet connection is a bit bad. Let's see. So it's giving it, but it's suggesting it. But the format, since I did not specify the format, it's giving me suggestions, like comments. We can play with it, but you got the idea. It's something that since you know exactly what is the context that you are trying to use in there, you are going to be able to be as specific as possible. Okay, going back to our presentation. So if it is to think we went through to the play time, we can see that we can chat with it, we can generate by using the comments you can select and then having suggestions in there on the selected code that we want to work with. It can predict and complete what we started, as we did with. The function that calculates the time between two dates is matching patterns with regular expressions. We can also write unit codes, unit tests, writing commands. It's generating sample data. So we can play with it in a lot of ways. And I strongly invite you to work with it and see what are the strong points and where are the things that you need to be more precise or to be a bit more specific with it. So when it comes to the integration in our software development processes, first of all we need to understand the capabilities of our AI. And as you were able to see, we have to learn exactly how to specify the context, how to specify the format, so that we in time can train and get as good answer as possible. Don't forget to be as realistic as possible. As you've seen, it's not always that sharp. So you need to be patient with it to create a context for example I used especially to not have the perfect context for it. I used a very simple but let's say not with a lot of things in it. The project that I played with it just to show you exactly that, if you're giving less context, it's going to give you answers more or less generic because it doesn't know exactly how to shape. So it needs some time. We are doing this first time in that project, so it needs some time to adjust to exactly what are the patterns that we are trying to do in there. Then see exactly how the AI tool that you are choosing is aligning with the project needs, that you have the team expertise and see exactly how easy it is to integrate and what resources do you need? My advice is to try to work with tools and in general, it's not only for AI that you can configure for your product that are flexible and you can work with and have strong compatibility with existing systems for effective implementation on your side. Also try to keep as up to date as possible. Work with it constantly in order to see what are the capabilities and give feedback in order to maintain its effectiveness and relevance. Gradually integrate AI into development workflows. Don't do it all at once. Get used to it. Play maybe in small projects before actually putting it into your product and see how it evolves step by step, like how it's improving its answer step by step and encourage your team to use AI. I think that we need to foster a learning environment and we need to adapt to AI capabilities for successful integrating. Instead of relying on all of those needs that we were saying on the beginning, we need to be prepared and to educate ourselves some of the best practices for integrating AI tools. Just to keep in mind that as we embrace AI tools in our development workflow, it's crucial to follow some best practices and to understand the tool to ensure effectiveness and ethical integration. And these practices not only enhance the benefits we derive from AI, but also helps us understand what are the potential risks and challenges and how we can work into resolving those. So when you are starting with working with AI, be specific with your goals. Why are you using AI and integrate it step by step. Stay updated with the latest advancements and implement quality control for all the outputs that you are using. Use AI ethically. Focus on data privacy and try to mitigate bias as much as possible. Don't try to replace, but rather enhance human skills by using AI capabilities. Address security risks and ensure privacy in your AI tools and the way you are doing the integration. Try to keep the team as close as possible and foster collaboration and communication, even though they are using an AI tool, and use these tools as a whole responsibly and try to enhance the software developers into an area where it becomes efficient and of quality, so enhance its features. I completely agree that it's important to consider the long term implication of AI investments and to be mindful of the environmental impact of scaling up AI infrastructure. And every time I hear something about this, I'm like yes, exactly. We need to take care of this because as we continue to innovate and evolve with AI, we should also think about what the future holds and how AI can contribute positively to the advancement of society. It's our responsibility to make sure that AI development and integration aligns with ethical responsibility. We need to think beyond the immediate application and consider how AI can shape our world in the long run and ensure our technologies progress goes hand in hand with sustainability and these ethical principles that we need to take care of. So be mindful of this. When you are going all in, in a project, in a product, or in the way you are using AI in your day to day life, all in, all, in here you can have some resources that you can use and where you can learn more or how to activate these tools and how to work with them. And you can also play with Samsung. I gave you some resources thank you once again for joining me in this session. If you have further questions or need guidance, please feel free to reach out to me. My contact information is on the screen. So let's continue to learn and grow together in this amazing environment that we have.
...

Mihaela-Roxana Ghidersa

Technical Lead @ Signant Health

Mihaela-Roxana Ghidersa's LinkedIn account Mihaela-Roxana Ghidersa's twitter account



Awesome tech events for

Priority access to all content

Video hallway track

Community chat

Exclusive promotions and giveaways