Top 30 Intermediate Backend Dev Concepts Quiz
30 intermediate multiple-choice Backend Dev concept questions, the mechanics underneath the basics: how the pieces relate and where the usual mental model stops holding. They come from 30 bites in the Backend Dev library, the middle slice of the 550 Backend Dev concept questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.
Backend engineering, APIs, and databases
30 questions. Pick an answer, or open “Show the answer” to read it.
Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.
Question 1 of 30
What is the primary consequence of running a long-running synchronous task in a Node.js application?
Show the answer
Answer: a · The application's event loop will become blocked, making the server unresponsive.
The card states that a long-running synchronous computation will 'monopolize the single main thread, blocking the event loop entirely,' leading to an unresponsive application. Synchronous tasks are not automatically offloaded to background threads; they execute directly on the main thread, unlike asynchronous I/O operations.
Read the full bite: The Node.js Event Loop: Concurrency on a Single Thread
Question 2 of 30
What primary challenge did the relational model address compared to earlier database systems?
Show the answer
Answer: c · The need for complex procedural code to navigate specific data storage paths
The card states that before the relational model, "Retrieving data required writing complex procedural code to navigate specific data paths," which was inflexible. The relational model aimed to separate the logical data structure from its physical implementation. Option A is a distractor because while hierarchical models were predecessors, the core problem was the procedural navigation within them, not just the representation of hierarchies.
Read the full bite: The Relational Model: Data as Simple Tables
Question 3 of 30
When a decorator is applied to a function, what is the immediate effect on that function's definition?
Show the answer
Answer: d · It replaces the original function in its scope with a new, wrapped function.
The card states that the decorator returns a wrapper function, which 'replaces the original my_func in the surrounding scope.' This means the original function's name now refers to the new, wrapped function. Option A is incorrect because decorators add behavior without altering the original function's source code.
Read the full bite: Python Decorators: Functions that Wrap Functions
Question 4 of 30
A Node.js API stops responding to every request whenever a user logs in, because the login handler calls crypto.pbkdf2Sync to verify a password. What is the most likely cause?
Show the answer
Answer: b · The synchronous call runs on the single main thread and blocks the event loop until it finishes
pbkdf2Sync executes directly on the same thread that runs the event loop, so nothing else can be processed until it returns; the threadpool default is four, not zero, and the block has nothing to do with database connections.
Question 5 of 30
In a bank transfer, which ACID property guarantees that if the transaction fails midway, both accounts revert to their original state?
Show the answer
Answer: d · Atomicity
Atomicity ensures that a transaction is treated as an 'all or nothing' operation; if any part fails, the entire transaction is rolled back. Consistency, while ensuring the database moves from one valid state to another, does not specifically handle the rollback of an incomplete operation in the same way Atomicity does.
Read the full bite: ACID: The Four Guarantees of Database Transactions
Question 6 of 30
What is the primary benefit of splitting a CPU-intensive synchronous operation into smaller pieces using setTimeout(fn, 0)?
Show the answer
Answer: b · To allow the browser to process UI updates and user input between task segments.
The card states that splitting work with setTimeout(fn, 0) allows yielding control back to the event loop, enabling the browser to process user input and render updates, keeping the UI alive. Option A is incorrect because this technique adds overhead and does not necessarily speed up the overall execution time; its purpose is responsiveness, not raw speed.
Read the full bite: JavaScript's Event Loop: Macrotasks & Microtasks
Question 7 of 30
What is the primary benefit of using `yield` in a Python function?
Show the answer
Answer: a · It enables the function to pause and resume execution, producing values on-demand to conserve memory.
The card states generators process data lazily, yielding one item at a time to conserve memory by pausing and resuming execution. Option D is incorrect because generators are one-time-use iterators.
Read the full bite: Python's `yield`: Functions That Pause and Resume
Question 8 of 30
What is the main objective of applying database normalization in a relational database?
Show the answer
Answer: a · To ensure data integrity and minimize redundancy by structuring data into smaller, related tables.
Normalization's primary goal is to eliminate data redundancy and prevent modification anomalies (update, insertion, deletion), thereby ensuring data integrity. Option D describes a benefit of denormalization, often used in analytical systems, which is the opposite of normalization's typical effect on JOINs.
Read the full bite: Database Normalization: Tidy Tables, Less Redundancy
Question 9 of 30
Which statement accurately describes how process.nextTick() callbacks are prioritized within the Node.js event loop?
Show the answer
Answer: b · They execute immediately after the current JavaScript operation, before any timers or I/O.
process.nextTick() callbacks are processed with the highest precedence, immediately after the current JavaScript operation completes and before the event loop proceeds to microtasks, timers, or I/O. Option D is incorrect because nextTick callbacks are processed *before* the microtask queue.
Read the full bite: process.nextTick(): Cutting in Line on the Event Loop
Question 10 of 30
What is the primary advantage of using a `with` statement in Python for resource management?
Show the answer
Answer: d · It ensures that acquired resources are reliably released, regardless of execution flow or errors.
The `with` statement's core benefit is guaranteeing that resources like file handles or network connections are properly closed or released, even if exceptions interrupt the program flow. While it interacts with errors, it doesn't automatically handle all exceptions; rather, it ensures cleanup *despite* them.
Read the full bite: The `with` Statement: Python's Automatic Cleanup Crew
Question 11 of 30
What is the immediate consequence when ownership of a variable is moved to a function in Rust?
Show the answer
Answer: a · The original variable becomes invalid and cannot be accessed further.
When ownership is moved, the original variable is invalidated, as the card states 'Once you've given it away, it's no longer yours to use' and the example demonstrates a compile error for subsequent use. Option D is incorrect because for complex types like String, ownership is moved, not copied, unless explicitly cloned. Option B is incorrect because the memory is freed when the new owner (the function's parameter) goes out of scope, not immediately upon the move.
Read the full bite: Rust Ownership: Memory Safety Without a Garbage Collector
Question 12 of 30
What is the immediate result of calling a function defined with async def, like my_coro(), without awaiting it?
Show the answer
Answer: c · A coroutine object is returned, which must be explicitly run by an event loop.
Calling an async def function directly only creates a coroutine object; it does not execute the function's code. This object must then be awaited or scheduled with an event loop to run. Option B describes synchronous function behavior, and Option A incorrectly implies immediate background execution without the necessary explicit step.
Read the full bite: Python Coroutines: Functions You Can Pause and Resume
Question 13 of 30
Which scenario correctly describes a fundamental rule enforced by Rust's borrow checker for memory safety?
Show the answer
Answer: a · You can have either one mutable reference or any number of immutable references to data, but not both simultaneously.
The borrow checker enforces that you can have either one mutable reference OR multiple immutable references to a piece of data at any given time, but never both, preventing data races. Option D is incorrect because the borrow checker strictly disallows multiple mutable references to the same data concurrently, regardless of the function scope.
Read the full bite: Rust's Borrow Checker: Memory Safety at Compile Time
Question 14 of 30
By default, what action does a relational database take when a user attempts to delete a record from a "parent" table that is referenced by a foreign key in a "child" table?
Show the answer
Answer: c · It blocks the deletion of the parent record to maintain data integrity.
The card explicitly states that if you try to delete a user referenced by posts, "the database will, by default, block the deletion to avoid creating orphaned posts." This is the standard behavior to enforce referential integrity. Option B describes an 'ON DELETE SET NULL' action, which is a configurable behavior, not the default.
Read the full bite: Foreign Keys: The Glue of Relational Databases
Question 15 of 30
What is the fundamental problem Node.js streams are designed to solve for data handling?
Show the answer
Answer: a · Processing large datasets without exhausting system memory.
The card states streams were created to 'process data piece by piece, keeping memory usage low and constant regardless of the total data size' because loading large files entirely into memory is inefficient or impossible. While streams can simplify I/O (option D), their core purpose is memory efficiency for large data, and they are not ideal for random access (option C).
Read the full bite: Node.js Streams: Processing Data in Chunks, Not Blobs
Question 16 of 30
For which scenario would Python's async/await typically NOT provide a performance benefit?
Show the answer
Answer: b · Processing a large dataset with intensive numerical calculations.
Async/await is designed for I/O-bound tasks where the program spends time waiting, allowing other tasks to run during these waits. CPU-bound tasks, like intensive numerical calculations, will block the single event loop, preventing any other tasks from progressing and thus negating the benefits of concurrency.
Read the full bite: Python's async/await: Concurrent, Not Parallel
Question 17 of 30
What is the primary advantage of using asynchronous child processes in Node.js?
Show the answer
Answer: d · To execute CPU-bound tasks without blocking the main event loop.
The card explicitly states that child processes solve the problem of CPU-intensive operations blocking the single-threaded event loop by offloading heavy work. Option B describes the purpose of worker_threads, not child processes.
Read the full bite: Node.js Child Processes: Escaping the Main Thread
Question 18 of 30
What is the main performance trade-off introduced by adding a database index?
Show the answer
Answer: d · It speeds up data retrieval but slows down data modification operations.
The card explicitly states that indexes speed up data retrieval but add overhead to INSERT, UPDATE, and DELETE operations, as the index structure must also be modified. This trade-off between faster reads and slower writes is the primary consideration. Indexes do not inherently complicate schema design, slow down non-indexed queries, or require manual updates for consistency.
Read the full bite: Database Index: The Phonebook for Your Data
Question 19 of 30
What is the primary benefit of defining a Rust trait, such as Summary with a summarize method, and implementing it for multiple distinct types?
Show the answer
Answer: b · It allows writing generic functions that can operate on any type that fulfills the Summary contract, promoting code reuse.
The card states traits enable "writing generic functions that can accept any type that fulfills a certain contract," which directly leads to code reuse and abstraction. Option D is a tempting distractor because traits can have default implementations, but the primary benefit isn't the automatic provision of a default, but rather the ability to treat different types uniformly based on their shared behavior.
Question 20 of 30
What is the primary benefit of Go's garbage collector for concurrent network services?
Show the answer
Answer: c · It performs most of its work concurrently with the application, ensuring high responsiveness.
Go's GC is designed to run concurrently with the application, minimizing the duration of "stop-the-world" pauses to maintain responsiveness for services. While pauses are very short, they are not completely eliminated, making option A incorrect.
Read the full bite: Go's Garbage Collector: The Concurrent Cleaner
Question 21 of 30
What is the primary distinction between a standard database view and a base table?
Show the answer
Answer: a · A view executes a predefined query against base tables each time it is accessed, without storing its own data.
A standard view stores only its query definition and executes it against the underlying base tables each time it's accessed, as explained in the 'How It Works' section. Option C describes a common misconception; views do not store their own data, unlike materialized views.
Read the full bite: Database Views: A Saved Query That Acts Like a Table
Question 22 of 30
When a Rust function attempts to parse user input that might be malformed, which error handling approach is most appropriate?
Show the answer
Answer: b · Returning a Result<T, E> enum, allowing the caller to handle the potential parsing failure gracefully.
The card specifies that Result<T, E> should be used for expected failures like parsing user input, which are conditions outside the program's direct control. panic! is reserved for unrecoverable programmer bugs, not anticipated external data issues.
Read the full bite: Rust's Two Error Types: Recoverable vs. Unrecoverable
Question 23 of 30
Why is the Last-In, First-Out (LIFO) execution order of Go's `defer` statements considered crucial for resource management?
Show the answer
Answer: d · It correctly handles dependencies, like unlocking a mutex that protects a resource before closing that resource.
The card explains that LIFO is crucial because it naturally handles nested cleanup, giving the example: "if you open a file and then lock a mutex, you'll want to unlock the mutex first, then close the file. defer handles this naturally." Option C is a true statement about LIFO, but B explains the *benefit* of that order in resource management. Option B is a general benefit of `defer`, not specific to its LIFO order. Option A describes a scenario where `defer` should be avoided, as it can cause memory leaks in loops.
Question 24 of 30
Which scenario best justifies using a pointer in Go?
Show the answer
Answer: c · Passing a large data structure to a function to prevent expensive copying.
The card states that a key reason to use pointers is "when you are passing a large struct to a function and want to avoid the performance overhead of making a copy." Option A describes pass-by-value behavior, which is the opposite of using a pointer to share or modify the original data.
Question 25 of 30
Which of the following is a significant change when migrating a Node.js project from CommonJS to ES Modules?
Show the answer
Answer: c · Module dependencies are statically analyzed before code execution.
The card states that ES Modules are a 'statically analyzable contract' where dependencies are mapped out before execution, a major shift from CommonJS's dynamic require(). Options A, B, and C are incorrect because ESM explicitly removes direct access to require(), __dirname, and __filename, and makes file extensions mandatory for relative imports.
Read the full bite: ES Modules in Node.js: The Modern `import` System
Question 26 of 30
In the context of database design, what does the functional dependency "A -> B" primarily signify?
Show the answer
Answer: c · For every unique value in column A, there is exactly one corresponding value in column B.
A functional dependency A -> B means that if you know the value(s) in column A, you can uniquely determine the value(s) in column B. Option B describes a foreign key relationship, which is a different concept from functional dependency.
Read the full bite: Functional Dependency: The Rules Behind Your Data
Question 27 of 30
What is the fundamental difference between variable shadowing and variable mutation in Rust?
Show the answer
Answer: d · Shadowing declares a new variable that makes the previous one inaccessible, while mutation modifies the value of an existing variable in place.
Shadowing creates a completely new variable, potentially allocating new memory, making the original inaccessible. Mutation, however, changes the value of an existing variable in its current memory location. Option B describes when to use each, not the fundamental difference in their operation.
Read the full bite: Rust's Variable Shadowing: Re-binding, Not Mutating
Question 28 of 30
When resolving a package, which source does npx check first before falling back to its cache or the network?
Show the answer
Answer: a · The local project's node_modules/.bin directory
npx prioritizes a local project binary to avoid unnecessary network requests, checking node_modules/.bin before its own cache or the registry. Option D is tempting because caching is a core feature, but local copies take precedence.
Read the full bite: npx: Execute Packages Without Installing Them
Question 29 of 30
When using a .env file for local development, what is the most critical step to prevent accidental exposure of sensitive information?
Show the answer
Answer: c · Ensuring the .env file is listed in your project's .gitignore
The card explicitly states that 'The biggest mistake is committing your .env file to Git, exposing all your secrets' and that your '.gitignore file must contain a line with .env to prevent committing secrets.' This makes preventing version control exposure the most critical step. Storing only non-sensitive data (D) contradicts the primary purpose of .env for secrets.
Read the full bite: Environment Variables: Config Outside Your Code
Question 30 of 30
Which of the following describes a 2NF violation in a relation that is in 1NF and has a composite candidate key?
Show the answer
Answer: a · A non-prime attribute is functionally dependent on only one attribute of the composite candidate key.
2NF eliminates partial dependencies, meaning every non-prime attribute must depend on the whole composite candidate key, not just a subset. Option B describes a transitive dependency, which violates 3NF, not 2NF.
Could you explain these out loud?
That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.