Refactoring & Version Control Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Give examples of version control systems

A

git, mercurial, svn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the benefits of implementing a version control system

A

Ability to track changes made by developers
Roll back commits
Allows multiple developers to produce for software in parallel
Avoids lost updates and overwritees

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the features of a VCS

A
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is refactoring

A

The process of improving code through analysis and the restructuring of code through simplification

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the refactoring process

A

test existing code
apply refactoring
re-test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does refactoring achieve

A

better use of OO techniques
breaking down large methods
grouping related data and methods into class structures
allows for code reuse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are some of the refactoring methods

A

extract method

inline temp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are code smells

A

potential problems in code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name indicators of “smelly” code

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly