Refactoring & Version Control Flashcards
Give examples of version control systems
git, mercurial, svn
What are the benefits of implementing a version control system
Ability to track changes made by developers
Roll back commits
Allows multiple developers to produce for software in parallel
Avoids lost updates and overwritees
What are the features of a VCS
Files stored in central repository Files checked out to local machine Send updated files to repository Highlight changes to files maintains states for regression maintains a log of changes and updates
What is refactoring
The process of improving code through analysis and the restructuring of code through simplification
Describe the refactoring process
test existing code
apply refactoring
re-test
What does refactoring achieve
better use of OO techniques
breaking down large methods
grouping related data and methods into class structures
allows for code reuse
What are some of the refactoring methods
extract method
inline temp
What are code smells
potential problems in code
Name indicators of “smelly” code
duplicated code
long methods
large classes
feature envy where a class uses methods of another class
Refused bequest where a class overrides a base method using a method that is not related to the original
Contrived complexity