Skip to content

Module 2: Thinking DevOps

Question 1: Which of these is associated with social coding, rather than traditional thinking?

  • Putting all the work in a development branch
  • Using private repositories
  • Working in silos
  • Sharing code

Answer: Sharing code

Explanation: Social coding emphasizes collaboration and sharing of code, often through public repositories, enabling transparency and teamwork. It contrasts with traditional thinking where code is kept private or closed within a specific team or silo.


Question 2: Select the correct statement regarding small batches.

  • Working in small batches results in less feedback than large batches.
  • Working in small batches takes more time than working in large batches.
  • Working in small batches minimizes waste.
  • Working in small batches came from the Agile Manifesto.

Answer: Working in small batches minimizes waste.

Explanation: Small batch work minimizes waste by allowing teams to focus on smaller, more manageable pieces of work, reducing delays and inefficiencies. It enables faster feedback and iteration, which is a key concept in both DevOps and Lean methodologies.


Question 3: Which of these is associated with minimum viable product (MVP)?

  • Additional features with bells and whistles
  • Giving the customer exactly what they originally asked for
  • Building in increments
  • An iterative process between developers and the customer

Answer: Building in increments

Explanation: The concept of MVP focuses on building the smallest, most basic version of a product that can be used to gather feedback and improve over time. It involves incremental development, where additional features are added based on user feedback and needs.


Question 4: What is the Red, Green, Refactor workflow?

  • Writing a failing test case (red), then writing enough code to make the unit test pass (green)
  • Avoiding code failure (red) by writing the most refined, error-free code (green)
  • Ensuring that no one can call the code (red), then deciding how you want to call the code (green)
  • Writing code first (red), then writing a test for it (green)

Answer: Writing a failing test case (red), then writing enough code to make the unit test pass (green)

Explanation: The “Red, Green, Refactor” workflow is a core part of Test-Driven Development (TDD). It involves writing a failing test first (red), making the test pass by writing the necessary code (green), and then improving/refactoring the code while ensuring that it still passes the test (refactor).


Question 5: What is behavior driven development (BDD)?

  • Focusing on the system as observed from the outside
  • Ensuring that each component is working correctly
  • Testing the functions of the system to build it right
  • Ensuring that each feature performs a specific task

Answer: Focusing on the system as observed from the outside

Explanation: BDD focuses on the behavior of a system as observed from the user’s perspective. It encourages collaboration between developers, testers, and non-technical participants (like business stakeholders) to ensure that the system meets user expectations and performs as intended.


Question 6: Select the statement that correctly describes Gherkin.

  • Exploring the problem domain and collaborating to produce a solution
  • A natural language syntax for defining acceptance criteria
  • Specific technical language for writing tests
  • Thinking from the inside out

Answer: A natural language syntax for defining acceptance criteria

Explanation: Gherkin is a language used in BDD to define test scenarios in a natural, readable format. It uses simple phrases to describe system behavior, making it understandable by both technical and non-technical team members.


Question 7: Which of these is true of a monolith, rather than microservices?

  • Changing a customer table would require coordinating with people on other teams.
  • Multiple instances are split out.
  • Scaling is done independently.
  • Each function would have its own database and keep track of its own state.

Answer: Changing a customer table would require coordinating with people on other teams.

Explanation: In a monolithic system, components are tightly coupled, meaning that a change in one part of the system (e.g., a database schema) can impact many other parts. This often requires coordination between different teams to avoid breaking functionality across the system.


Question 8: Select the correct statement regarding stateless microservices.

  • Stateless microservices are frequently and easily debugged and patched.
  • Stateless microservices are simply threads, not full processes.
  • Stateless microservices each maintain their own state in separate databases.
  • Stateless microservices maintain a hidden state.

Answer: Stateless microservices are frequently and easily debugged and patched.

Explanation: Stateless microservices do not maintain any internal state between requests. This makes them easier to scale, debug, and patch since each instance operates independently and does not rely on previous interactions to function.


Question 9: What is monkey testing?

  • A test that isolates failing services to limit the scope of failure
  • Deliberately killing services to see how other services are affected
  • Avoiding failure at all costs
  • A test that monitors for failure up to a limit before it trips

Answer: Deliberately killing services to see how other services are affected

Explanation: Monkey testing is a type of testing where random or unexpected inputs are provided to the system to see how it behaves under stress or in abnormal conditions. It’s a way to discover failures that might not be caught during normal testing.


Question 10: Select the correct statement regarding the bulkhead pattern.

  • Bulkhead patterns are designed to detect a problem and trip to avoid catastrophic failure.
  • Bulkhead patterns monitor up to a limit and trip if they detect failure.
  • Bulkhead patterns isolate failing services to limit the scope of failure.
  • Bulkhead patterns are used to deliberately kill services for testing.

Answer: Bulkhead patterns isolate failing services to limit the scope of failure.

Explanation: The bulkhead pattern is a design pattern in microservices architecture that isolates failures in specific services to prevent them from affecting other services. It is named after the bulkheads in ships, which compartmentalize sections to contain flooding.