200-901 · Question #329
Why would a developer compare a current version of code to a previous version?
The correct answer is B. to troubleshoot code failures. Comparing a current version of code to a previous version (diffing) is primarily used to troubleshoot failures. By identifying exactly what lines changed between a working version and a broken version, a developer can isolate the root cause of the failure. While version control…
Question
Why would a developer compare a current version of code to a previous version?
Options
- Ato provide the single source of truth
- Bto troubleshoot code failures
- Cto track who made a change
- Dto aid in collaboration
How the community answered
(55 responses)- A7% (4)
- B87% (48)
- C2% (1)
- D4% (2)
Explanation
Comparing a current version of code to a previous version (diffing) is primarily used to troubleshoot failures. By identifying exactly what lines changed between a working version and a broken version, a developer can isolate the root cause of the failure. While version control does provide a single source of truth (A), that is a characteristic of the VCS system itself, not the act of comparing versions. Tracking who made a change (C) is done via git blame or commit history, not version comparison. Aiding collaboration (D) is a general benefit of version control, not specific to comparing versions.
Topics
Community Discussion
No community discussion yet for this question.