Version Control Flashcards

1
Q

What is version control?

A

Version control is a system that records all changes and modifications to files for tracking purposes. It allows developers to revert or roll back to a previous state or point in time.`

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

What are other terms used to refer to version control?

A

Developers also use the terms “source control” or “source code management.”

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

What is the primary goal of a version control system?

A

The primary goal of any version control system is to keep track of changes and allow developers to access the entire change history.

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

What types of changes can be tracked by a version control system?

A

Adding new files, modifying or updating files, and deleting files.

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

How does version control help with identity tracking?

A

Version control records the identity of the user responsible for adding or changing a record, providing accountability for changes.

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

What are some benefits of version control for developers?

A

Revision history, identity tracking, collaboration, automation, and efficiency.

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

What is revision history in version control?

A

Revision history is a record of all changes in a project, allowing developers to revert to a stable point in time if issues arise.

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

How does version control provide a safety net in word processing applications?

A

Word processing applications use auto-saving to create restoration points, allowing users to revert to a previous version of the document if needed.

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

What is a peer review in the context of version control?

A

A process where developers on a team review each other’s code and provide feedback before the code is finalized.

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

How does version control aid in DevOps?

A

Version control plays an integral role in DevOps by tracking changes and aiding in the quality release and deployment of software.

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

What is an iteration in the agile methodology?

A

In the agile methodology, an iteration is a two-week period in which a team plans and completes a list of tasks.

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

How does version control contribute to efficiency in development teams?

A

Version control allows teams to submit code, track changes, and ensure that new features won’t break existing functionality, which aids in team efficiency.

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

What is the role of automation in version control systems?

A

Automation helps ensure that every new task or feature introduced does not break existing flows, increasing team efficiency and confidence.

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

How is Meta’s approach to project management different from other companies?

A

At Meta, engineers are in charge of projects, while at other companies, product managers or leadership are often in charge of each project.

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

What is unique about version control at Meta?

A

Meta has a giant monolithic repository for all back-end code, shared by every Instagram team, where any engineer can make improvements.

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

What is Meta’s stance on responsibility for code?

A

Meta has a saying that “nothing at Meta is someone else’s problem,” meaning any engineer can work on anything they want to.

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

How does version control at Meta differ from other companies?

A

Meta uses a monolithic repository, while many companies use smaller repositories (micro-services) for each team.

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

Why doesn’t Meta use branches for each team?

A

With so many engineers, using branches would cause too many merge conflicts.

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

What is a challenge of using a monolithic repository at Meta?

A

Merge conflicts happen often, so they try to write smaller changes and add gatekeepers to easily revert changes if necessary.

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

Why is collaboration critical for success at Meta?

A

Effective collaboration helps in building better products by getting diverse perspectives on what features to build and how to improve them.

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

How does Meta ensure that Instagram and Messenger calling don’t interfere with each other?

A

They add a lot of tests to make sure Messenger doesn’t break Instagram and vice versa.

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

What is git blame and why is it useful?

A

GIT BLAME is a tool that allows you to see who wrote a specific line of code. It helps to understand the context of the code and identify who to contact for more information.

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

How does version control help at Meta?

A

It helps with tracking changes, reverting code if necessary, and allowing engineers to collaborate by making improvements across the codebase.

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

What problem does version control help solve when multiple developers are working in the same codebase?

A

Version control helps keep track of updates and changes from multiple developers working on the same codebase, preventing issues like overwriting each other’s work.

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

What are the two main types of version control systems?

A

Centralized Version Control Systems (CVCS) and Distributed Version Control Systems (DVCS).

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

What is a centralized version control system (CVCS)?

A

In CVCS, there is a central server that holds the full history of changes. Developers pull code from this server and must push their changes back to it for others to see.

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

In a centralized version control system, where is the full history of the code stored?

A

The full history of the code is stored on a central server.

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

What is an advantage of a centralized version control system (CVCS)?

A

CVCS is generally easier to learn than distributed systems and provides more control over user access.

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

Name some examples of version control systems.

A

Examples include Subversion, Perforce, AWS Code Commit, Mercurial, and Git.

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

What is a key advantage of a distributed version control system (DVCS)?

A

In DVCS, you don’t need to be connected to the server to add changes or view a file’s history, allowing offline work and better speed and performance.

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

What is the key difference between centralized and distributed version control systems?

A

In a centralized system, only the server holds the full history, and users are clients. In a distributed system, every user has a full copy of the codebase and history, making each user essentially a server.

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

What is a distributed version control system (DVCS)?

A

In DVCS, every user has a full copy of the codebase, including the entire history of changes. Users don’t need a constant connection to a central server to perform most tasks.

24
Q

What is a disadvantage of a centralized version control system?

A

A disadvantage of CVCS is that users need a connection to the server to perform any actions, which can make the system slower.

25
Q

What role does DVCS play in software development?

A

DVCS helps improve developer operations and enhances the software development life cycle by allowing faster performance and offline work.

26
Q

Why might DVCS be faster than CVCS?

A

DVCS allows users to perform most tasks locally without needing a constant connection to a server, which improves speed and performance.

27
Q

What does Version Control System (VCS) do in software development?

A

A Version Control System (VCS) records changes to a file or set of files over time, allowing developers to manage changes and track who made each change.

27
Q

When were version control systems first created?

A

Version control systems were first created in the 1980s, before the Internet.

27
Q

When do you need to connect to the server in a distributed version control system?

A

You only need to connect to the server to pull the latest changes or push your own changes.

28
Q

What was one of the first significant Version Control Systems?

A

Concurrent Versions System (CVS), developed in 1986 by Walter F. Tichy.

29
Q

What information does CVS store?

A

CVS stores information about every file in a folder structure, including the name, location, who modified it, and when it was last modified. It also stores information about folders.

30
Q

What were the flaws of CVS?

A

CVS did not include integrity checks, so data could become corrupted. It also mainly supported text files, not binary files like images or videos.

31
Q

What was the main successor to CVS?

A

The main successor to CVS was Subversion (SVN).

31
Q

What led to the creation of the Mercurial and Git projects?

A

In 2005, the free license for BitKeeper was revoked, leading to the creation of Mercurial and Git.

32
Q

How did Subversion improve on CVS?

A

Subversion improved on CVS by adding integrity checks and better supporting versioning of binary files.

32
Q

What are the two distributed version control systems developed in response to Linux kernel development?

A

Mercurial and Git.

32
Q

Who developed Mercurial?

A

Olivia Mackall

32
Q

What type of model did Subversion use?

A

Subversion used a centralized VCS model, where all operations had to be done using a centralized server.

33
Q

What made Mercurial popular?

A

Mercurial became popular because it was easy to transition from Subversion and had a small learning curve. Many platforms offered free Mercurial hosting.

33
Q

What is an example of a conflict that can occur without a proper workflow in Version Control?

A

A conflict can occur when two developers edit the same file simultaneously and try to submit their changes at the same time. A good workflow will have a process for resolving these conflicts.

33
Q

What was the proprietary VCS used by Linux before Mercurial and Git?

A

The proprietary VCS used by Linux was called BitKeeper.

33
Q

Who developed Git?

A

Linus Torvalds developed Git to host the Linux kernel’s source code.

33
Q

Why is a peer review system important when a new junior developer joins a team?

A

A peer review system ensures that another developer reviews the junior developer’s code before merging, preventing mistakes, especially in critical systems.

34
Q

What happens if Version Control is used without a proper workflow?

A

Using Version Control without a proper workflow is like building a city without traffic lights; it can lead to chaos, including conflicts and mistakes.

34
Q

What made Git popular in the open-source community?

A

Git’s popularity in the open-source community grew due to its distributed VCS design and GitHub offering free Git hosting for open-source projects.

34
Q

What is Continuous Integration (CI)?

A

Continuous Integration is a process that automates the integration of code changes from multiple developers, merging small changes frequently to reduce merge conflicts and ensure stability.

35
Q

How does Continuous Integration help in software development?

A

CI ensures that code is frequently compiled and tested automatically, reducing the chances of regression and keeping the build stable.

36
Q

What is Continuous Delivery?

A

Continuous Delivery is an extension of Continuous Integration that automatically packages the application and prepares it for deployment after changes are merged into the main stream.

37
Q

What is the main goal of Continuous Deployment?

A

The goal of Continuous Deployment is to automatically deploy validated software changes to a live (production) environment for customers to use.

38
Q

What is the key difference between Continuous Delivery and Continuous Deployment?

A

Continuous Delivery packages the application for deployment, while Continuous Deployment automatically deploys the application to a live environment.

38
Q

What are some benefits of using Continuous Delivery?

A

Continuous Delivery helps avoid human error when packaging applications and ensures that software is always ready for deployment.

39
Q

What is a “source of truth” in a codebase?

A

A “source of truth” refers to a version control system that holds all historical changes of the codebase, providing a full history of every file added to the repository.

40
Q

How does a version control system aid team collaboration?

A

Version control makes collaboration easier by providing access to the full history of changes, which allows teams to follow the flow of features and identify potential issues.

40
Q

What three essential data points does revision history capture?

A

WHO made the change, WHEN the change occurred, and WHAT was changed.

41
Q

Why is it important for developers to communicate changes clearly?

A

Clear communication of changes fosters a transparent team environment, where all developers understand the lead developers’ aims and can collaborate more effectively.

42
Q

What is a “pull request”?

A

A pull request is a process where a developer submits changes to a repository for peer review, allowing other developers to approve, request changes, or decline the changes.

42
Q

What are some areas that benefit from staging environments?

A

Staging environments benefit new features, testing, migrations, and configuration changes.

42
Q

What is the role of peer review in a version control workflow?

A

Peer review ensures that changes are reviewed by other developers before they are merged into the codebase, helping catch potential issues or conflicts early.

42
Q

How does revision history help when resolving coding conflicts?

A

Revision history shows the full life cycle of changes, which aids developers in resolving conflicts by identifying who made changes, when, and why.

42
Q

Why is it important for the staging environment to closely match the production environment?

A

The closer the staging environment is to production, the more accurate the testing will be, which helps teams identify potential issues before they reach production.

42
Q

What is a migration, and why is staging important for it?

A

A migration involves moving data or software changes, and staging is important because it allows teams to test migrations without affecting production.

43
Q

What is the primary purpose of a staging environment in software development?

A

Test code in an environment that mimics production, allowing teams to identify and fix issues before they reach production.

44
Q

Why should new features be tested in a staging environment?

A

New features should be tested in a staging environment to verify that they work properly and do not interfere with existing functionality.

44
Q

Why is performance testing sometimes not feasible in a staging environment?

A

Performance testing may not be feasible in staging due to differences in resources, such as fewer virtual machines in staging compared to production, which can impact performance testing accuracy.

44
Q

What types of testing are typically done in a staging environment?

A

Testing in a staging environment can include unit testing, integration testing, and performance testing.

45
Q

What role does a staging environment play in configuration changes?

A

A staging environment allows teams to test configuration changes and spot potential issues before they affect production.

46
Q

What is the main purpose of the production environment?

A

The production environment is live, where the software is available for users to interact with.

47
Q

What are the potential impacts of downtime in a production environment?

A

Downtime in production can lead to loss of revenue, customer dissatisfaction, and an inability for users to access services.

48
Q

Why are vulnerabilities a concern in the production environment?

A

Vulnerabilities are a concern because releasing unpatched or outdated software can introduce security risks, leading to potential cyber-attacks or data breaches.

49
Q

How can reputation be affected by downtime or issues in the production environment?

A

Downtime or issues in production can damage a company’s reputation, causing a loss of customer trust and potential revenue loss.