How generative AI can make developing fun
Published: 2024-05-31 08:11:22


![Happy AI robot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iw9iuw1rbi4y3z0kek3p.png)

There are many things a software developer does, or needs to know nowadays. Starting from coding, testing, writing/reading documentations, analyzing code, fixing errors and so much more. There are certain aspects that make this job fun, but with all the components together it sometimes makes it tiring. 

Additional “problems” arise when software developers that work with startups need to write a piece of code or logic that is common in most applications like the login or sign up logic. Which after some time, once they get the jist of it, becomes boring and repetitive.

Developers also face a challenge when they switch companies, and/or start anew in a non familiar environment. Thrown on a new project and in a new team, they have to adapt, understand the code they witness for the first time, quickly learn a new programming language or simply upgrade or fix an outdated/buggy code leaving the key features intact. The list can go on, but what if there was a tool that could help us, make some of these challenges more approachable, and less painful.

With the introduction of generative AI people were at first skeptical, afraid even, of what this new technology can do. But after a couple of years a lot of people embraced it. Analyzing and playing with it new possibilities have emerged, and people started using the full capacity of generative AI. It started from simply generating blog posts or other text, human like conversations, quick research and information delivery then we could generate images, videos, music even from a simple text input. And now we can also code. But before we go any further a lot of you will ask “What is generative AI and is it really that important ?”.

Generative artificial intelligence is a type of AI that can create new content and ideas, including conversations, stories, images, videos, and music. AI technologies attempt to mimic human intelligence in nontraditional computing tasks like image recognition, natural language processing (NLP), and translation. It is the next step in the era of artificial intelligence. You can train it to learn human language, programming languages, art, chemistry, biology, or any complex subject matter. It reuses training data to solve new problems. For example, it can learn English vocabulary and create a poem from the words it processes. They can help reinvent experiences and applications, create new things never seen before, accelerate research, and help reach new productivity levels.

There are a lot of generative AI tools/assistants out there, from which only a few are very popular like ChatGPT, Google AI studio, Github Copilot, Synthesia etc. But today we are going to talk about the most capable of them all, Amazon Q.

Amazon Q generates code, tests, debugs, and has multistep planning and reasoning capabilities that can transform and implement new code generated from developer inputs. Amazon Q also makes it easier for employees to get answers to questions across business data, such as product information, business results, code base, and many other topics, by connecting to enterprise data repositories to summarize the data logically, analyze trends, and engage in dialogue about the data. Amazon Q offers a variety of products but for the sake of this blog post we are going to analyze Amazon Q Developer.

Amazon Q Developer assists developers and other IT professionals with all their tasks, from coding, testing, and upgrading applications, to diagnosing errors, performing security scanning and fixes, and optimizing AWS resources. Amazon Q has advanced, multistep planning and reasoning capabilities that can transform (for example, perform Java version upgrades) and implement new features generated from developer requests. 

Amazon Q Developer is very easy to install and integrate with and to do so you have to go to its webpage and select your preferred IDE in which you want Amazon Q to assist you. In this case we are going to select the IntelliJ IDE and download the plugin. 


![JET brains IDE](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8scogeicccpz9c35alp.png)

After that we will install the downloaded plugin by opening our IDEA, click on Settings, navigate to Plugins, select “Install Plugin from Disk…” and locate the earlier downloaded plugin. AWS Core toolkit needs to be installed as well in order to use Amazon Q developer in your IDE. 

![Installation guide](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gem2wppzjchqrypymhm8.png)

After the installation is complete you will see a new icon on the Tools Window Bar located on the right side of the IDE. 

![Amazon Q icon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v0jj9yyo24cqp4e8maqt.png)

Pressing the icon will open a chat that will ask you to login (don’t worry, you can use Amazon Q without an AWS account for free) where we can talk with Amazon Q, ask questions, post errors and so much more. But the key features are located when you select a piece of code, right click and from the dropdown you will see an option saying “Send to Amazon Q”. This option allows us to send the selected code to Amazon Q in order for it to explain, refactor, optimize and fix our code which can save a lot of time and headaches in the development world.

Amazon Q Developer also assists with writing code. Let’s say you want to write a function that adds two numbers together. You can simply write what you want your method to do in a comment and Amazon Q will show you a suggestion of what that code would look like, after which you can opt to use that suggested code or not. Amazon Q will also suggest imports, or other pieces of code you might be missing so keep an eye on that as well.

![Code suggestions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1r8vmlhoi1gmnrwlmhif.png)

So, to summarize, Amazon Q Developer offers a lot of features that can eliminate the stress that often comes with developing. It can remove the need to spend time on writing repetitive or simple code, decrease the time we spend on analyzing features we don’t understand, vague documentation or errors, and most important of all, it increases our productivity, helps us focus more on important and high priority tasks and makes writing code fun again!