Seven crucial AI considerations for software engineers

Generative AI is set to revolutionise the way we work; providing huge benefits to individuals, teams and industries. From driving new businesses to improving efficiencies, there's no doubt we're at the start of a period of rapid change – with generative AI the catalyst.
Date posted
14 July 2023
Reading time
4 minutes
Richard Rothery
Principal Platform Architect · Kainos

As the explosion of interest in AI continues to transform processes and permeate the world of tech, we’ve been considering the emerging discipline’s effect on the software engineering landscape. In our previous blog, we explored the impact of AI on software engineering; expelling common myths and detailing the ways in which AI will enhance productivity.

From concept to completion, AI is reshaping the software engineering industry. To ensure the technology is utilised and adopted appropriately, we're going to look at seven considerations software engineers should keep in mind when implementing AI.

1. You could find yourself in an echo chamber

AI assistance can increase code quality if it suggests better code than would have otherwise been produced. Or it can reduce quality if the programmer pays less attention and commits poor quality code.

Because AI is trained on the data sets it sees, it is our responsibility as engineers to stay on the right side of that curve and ensure the AI continues to improve.

image

2. Put useful information where AI can read it

Imagine having a meeting with colleagues, agreeing actions and then coming back to follow up and set new actions. None of that is captured where AI can easily see it. Compare conversations that happen between engineers through pull requests in GitHub which can all be used to prompt AI.

Organisations that don’t digitise their conversations will potentially be at a disadvantage. I can see transcripts from virtual meetings being filtered and then fed into the models to provide organisational context.

3. Prompt engineering is key (for now)

Just like when we first learned to use search engines, knowing the right search term was key. The same will be true of using AI to help with coding. Some tools even allow “in-session learning” to happen. You can use follow-up questions, statements and code snippets etc. to improve the result further. We saw this in the early days of the web, you could search the internet or use stack overflow to help solve a problem instead of needing to read a big IT manual. The skill was in knowing what to ask and whether the result was correct in your context. The same will apply working with AI, until the models improve based on our “prompt usage” those that can extract the best results by creating the best prompts will progress faster.

4. Using AI to spot gaps

The knowledge base that AI is trained on will be vastly wider than a single human can cover. We can therefore use that to find the bits we miss. As an example, AI has access to enough code and corresponding unit tests that it can be very good at making sure the coverage is high. It can point out edge cases that may have been missed based on what it sees from millions of other repositories.

5. AI is another tool in the solution stack

As humans, we’re exceptionally good at falling into the trap of looking at a new tool and then trying to find a problem to solve. When you have a hammer, it’s easy to see everything as a nail. The organisations and engineers that succeed will see it a way to help solve problems by starting with the problem and seeing where AI can offer unique value or efficiencies.

6. Teach and be taught

As individuals, we all have some areas that we’re strong in and some we’re still learning.

The trick will be working out when to switch between an “AI acceleration mode” where the human skill/knowledge is high and we need help tweaking, and “AI discovery mode” where the human skill/knowledge level is low and AI can help delivery in the most efficient way possible. We can let it teach us and help us discover the solution we need.

7. As with CICD practices, so with AI practices…

If we believe some of the earlier suggestions, then prompt engineering and reviewing AI suggestions will take up more of the time than coding itself. Like peer reviews on CICD changes, the smaller change we make, the easier this process will become. Reviewing 800 lines of AI suggestions will be far harder to spot issues than if we change one small part at a time.

image

As a whole, AI has the potential to do a lot of good. Whilst people have divided opinions about artificial intelligence, there’s no doubt that AI has a lot of positive, innovative use cases when leveraged appropriately. As software engineers, we could free up a lot of time to enable us to tackle the big problems facing our customers and partners. Harnessing the benefits of AI, while keeping the limitations in mind, will help you deliver creative solutions that improve people’s lives.

Sources

  1. https://www.youtube.com/watch?v=bHb_eG46v2c (Bill Gates on AI and the rapidly evolving future of computing)
  2. https://queue.acm.org/detail.cfm?id=3454124 (SPACE Framework)
  3. https://arxiv.org/pdf/2302.06590.pdf The impact of AI on Developer Productivity

About the author

Richard Rothery
Principal Platform Architect · Kainos