How developers can use AI to improve their workflows

March 15, 2023
by
Joe Reda

It's only been a few months since OpenAI released its ChatGPT tool to the world, and we're already seeing some potential paradigm shifts in how we work. ChatGPT is a language model trained by OpenAI that can understand natural language and provide human-like responses to a wide range of questions and topics. Companies including Microsoft, Salesforce, Notion, and others quickly announced they were looking for ways to add this innovative tool to their platforms.

The focus on ChatGPT is often on how writers, marketers, and other content creators can use it to change how they do their jobs. But ChatGPT isn't only for writing website copy or LinkedIn posts. Developers—including our team at BitBakery—are improving their workflows and freeing up time to focus on user experience by using ChatGPT.

Here are five ways developers can use ChatGPT at work.

Code generation

As we mentioned, ChatGPT gets much attention for its use in content creation. But developers are also finding it helpful in writing code for mobile and web applications. In the same way ChatGPT can craft a decent tweet, it can also create code snippets to help developers build the scaffolding for a new project.

Developers can use ChatGPT to create anything from Javascript functions to language models for their AI projects. Here's a simple example that makes an HTML5 file and uses Bootstrap.js to create a 3-column layout.

While the examples generated by ChatGPT look great, it's important to remember that they're examples built from an existing model. The AI behind ChatGPT is not connected to the internet, and the language model used to generate the examples could have incorrect or out-of-date information. 

We've found examples like this interesting for seeing other ways of building functions within applications. Every developer on our team brings a unique way of looking at a problem—ChatGPT adds a different viewpoint that can inspire us to try new ways of looking at a problem.

Understanding existing code

Using ChatGPT to understand existing code is another invaluable tool we hope will improve as OpenAI continues to advance its AI language model. When our team supports a client's existing application, we often spend a lot of time learning how the existing codebase works. 

ChatGPT can potentially reduce this time by helping developers understand how existing code works and interacts as part of the larger application or service. This feature is handy when the original developers are no longer available to answer questions (even more so when they didn't leave any comments in the code).

One of the things we like about this is how it can help when you're working with a framework or language you're unfamiliar with. Our team has a diverse range of experiences, but as technology evolves, chatting with an "AI expert" to better understand how a new framework works will be amazing.

Debugging problems 

All developers have a secret source of knowledge when they get stuck on a problem. Whether it's a junior developer starting their career or a senior architect building enterprise-grade cloud solutions, they know the answer is probably on Stack Overflow. The venerable site has been the go-to source for developers for everything from understanding error codes to getting assistance debugging challenging problems. 

The introduction of ChatGPT has shown developers another way of debugging by empowering them to ask questions using natural language. Developers can post an error code and ask ChatGPT what it means and how to fix the root issue. Not only that, but developers can also post the code itself into a chat and ask ChatGPT to help debug whatever problem is blocking their work.

In the same way as ChatGPT examples shouldn't be relied on as 100% accurate, debugging with ChatGPT means using potentially incorrect or outdated information.

Technical documentation

When discussing understanding existing code, we mentioned how ChatGPT could help when there is little or no commenting in a codebase. Another example of how ChatGPT can help developers avoid this is by using the tool to create technical documentation for a project.

Developers' time is valuable—but so is properly documenting a codebase. ChatGPT can help developers create technical documentation faster so they can spend more time on critical features.

Test cases

ChatGPT is a conversational chat tool. That means it can answer questions and has a "memory" of the conversation. This allows you to go back and ask a question differently or even expand upon a conversation.

One of the things we're looking at ChatGPT for is generating test cases. In the example below, we asked ChatGPT to generate a test case for one of the functions it documented earlier.

Testing is one of the most critical parts of any project. Having help from ChatGPT in creating test cases means having an extra set of "eyes" who can help identify parts of the project that need specialized testing.

Our team of BitBakers constantly works to stay up-to-date with the latest tools, frameworks, and processes to ensure your project's success. Contact us today to learn more about how we can help you.

BitBakery Logo
Unit 100 - 151 Charles St. W.
Kitchener, ON N2G 1H6
(647) 483-2678