Refactoring
Rewriting something so that it is written differently, but ultimately “means” the same thing. E.g. in Math, you can refactor x + xy to x( 1 + y ). These two statements (x+xy) and (x(1+y)) mean exactly the same thing mathematically, but they’re just written differently. e.g. 2 in programming, refactor is used more loosely. You can refactor a bunch of code which means you rewrite the code to do the same intended thing, but in a better way (more efficiently, or with more adherence to OOP principles, or rewrite it to remove bugs).

One Comment

  1. Rewriting code to remove bugs isn’t refactoring because you’ve changed what the code does. Fixing bugs is fixing bugs, not refactoring. Refactoring doesn’t change the meaning of the code. There are some who claim that performance improvements are not refactoring either because you’ve changed the observed behavior. I don’t agree with that because the results are the same, you just got the results in a more efficient manner.


Post a Comment