How to manage essential and accidental software complexity in development

How to manage essential and accidental software complexity in development

software complexity

Share on

In the sea of software possibilities and new requirements, user needs are becoming harder and harder to fulfill without introducing some complexity. Behind every friendly user interface is a web of expertly crafted code. But that code didn’t come alive without processes and certain software complexity, to begin with. 

We can, of course, expect some complications and obstacles in software development, but some things remain unpredictable. Often, developers, themselves create circumstantial issues and problems, on purpose or by accident.

Essential and accidental complexity

The complexity comes in different forms, depending on their origin. It can be essential or accidental. Even though each is somewhat self-explanatory, we’ll cover each to distinguish them.

Essential complexity

Each software requirement is there to solve a problem. And each problem belongs to a certain business domain. Essential complexity is the nature of that problem and it’s there no matter the solution. Basically, it’s the complexity of the stated problem, how hard it is to do something, no matter the approach, and it cannot be avoided. 

Complexity is determined depending on the user or business the software is being developed for. It can be minimal or it can prove to be challenging.

Accidental complexity

This type of complexity is introduced into the software design by accident. It is caused by the lack of proper understanding, education, training, or bad communication. It doesn’t derive from business domain complexity like essential, but it is rather caused by developers themselves. Accidental complexity results in bad or overly complex code, poor or complicated software design, and architecture, or unneeded features. You can resolve it with proper onboarding, training, and education. 
Accidental complexity can be solved by simplification, whereas essential cannot. You can’t remove a feature or requirement just to make your job easier, because the software itself will lose parts of its functionality, value, or purpose.

Why does accidental complexity happen?

Often, under time pressure or taken by the new technology shine, developers rush things or try innovations thinking it will quickly garner results. They have certain outlooks and coding processes that don’t always align with best practices or what’s most optimal for the project. There isn’t a conclusive plan for the long run, just the immediate approach to solving the tasks without necessarily keeping repercussions in mind. 

A lot of developers have encountered such scenarios, especially with the tech stack. In comes a new technology that promises quick results. But oftentimes, keeping to what you know, even if it takes more time, is more sustainable and suitable to the project at hand. All the glitz and glamour of new technology can be deceiving and blinding. A new tech stack can come with dependencies and other issues. 

Another issue arises when developers don’t understand the full scope of the projects or if requirements weren’t communicated properly to them. That’s how they implement features or practices that don’t align with the project.

You can’t win them all, but you can try

We already established that essential complexity can’t be eradicated since it’s closely connected to the business domain and user problems. You can only change your approach to the problem or discuss with the client some of the requirements and specifications.
But what you can do, is to try and eliminate the accidental complexity. To deliver quality code and superb software, you can not overcomplicate just because you can. You want to, at all costs, try to avoid creating bugs and technical debt.

So, what can you do to minimize software complexity?

There are some things you can do to avoid software complexity even though it wasn’t made intentionally. First things first, it always starts with the end user, and understanding him is your basis to keep it simple.

Keep to user needs, and avoid gold plating

Keep in mind that the user wants to perform tasks as easily as he can. Although the business domain or problem may be complex, the solution has to be simple. As a developer, you might get tempted to add features or functionalities that the client hasn’t requested. In this case, avoid gold plating. If it’s not in the project scope, don’t unnecessarily add more things just because you either want to show off or exceed the client’s expectations. This way you bring on more complexity and more code that isn’t actually required.

Understand user behavior and adapt the design to it

One of the biggest mistakes is starting the project wrong because you didn’t take the time to try to understand the user. User stories are important and knowing how the user will behave while using the software is essential in design. Without proper design, you can’t develop software adapted to the end user.

Keep the code simple and clean when you can

Apply the DRY principle as much as you can. Keeping the code clean means that other developers can come onto the project and easily understand it or fix it if must be. It’s also easier to fix bugs and do code reviews.

Develop and communicate best coding practices

This one doesn’t fall solely on developers but on the organization itself. Internally, teams should be on the same page about the best approach and practices when coding. Before and during development, there should be meetings to discuss the best approaches and courses of action. Having set in rules and everyone chipping in on what’s best to do is a good thing to ensure quality development and quality software.

Let the process be transparent

It isn’t always the fault of the software itself. Complexity can arise from unorganized and untransparent processes in development. From requirements elicitation to release, each step can carry organizational, communicational, and managerial issues. Even the smallest link in the cycle can affect complexity. Imagine the damage an improperly communicated requirement is going to cause. Or team instability and incoordination.

How to manage complexity since you can’t really kill it?

Try and fail. As a young developer, you won’t know everything. Even a senior is not almighty. But with experience and trying and failing, you will develop skills to recognize what works and what doesn’t. You’ll see what will cause a headache in the future and what will be a breeze for you. There is no such thing as a perfect simple code on the first try, or at least it’s not as easy to do it. But having certain procedures and practices in place could help tremendously. 

You have to feel the burn of mistakes on your flesh eventually. Sometimes, issues from duplications, bad code, and similar have to happen for you to learn. How else will you know if what you’re doing is wrong or right if you haven’t experienced it before? 
Besides the above-mentioned tips on how to handle complexity, you just got to learn and absorb everything like a sponge. In software development, no man is an island. Yes, responsibilities are divided across your team, but you are there to advise and steer each other in the right direction. Learn from more experienced team members and try to avoid mistakes they made in the past.

Is complexity going to decrease with technological advances?

The answer to this question is probably a “no”. Why is that? Well, new technologies do rapidly grow and they do make some jobs easier. But, software is starting to demand more and more in terms of performance and problem-solving. The scale of some projects is so big that they invite complexity. 

User needs are ever expanding and staying one step ahead can be demanding. That’s why there are plenty of individuals working on a single project, which invites another dimension of complexity as well. They have to work as one cohesive unit to anticipate and fulfill every need. This is not seen only in software for commercial users, but enterprise-level software as well. The more complex domain and requirements, the bigger the chance to encounter accidental complexity. 

What can be expected or unexpected?

Well, there is no way around some of the complexity in software development. It’s always going to be there no matter the technology and no matter the user or business needs. The rise of online presence and digitalization will invite new innovations and new demands. It’s going to be up to evolving expertise of software developers and organizational and managerial skills to keep up and minimize any surfacing complexity.

More from our updates:

Our Work

Explore our recent work

Services

Explore what we offer

info@deegloo.com | Zadarska 80, 
1000 Zagreb, Croatia

© Deegloo. All rights reserved 2022.