In a large-scale e-commerce platform, multiple users are trying to purchase the same limited-stock item simultaneously. How would you handle concurrent transactions to ensure fair access and prevent overselling?

  • Implementing a Reservation System
  • Optimistic Locking
  • Rate Limiting Purchases
  • Using a Queue for Order Processing
To address concurrent purchases of limited-stock items, implementing a reservation system is effective. This involves temporarily reserving stock for a user during the checkout process, ensuring fair access and preventing overselling by managing stock availability in real-time.

Which of the following is NOT an authentication factor?

  • Geographical location
  • Something you are
  • Something you have
  • Something you know
Geographical location is not a typical authentication factor. Authentication factors include knowledge (passwords), possession (smart cards), and biometrics (fingerprint).

JavaScript _______ are objects that store collections of key-value pairs.

  • Arrays
  • Maps
  • Objects
  • Sets
JavaScript Maps are objects that store collections of key-value pairs. Unlike Objects, they allow any data type as a key and provide methods for easy manipulation.

What is the difference between client-side caching and server-side caching?

  • Both client-side and server-side caching are the same.
  • Client-side caching stores data on the server to improve performance. Server-side caching stores data in the user's browser cache.
  • Client-side caching stores data on the user's device, reducing server requests. Server-side caching stores data on the server, reducing database or application server load.
  • Neither client-side nor server-side caching exists.
Client-side caching occurs on the user's device, reducing the need for repeated server requests. Server-side caching, on the other hand, involves storing data on the server, alleviating load and enhancing overall system performance.

You're collaborating with a team on a project, and you need to review changes made by another developer before merging them into the main branch. How would you do this in Git?

  • git diff HEAD..origin/branch-name
  • git fetch and git merge origin/branch-name
  • git log origin/branch-name
  • git pull origin branch-name
You would use git fetch to retrieve changes from the remote repository and then git merge origin/branch-name to merge the changes locally for review before merging into the main branch.

You're leading a software development team that follows the Agile methodology. How would you ensure effective communication and collaboration among team members?

  • Annual Team Retreats
  • Daily Standup Meetings
  • Email Communication
  • Monthly Status Reports
In Agile, daily standup meetings are crucial for effective communication and collaboration. These short, focused meetings help team members discuss progress, challenges, and plans, fostering a collaborative and transparent environment. Email communication and periodic reports may not provide the real-time interaction needed in Agile.

What is the purpose of JWT (JSON Web Token) in authentication?

  • Authenticating the server to the client
  • Encrypting the user's password
  • Securely transmitting information between parties
  • Storing sensitive information in the client-side
The purpose of JWT is to securely transmit information between parties. It is a compact, URL-safe means of representing claims to be transferred between two parties.

Which platform offers features such as issue tracking, wikis, and merge requests to facilitate collaboration among developers?

  • GitLab
  • Node.js
  • Ruby on Rails
  • Visual Studio Code
GitLab is a platform that offers comprehensive features for collaboration, including issue tracking, wikis, and merge requests. It serves as an integrated solution for version control, continuous integration, and collaboration, providing a seamless environment for developers to work together on projects.

Which design pattern is used to ensure that only one instance of a class is created and provides a global point of access to that instance?

  • Factory Method
  • Observer
  • Prototype
  • Singleton
The Singleton design pattern is used to ensure that only one instance of a class is created and provides a global point of access to that instance. This is particularly useful when exactly one object is needed to coordinate actions across the system.