How does Gitflow differ from GitHub Flow?
- GitHub Flow doesn't use branches
- GitHub Flow is for individual developers
- Gitflow has a more complex branching model
- Gitflow is specific to GitHub
Gitflow and GitHub Flow differ in their branching models. Gitflow tends to be more complex, with designated branches for features, releases, and hotfixes. GitHub Flow, on the other hand, is simpler, focusing on branches for features and releases in a more continuous delivery style.
One way to reduce the frequency of merge conflicts in Git is by regularly _______ branches with the main development branch.
- Cloning
- Merging
- Pushing
- Rebasing
One way to reduce the frequency of merge conflicts in Git is by regularly rebasing branches with the main development branch. Rebasing incorporates the changes from one branch into another, maintaining a cleaner and linear project history.
How does multi-version concurrency control (MVCC) work in database systems?
- Each transaction creates a new version of a modified data item.
- MVCC is only applicable to read-only transactions.
- MVCC relies on locks for data consistency.
- Only one version of a data item exists at a time.
Multi-Version Concurrency Control (MVCC) works by creating a new version of a modified data item for each transaction. This allows multiple transactions to access different versions of the same data concurrently, promoting better concurrency and reducing contention for resources.
You're developing a system where multiple modules need to be notified whenever a particular event occurs. Which design pattern would you implement to achieve this?
- Command
- Mediator
- Observer
- Prototype
The Observer pattern is appropriate for scenarios where multiple modules need to be notified of changes in another object. It establishes a one-to-many dependency between objects, ensuring that when one object changes state, all its dependents are notified and updated automatically.
Which design pattern is used to provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation?
- Decorator
- Iterator
- Observer
- Proxy
The Iterator design pattern is used to provide a way to access elements of an aggregate object sequentially without exposing its underlying representation. It abstracts the traversal mechanism and allows the client to access elements without knowing the internal structure.
What does IaC stand for?
- Infrastructure as Code
- Integrated Application Code
- Intelligent Automation Configuration
- Internet and Cloud
IaC stands for Infrastructure as Code. It is a key DevOps practice that involves managing and provisioning computing infrastructure through machine-readable script files, rather than through physical hardware configuration or interactive configuration tools.
In multi-version concurrency control (MVCC), each transaction sees a _______ snapshot of the database.
- Consistent
- Current
- Historical
- Isolated
In multi-version concurrency control (MVCC), each transaction sees a historical snapshot of the database. This means that each transaction sees a version of the database as it existed at the start of the transaction, ensuring consistency and isolation.
Your team is working on a project where images are a significant part of the content. How would you optimize image loading to improve overall website performance?
- Compress images without significant quality loss
- Implement lazy loading
- Use responsive images with the srcset attribute
- Utilize Content Delivery Networks (CDN)
Using responsive images with the srcset attribute allows the browser to select the most appropriate image based on the user's device, improving performance. It tailors the image delivery to the user's screen size and resolution.
The command "git log --graph" displays a _______ representation of the commit history.
- Graphical
- Tabular
- Text-based
- Visual
The command "git log --graph" displays a text-based representation of the commit history with a graphical structure. It helps visualize the branching and merging of commits in a more readable format.
Which tab in Browser Developer Tools is used to inspect and manipulate HTML and CSS?
- Console
- Elements
- Network
- Sources
The 'Elements' tab in Browser Developer Tools is used to inspect and manipulate HTML and CSS. It provides a visual representation of the document's structure, allowing developers to view and modify the HTML and CSS code.