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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With