Small thought on Refactoring

In the first courses of Computer Science we are taught that programming is nothing more than giving instructions to the computer. Unlike other disciplines, where instructions are given to other people and can take a long time to be executed, programming is an almost magical process where what we indicate is done immediately without question and without the need for others (relatively). However this means that unlike other disciplines in software the final result depends exclusively on the quality of the instructions we give through the code we write and that is the main reason why all the activities that seek to improve our code must be a priority in the industry. Among the latter, Refactoring is undoubtedly one of the most popular.

More than a goal, Refactoring is a process through which we change the internal structure of existing software without changing its apparent behavior. There is a lot of bibliography that exists on the subject, but perhaps the most popular source is the book “Refactoring” published in 1999 by Martin Fowler and Kent Beck, here they talk about already existing patterns to speed up this practice such as elimination of unnecessary code, renaming of variables and methods to give them more meaning, breaking complex conditional statements down, etc. In short, all of the refactoring techniques advocate the same unique principle that Dave Thomas and Andrew Hunt mention in The Pragmatic Programmer: making code easier to change.

Leave a comment