___________ is a design principle in OOP that states a class should have only one reason to change.

  • Encapsulation
  • Inheritance
  • Polymorphism
  • Single Responsibility Principle
The correct option is Single Responsibility Principle. This principle suggests that a class should have only one job or reason to change, leading to more modular, maintainable, and understandable code.

The Agile practice of estimating the effort required for each user story or task is known as _________.

  • Story Pointing
  • Sprint Planning
  • Backlog Refinement
  • Velocity Tracking
In Agile methodologies, estimating the effort required for each user story or task is commonly referred to as "Story Pointing." Story Pointing involves assigning relative values (such as story points) to different tasks or user stories, based on their complexity, risk, and effort required. This practice helps Agile teams plan and prioritize their work effectively during sprint planning sessions. Sprint planning involves determining which user stories and tasks will be tackled in the upcoming sprint, whereas backlog refinement is the ongoing process of reviewing and updating the product backlog. Velocity tracking, on the other hand, is a measure of how much work a team can complete in a sprint, often calculated based on past performance. Therefore, the most appropriate option for estimating effort in Agile is Story Pointing.

How can you determine the code coverage achieved by your test suite?

  • Analyze test results
  • Count the number of test cases executed
  • Measure the percentage of code executed
  • Review developer documentation
Code coverage measures the percentage of code executed by your test suite. To determine this, you can use tools that analyze test results and report on the lines of code covered during testing. This metric helps assess the thoroughness of your testing efforts and identifies areas of the codebase that may require additional test cases for better coverage and quality assurance.

What is the difference between deadlock prevention and deadlock avoidance?

  • Detecting and breaking deadlock once it occurs
  • Preventing resource allocation patterns that lead to deadlock
  • Proactively avoiding deadlock by resource allocation strategies
  • Reactively resolving deadlock situations after they occur
The key difference between deadlock prevention and deadlock avoidance lies in their approaches to handling deadlock situations in operating systems. Deadlock prevention focuses on proactively avoiding deadlock by implementing resource allocation strategies and system design techniques that eliminate the possibility of deadlock occurrence. On the other hand, deadlock avoidance aims to reactively resolve deadlock situations after they occur by detecting them and taking appropriate actions, such as preempting resources or terminating processes to break the deadlock. While prevention aims to stop deadlock from happening in the first place, avoidance deals with managing deadlocks if they occur, making them complementary strategies in ensuring system stability and resource utilization efficiency.

In a distributed system, you need to efficiently search for a particular value across multiple sorted arrays. How would you approach this problem?

  • Binary Search
  • Hashing
  • Indexing
  • Linear Search
Binary Search is the optimal approach for searching in sorted arrays due to its logarithmic time complexity O(log n). Linear Search is inefficient for large datasets, Hashing may not be suitable for sorted arrays, and Indexing might introduce additional overhead in a distributed system.

IPv6 uses ________-bit addresses compared to IPv4's 32-bit addresses.

  • 64
  • 128
  • 256
  • 512
IPv6 uses 128-bit addresses, which is a significant increase from IPv4's 32-bit addresses. This expansion allows for a much larger number of possible unique addresses, addressing the issue of IPv4 address exhaustion. Therefore, "128" is the correct option.

In a Django project, you need to optimize database queries for improved performance. What strategies would you employ to minimize query time and enhance scalability?

  • Employ Django Channels for asynchronous and concurrent query handling.
  • Implement database indexing and denormalization techniques.
  • Use Django's select_related and prefetch_related for efficient queries.
  • Utilize Django's caching mechanisms like caching querysets and template caching.
Optimizing database queries in Django involves various strategies such as indexing commonly queried fields, denormalizing data to reduce joins, and using efficient ORM methods like select_related and prefetch_related to minimize database hits and improve performance.

In Express.js, middleware functions have access to the ___________ and ___________ objects.

  • Error
  • Next
  • Request
  • Response
Middleware functions in Express.js have access to the request and response objects, as well as the 'next' function which is used to pass control to the next middleware function in the stack.

What is the OSI Model used for?

  • To standardize network communication protocols
  • To provide a framework for network device communication
  • To define how data is transmitted over a network
  • To facilitate interoperability between different networking technologies
The OSI Model, or Open Systems Interconnection Model, is used to provide a conceptual framework that standardizes the functions of a networking or telecommunication system into seven layers. It helps in understanding and designing complex network architectures by dividing the communication process into manageable layers, each responsible for specific tasks. Option 2 is correct because the OSI Model indeed provides a structured framework for various networking devices to communicate effectively.

What is the role of middleware in Express.js, a popular framework for Node.js?

  • Executing additional functions
  • Managing session data
  • Parsing JSON data
  • Routing requests
Middleware in Express.js executes additional functions between receiving a request and sending a response. It can perform tasks like authentication, logging, parsing data, and modifying the request/response objects. Middleware functions have access to the request object (req), response object (res), and the next middleware function in the applications request-response cycle. This flexibility allows developers to modularize and enhance the functionality of their Express.js applications.