Top 30 Backend Dev Concepts Quiz
30 multiple-choice questions on the Backend Dev fundamentals, drawn from 30 bites in the Backend Dev 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 mechanism by which Python type hints improve code reliability?
Show the answer
Answer: c · They enable static analysis tools to identify potential type mismatches before execution.
Type hints are ignored by the Python interpreter at runtime. Their primary role is to allow static analysis tools to check for type consistency and potential errors before the code is ever executed, improving reliability. They do not perform runtime validation of external data.
Read the full bite: Python Type Hints: Documentation Your Linter Can Read
Question 2 of 30
What is the primary function of a Database Management System (DBMS)?
Show the answer
Answer: c · To manage and control how applications interact with and access stored data.
The card states the DBMS acts as a "single, controlled gateway" and a "librarian" to manage access and operations on data for applications. Option B describes the database itself, which the card identifies as a common misconception, incorrect confusion point.
Read the full bite: DBMS: The Software That Runs Your Database
Question 3 of 30
What is the primary function of the V8 engine within environments like Chrome or Node.js?
Show the answer
Answer: c · To translate JavaScript code into native machine code for fast execution.
V8's core role is to compile JavaScript into native machine code, enabling high-performance execution. While environments like Node.js provide APIs for interactions (option D), V8 itself is solely the engine responsible for processing the JavaScript code.
Read the full bite: V8: The Engine Powering Chrome and Node.js
Question 4 of 30
What is the fundamental principle guiding Go's design?
Show the answer
Answer: d · Optimizing for practical engineering challenges in large systems.
Go was created to solve practical problems like slow builds and complexity in massive codebases, prioritizing engineering concerns such as maintainability and team productivity. It explicitly avoids being a research language or focusing on novel paradigms.
Read the full bite: Go's Design Philosophy: Engineering Over Novelty
Question 5 of 30
A team needs to speed up queries on a large table and purge old records. Which task requires DDL?
Show the answer
Answer: b · Adding an index on the date column to speed up filtering
Adding an index changes the database schema, which is the purpose of DDL. Purging old rows may seem structural, but it only deletes data, making it a DML operation.
Question 6 of 30
For which scenario would a Python dataclass be the most suitable choice?
Show the answer
Answer: d · Creating a simple data structure to represent an API response with predefined fields.
Dataclasses are designed for classes whose primary purpose is to store and group data, making them perfect for structured records like API responses. They are not recommended for classes with complex logic, intricate state, or custom initialization needs, which are better handled by regular classes.
Read the full bite: Python Data Classes: Write Less Boilerplate
Question 7 of 30
What is a key advantage of Rust's philosophy of bundling its official documentation with the language installation?
Show the answer
Answer: c · It guarantees developers have immediate, offline access to comprehensive learning materials.
The card states that bundling the documentation ensures every user has immediate, offline access to a high-quality learning resource. Option D is incorrect because documentation adds to the download size, it doesn't reduce it.
Read the full bite: Rust's Philosophy: Documentation and Community First
Question 8 of 30
For which type of task would Node.js's event-driven model, relying on EventEmitter, typically be least effective?
Show the answer
Answer: a · Performing intensive image manipulation or video encoding.
The event-driven model is least effective for CPU-bound tasks like image manipulation because they block the single-threaded event loop. It excels at I/O-bound tasks such as network requests, database queries, and file operations.
Question 9 of 30
Which action is a clear use of DML because it changes stored data rather than table structure or read-only querying?
Show the answer
Answer: d · Inserting a new row into an existing table
Inserting a new row is explicitly called a textbook DML operation that alters stored data. Running a SELECT statement is a tempting distractor because the card notes that read-only querying is sometimes classified separately as DQL rather than being grouped with DML.
Question 10 of 30
What is the primary function of an __init__.py file in a Python directory?
Show the answer
Answer: c · To explicitly designate the directory as a Python package.
The card states that "Its mere presence turns a regular directory into an importable package," indicating its fundamental role is to mark a directory as a package. While it can contain code to import sub-modules (option A), this is an optional setup task, not its primary function of defining the package itself.
Read the full bite: Python Packages: Grouping Modules with __init__.py
Question 11 of 30
A Go server spawns a goroutine per incoming request, and one handler blocks forever reading from a channel that nothing will ever write to. What happens to that goroutine?
Show the answer
Answer: b · It stays alive indefinitely, quietly consuming its stack memory, because Go never force-cancels a blocked goroutine on its own
Go has no automatic timeout or forced cancellation for a blocked goroutine, so it simply stays parked, leaking its stack, until the process exits or something explicitly unblocks it. The runtime does not kill it after a timeout, a single blocked goroutine does not crash the whole program since Go only reports a deadlock when every goroutine is blocked at once, and the garbage collector does not collect a goroutine that could still be unblocked.
Question 12 of 30
What is the primary reason to avoid using "natural keys" like email addresses as primary keys?
Show the answer
Answer: a · Their values can change over time, complicating data management and relationships.
The card states that natural keys "can change, which creates a maintenance nightmare" and requires updating the value in every referencing table. This directly points to complications in data management and maintaining relationships. While other options might have some truth in different contexts, the card emphasizes changeability as the core issue.
Read the full bite: Primary Keys: The Unique ID for Every Row
Question 13 of 30
What primary problem do Python Enums address in code?
Show the answer
Answer: c · Making code more readable and less prone to errors when using fixed sets of values.
The card states Enums solve the problem of "magic values" by providing a "robust, readable, and type-safe way to define a fixed set of named constants," making code's intent "immediately clear." While Enums contribute to type safety, their primary purpose is to replace obscure "magic numbers" with meaningful names for fixed sets of choices, improving readability and reducing errors from typos or misunderstandings.
Read the full bite: Python Enums: Give Names to Magic Numbers
Question 14 of 30
How does a concrete type in Go become an implementer of an interface?
Show the answer
Answer: b · By defining all the methods specified in the interface's method set.
A type satisfies an interface implicitly by implementing its methods, without an 'implements' keyword. Option B accurately describes this structural typing, where a type automatically satisfies an interface if it provides all the required methods. Option C is incorrect because Go does not use an explicit 'implements' keyword.
Read the full bite: Go Interfaces: Describe Behavior, Not Data
Question 15 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 16 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 17 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 18 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 19 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 20 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 21 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 22 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 23 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 24 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 25 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 26 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 27 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 28 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 29 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 30 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
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.