Skip to main content

Dirty code still runs — but that’s not a good thing

Organizations understand the importance of code in today’s business landscape. We rely on software to power our daily lives — the global market is projected to grow to nearly $1.6 trillion within the next decade. Developers are feeling the pressure from this, with the increased push to write more code every day. However, this does not mean that the development of high-quality and error-free code should be sacrificed to meet the demands of increased software delivery. 

Developers are increasingly using testing in the continuous integration and delivery (CI/CD) pipeline to produce high-quality code. The problem is that these reviews aren’t always the right kind. The lack of proper reviews and analysis within the CI/CD pipeline pushes software to production that’s rooted in poor-quality code. That problematic code runs… but not on a solid foundation, and that’s not a good thing.

As developers reuse and build on that low-quality code, it perpetuates a vicious cycle. Teams waste time fixing original, recycled code snippets or, in some cases, push it through despite quality issues. All this exacerbates technical debt, an expensive and unsustainable problem for businesses to grapple with.

The solution to this involves not just frequent testing, but testing that ensures clean code. Writing consistent, adaptable, intentional and responsible code prevents new issues, reduces pain points, improves collaboration and leads to better software and strong business outcomes. Incorporating the right testing and analysis is a win-win.

Machines May Not Care About Clean Code — But People Should

Our dependence on software correlates with our dependence on code. The problem is that software-operated machines don’t care about the quality of the code, so long as it continues to run. They don’t consider its quality and readability, nor developers’ ability to understand and reuse it later. Operational code doesn’t even have to be secure for it to keep the lights on.

Code must go beyond bare functionality, especially with the growing AI use. Research shows nearly 36% of Copilot-generated code contained critical weaknesses across various programming languages. That’s why GitHub emphasizes that individual developers are responsible for ensuring code quality and security before deployment.

Developers understand AI coding assistants can help them keep up with increasing business demands and boost productivity. Where they fall short is maintaining quality. While teams universally include unit testing into the CI/CD pipeline as a way to check AI-generated code, the reality is that unit testing alone only analyzes functionality — not quality.

Deploying software that has only undergone unit testing can certainly function, but its poor quality can create a negative domino effect, causing long-term issues and rework. Functionality isn’t enough; preventing problems from the start is crucial to avoid resource and financial costs.

Code Doesn’t End With One Project

Developers are always looking for ways to boost productivity and reuse what they’ve already built to improve, add on, or create new projects. As business demands pressure these teams to deliver at a higher, faster rate, the need to be efficient has only increased.

However, when clean, quality code that’s secure isn’t prioritized, there can be lasting effects. The impact may not be felt immediately, but over time, bad code becomes insidious to software. For example, the average developer already spends 21+ hours a week debugging, refactoring and fixing bad code at a total of $85 million annually worldwide in opportunity cost. Poor-quality code will exacerbate the amount of time and the cost of fixing it when originally used, and then reused in other projects.

Developer turnover exacerbates the issue: when a developer leaves to pursue a new role, their code could very well cause long-term catastrophic problems, even years later. If guardrails for sustainable clean code weren’t implemented it can be a struggle to decipher through their old code.

When developers reuse poor-quality code, they’re dismantling a business’ software foundation from the inside. Software powers businesses today, and issues with it can threaten profits, reputation and security. With the cost of poor software quality estimated to be at least $2.4 trillion, neither developers nor businesses can afford to ignore the problem of bad code.

Clean Code Ensures Quality and Relieves Developer Pain Points

Business outages, security issues, poor application performance — these issues stem from bad code. Clean code, however, empowers developers and businesses to push out updates and deploy software with the confidence that it isn’t built on a crumbling foundation. It can and will perform over time.

Quality code benefits developers by minimizing the time and effort spent on patching and refactoring later. Having confidence that code is clean also enhances collaboration, allowing developers to more easily reuse code from colleagues or AI tools. This not only simplifies their work but also reduces the need for retroactive fixes and helps prevent and lower technical debt.

To deliver clean code, it’s important to note that developers should start with the right guardrails, tests, and analysis from the beginning, in the IDE. Pairing unit testing with static analysis can also guarantee quality. The sooner these reviews happen in the development process, the better.

Investment in Clean Code Delivers Results

Developers and businesses can’t afford to perpetuate the cycle of bad code and, consequently, subpar software. Pushing poor-quality code through to development will only reintroduce software that breaks down later, even if it seems to run fine in the interim. To end the cycle, developers must deliver software built on clean code before deploying it. 

By implementing effective reviews and tests that gatekeep bad code before it becomes a major problem, developers can better equip themselves to deliver software with both functionality and longevity. Investment in quality code offers dividends from multiple perspectives: it reduces costly tech debt while freeing up developer resources and supporting collaboration. Only by working with the best quality code can businesses ensure their developers can work at their highest potential, and deliver software with the functionality and longevity that drives impactful business results.

The post Dirty code still runs — but that’s not a good thing appeared first on SD Times.



from SD Times https://ift.tt/yxBnqdE

Comments

Popular posts from this blog

Difference between Web Designer and Web Developer Neeraj Mishra The Crazy Programmer

Have you ever wondered about the distinctions between web developers’ and web designers’ duties and obligations? You’re not alone! Many people have trouble distinguishing between these two. Although they collaborate to publish new websites on the internet, web developers and web designers play very different roles. To put these job possibilities into perspective, consider the construction of a house. To create a vision for the house, including the visual components, the space planning and layout, the materials, and the overall appearance and sense of the space, you need an architect. That said, to translate an idea into a building, you need construction professionals to take those architectural drawings and put them into practice. Image Source In a similar vein, web development and design work together to create websites. Let’s examine the major responsibilities and distinctions between web developers and web designers. Let’s get going, shall we? What Does a Web Designer Do?

A guide to data integration tools

CData Software is a leader in data access and connectivity solutions. It specializes in the development of data drivers and data access technologies for real-time access to online or on-premise applications, databases and web APIs. The company is focused on bringing data connectivity capabilities natively into tools organizations already use. It also features ETL/ELT solutions, enterprise connectors, and data visualization. Matillion ’s data transformation software empowers customers to extract data from a wide number of sources, load it into their chosen cloud data warehouse (CDW) and transform that data from its siloed source state, into analytics-ready insights – prepared for advanced analytics, machine learning, and artificial intelligence use cases. Only Matillion is purpose-built for Snowflake, Amazon Redshift, Google BigQuery, and Microsoft Azure, enabling businesses to achieve new levels of simplicity, speed, scale, and savings. Trusted by companies of all sizes to meet

2022: The year of hybrid work

Remote work was once considered a luxury to many, but in 2020, it became a necessity for a large portion of the workforce, as the scary and unknown COVID-19 virus sickened and even took the lives of so many people around the world.  Some workers were able to thrive in a remote setting, while others felt isolated and struggled to keep up a balance between their work and home lives. Last year saw the availability of life-saving vaccines, so companies were able to start having the conversation about what to do next. Should they keep everyone remote? Should they go back to working in the office full time? Or should they do something in between? Enter hybrid work, which offers a mix of the two. A Fall 2021 study conducted by Google revealed that over 75% of survey respondents expect hybrid work to become a standard practice within their organization within the next three years.  Thus, two years after the world abruptly shifted to widespread adoption of remote work, we are declaring 20