Cursor Curated
13th September 2023

Sustainable code

Reduce, reuse, recycle for software development

20 Cover sustainable code2
Cursor Curated Issue 20
Daniel Westlake

We’ve all heard stories of disgruntled programmers ‘breaking the internet’ with seemingly simple amends to code. It’s truly astonishing that in this day and age, whole systems can be brought down by one single point of failure. We saw a similar story during the August 2023 Bank Holiday weekend, when one wrong piece of data on a flight plan brought down air traffic control.

The inconvenient truth is that many modern businesses are heavily reliant on code. Indeed, Software-as-a-Service (SaaS) is trying to mitigate this – using subscription models to overcome problems. But in a broader sense, we still need to consider how disparate systems link together.

Rethinking software with sustainable code

The influence of SaaS is causing us to rethink our software development strategy. In particular, a ‘reduce, reuse and recycle’ mindset will help us to overcome single point of failure issues. The UN defines sustainability as “meeting the needs of the present without compromising the ability of future generations to meet their own needs.”

So, how does sustainability affect planning in software development?

  • Reducing workloads – developers can plan their time better by using code that is already available through framework
  • Holding onto functional code – discouraging starting from scratch will save time and money, and reduce margins of erro
  • Improving return on investment (ROI) – optimising existing code poses the best return on investment.
20 reduce reuse recycle

Simply put, code is an asset. We can invest in it or we can neglect it – but doing the latter runs the risk of unsupported software, system shutdowns and wasted resources. Similarly, sustainable code is just as important for software maintenance, staying one step ahead and evolving rather than ‘set and forget’.

Approaching your software stack sustainably

There’s no one-size-fits-all with software development. Any number of variables from developer skills to all-round experience can affect codebase health. There’s also the danger of shiny object syndrome: between 1999 and 2001, American companies spent $130 billion on tech they never used.

The key is to have a true understanding of the software before going in all guns blazing. Chasing trends does not always equate to long-term results, so instead, companies should question exactly what they want to get out of new software. If developers are more familiar with a certain tool, productivity is invariably higher. So too is ROI.

We have to maintain, not just build

A software maintenance agreement is not just a commercial duty, but a sound sustainable decision. By using open-source software, we can reduce our reliance on writing new code. We call these ‘dependencies’. These lessen the amount of new code required, with the average app featuring 528 dependencies.

These are sustainable but come with risk. Some 84% of applications come with at least one vulnerability. As software becomes more complex, developers need to stay on top of these problems. We should heed the lessons of cyber-attacks such as SolarWinds’ Orion IT monitoring and management software in 2020. Though it hit fewer than 100 installations, it had the potential to bring down 18,000 systems.

We also need to be mindful that how we manage individual and team performance may impact long-term outcomes. For example, developers may be more incentivised to work quickly than think about long-term sustainability. Regular updates and patches will mitigate risk.

Returning to the notion of software maintenance agreements, this can assure long-term viability of digital platforms. Best practices include:

  • Transparency in software development: clear outlines for what the maintenance entails, even if it is one hour’s updating per month
  • Little updates where possible, but larger updates mandated through an agreement
  • Staying ahead of changes and not letting small fixes turn into larger, more expensive issues.
20 monitoring and maintenance

Planning for end of life

Staying current does not always mean keeping up with the latest features. Instead, we should ensure our software remains within the manufacturer’s supported lifecycle. In some cases, we see major releases or major versions, which may involve rewriting code.

This can happen for many reasons, from new tech to maturity of the market segment. New programming languages and mobile applications introduce features at a rapid pace, but it’s important to avoid new for newness' sake and instead choose products with annual release cycles.

When manufacturers stop supporting a certain version, this is known as ‘end of life’. This lack of support poses security risks and high costs for rewriting code. Businesses need to be aware of the systems they depend on, and keep costs low by revising their upgrade schedules.

So, whose responsibility is all of this?

Code is your business asset to manage, but often, people assume agencies or developers are keeping on top of it. Investing in a regular MOT, whether it's ad hoc or through a maintenance plan, will prevent nasty surprises; like discovering messy code when moving companies.

Hold regular meetings with your developers, not to catch them out, but to encourage them to keep things in order. Encourage a long-term mindset rather than quick fixes.

20 review plan

The takeaways

Like many things, prevention is better than the cure. Sustainable code management comes from being proactive, not reactive, with regular investment into reviews and updates. By staying in the know, you can keep costs low, improve your ROI and reduce risk.

Your next step: Free Code Review

Nobody should have to navigate the complex code landscape alone, so we’re offering a limited number of free code reviews throughout September and October. Understanding how sustainable your current code is allows you to diagnose issues and plan for long-term success. Use the link below to register your interest.

Register here for your Code Review