Home > Refactoring > What Refactoring Is and What It Isn’t

What Refactoring Is and What It Isn’t


Today I found an article in Java Code Geeks written by Jim Bird through DZone posted by Swizec Teller. It really says what are in my mind. So here is my two cents supporting the post.

First of all thanks to Jim Bird a lot for the great post! Definitely there are big differences between changing as part of refactoring and changing for other purposes. Throughout the life of development of a system, developers incorporate many changes in code base. But not every changes are refactoring. They fix bugs, optimize performance, simplify error handing or even may replace some erroneous codes with some defensive codes. These are not refactoring.

So never call you are doing refactoring when you are doing these things and don’t forget that it is your duty as a developer to incorporate new changes, fixing existing logics and remember don’t blame others.

Remember what is meant by refactoring:

“Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure. It is a disciplined way to clean up code that minimizes the chances of introducing bugs. In essence when you refactor you are improving the design of the code after it has been written.” – Martin Fowler

Most importantly, don’t do refactoring just for refactoring or simply which doesn’t make any visible progress. Refactor before you make changes in code to make it more understandable, easier or safer for the new changes or after changing done to make it more structured or readable to you and others.

Also there is a big difference between inline refactoring and large scale refactoring. In that post Jim Bird beautifully mentioned many points that we should remember. I want to add some additional points for large scale refactoring.

The whole team should agree on the big refactiong that is on going that they need it and the time is ok. As these refactorings may need weeks or even months to complete, every day you should have a little faith that you are saving your world.

Practices like Branch by Abstraction (original entry of this technique) come in to play to help you manage changes inside the code over a long period of time.

Read more: http://www.javacodegeeks.com/2012/04/what-refactoring-is-and-what-it-isnt.html

Advertisements
Categories: Refactoring Tags:
  1. April 8, 2016 at 1:37 pm

    Hva er reglene for u00e5 leie en film og vise den pu00e5 et tilsvarende sted i Norge? Er det noen regler? Click https://twitter.com/moooker1

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: