
Today, I would like to talk about anti-patterns that everyone uses unconsciously from time to time to solve problems, which can lead to bigger problems than the ones initially had. The software development process is principally based on transferring a real-life situation to the computer environment. Transferring these situations to the computer environment is actually “the problem” we need to solve. For this end, we should design our code by thinking deeply. That is to say, software development primarily tries to solve a problem. Many solutions can be produced for these problems. But sometimes, by focusing too much on the solution, we can miss the problem and produce solutions that do not fit it exactly. Although these solutions seem correct and solve our problem at first glance, they can lead to bigger ones than they can solve.
During this problem-solving process, it is most important to understand the problem in detail and tackle it from every angle. Because not understanding the problem well can create problems that are not entirely correct and lead to higher costs. To put it simply, approaches that seem to solve the problem but do not in reality and cause more costly problems are called anti-patterns. A pattern that is accepted by the software community and known by many developers may not be suitable for the problem at hand and may have more downsides than benefits. So, this pattern becomes an anti-pattern for our problem.
Although anti-patterns are grouped differently in different sources, we can fundamentally divide them into three categories: Software Development Anti-Patterns, Software Architecture Anti-Patterns and Project Management Anti-Patterns. I’m going to discuss anti-patterns more from a software-based perspective, but the logical conclusions that can be drawn from here actually emphasize similar principles on both the project management and software sides.
We’ve covered what an anti-pattern is, so now let’s talk about how to avoid it. In general, there are many anti-patterns and there are different ways to avoid them. But we can draw a general framework and come up with an approach to prevent these issues from occurring.
As I mentioned above, I believe the most important point lies in understanding the problem. When we examine the problem thoroughly in all its aspects, we avoid approaches that will not be good for our problem as much as possible.
When talking about software development anti-patterns, it’s vital to remember the SOLID principles and always act in accordance with them during development.
Another point that we should not ignore while developing our software is that it should be highly cohesive and loosely coupled. If we develop software with these two approaches in mind, we will avoid anti-patterns as much as possible.
The advancement in software is growing day by day; new approaches, concepts and technologies are brought to the software world constantly. In addition to these, our software also must adapt to this process and evolve. For this reason, our software, which we have developed in reference to the conditions of the moment, should be designed to keep up with the innovations that may come tomorrow. Approaching our software development this way will help us avoid anti-patterns.
Now, I am going to briefly touch on a couple of anti-patterns.
Golden Hammer
One of the most widespread anti-patterns in the industry is the golden hammer anti-pattern. One might believe that a solution which worked well for previous problems will also be effective for new challenges we encounter. But this is not always the case. Software structures are often complex and have many aspects. There may be businesses and structures that affect each other. Although the new challenge may resemble previous issues that we’ve resolved using our tools at hand, there may be differences in many parameters, such as conditions and demands, that create the new problem. Therefore, it is important to analyze our problem well. On the other hand, the software world is constantly renewing, developing and evolving. Solutions that seem good according to yesterday’s conditions may not be good solutions for tomorrow’s problems in this developing and evolving world.
Symptoms
The instruments used in the architecture of the system are a set of technologies or belong to a single vendor.
The software development team cannot meet certain requests because they are too dependent on existing tools that cannot meet the needs of the project.
The software development team is failing to research new application development approaches and technologies and is unaware of new technologies.
Developers become isolated from the industry. They show a lack of knowledge and experience with alternative solutions and technologies that could better address the current needs.
Comments & Discussion
Comments powered by GitHub Discussions. If comments don't load, please ensure:
You can also comment directly on GitHub Discussions