Skip navigation

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).
Advertisements

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.


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: