(Photo Credit Christina Morillo)

How I Use ChatGPT As A Software Engineer

Vincent T.
0xCODE

--

ChatGPT has rapidly gained popularity as a versatile AI (Artificial Intelligence) tool for various industries. Software engineering is no exception, as there are many benefits for professionals in this field.

This is assuming you have a background in computers with an understanding of programming basics. AI tools like ChatGPT are expert systems that can assist you to learn and better understand those fundamentals.

In this article, we’ll explore some of the ways to use ChatGPT as a software engineer. It can be valuable and I provide examples of practical applications.

Problem Solving And Troubleshooting Code

If you are stuck on a coding problem, your most likely first option is to seek help from a more experienced programmer. Otherwise there are resources online like Google, Stackoverflow, Slack channels, Telegram groups, Discord servers, Medium articles and technical forums.

It can take some time though before you get an answer, if one is available. This is where ChatGPT can become very helpful.

Imagine you’re developing a web application, and you’re struggling with a JavaScript function or API. You can ask ChatGPT specific questions about your code, and it can provide solutions or suggest optimizations in real-time.

I am going to start a chat with the context to be specific.

Then I will describe the problem in my prompt with details.

ChatGPT replies back with the following.

When you are debugging code that is full of problems, using ChatGPT for troubleshooting purposes is recommended.

You can be as detailed and specific as you like. There are prompt techniques that you can use for further granularity.

Engage ChatGPT in a conversational manner like talking to another human being, not in machine-like vague broken sentences.

Rapid Prototyping

ChatGPT can help software engineers quickly prototype and generate code snippets or even entire sections of code. This can be useful for building prototypes in the least amount of time possible.

You can ask ChatGPT to generate a boiler plate code to quickly get you started.

If you notice in my prompt, I do my best to give a clear description of the requirements. Try to be less general and more specific about what you need.

The following are the code snippets generated from the chat conversation. It can be modified and customized later.

This application is not yet complete or even near production. It will still need a data model and creation of a database in MongoDB.

What this allows developers is to save time coding from scratch. Getting a template from which to start helps developers get to building applications right away.

Code Review

Code quality is paramount for developing production level applications. ChatGPT can assist in code review tasks. This can be a great way to evaluate your code for testing and quality assurance purposes.

ChatGPT can review the code and provide constructive feedback. Here is an example of completed code for evaluation.

I received good feedback but with some suggestions.

Feedback like this is important to help engineers learn and improve their coding skills. Software engineers often encounter bugs, errors, and unexpected issues in their projects so this is a way to minimize those problems which would otherwise take up more time in development.

There are software tools available that can perform this task, so ChatGPT is one of the latest options. It is like a personal assistant tool that can help developers quickly test their programs at any moment during the development cycle process.

Thoughts And Conclusion

ChatGPT can be a valuable tool for software engineers, providing instant code assistance, aiding in knowledge sharing and learning, expediting rapid prototyping, assisting with problem-solving and troubleshooting, aiding in tasks, and supporting code review.

The interaction you get with ChatGPT is quicker, direct and personal, unlike forums where other users can be hostile and where the answers are sometimes not so clear or could take a long time for a solution.

While it can be used by anyone, I do recommend it for those who understand how coding works. You are not going to immediately build the next killer app, but it is possible.

In order to know if ChatGPT is providing you the right information requires further learning. If you can corroborate it with your own research on Google or other sources, then you can validate what you are getting from the results.

As a precaution, it still requires putting in the work to get the best result. Use this resource as an enhancement to help improve and develop skills.

--

--

Vincent T.
0xCODE

Blockchain, AI, DevOps, Cybersecurity, Software Development, Engineering, Photography, Technology