Zhala Sarkawt
Zhala Sarkawt

Reputation: 11

What are the advantages and disadvantages of refactoring code smell in software quality?

What are the advantages and disadvantages of refactoring code smell in software quality?

Upvotes: 0

Views: 5728

Answers (2)

Mohammed Igbal
Mohammed Igbal

Reputation: 11

Advantages: 1. Refactoring is a really good weapon to maintain the code 2. It's interesting thing to do whether part of current task or as a separate task 3. Make the code clean and organized 4. Help to follow principles like SOLID, GRASP, etc

Disadvantages: 1. It's risky when the application is big 2. It's risky when the existing code doesn't have proper test cases 3. It's risky when developers do not understand what's all about

Upvotes: 0

Md. Masudur Rahman
Md. Masudur Rahman

Reputation: 1078

Although refactoring does not add features or functionalities in a software system, it is sharp weapon for developers in their maintenance activities. It makes a software system easier to understand and cheaper to modify without changing its observable behavior by changing its internal structure.

The purposes of refactoring according to Martin Fowler (Father of Code Smell) are stated in the following:

  1. Refactoring Improves the Design of Software
  2. Refactoring Makes Software Easier to Understand
  3. Refactoring Helps Finding Bugs
  4. Refactoring Helps Programming Faster

Specially for long-term software, it is essential to refactor the code in order to make the software more adaptive. However, you definitely do not perform refactoring tasks, if it exceeds your budget and time. In essence, stop refactoring when you -

  1. Run out of money
  2. Run out of time

Upvotes: 3

Related Questions