Are we finally there yet? Can AI build all the software the world needs, stripping human developers from the process completely? No. However, we’re at a point where companies such as Amazon Web Services (AWS) have given developers tools that can be amazing assistants when building new apps and services.
Before we dive into AWS’s latest AI offerings, let’s cover a few important details about what it means to be a developer in this new age of generative AI.
Many of us have worried that AI will “take our jobs.” This is just not true. Today’s AI, while certainly advanced, lacks the ability to fully understand complex software requirements without a guiding human hand. As a test, I installed the Amazon Q Developer plugin (an AI tool) for Visual Studio Code and set out to create a Learning Management System (LMS). Although I would love to be able to simply type, “Show me code for a learning management system,” I know better. I needed the ability to create courses from templates, adjust schedules for holidays, and manage a hierarchy of course modules and sub-modules.
So, I started out small, with the database and tables for courses. When I described what I needed, Q misunderstood the requirements and created a simple database model consisting of units and modules, with modules living inside units. There was no more depth to the hierarchy. As an experienced developer, I immediately spotted this problem. I asked for a revision, telling it to forget about units and instead use just modules that can contain further modules, recursively. I then guided Q to generate a more accurate set of tables. Eventually, it gave me what I needed. (Could I have coded the SQL for these tables from scratch faster? Perhaps.)
This process was much like a senior developer guiding a junior developer. Although AI has learned a lot about software architecture, it still has a long way to go. This showed me that AI, such as AWS Q, is really an assistant to a developer, rather than a replacement for developers. It can speed up tasks such as generating SQL code (possibly), but it requires lots of human oversight to make sure it gets everything right.
The next thing I wanted to point out: I was really excited about the free Amazon Q add-on for Visual Studio Code. I spent many hours one Sunday afternoon asking it to help me build an LMS. After much refinement, I was quite happy with what it suggested. Then I shut down VS Code. When I started it up again the next day, my entire conversation with Q was gone. The documentation says that if I create a business account, it can save conversations… but the free version won’t.
That’s a huge difference from ChatGPT, for example, which saves your conversation. Bear that in mind if you’re using the free version of the add-on: you’ll want to copy and paste your conversations into a separate document. Lessons learned!
That said, now let’s look at the services AWS has made available in the AI developer realm. In early July 2024, for example, they rolled out some huge announcements about new offerings. These are big advances in AI (aside from Q forgetting my conversation). And as a software developer, you’re going to want to learn how to use these tools as part of your software development process.
Q Developer
Q Developer is a chatbot and autocomplete plugin available for different IDEs such as VS Code, JetBrains IDE, Visual Studio, and even online IDEs such as AWS Cloud 9 and AWS Lambda Console.
Q Developer includes many features, such as a chatbot readily available inside the IDE that can answer a lot of questions for you—particularly those pertaining to AWS and (with its customization capability) your company, like how to use a service such as DynamoDB in your app or how your company’s internal code base is structured. It gives great explanations, and you can ask it further questions, such as how to model your DynamoDB tables. In this sense, it can teach you what you need to know.
Q also works as an assistant while you’re coding. It can offer code suggestions to help you quickly write functions. It can also quickly create sample data for your unit tests. You can even tell it something like, “I need a JavaScript function that will sort an array that contains instances of my Person class, and I need it to sort on hire date,” and it will fill in the code for you.
Another example: You might have a C# code file open, and you need a function that does what we just described (sort an array containing instances of a person class0. You can simply type a comment starting with // into the IDE, describe the function, and it will automatically generate a function that does exactly that.
This is a huge time-saver! As usual, you’ll want to verify and test the code, but it usually gets it right. Yes, we were critical of the chatbot for not saving the chat session, but the code generator within the code editor works beautifully.
For example, I started a C# project, and I typed a comment followed by “A class called Employee that includes first name, last name, start date, salary, and department.” I paused a moment, and then a class with exactly those properties (complete with a basic C# get; set; notation) appeared. I pressed Tab and there it was.
Then to my shock, I saw the following line generate, complete with two slashes denoting a comment:
“// A class called Company that includes name, date founded, and list of employees”
I didn’t need that, though, so I deleted it. But what I did do was add a comment inside the Employee class:
“// A static member that holds a list of employees”
And it generated the appropriate member. (It made it public, as I didn’t specify any access.)
I then added this comment:
“// A static method that returns a list of employees sorted by last name”
And indeed, it used a LINQ method along with an arrow notation method to sort them by last name and return it as a List. Now we’re talking!
This is where Q excels. How does it stand up against other AI plugins such as Microsoft’s GitHub CoPilot? My experience is that it's about the same. However, Q can do sophisticated code transformations, such as reading your Java 8 code and updating it to be compatible with Java 11, whereas the others can't. (I personally had no need for this feature.) Amazon also makes additional claims about Q:
"Q Developer has the highest reported code acceptance rates in the industry for assistants that perform multi-line code suggestions. Its code security scanning capabilities outperform leading publicly benchmarkable tools. And its agents capabilities currently top the SWE Bench Leaderboard, scoring 19.75."
Our suggestion is to try them all out yourself and see which works best for you.
SageMaker
SageMaker is AWS’s premier developer product for machine learning. They refer to it as an IDE, but really it’s a collection of services that you can access through their online AWS console. At the forefront is AWS’s own implementation of Jupyter Notebooks, the current standard for writing Python code that performs data analytics. But with SageMaker in particular, you can use Jupyter to write code that can perform machine learning, with access to different data models including Large Language Models (LLMs).
SageMaker also handles the underlying infrastructure, provisioning computing resources as needed, and even setting up clusters as needed. It also provides built-in algorithms that work with such frameworks as TensorFlow, PyTorch, and other popular AI Python frameworks.
In July, Amazon announced a big improvement to SageMaker with the addition of Q for SageMarker. You can ask Q for a plan to build your ML app in SageMarker, and Q will lay out an entire outline of what you need to do. Then, as a developer, you can go refine the outline, asking Q to revise it. Q can also help write the actual code, which you’ll carefully review.
Bedrock
Bedrock is AWS’s service to build generative AI applications with foundation models and responsible AI capabilities. This is different from SageMaker, which is a complete platform for doing machine learning.
What’s interesting about Bedrock is it includes several models that AWS has deemed “foundational models.” These are models that include some of the big names from companies like AI21 Labs, Anthropic, Cohere, Meta, Mistral AI, Stability AI, and Amazon itself. These are models that AWS has chosen as some of the most important, hence the term Foundational. You can also import your own models that you find elsewhere.
Bedrock also includes an API for interacting with the models you choose to use in your own apps, allowing you to add AI to your apps.
Guardrails
This is a part of Bedrock, and not a standalone service. The whole idea here is that AI has an unfortunate history of generating not only wrong information, but harmful information that is inappropriate and offensive, as well as potentially hurtful. You obviously don’t want that in your apps.
Guardrails works with Bedrock to filter out harmful content, both from user prompts as well as responses. You’ll want to learn how to get the most out of Guardrails in your app—both to help people as well as prevent lawsuits.
AppStudio
AppStudio is about the closest we’ve come to “the future.” This is where you type in a few sentences of what you want the app to do, and AWS’s advanced AI builds the app for you.
However, you have little control over the design and architecture of the app, although you can determine quite a bit of the look and feel via a drag-and-drop interface.
AppStudio can also connect to various services within AWS. For example, it can store data inside DynamoDB as well as the managed SQL instances within AWS’s Relational Database Service. It also connects with AWS Cognito so that you can include user logins.
As a developer, how should you approach App Studio? With caution. Try it out, work with it, and see what you’re able to build with it. App Studio allows you to see the code it builds, and you can modify the code, as well. However, you’ll still want to be careful with it, and make sure that the code it generates is in fact exactly what you need.
App Studio apps are not intended (at least today) to be enormous apps with thousands of features. The example that AWS provides is a system for business travelers to input their receipts; in other words, small business tools you might use internally at your workplace, as opposed to apps for general use. You’ll need to explain to non-developers that App Studio isn’t the ultimate software development robot for building any app imaginable.
Amplify Gen2
Amplify is an AWS service that lets you build full-stack applications and easily host them on AWS. This service has matured considerably from its first introduction in 2017. Today, you can write TypeScript code locally on your own computer, and from there deploy an app that makes use of AWS services such as Lambda (for running serverless code), S3 (for basic storage), and DynamoDB (for NoSQL storage), among others. The current generation also gives you access to generative AI services such as Bedrock. So, while Amplify technically isn’t part of AI itself, it integrates well with AI, and you will want to learn it.
Conclusion
Developers who use tools such as Q (or even Microsoft CoPilot, which we didn’t cover here) will be developing apps much faster than everybody else and will be writing code that is possibly better and more optimized. This means that you and I, as developers, need to start using all these tools immediately and become comfortable to them.
At the same time, it’s important to recognize that these tools are not perfect and will not generate perfect code. Humans remain a vital part of the development process.