리팩토링
정의
리팩토링이란:
Refactoring is the process of changing a software system in a way that does not alter the external behavior of the code yet improves its internal structure. It is a disciplined way to clean up code that minimizes the changes of introducing bugs. In essence, when you refactor, you are improving the design of the code after it has been written.1
명사와 동사:
- Noun: a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.1
- Verb: to restructure software by applying a series of refactorings without changing its observable behavior.1
한편, “external behavior” 또는 “observable behavior”란?
I use the phrase “observable behavior.” This is a deliberately loose term, indicating that the code should, overall, do just the same things it did before I started. It doesn’t mean it will work exactly the same—for example, Extract function will alter the call stack, so performance characteristics might change—but nothing should change that the user should care about.1
Lean software development
LSD의 원칙 중 하나인 Build integrity in의 도구.
Engineers start with something that works, learn from its weaknesses, and improve the design. Improvement comes not just from meeting customer demands or adding features; improvements are also necessary because complex systems have effects that are not well understood at design time. Suboptimal choices are an intrinsic part of the process of engineering complex designs in the real world. It is not reasonable to expect a flawless design that anticipates all likely contingencies and cascading effects of simple changes. Design researcher Donald Norman notes that it takes five or six attempts to really get a product right (see The design of everyday things). —p140, Chapter 6, Lean software development (book)