The code review revolution: How Myrge is harnessing the power of GenAI to radically accelerate software development by up to 5x

bp tech blog
bp tech blog
10 min readJan 17, 2024

--

Co-authored by Sami Khan, Chris Gell and Justin Lewis

bp has a team dedicated to building startups that solve the world’s toughest challenges. Justin Lewis is VP of bp’s business incubation unit, a thriving hub of diverse start-ups working to elevate operations across multiple industries and sectors. These include Myrge, a small but ambitious team of engineers working to accelerate developer velocity using sophisticated AI technologies to build the human-machine software teams of the future. Already used at scale within bp, in 2023 Myrge supported over 2000 engineers.

Why is developer velocity important in the energy industry?

“Our software engineers help keep workers safe and connected on site, whether on-shore or in the middle of oceans, and help consumers make sustainable choices by optimising EV charging station placements. Tech helps prevent and reduce emissions with cutting-edge IoT devices. So, from my perspective, enabling software developers to do work safely and as quickly as possible is a priority.”

Fran Bell, senior vice president for digital technology at bp

We have invented a way to accelerate developer velocity by up to 500%

Most attempts to accelerate developer velocity are incremental, with single digit or rarely double-digit improvements. We have achieved an outstanding improvement with a multi-pronged approach and by focusing on an area of software development that has previously received too little attention.

There are many advances in the speed at which software engineers write code. However, this represents a minority of the time spent by software engineers in the software development process, so improvements in this area tend to have a smaller impact. Myrge has identified where blockers and bottlenecks occur most in software development lifecycles to understand where the biggest optimisations can be made. Code reviews and reviewing is high on that list, so Myrge has invented new technology to scale code reviewing quality and efficiency.

To scale these developer velocity wins we have also invented new technology to scale code reviews by a factor of 17x.

An average engineer has capacity to review code for 10 developers

With the help of AI, one Myrge engineer can review code for 175 developers, enabling each one of those developers to build high-quality code up to 5x faster.

The scale of impact is years of wait time saved every day, allowing developers to spend less time reviewing code and more time building and shipping it.

What are the problems that impact developer velocity?

Developer velocity is measured by how quickly software developers are able to build and launch features. Coding speed, code quality, tech debt, cycle times, duplicated effort, and waste are all contributors to developer velocity.

Coding speed

The speed at which a developer writes code is often the point of focus while optimizing developer velocity. We believe the speed of code writing is going to accelerate with emergent applications of generative AI and maturing low-code and no-code platforms.

However, the time spent writing code is a minority of the total time spent building new features. Other aspects such as reading, reverse-engineering, reviewing, testing, and deploying code often use more developer time than writing code.

Code quality

Low quality code impacts developer velocity in the long run. High quality code tends to be readable, allowing new developers to make changes rapidly, and designed to facilitate easy code improvements - enabling high velocity and allowing software engineers to augment the code and develop new features faster. Lower quality code does the opposite - only a small circle of people who are familiar with the project may be able to make changes to core areas, the time to get new people up to speed might be months rather than days, and small changes might cause production issues, or business risk. All this can negatively impact developer velocity.

Tech debt

This occurs when a quick-fix now increases the probability of bugs and outages later. Some studies (referenced below) have found that tech debt can waste 20% - 40% of a developer’s time.

Long cycle time
The cycle time is the time it takes to develop and deploy a new feature. Cycle time is impacted by both the process complexity and build-and-test pipeline duration. Delays during this stage (slow approvals for code reviews, long running tests, low confidence in production rollouts) can have significant impacts on developer velocity.

Code written in a short period of time can often take a long time to deploy due to slow reviews, tests, and deployments.

Duplicated effort

Software teams may waste time building something that exists to a high standard in open source, or even within a different team in the same company. Duplicating work isn’t just an inefficient use of developer hours — additional work requires additional maintenance, which means even more wasted time and effort.

Waste

Waste occurs when developers spend time building something that isn’t really needed. This might be a result of overengineering (building something more complicated than is actually required) , or focusing on something with low value (e.g. developing UIs without customer buy-in which are ultimately never used).

Code reviews are critical to improving developer velocity

Code reviews can significantly improve code quality, reduce tech debt, drive down cycle times and minimise waste and duplicated effort — unlocking developer velocity on a massive scale.

However, the code review process is typically slow and inconsistent. Average wait times for code reviews vary across organizations but typically take over 24 hours. In a multi-hundred-person engineering organization this translates to years of productivity lost due to waiting on code reviews every day. If we can improve the quality, speed, and consistency of code reviews we can massively impact developer velocity.

How Myrge optimizes code review and accelerates developer velocity

Myrge has a technology platform designed to optimize how a code reviewer reads and improves code. One part of that platform Code Review as a Service, provides fast and effective code reviews for software developers, with a dedicated team of code review experts using a collection of AI technologies to orchestrate, maximize, and facilitate code reviews. This human-machine offering can supercharge the review process, aiming to start reviews within just 15 minutes of a pull request being raised. Empowered by AI-backed tooling to shrink code review wait times from days to mere minutes, each Myrge reviewer can support a significant number of engineers.

This gives developers back the valuable time they need to build and ship innovative, high-quality software, and radically shortens the cycle time - accelerating developer velocity by up to 5x.

How Myrge creates the human-machine code review teams of the future

In the first technical stage in a code review by Myrge, AI creates an orchestration layer which breaks up code changes into collections of smaller changes which can be reviewed independently. These are then delegated to human specialists and AI systems as tasks to be completed.

