• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is Code factoring?

 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 45
What of the following help code reuse.
1) Use of javadoc comments
2) Code factoring
3) Source version control system
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code factoring has to do with the separation of responsibilities in code. Properly factored code has high cohesiveness and minimized coupling (as much as possible for the situation). This makes code more reusable because it is less dependent on other modules within the application and is generally more abstracted to its specific task.
I would also argue that the inclusion of good documentation (ie the javadoc answer) would lead to more reusable code.
The act of going back and making your existing code better by factoring is known as Refactoring. There is a terrific book on this subject by Martin Fowler(the man).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic