04 October 2024
The thing is, it’s a true craft to determine whether code is good or bad — and that craft has definable elements that can be repeated again and again, so long as the developers involved know what they are. That’s why it’s crucial for organisations — from the CIO down to the last developer — to be on the same page when it comes to defining and measuring code quality.
It’s necessary – not optional – to have a process in place that ensures code quality, includes objective, clearly-defined metrics, and uses the right tools so that you can continuously measure the quality of source code.
Quicklinks
Looking for a specific part of this article? These quick links will navigate you through it quickly.
Why CIOs are losing sleep at night
Running a three-ring circus is not an easy job. Yet, it’s a reality for most CIOs, as they will play a crucial role in these transformations by making key decisions that will help their company provide the right technology to maintain their competitive advantage, while having to develop the right culture and mix of talent to achieve that digital transformation. Our experience tells us that all those sleepless nights boil down to five core issues for CIOs:
- Putting out all the fires created by legacy IT systems
In many organizations, this takes up so much time that nothing else really gets done. There seem to be lots of silver bullets available like moving everything to the cloud, replacing legacy systems with SaaS, microservices and low code, but without deep source code visibility, all of these approaches will disappoint. Adopting a way of working ‘just because it’s the new standard’ is not a good idea. You have to determine what way of working is most effective both for your team and the system you’re building. - Driving Digital Transformation
Transformation initiatives to fully leverage the opportunities of digital technologies are important to every organization, yet often get stalled or shoved aside by the crisis du jour. It’s true that all organizations are becoming more like technology companies, but the majority have not nearly been matching the levels of investment that ‘actual technology companies’ are making. This underinvestment will result in many companies staying behind their digital native counterparts. - Building the organization’s talent and skills for the future
Many CIOs tell us that this is their #1 concern . . . yet, they struggle to address it systematically. Forrester recently revealed that 65% of CIOs state that a skills shortage is holding them back from achieving successful digital transformation. Developer Economics notes that developers are getting less experienced, on average, every year. This means you’ll have to invest in skill and talent development, keeping employees engaged and cultivating the right culture. - Assessing whether or not you’re getting enough value for the money you spend on software development
What about your ROI on software development? Are you getting the most out of your investment? That question by itself can keep you up for a few nights, right? To evaluate software projects accurately, you need deep visibility into both inputs and outputs. Once you have that clearer view, you’ll manage your business better by answering vital questions, like ‘Do our vendors deliver high-quality software fast enough?’, ‘Are we spending too much on developing this application?’ and ‘Are our development teams becoming more efficient over time?’ - Maintaining Developer happiness
Meanwhile, down in the trenches of many organizations, development teams are flooded with demand for more features and increased pressure to produce more high-quality code at a faster rate. Not surprsiningly, this can (and by can we mean will) lead to frustration, decreased quality of work and unhappiness. This is exactly what you need to prevent from happening. It’s of grave importance to actively steer on developer happiness, as research repeatedly shows that there’s a strong relationship between happiness, software quality and developer productivity.
So while focusing on improving skills so that developers can keep meeting ever-increasing demands, you also have to maintain that happiness factor. The top 3 causes for developer unhappiness, according to research, are 1) being stuck in problem solving; 2) time pressure; and 3) bad code quality and coding practice. Luckily, not all is lost. Especially when it comes to the third point, there are actions you can take to make sure your development teams work with high-quality code with properly defined metrics and practices. Providing the necessary resources and using relevant static analysis tools and the right practices is key here. We’ll get back to that later.
Long story short; we can’t blame you for being overwhelmed — let alone not having a process in place to improve team members’ coding skills. But the answer isn’t to work harder, or to run around wasting time and money on firefighting that doesn’t solve the underlying issues.
The real answer is to embed a commitment to code quality in everything you do.
Code Quality cannot be an afterthought
It’s not rocket science – high quality code is inherently more maintainable, more secure and cheaper – which will save you money and effort in the long run. When you can measure code quality objectively and in the context of business needs, you’ll be much better positioned to evolve legacy systems, manage your vendors, and improve both the skills and satisfaction level of developers.
Putting a strong focus on improving the maintainability of your systems will help you resolve issues more effectively and efficiently – and that increases time to market and frees up greater resources for innovation. More specifically, research that we here at SIG have conducted, shows that issue resolution and enhancements are twice as fast in systems with above-average maintainability than in systems with below-average maintainability. Now that’s impressive, isn’t it?
If that doesn’t convince you to make code quality a priority, maybe the economic impacts – and strategic importance – will. Poor software quality will cost you. Big time. One way or another, poor software quality can have substantial implications when it comes to both time and money. Research suggests that companies spend more than $300 billion per year worldwide debugging their software. On top of that, fixing software bugs after release rather than during the design process costs four to five times as much.
If you’re not actively steering on code quality, you’re putting your software development efforts at risk. It’s simply not something you’re able to forego.
What do developers themselves have to say about code quality?
The funny thing is, everyone in software development — from coders to executives — seems to agree that producing high-quality code is important . . . but what do their organizations actually DO about it? All of our work with clients here at SIG confirms that high-quality software is easier and cheaper to maintain, more secure, and results in better business outcomes. Yet after 18 years in the field, we still see many companies that haven’t dedicated the necessary resources or institutional processes to back up their good intentions for quality code.
As part of our mission to get software right, we decided to research this further and teamed up with technology publishing house O’Reilly Media to conduct a poll and subsequent report.
The general outcome of the poll leaves us with some familiar frustration. It reinforces previous findings that, although code quality is valued in principle, software development organizations often measure and manage it unevenly — or not at all — in their day-to-day practices. More specific and striking outcomes include:
- 90% of respondents agree that “a practical and measurable standard on code quality will help towards improving a software system.”
- 70% of respondents believe that maintainability is the most important non-functional aspect of code to measure, even when compared to performance or security.
- The top 3 reasons for not using software quality standards were “lack of consensus on what software quality is/which standards to use,” “currently has no priority,” and “lack of management support.”
- The vast majority of respondents think that standards help, but less than 50% are planning on using any in the near future.
- Most developers don’t use tools for improving software quality, largely because they lack the budget to acquire them.
Taking into account the severe consequences of low-quality software, we cannot help but wonder:
How many wake-up calls does it take to get serious about (managing) code quality?!
What’s next?
No need to worry – yet. If you start focusing on making code quality and the health of your software a shared priority of the entire organization, you’ll be able to mitigate risks and benefit from increased time to market, lower costs and more secure systems. Just like Rome wasn’t built in a day, it will take some time to have the necessary processes and practices in place to actively manage and steer on making your IT future-proof. Start by embedding code quality into your daily routines by making small adjustments continuously. Dedicate resources, identify the right solutions for your situation, think about the right metrics to measure quality objectively, and select relevant tools that will make your life easier and automated.
In a follow-up piece, we will elaborate on practical measures you can take to start embedding code quality into your daily processes and pinpoint the most impactful ones.