Skip to main content

By Dan Hawkyard – Senior Software Engineering Consultant at Nimble Approach.

What is ChatGPT? Why is it worth talking about in the SDLC?

AI tools are here to stay, and they’re only getting better. In recent months the topic of AI has begun turning heads and made its way into the mainstream. 

There have been a huge number of generative AI models that have emerged in recent times; of these ChatGPT has comfortably made the biggest waves and generated the most noise, and with good reason. 

It’s free, easily accessible, and extremely easy to use; able to understand and reply to conversational language and respond appropriately on almost any topic. This represents a significant advancement in natural language understanding and generation for large language models.

This low barrier to entry and the seamlessly endless ability to answer queries has led to people wondering how it can be best utilised to help them in their day-to-day lives and at work. But it’s also led people to be concerned for their future employment, with a fear of being replaced by AI

When you really begin to understand how to harness the power of a tool like ChatGPT to help you work more efficiently and effectively, then the concerns people may have are soon put to bed. This couldn’t be more true than working in the SDLC (Software Development Life Cycle).

The key is to treat it as a tool to improve how you currently work, and not to replace how you previously worked.

Why do we actually use it?

ChatGPT has the potential to impact all areas of the SDLC. It’s up to us to adapt to change and react to new technologies; analysing and testing if they can improve areas of our business. 

Speed and efficiency are two of the main motivators for using a tool such as ChatGPT, allowing us to offload some of the more time consuming or tedious tasks. It also allows us to get an alternative point of view, and come up with things that might otherwise be missed or overlooked. Ultimately this will result in a faster development feedback loop.

Examples of this would be when gathering requirements for a piece of work, or coming up with test scenarios. Self improvement, learning and problem solving are also areas that can be enhanced by utilising ChatGPT in the right way. Being able to ask how things work in a conversational way, and then ask follow up questions about certain aspects of the response, or ask for more detail, allows for a more interactive learning experience. 

The same applies to problem solving, where being able to refer back to previous messages and replies in the conversation becomes very powerful when trying to come up with a solution. 

By leveraging ChatGPT in this way, teams might find they have more capacity for all the things that are often deprioritised, such as tackling tech debt and finding time for L&D. This should in turn lead to better quality products being delivered in a more timely fashion and at a reduced cost, which ultimately is what all delivery teams want to achieve.

Can AI improve product inception and design? 

Yes it can, in fact it can have a big impact. Requirements are classically vague and poorly defined, that’s if they’re documented at all. ChatGPT is capable of translating simple ideas and concepts into lists of requirements that can be further refined and prioritised with follow-up questions.

For individuals and small teams without product owners, this might be invaluable for taking those first concrete steps into delivering their idea. For more mature teams and enterprises, ChatGPT might be used to add additional depth to requirements, which will ultimately lead to better design and a smoother development process. 

The caveat in both of these cases is that you risk sharing IP or may be restricted from asking more direct questions, although this is being addressed with plugins and future versions that don’t share data. 

After you’ve gathered your requirements, the next step is to flesh them out and turn them into usable designs. Using AI to generate and help create these designs is potentially very powerful, however it is not something that ChatGPT specifically does well. 

This is largely because, without plugins and other tools, it’s entirely text based in its current form, not allowing for the generation of images. Future iterations of ChatGPT may improve this, as well as the addition of several plugins that are now available, allowing it to utilise other AI image generation tools that are more directly suited to the task.

Laptop with code on screen

But can AI / ChatGPT actually write code?

The answer to that question is a definite yes. Writing code and building applications is often the first thing that comes to mind when considering potential applications for ChatGPT within the SDLC. While this is definitely a strength of ChatGPT, there are definitely some limitations in this area.

ChatGPT can be an excellent tool to save time when spinning up a new skeleton application, creating a lot of the boilerplate and basic logic easily and quickly. It will even recommend file structures for your project and provide appropriate choices for technology and tooling.

It excels when writing small pieces of code and then building up slowly, rather than providing it with a full list of requirements and then expecting it to deliver you a full project, which always results in buggy and error-prone code that can be difficult to debug. 

