Artificial Intelligence (AI) is perhaps the most discussed (and debated) technology of the past year, and will likely only gain momentum. AI is a powerful tool for virtually any industry, but it’s especially consequential for those of us in software development.
In this blog, I’ll discuss how the SQream and Panoply research and development teams use AI to further develop our products.
Research
API Documentation
The first thing AI helps us tackle is understanding API documentation. This can be documentation from API service provider giants like Google or Shopify, or smaller companies like ChargeBee. Not only does it know the official documentation that the service provides, but it also crawls through popular forums to collect data and specific questions on a given topic. In our day-to-day job in R&D, asking OpenAI a question is much faster than looking through documentation page by page.
Example prompt: Which resources support Bulk Requests in Shopify?
Beware that the AI model was trained on could be outdated if the API undergoes frequent upgrades. At the time the model was trained, the API was in one version, but subsequent upgrades and added features mean the model may not be fully current.
Suggesting Architecture
If you are an architecture newbie or want to learn more about an architecture stack, AI can help you with that, too. Tell it briefly about your final goal or what you’d like to learn, and it will generate a list of tips to suit your needs.
Example prompt: I want to build a website aggregating news from different sources into one page. Tell me about the architecture stack that would fit my needs. Keep it brief and use bullet points.
Suggesting Tools
Another feature is helping you find the right tool for the job. Suppose you need to perform a task (writing an API, for example) but need clarification about the best service. In that case, you can ask AI to give you a list of suggested services and why one might be better than the other.
Example prompt: I need to write my own API utilizing GraphQL. What would be the best tool to write this type of API?
Helping with Tasks
AI can also be a great assistant while working on new tasks or solving bugs. If you don't know where to start you can ask your AI of choice. Though it can’t perform the tasks for you, it can give you fresh suggestions for starting your task, ideas on where the bug came from, and how to tackle them.
Example prompt: I have a bug that happened in the PSQL database: "ERROR: deadlock detected (SQLSTATE 40P01)". What could be the reason?
Development
Basic data transformation
You often get a raw data snippet not in the correct size or file extension, or it requires minor tweaks. Instead of googling a dedicated service, you can paste your file text content and ask it to make the changes you want to perform.
Example prompt:
-
- Convert this JSON to CSV.
- Prettify this JSON.
- Remove the key "password" from every object in this JSON.
- Replace every value of key "address" to "***" if there is "{"secret": True}" key in the object.
Ask to autocomplete the code
Tools such as GitHub Copilot can help finish writing code functions and classes for you, saving quite a bit of time in manual work. They also support different integrated development environments (IDEs), and are easy to install and user-friendly. Keep in mind that the code AI generates or completes may not be correct, so always double check it.
Cover your code with documentation
If you’re feeling lazy, or just have a lot of scripts to get through, AI can also generate documentation for your code modules.
Example prompt: I have this function: …, write three lines of documentation on it.
Cover your code with tests
Another great AI tool feature is the ability to test your code. You will only need two things to do that: the function you want to test and the dedicated test library.
Example prompt: I have this function: …, write extensive tests on it, utilizing every possible branch using pytest.
Refactor existing code
One last thing, and a benefit I find particularly interesting: being trained on a massive dataset, the AI model may be able to warn you about problems that can come from writing code in a particular way.
Example prompt: I have this function: …, tell me if there are any mistakes or issues I should worry about?
Looking ahead
Popular AI and LLM tools like ChatGPT are still new, but they’re already making a splash for users relieved to save time on day-to-day tasks and manual work. It will be fascinating to see how these tools grow over the next few years, and there’s much debate over whether their influence will be a net positive or negative.
Worried chatter about R&D and software engineering jobs being replaced is understandable, but rest assured: at least for now, AI tools are your friendly assistants. Their analysis isn’t foolproof, their code may not be perfect, and they still need a human expert to check their work. So treat your AI tool like a helpful little part of the team, but maybe still greet it with a “good morning” - just in case.