Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When do I need to stop using design patterns?

My colleagues are going crazy because I keep on wanting to rewrite code that already works, because I would like to replace some legacy design with design patterns. Although I feel like it will help improving the existing code, I do feel like I am getting a little paranoid about it and try to use them everywhere and even replacing one design pattern with another. Some of my colleagues say that so long as the legacy code works, leave it alone.

When should I stop using them? Where do you draw the line between code that needs to be replaced by a better design and the one that needs to not be touched?

like image 314
ak3nat0n Avatar asked Aug 18 '09 18:08

ak3nat0n


People also ask

When should design patterns not be used?

In what scenarios we should not use Design Patterns ? When the software is being designed and it would not change with time and new requirements. When the requirements of the source code of a particular application are unique and same.

Is design patterns still relevant?

Quick answer: yes. Especially when you're at the beginning of your journey, design patterns are a good starting point. Even if you won't use them right away in your first projects, getting to know them will help you understand the existing solutions you're using. Complex solutions are made of patterns.

What are the disadvantages of design patterns?

Disadvantages. Using design patterns requires extensive knowledge. Having design patterns available can also lead to people believing that apparently all problems can be solved using existing design patterns. In short, this can limit creativity and the desire to find new (better) solutions.

Do you need design patterns?

Why use a design pattern? The usefulness of using a design pattern is obvious. The design pattern can accelerate the development process. It provides proven development paradigms, which helps save time without having to reinvent patterns every time a problem arises.


1 Answers

If the code is working, and doesn't need attention - don't spend time/money updating it. Not until it is fiscally-necessary to do so. Just make sure all of your new code is excellent, and slowly erase this issue from now on.

like image 183
Sampson Avatar answered Sep 19 '22 21:09

Sampson