DailyQuiz
About today's quiz

ProgrammingAdvanced

A new quiz is published every day for this topic and level. Answer the questions, read the explanations, and complete the quiz to keep your streak alive.

Tips before you start

  • Read every question carefully before answering. Some questions include subtle wording that changes the correct answer.
  • Take your time on the first question. There is no time limit, but your total time is tracked for your statistics.
  • After each answer, read the explanation. Even correct answers often include useful context you might not know.
  • Come back tomorrow for a brand new quiz on the same topic. Daily practice is the most effective way to retain what you learn.
AdvancedTechnology
Today's questions

Today's quiz questions

These are the questions that make up today's quiz. Test your knowledge, see how much you know, and learn from the explanation behind every answer.

  1. 1.What is the difference between optimistic and pessimistic locking?

    • Optimistic is faster; pessimistic is more secure
    • Optimistic assumes no conflicts and checks at commit; pessimistic locks resources immediately to prevent conflicts
    • Optimistic locks the entire database; pessimistic locks individual rows
    • Optimistic uses encryption; pessimistic uses authentication
  2. 2.What is the Liskov Substitution Principle?

    • Objects of a superclass should be replaceable with objects of its subclasses without breaking the program
    • Any variable can be substituted with a literal value
    • Interfaces should always be substitutable for abstract classes
    • Functions should be substitutable for their return values
  3. 3.What is a race condition?

    • A competition between two programs for CPU resources
    • A bug where program behavior depends on the timing of uncontrolled concurrent operations
    • A test that measures how fast code executes
    • A performance benchmark comparing two algorithms
  4. 4.What is a lock-free data structure?

    • A data structure that cannot be modified after creation
    • A concurrent data structure that guarantees system-wide progress without using mutex locks, using atomic operations instead
    • A data structure without access restrictions
    • A data structure that doesn't require initialization
  5. 5.What is a monad in functional programming?

    • A single-threaded execution environment
    • A unit test framework for functional code
    • A function that takes exactly one argument
    • A design pattern that wraps values in a context, providing a way to chain operations on that context
  6. 6.What is the purpose of a load balancer?

    • To distribute incoming network traffic across multiple servers to ensure high availability and reliability
    • To balance CPU and memory usage within a single server
    • To compress network traffic to reduce bandwidth
    • To cache responses and reduce server load
  7. 7.What is the circuit breaker pattern?

    • A resilience pattern that prevents cascading failures by stopping calls to a failing service after a threshold of errors
    • A network pattern that reroutes traffic during outages
    • A power management pattern for server hardware
    • A security pattern that disconnects users after detecting suspicious activity
  8. 8.What is the purpose of a write-ahead log (WAL)?

    • To buffer writes and batch them for performance
    • To log all write operations for audit compliance
    • To pre-compute query results before they're needed
    • To ensure durability by writing changes to a log before modifying the actual database, enabling crash recovery
  9. 9.What is the CAP theorem in distributed systems?

    • A design pattern for microservices architecture
    • An algorithm for cache replacement policies
    • A distributed system can only provide two of three guarantees: Consistency, Availability, Partition tolerance
    • A security model for encryption systems
  10. 10.What is the visitor pattern?

    • A pattern for tracking user visits to web pages
    • A web analytics pattern for monitoring traffic
    • A behavioral pattern that lets you add new operations to objects without modifying their classes by separating algorithm from object structure
    • A pattern where objects visit a central registry before execution