According to Wikipedia, Code refactoring is the process of restructuring the existing computer code without changing its external behavior.
In other words, I say : Poor code with possibilities of biting you in the future and fixing at that time.
Few days back I was checking and wondered by seeing my code of past years. I must say with time our methodology of writing software and producing code increases significantly and if it doesn’t, it means we are at some wrong place.
So, should we allow refactoring in our code or not? Yes, it’s a tricky question and there is an answer yes and no depends on the situation.
But from the perspective of a hard-core developer, programmer it should never be allowed. Why should allow chance to revisit our code and make it correct? What ever code you write at first time, it should be there all the time till the life of an application.
Let me go along the way of possibility of code refactoring.
At entry level programming
Most of entry level programmer comes and try their expertise for producing an application. I must admit here that, they might not have gone through good or bad experience of writing any software system before they join any real software producing organizations. At this time, it is much much necessary that, they should go through the process of writing a good code, their code should be evaluated at regular time interval.
They can improve their code quality by getting feedback and writing accordingly. At this level, it’s a very common thing of leaving things behind as it comes and see it when it comes again. This attitude should not be developed onto them, this is a very dangerous to them and organizations, hired them.
Early Go to Market
It’s also seen a very common that many experienced programmers tend to wrap things, as they can to get Go to market plan. I know after all business markets are all for a software application and it should be in the market in time, but not with cost of code quality. It demotivate programmers and it may put a negative impact in programmers and management.
We all have one tendency of showing our work to other people and make our label onto them. During these hurry, we miss out checking quality. This is evitable if we don’t become impatient.
There are many points could be listed out here, I have listed out a few of the major from my perspective. I hope this will helpful to you, identifying writing an application without chance of refactoring. Why should we not able to write code that last ever or till the end of an application? I am sure, we can but if we want to.
Please feel free to share your suggestions on this topic.
Happy quality coding!!