Code refactoring means spring cleaning existing code. It usually implies changing the way the code is expressed without modifying what it does.

A refactor could improve code readability, reduce complexity, increase mainanability, etc.

A simple example could be improving the expressiveness of code by renaming variables. Silly example below:

# Original code
class Rm
  def initialize (n, a, v)
    @n = n.to_i
    @a = a
    @v = v
# Refactored code
class Room
  def initialize (no_of_windows, floor_area, volume)
    @no_of_windows = no_of_windows
    @floor_area = floor_area
    @volume = volume
end # aah, much better

Uncategorized LinksEdit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.