Q191. How would you write a robust, idempotent automation script?
A production script should be safe to re-run, fail clearly and clean up after itself. ```bash #!/usr/bin/env bash set -euo pipefail workdir=$(mktemp -d) cleanup() { rm -r...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (329 available).
A production script should be safe to re-run, fail clearly and clean up after itself. ```bash #!/usr/bin/env bash set -euo pipefail workdir=$(mktemp -d) cleanup() { rm -r...
The rule of three: if a class needs a custom destructor, copy constructor or copy assignment operator, it probably needs all three, because they manage the same resource....
**Arrow functions** (also known as "lambda expressions") provide a concise syntax for writing function expressions in JavaScript. Introduced in ES6, arrow functions are o...
Two-phase commit, 2PC, is an atomic commit protocol for transactions spanning multiple databases or resource managers. Phase one, prepare: the coordinator asks every part...
TCP congestion control keeps the sender from overwhelming the network. The sender maintains a congestion window, cwnd, and sends at most the minimum of cwnd and the recei...
Data leakage is when information unavailable at prediction time seeps into training, producing optimistic validation scores that collapse in production. Common sources: -...
A stateless JWT cannot be un-issued, so revocation needs supporting state. Options: - Denylist: store revoked token identifiers (`jti`) until their `exp`, and check on ea...
Kafka combines two features: - Idempotent producer: each producer gets a producer id and sequence numbers. The broker deduplicates retries within a session, so a network ...
In JavaScript, **first-class functions(first-class citizens)** mean that functions are treated like any other variable. That means: 1. You can assign a function to a vari...
Scaling relational databases follows a progression, because a single node eventually hits CPU, memory or I/O limits. 1. Optimise first: fix queries, add indexes, tune the...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.