As a developer, you are always looking for ways to streamline your workflow and improve efficiency. One tool that you should consider adding to your development toolkit is ChatGPT.
What is ChatGPT?
ChatGPT is a chatbot developed by OpenAI that uses the power of machine learning to understand and generate human-like text. It is trained on a large dataset of human conversations, which allows it to understand the context and nuances of language, but it can also write and debug code in many languages.
While ChatGPT is not a replacement for a human developer, it can be a useful tool to assist in a wide range of tasks, but how should it be utilised?
Debugging and testing
ChatGPT can accept code and test cases and output responses. This saves time and effort when compared to manually inputting test cases or reading through code to find an error.
ChatGPT can be used to assist in the creation of technical documentation by generating text based on a given prompt or context. It can even take code and add comments based on its understanding of what the code is doing.
Brainstorming and idea generation
ChatGPT’s ability to understand and respond to natural language commands means it can be used to generate ideas and suggestions for projects or to help you talk and think through problems to come up with solutions.
What does it look like in action?
In the example below you can see how ChatGPT can produce a basic DAX measure from a simple command:
It produces well formatted DAX along with an explanation of what the functions are doing, and although it has no access to your specific data model, it uses intuitive table and column names.
However, when you ask for something a little more detailed, the results aren’t always as accurate.
As you can see, the functions are there but the logic behind what it’s trying to do is flawed. Instead of limiting the sales to just those made in the current week, the measure is showing all sales where the sale date is equal to or greater than the minimum, and equal to or less than the maximum sale date in the table, effectively showing all sales data (but still filtered by Region). Totally incorrect for the result I was after, but helpful in that it has suggested an approach, and THIS is how I feel ChatGPT should be used.
So can it do my job for me?
While ChatGPT saves time and streamlines a lot of processes, its outputs should be reviewed carefully. It may be able to generate code, but it is unlikely it will write functional code that can be copied, pasted, compiled and run. It is also unable to understand the logical requirements of a given programming task, meaning any functional code it produces may not be the most efficient solution. For example, it won’t know what indexes exist in a database so it can’t utilise them when joining tables, only a hands-on developer can do that level of optimisation.
In short, ChatGPT is not a substitute for a human programmer, it is useful for providing insight and the foundations of a solution and should be added to any developer’s arsenal, but only as an aide.
You can create a free account and try it out for yourself here: https://chat.openai.com/chat
Chat GPT does plenty more than I’ve shown above, so play around with it and find out how to tailor what it can do to suit your needs. It even creates content for you……