_______ scope is created when a function is defined and persists even after the function returns.
- Closure
- Global
- Local
- Static
Closure scope is created when a function is defined inside another function. It allows the inner function to access the outer function's variables, even after the outer function has finished executing.
In which scenario would you typically use the "git rebase" command over "git merge"?
- When creating a new branch for a bug fix
- When dealing with conflicts in parallel branches
- When wanting to keep a linear history
- When working on a feature branch to incorporate upstream changes smoothly
The "git rebase" command is used to maintain a linear project history by moving, combining, or eliminating existing commits. It's typically employed to integrate upstream changes smoothly into a feature branch, resulting in a cleaner and more readable history.
Your team needs to develop a real-time chat application. Which framework would you recommend and why?
- ASP.NET SignalR
- Django Channels
- Firebase
- Socket.io
Socket.io is a reliable choice for developing real-time chat applications. It enables bidirectional communication and supports WebSocket, making it efficient for handling real-time updates in a chat system.
Role-based access control (RBAC) is a common method for _______ in large systems.
- Authorization
- Authentication
- Encryption
- Decryption
Role-based access control (RBAC) is a common method for authorization in large systems. It defines access levels based on a user's role within an organization. The correct option aligns with the purpose of RBAC.
What is the principle of least privilege in security?
- Allowing users to choose their own access rights
- Assigning access rights based on seniority within the organization
- Granting all users maximum access rights by default
- Restricting users' access rights to the minimum necessary for their job functions
The principle of least privilege in security advocates restricting users' access rights to the minimum necessary for their job functions. This minimizes the potential damage from accidental mishandling or intentional malicious actions.
Which server-side language is known for its scalability and event-driven architecture, commonly used with frameworks like Express.js?
- Java
- Node.js
- Python
- Ruby
Node.js, based on JavaScript, is known for its scalability and event-driven architecture. It is commonly used with frameworks like Express.js for building efficient server-side applications.
Which SQL command is used to add a new row to a database table?
- ADD
- INSERT
- MODIFY
- UPDATE
The INSERT SQL command is used to add a new row to a database table. It allows you to insert data into a specified table.
What is a common language used for defining infrastructure as code?
- HTML
- JSON
- XML
- YAML
JSON (JavaScript Object Notation) is a common language used for defining infrastructure as code. It is a lightweight and human-readable data interchange format, making it well-suited for configuration files. YAML is another popular choice for its simplicity and readability in configuration management.
Which cloud platform offers services like Google Compute Engine and Google Kubernetes Engine?
- Amazon Web Services (AWS)
- Google Cloud Platform (GCP)
- IBM Cloud
- Microsoft Azure
Google Cloud Platform (GCP) offers services like Google Compute Engine (IaaS) and Google Kubernetes Engine (Container Orchestration). GCP provides a range of cloud services and is known for its data analytics and machine learning capabilities.
Which principle suggests that infrastructure changes should be reversible?
- Consistency
- Idempotency
- Immutability
- Reversibility
The principle of reversibility suggests that infrastructure changes should be reversible. This means that any changes made to the infrastructure can be rolled back, providing a safety net in case of errors or unexpected issues.