If requirements are changing often and you want to distribute your code in time, then what is the best solution being spaghetti ?
What is your definition of spaghetti code? For me, spaghetti code is a very long, unstructured and chaotic method / function. This is not due to changing requirements, but due to the laziness of the developers. If you have to rewrite a method because things have changed, then you can clear it straight away without any upper part.
If you mean a badly designed object structure instead, then you may be right. If requirements change very quickly, you will easily end up with those classes which no longer have the purpose, bad object hierarchy, and the like for them.
There are some tips to avoid this:
-
Do not overdose in the beginning
-
Required After the change, do not start applying it correctly, take it, take a step back and see if your code structure can be changed before it fits into a new feature.
-
Contact your customer, that requires some time for the change. If you know that they know that changing the requirement also means a change in the structure of your code, So you will have less pressure to squeeze your code into existing structures.
-
Always Refactor Coding In my experience, small methods like reducing the number of redundant codes in the same method or class from many places, are most effective to keep your code clean. I always keep looking for code in error and to make them work easier as soon as possible Remove as soon as possible. It takes some experience, but now it's the right time to start training: -)
-
As Crosnwald said, to protect it, test cases in its code Protected by adding to the fear of big changes after working on a large heritage system, I know this fear and feel like working without security. When you work for the first time for your safety, it becomes less than a courage to make the necessary changes.
Comments
Post a Comment