Sophisticated orchestration is critical for scaling the amount of code humans can review because it enables the team to optimize not only which experts look at which segments of code, but also what elements that expert is specifically reviewing the code for.

Why not fully AI-automated code review?

Because AI isn’t a silver bullet (yet). Delegating code reviews to humans is critical because the majority of useful comments and interventions come from humans, while suggestions generated by AI tend to include hallucinations. Useful comments and interventions require a deep understanding of cause and effect that machine learning techniques such as generative AI are not yet able to process (you can read more about causality and the limitations of correlation driven AI in our Causal Inference Symposium blog post).

Using AI to automate code reviews sounds promising in theory, but has challenges in practice

· AI provides good and bad recommendations. And it can be very noisy, even with tooling to support it. It is improving as training becomes more sophisticated, but (for now) a human-machine team means developers see appropriate levels of comments on their reviews.

· Every code review is an opportunity for more experienced engineers to coach and mentor others. AIs don’t really consider this human element when providing feedback, whereas individuals can use appropriate language to improve teams’ coding skills, which will ultimately lead to better code quality over time.

· Providing enough context for AI to solve an issue is difficult, and sometimes it just won’t analyse the code correctly at all. Myrge needs to provide a service which will always provide a good review, no matter what code is being reviewed.

Since useful code reviews can’t be automated yet, the speed and quality bottlenecks are in the human reviewers. To address this the Myrge team has built a large variety of AI technologies that help humans review code 17x more efficiently. This approach is aligned with bp’s AI strategy of building human-machine teams.

How do Myrge engineers work?

The right reviewer for the task
Myrge AI captures metadata about each code change, including the languages used, complexity, type of changes, and the size of the changes. This information is used to route the request to the best reviewer for the task.

Human reviewers only assess the code that matters
Our aim is to only show reviewers the changes that cannot be automatically assessed . Myrge detects inconsequential changes that don’t require a manual review, and saves time by reviewing these automatically.

Less dependence on project familiarity

Typically, code is reviewed by software engineers on the same team as the code author, who are familiar with the code and the domain. The intended benefit is sharing knowledge across the team about what changes are occurring in the code base. However, in practice this is inefficient - team members often have higher priorities on their to-do list, and individuals across teams have inconsistent code reviewing skills. Regularly, only one team member reviews code and so it is unlikely that the right insight get to all of the right people on the team.

By breaking down the six key features of high-quality code, Myrge has established a method of completing a code review that’s less dependent on project familiarity.

These are:

· Readability

· Maintainability

· Robustness

· Security

· Performance

· Correctness

Five of these six features are relevant to most projects and don’t require specific domain knowledge.

Correctness can be domain specific, but only when business logic is particularly complex. Myrge can use AI to provide rapid context when needed to reviewers, allowing them to accurately review the majority of this kind of case. Dedicating code reviewers to projects helps the code reviewers maintain the critical domain and business context.

What does Myrge’s AI do?

· Generate pull request descriptions offering essential context on previous changes, along with high-level summaries of code and suggestions to fix issues.

· Create feedback, commands and code changes tailored to the code being reviewed.

· Search for and identify bugs, duplications, and other issues that can impact code quality.

And more …

Mryge in action

Summarization of pull requests

Summarization of pull requests using Myrge GenAI

Here Myrge AI has summarised a pull request, giving the code reviewer a clear understanding of the context and required action in no time.

Generating a comment and problem with a fix

Screenshots showing how Myrge GenAI can be used to generate comments and fix code issues

Here Myrge AI has summarised a problem with the code and suggested a fix, saving the code reviewer time and effort.

What’s next?

We believe many other companies could benefit from Myrge’s unique offering. That’s why we’re considering the possibility of making Myrge externally available. Want to find out more? Head to www.myrged.com

Look out for future posts to find out how we’re significantly increasing developer productivity and speeding up innovation cycles to help solve the energy trilemma by combining generative AI and dedicated human code reviewers.

References

2. Business Cost of Technical Debt — CodeScene

3. Tech Debt: Reclaiming Tech Equity — McKinsey

4. Stripe, The Developer Coefficient

Further reading

Read more about how we’re using tech to help solve the energy trilemma

Co-authors

Sami Khan

Sami Khan, co-founder of Myrge

Sami is a co-founder of Myrge. He has over 25 years of experience in software development and digital transformation, he’s been a full stack developer, engineering manager, company-level troubleshooter, and CTO in the past. He’s a real fan of continuous improvement, autonomous teams, and pragmatic processes that individuals or automation can follow.

Chris Gell

Chris Gell, co-founder of Myrge

Chris is also a co-founder of Myrge. With 10+ years of experience working in a demanding and commercial environment, including technical and people leadership, Chris is a well-rounded Engineering leader who helps teams achieve impactful outcomes through collaboration, coaching, and technical leadership.

Justin Lewis

Justin Lews, vice president of bp’s business incubation unit

Justin Lewis is the Vice President of bp’s business incubation unit that tests and grows business models and provides thought leadership on how to rapidly turn game-changing business ideas into commercial reality. Justin brings with him innovation leadership honed at Tesla, and previously Google, where he was their most prolific inventor, filing more than 450 software patents. While completing a computer science and game design degree, he founded two successful gaming companies, selling to some of the most well-known gaming houses.

--

--

bp tech blog
bp tech blog

Welcome to bp’s tech blog, where our tech experts will share some of their most significant technical contributions to help solve the energy trilemma.