🌍 Backend Development · flashcards
Backend Development Programming Foundations and Server Runtimes Flashcards
51 question-and-answer cards covering Programming Foundations and Server Runtimes as it is examined in Backend Development. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.
24 sample cards from the Programming Foundations and Server Runtimes deck
Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.
What is the difference between a parameter and an argument in a function?
A parameter is the named variable in a function's definition (a placeholder). An argument is the actual value passed to the function when it is called.
What are the four pillars of Object-Oriented Programming?
Encapsulation (bundling data with methods and hiding internal state), Inheritance (deriving new classes from existing ones), Polymorphism (one interface, many implementations), and Abstraction (exposing only essential features).
What is the difference between a class and an object (instance)?
A class is a blueprint/template defining properties and behaviors. An object is a concrete instance created from that class, holding its own actual data in memory.
In OOP, what is the difference between overloading and overriding?
Overloading defines multiple methods with the same name but different parameter lists (resolved at compile time). Overriding redefines an inherited method in a subclass with the same signature (resolved at runtime via dynamic dispatch).
What is the difference between composition and inheritance?
Inheritance models an 'is-a' relationship by extending a parent class. Composition models a 'has-a' relationship by building objects from other objects. Composition is often preferred for flexibility ('favor composition over inheritance').
What is a pure function in functional programming?
A function that (1) always returns the same output for the same input and (2) has no side effects (no mutation of external state, no I/O). This makes it deterministic and easy to test and reason about.
What is immutability and why is it valued in functional programming?
Immutability means data cannot be changed after creation; updates produce new values instead. It eliminates whole classes of bugs from shared mutable state, simplifies reasoning, and makes concurrency safer.
What is a higher-order function? Give examples.
A function that takes one or more functions as arguments and/or returns a function. Common examples are `map`, `filter`, and `reduce`, as well as functions that return closures.
What do map, filter, and reduce each do?
`map` transforms each element and returns a new collection of the same length; `filter` returns a subset of elements matching a predicate; `reduce` (fold) combines all elements into a single accumulated value.
What is the difference between an error and an exception, and what is exception handling?
An exception is an anomalous event disrupting normal flow that a program can catch and handle; an 'error' often denotes a serious, usually unrecoverable problem. Exception handling uses try/catch/finally blocks to gracefully manage such events.
What is the purpose of the `finally` block in try/catch/finally?
The `finally` block always executes after `try`/`catch`, whether or not an exception occurred, so it is used for cleanup such as closing files, releasing locks, or freeing connections.
What is the difference between checked and unchecked exceptions?
Checked exceptions must be declared or handled at compile time (e.g., Java's IOException). Unchecked exceptions (runtime exceptions) are not enforced by the compiler and typically indicate programming bugs like null dereferences.
What is the difference between synchronous and asynchronous execution?
Synchronous execution runs tasks one after another, blocking until each completes. Asynchronous execution starts a task and continues without waiting, handling the result later via callbacks, promises, or async/await, improving responsiveness for I/O-bound work.
What is blocking vs. non-blocking code?
Blocking code halts the thread until an operation (like a disk read) completes. Non-blocking code initiates the operation and returns control immediately, letting the thread do other work while the operation proceeds in the background.
What is a callback, and what is 'callback hell'?
A callback is a function passed to another function to be executed later, typically when an async operation finishes. Callback hell is deeply nested callbacks (the 'pyramid of doom') that make async code hard to read and maintain.
What is a Promise, and what are its three states?
A Promise is an object representing the eventual result of an asynchronous operation. Its states are pending (initial), fulfilled (resolved with a value), and rejected (failed with a reason). It settles once and cannot change afterward.
How does async/await relate to Promises?
async/await is syntactic sugar over Promises. An `async` function returns a Promise, and `await` pauses execution until a Promise settles, letting asynchronous code be written in a sequential, readable style (with errors caught via try/catch).
What is the event loop, and how does it enable non-blocking I/O?
The event loop is a mechanism that continuously checks a queue of pending callbacks and executes them when the call stack is empty. It lets a single thread handle many concurrent operations by offloading I/O and running callbacks upon completion.
In the JavaScript event loop, what is the difference between the microtask queue and the macrotask (callback) queue?
Microtasks (e.g., resolved Promise callbacks, queueMicrotask) run first and are fully drained after each task, before rendering. Macrotasks (e.g., setTimeout, I/O callbacks) are processed one per loop iteration. Microtasks have higher priority.
What is the difference between a process and a thread?
A process is an independent program instance with its own isolated memory space. A thread is a lighter unit of execution within a process that shares the process's memory with sibling threads, making inter-thread communication faster but riskier.
What is a thread pool and why is it used?
A thread pool is a managed set of pre-created worker threads reused to execute tasks. It avoids the overhead of constantly creating/destroying threads, limits concurrency to a fixed size, and improves performance and resource control.
What is the difference between concurrency and parallelism?
Concurrency is dealing with many tasks at once by interleaving their progress (structure), possible even on one core. Parallelism is literally executing multiple tasks simultaneously on multiple cores/processors (execution). Concurrency is not necessarily parallel.
Describe Node.js's architecture and its concurrency model.
Node.js runs JavaScript on the V8 engine with a single-threaded event loop for application code, using the libuv library to provide the event loop and a thread pool for offloading blocking operations (file I/O, DNS, crypto). This enables high-throughput, non-blocking I/O; CPU-bound work can still block the loop.
What is npm, and what is the role of package.json?
npm (Node Package Manager) is the default registry and CLI for installing and managing JavaScript packages. package.json is the project's manifest, declaring metadata, dependencies and devDependencies (with version ranges), and runnable scripts.
What this deck covers
The Programming Foundations and Server Runtimes deck follows the Backend Development Programming Foundations and Server Runtimes syllabus — 6 chapters and 31 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 8.5 cards per chapter.
Answers are written to be recallable, not just readable — averaging about 228 characters, which is long enough to carry the reasoning and short enough to say out loud.
A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.
Programming Foundations and Server Runtimes flashcards FAQ
How many Programming Foundations and Server Runtimes flashcards are in this Backend Development deck?
51 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.
Are these Backend Development flashcards free?
Yes. The preview here is free to read with no signup, and the full 51-card deck is free inside the Examius app.
What do the Programming Foundations and Server Runtimes cards cover?
They follow the Backend Development Programming Foundations and Server Runtimes syllabus — 6 chapters and 31 topics — so the questions track what is actually examinable.
How should I use these flashcards?
Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.