An extremely useful feature is the ability to reference previous code snippets and earlier parts of the conversation, allowing it to iterate over and improve the code it produces. However, once again, asking too much of it when asking for changes can lead to errors and bugs, particularly with it seemingly arbitrarily changing file or variable names part way through. This is something that will likely improve over time.

It would be very easy for developers to see the power of ChatGPT and completely change their ways of working, using it to write all of their code and start blindly copy/pasting without actually understanding what the generated code does, or if it is in fact the most appropriate way of solving that particular problem.

This would be of particular concern for junior developers, and great care must be taken within a development team to not misuse it in this way.

It is likely that, with the introduction of GitHub Copilot X and other AI development tools, AI will become more powerful at writing code over time, especially when given the context of whole repositories instead of just short prompts. 

Guess what? AI can help you write tests too

Within the SDLC, testing is often cited as an area that ChatGPT can enhance and that is true, as long as it is used in the correct way. Something it excels at is turning requirements and acceptance criteria into BDD (Behaviour Driven Development) style test cases. 

This provides a great foundation to build upon when it comes to actually writing tests. Using ChatGPT to then take the next step and actually write the tests does however require a slightly more considered approach. 

Given a block of code, it is very good at starting to write unit tests for that code, and that code specifically. The problem with this is that if there were any bugs or unintended errors in your code, it will likely write tests that will allow these errors to pass instead of fail. This could lead you to falsely believe that buggy code is working perfectly since all the tests are passing. As a result, it can be dangerous to rely solely on this as a way of creating unit tests.

In order to generate more reliable tests, a slightly different approach is required, starting with giving it a block of code and simply asking it to explain its function. This explanation can then be used to see if there are any problems with this code since the explanation may not match its intended function. Asking ChatGPT to then fix these problems and write tests based on the output will yield much better results. However, it would still be unwise to rely on this approach as the sole method of generating unit tests, partly because it struggles to think outside of the box and won’t be able to cover all of the relevant edge cases.

So should you start using ChatGPT straight away?

The answer to that question is… it depends. There is one big elephant in the room that might prevent the use of ChatGPT within a business setting, and that all revolves around potential legal issues and data ownership. Currently, the owner of anything produced by ChatGPT is unclear, and ongoing legal discussions are taking place to try and understand this issue more. This also ties into the use of your input data to then train the model further, which is also a potential problem from a data protection standpoint.

This could be a big factor when deciding to use the tool and must be taken into account from a business and legal perspective. At Nimble this is something that we must acknowledge and think about for every client engagement that we have, in order to determine if using the tool is appropriate or not.

Assuming that the legal issues are resolved, or you are willing to accept the grey area surrounding them, then ChatGPT can be a very powerful tool. A tool that if you aren’t utilising day-to-day as part of the SDLC, then you are potentially behind the curve. In order to get started with ChatGPT and to bring it into a team’s normal workflow, a team must understand how to use it effectively.

At Nimble, we’ve found that a great way to do this is to have a hackathon; empowering the team to play around with ChatGPT and use it across all stages of a development life cycle to deliver something small in a couple of days. This will help everyone within a team, technical or otherwise, understand how generative AI works and how it can positively impact the SDLC.

When used in the correct way, ChatGPT can help with all stages of a product’s development. Of course, care must be taken so that it isn’t used in the wrong way; it should be treated as a tool to assist and help us and not something that is relied upon, similar to how search engines and websites such as Stack Overflow are used. Generative AI will only improve and get better, and it is our job to ensure that we continue to embrace it and learn how to use it to enhance the SDLC responsibly and safely. At Nimble we are proactively learning about generative AI and passing that knowledge and experience onto our clients in our day-to-day work.

To find out more about generative AI get in touch with our AI team.

Author Bio

Dan Hawkyard – Senior Software Engineering Consultant at Nimble Approach.

Dan has 7 years of consultancy experience, working with a variety of clients and a wide range of technologies.