Software Engineer Quiz

Questions: 16 · 10 minutes
1. A service must run on several interchangeable instances behind a load balancer. Which design most directly supports horizontal scaling?
Keep service instances stateless where practical and place shared state in an appropriate external store
Store uploaded files only on one instance's local disk
Require every request to return to a manually selected server
Keep each user's session only in the memory of the first instance they contact
2. Which design best demonstrates high cohesion?
A utility class handles authentication, invoices, email, and database backups
A module groups closely related invoice-calculation responsibilities
Every function can directly modify every part of the application state
One module changes whenever any feature in the system changes
3. A pull request contains thousands of lines that mix a refactor, a feature, and formatting changes. What would most improve reviewability?
Add more reviewers while keeping all changes in one request
Remove tests so reviewers can focus on production code
Separate it into smaller, focused changes with clear purposes
Merge it first and review the changes afterward
4. A Git merge produces conflicts in a file that two developers edited. What is the most appropriate next step?
Inspect the conflicting sections, choose or combine the intended changes, test the result, and commit the resolution
Delete the file and restore whichever branch was created first
Force-push the local branch so Git selects its version automatically
Rebase repeatedly until the conflict markers disappear without editing
5. A client may repeat the same request after a timeout. Which HTTP operation is intended to replace a resource at a known URI and be idempotent?
CONNECT
POST
PUT
PATCH in every possible implementation
6. A request fails in production after passing through several services. Which observability setup would most help trace the request's path?
A separate unstructured text file on each developer's computer
Only the total number of requests received each day
A dashboard showing the current number of source-code files
Correlated logs or distributed traces carrying the same request identifier across services
7. How should an application generally store user passwords?
As unique salted hashes using a password-specific algorithm such as Argon2 or bcrypt
Encrypted with one reversible key shared across all accounts
As plaintext in a database with restricted table permissions
As unsalted hashes using a fast general-purpose algorithm
8. A test fails unpredictably in continuous integration but usually passes locally. What is the best first engineering response?
Automatically rerun it until it passes and permanently ignore the original failure
Investigate sources of nondeterminism such as timing, shared state, ordering, and uncontrolled dependencies
Mark every failure as an infrastructure problem without investigation
Delete the assertion that fails most often
9. Which characteristic is most important for a reliable unit test?
It checks a small unit of behavior while controlling external dependencies
It exercises the complete deployed system, including live external services
It depends on tests running in a particular order
It verifies several unrelated behaviors in one long scenario
10. Two threads increment the same shared counter, but some increments are lost. What is the most likely cause?
A memory leak caused by the counter having too small a numeric type
A syntax error that the compiler ignored
A race condition because the read-modify-write operation is not synchronized or atomic
A deadlock caused solely by both threads completing
11. A web application builds a SQL query by concatenating text supplied by a user. Which change most directly reduces SQL injection risk?
Hide database error messages from the user interface
Run the query through a faster database connection pool
Escape quotation marks with custom string-replacement code
Use parameterized queries and bind user input as values
12. A business-logic class directly creates a specific database client, making isolated tests difficult. Which redesign best applies dependency inversion?
Make the database client a global variable shared by all classes
Expose the database password so tests can connect directly
Copy the database-access code into each business method
Have the class depend on an abstraction that can be supplied with different implementations
13. A requirement says a dashboard should load “quickly,” but gives no measurable target. What should the team do before treating the requirement as testable?
Assume “quickly” means the fastest response achieved during development
Agree on measurable acceptance criteria, including conditions and a response-time target
Replace the requirement with a preferred programming language
Wait until users complain, then define the expected performance
14. What is the typical time complexity of binary search on a sorted array?
O(n)
O(1)
O(log n)
O(n log n)
15. After adding a cache, users sometimes see old profile information immediately after an update. Which response most directly addresses the consistency problem?
Increase the cache capacity so more old values can be retained
Compress cached values before returning them
Remove database indexes from the profile table
Define an invalidation or refresh policy when profile data changes
16. A client calls an external API that occasionally fails because of brief network interruptions. Which retry strategy is generally most appropriate?
Retry continuously with no delay until the call succeeds
Use a limited number of retries with exponential backoff and jitter for retryable failures
Retry every request immediately, including requests that are not safe to repeat
Disable timeouts so every request can wait indefinitely
Popular tests
Narcissistic Personality Inventory (NPI)
This self-report measure is used to assess narcissism as a personality trai…
Start Test
Yale-Brown Obsessive Compulsive Scale (Y-BOCS)
This measure is used to rapidly quantify the current severity of obsessive…
Start Test
CRAFFT Screening Test (CRAFFT 2.1)
This brief screening measure is designed to identify potential alcohol and…
Start Test
Patient Health Questionnaire-9 (PHQ-9)
This measure is commonly used to quickly screen for the presence and severi…
Start Test
Maslach Burnout Inventory (MBI)
This self-report measure is used to assess occupational burnout symptoms in…
Start Test
Adolescent Anxiety Questionnaire
This measure is designed to support a brief appraisal of anxiety symptoms a…
Start Test
Emotional Creativity Inventory (ECI)
This self-report measure assesses individual differences in the originality…
Start Test
Horne–Ostberg Morningness–Eveningness Questionnaire (MEQ)
Circadian preferences influence typical patterns of alertness and sleep tim…
Start Test
Ambivalent Sexism Inventory (ASI)
This measure is designed to assess attitudes toward women, including both o…
Start Test
Internalized Misogyny Scale (IMS)
This measure is designed to assess internalized negative beliefs and stereo…
Start Test
Perceived Stress Scale (PSS-10)
This self-report measure assesses the degree to which individuals appraise…
Start Test
Impulsive Behavior Scale (SUPPS-P)
Impulsivity is a multidimensional construct that is often assessed with bri…
Start Test
Clinical Institute Withdrawal Assessment for Alcohol, Revised (CIWA-Ar)
This rating scale is used to rapidly assess the severity of alcohol withdra…
Start Test
Positive and Negative Affect Schedule (PANAS)
This measure provides a brief self-report assessment of current or typical…
Start Test
Light Triad Scale (LTS)
This self-report measure assesses prosocial personality tendencies and orie…
Start Test
Suicidal Ideation Scale
In clinical settings, the Suicidal Ideation Scale is used to structure an i…
Start Test
Body Dysmorphic Disorder Scale (BDD-D)
This brief self-report measure is designed to screen for and quantify distr…
Start Test
Beck Anxiety Inventory (BAI)
This measure is a brief self-report inventory used to screen for anxiety sy…
Start Test
Differential Test of Perfectionism
This instrument is used to screen for perfectionism-related attitudes and t…
Start Test
Locus of Control Scale
This measure assesses generalized expectancies regarding the degree to whic…
Start Test
New Apathy Scale
This brief self-report measure is used to screen for apathy-related symptom…
Start Test
Perth Alexithymia Questionnaire (PAQ)
This measure assesses individual differences in alexithymia, including diff…
Start Test
Social Intelligence Scale
This brief self-report measure is designed to support rapid screening of in…
Start Test
Fear Test
This measure is designed to evaluate individual differences in fear-related…
Start Test
Neuroticism Level Scale
The measure is intended for brief screening of an individual’s propensity t…
Start Test
Aggressiveness Indicators Screening Questionnaire
This screening tool is designed to quickly identify behavioral indicators a…
Start Test