Using Amazon Q Developer in my development flow

Using Amazon Q Developer in my development flow

How using Amazon Q Developer can help reduce context switching and reduce the time it takes to complete developer tasks

Ricardo Sueiras
Amazon Employee
Published Apr 30, 2024
In a previous post I shared how I am using Amazon Q Developer to help me work with my stakeholders, ask better questions, and better align the different choices I have to build a solution. In this post, I explore how I am using Amazon Q Developer to start building my solution
Using Amazon Q Developer to help me start a new project
It has been a long long time since I touched Java code, and I think it at version 1.3 or 1.4. Java has come a long way since then, and is still one of the most popular development languages that developers love and use today (according to various developer reports I read). I wanted to experiment and understand how to use Amazon Q Developer to help me build a new application, and so I thought I would share in this post what I learned.
Like any new tool, I have found that the more time I spend with Amazon Q Developer, the better results I am getting. I think this is an important learning for me, as my expectations on how I thought I would use these has changed, and now I am very comfortable with how I have integrated Amazon Q Developer into my development flow. Here are three areas that I have found it super helpful.
Reducing context switching
I don't know about you, but as developers we have to deal with lots of technology and building blocks, and having all the details in our heads is just not sustainable. With the rapid pace of change, these are also changing, so being able to have reference guides to hand is a really helpful capability. I might typically have found this information via internet searches, but now I have everything I need to hand. Here are a few examples of what this looks like when using tools like Amazon Q Developer, but this really just scratches the surface.
As I was building my new application, I wanted a quick reminder of how to bootstrap a Spring Boot application. No problem, Amazon Q Developer provided me with everything I needed to know.
As I was building this application, I needed to add logging but I could not remember how Spring Boot did this. My typical workflow of finding this via a search is now simplified as I just as Amazon Q Developer, and it provides me with precise information on how to configure logging, together with other information and links to the source in case I need to dive deeper.
Finally, I wanted to add my code to my source code repository. I am a little bit rusty with the git command line, so I use Amazon Q Developer to walk me through the commands. As I do this, I iterate and ask follow on questions. As it understands my context and the responses from previous questions, it helps me complete this task in just a few minutes.
Accelerate new code generation
Once I have the core of my application built, I now need to add some additional features. Often, those features are not necessarily complex or difficult. One of the great capabilities of Amazon Q Developer Agent for software development, is that it allows you to easily create all the code, from the prompt and direction you give it. You invoke Amazon Q Developer Agent for software development by using the "/dev" and then pressing space, which activates it and then allows you to enter what you want it to do.
In my specific demo application, I want to export the output and upload it to an Amazon S3 bucket. When I enter this, Amazon Q Developer Agent for software development works on a plan, which it shares with me. I can use this to review and adjust if needed, or if I am happy, click on the GENERATE button. This will kick off the process to now generate the code.
After a few minutes (the time it takes will vary based on what you are asking it to do) it will present you with code for you to review. You can now review each of the files, and you will notice that these are presented in the IDE so you can compare changes, or review net new as well. You also have an opportunity to provide feedback and ask for the code generation process to restart - something that I found I do need to do occasionally, as I learn how to best "speak" with my new coding companion.
You will see in this video how I use Amazon Q Developer Agent for software development to create this new functionality, and then use Amazon Q Developer to then help me fix a few issues with the code. I really like how it is able to help me troubleshoot issues, in this case a combination of a few things missing from the code, as well as me not having the right permissions. The best thing? I did it all from within my IDE.
Reducing tedious tasks
When I speak with developers about the things they love and enjoy less as a developer, documenting and documentation are two that frequently come up. I have always been a big fan of creating good documentation, as it helps you scale the code you create - making it easy for others to use, and for others to review/improve. I wanted to explore how I could use Amazon Q Developer to help make this task a joy, and what I found is that I think this is going to be a strong use case for a lot of developers as they start using these generative AI tools like Amazon Q Developer.
In this video, I share how I use Amazon Q Developer to help me effortlessly add doc strings to my classes.
In this next video, I turn again to Amazon Q Developer Agent for software development, and this time I ask it to produce a README for this project, and how I then provide some feedback to adjust the level of detail I want it to produce. With tools like Amazon Q Developer, there should be no excuse now for no documentation for your projects!
Try Amazon Q Developer and see how it can help you make development be fun again
In this short post and videos, I wanted to quickly share how Amazon Q Developer Agent for software development can help developers simplify with many of the tasks you have to do. Whether it is reducing context switching and keeping you in the flow, providing quick answers to error messages, or reducing some of the less glamourous tasks we need to do, next generation developer tools like Amazon Q Developer can reduce the toil and make development fun again!
Stay tuned for more adventures in Amazon Q Developer, and as always, I would love to hear your stories and what you are doing with Amazon Q Developer. Find more ways that Amazon Q Developer can help you by checking out the Developer Centre resources.

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.