Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stable System Vs Better Design

In may Daily Job i come across this Dilemma :

"Stable System Vs Better Design"

In routine job when i am fixing some module, When i see bad design

-> Badly written code

-> Badly Written Algorithm

-> Optimization possible

I would prefer to fix these also along with issue i am fixing

But many people opposes my changes a few supports, People who opposes will say

"You should be business oriented if system is stable, If you change some thing may cause regression, Hence do not favor business"

some time :

you will see your own written code after 6 months, Always you will see some improvment opportunity in this

While who support will say:

This is continual improvement and system will be more stable

So i would like to know what you people think

like image 584
Satbir Avatar asked Dec 01 '22 07:12

Satbir


2 Answers

If applicable, write a unit test (or several, to cover edge cases). This gives you the confidence to refactor and know that you haven't broken anything.

Of course, if the code is tightly coupled (or spaghetti!), that's going to be a problem.

like image 100
Mitch Wheat Avatar answered Dec 04 '22 08:12

Mitch Wheat


If it ain't broken don't fix it - wrap it. Isolate the modules as much as you can without changing its implementation; they should be touched (fixed, improved) when / if a real need arises.

like image 25
Otávio Décio Avatar answered Dec 04 '22 09:12

Otávio Décio