Refactor your code

By Eugenia Pérez | 12 May, 2013

Everyone can write code than can be understood by a machine, but not everyone can write code that can be understood by another human.

In the daily routine of a software developer, is as usual taking part in new developments as maintaining legacy systems. That is why it is very important to ensure that our code is as easy as possible to be read, understood and extended. And in this context refactoring has a key importance.

Refactoring is about improving the quality of our code and it is a task that needs to be applied as a part of deeper process. In this process, the developer usually follows this approach:

  • Writing the code that solves the problem we are facing.
  • Testing the code using automation tests (unit tests, integration tests, etc).
  • Refactor our code ensuring that the tests still pass.

In the previous process, having tests covering our code is a must. Why? Because it is the best way to ensure that the refactoring we are applying has not introduced new bugs in our code.

To read more about refactoring, there is a brilliant book by Martin Fowler. Your can find it here:
http://www.amazon.co.uk/Refactoring-Improving-Design-Existing-Technology/dp/0201485672/ref=sr_1_1?ie=UTF8&qid=1368304237&sr=8-1&keywords=refactoring

Dude, the execution path of this company is as confusing as the script of a soap opera. Yes, maybe it is about time to do some refactoring Jose Armando de los Angeles ;) .

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Leave a Reply

Your email address will not be published.