Skip to content
tezvyn:
Menu

⚙️Backend Dev

Backend engineering, APIs, and databases

290 bites

Test yourself: Top 30 easy Backend Dev interview questions →Multiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Easy everything in Backend Dev, page 7

easy2 min read

What is go test -race and when is it crucial?

This tests knowledge of Go's race detector. A strong answer says -race instruments code to detect racy reads/writes, finds data races not deadlocks, and is crucial for concurrent apps under load.

easy2 min read

How does Rust differentiate unit and integration tests?

Tests Rust test layout and privacy. Unit tests sit in src/ under #[cfg(test)] and call private functions via super::. Integration tests go in tests/ as external crates. Wrong: claiming it blocks private testing or merging them into src/.

easy2 min read

How do you write a table-driven test in Go?

Tests idiomatic Go test design. A strong answer: slice/map of structs with inputs/expected outputs, loop with t.Run for named subtests, and cite DRY code, parallelization, and failure isolation. Red flag: separate Test functions per case or omitting t.Run.

easy2 min read

Serialize a Go struct to JSON and contrast with Rust

This tests fluency in Go's encoding/json versus Rust's derive macro ecosystem. Go: call json.Marshal on exported fields; Rust: derive Serialize, then serde_json::to_string. Red flag: claiming Rust uses std-only serialization or that Go needs external crates.

easy2 min read

Build a TCP server in Go and Rust using standard libraries

Tests standard-library networking APIs in both languages. Strong answer: Go's net.Listen with Accept loop vs Rust's std::net::TcpListener::bind and incoming iterator. Red flag: reaching for HTTP or async frameworks instead of core TCP primitives.

easy2 min read

Read a file into a byte slice in Go and Rust

This tests standard-library convenience APIs for slurping files. In Go, use os.ReadFile (1.16+) returning ([]byte, error). In Rust, use std::fs::read returning Result<Vec<u8>>. A red flag is opening a file and looping over reads when a one-liner exists.

easy2 min read

What is the difference between Cargo.toml and Cargo.lock?

Cargo.toml declares broad requirements; Cargo.lock pins exact resolved versions.

easy2 min read

How do you initialize and manage Go dependencies?

Init with go mod init; use go get and go mod tidy; go.mod sets path and versions, go.sum stores checksums for verified builds.

easy2 min read

Buffered vs unbuffered Go channels and deadlock scenario

Tests channel synchronization semantics. Unbuffered channels block until sender and receiver rendezvous; buffered channels block only when full or empty. Deadlock: goroutine sends on unbuffered channel with no receiver.

easy2 min read

How do Send and Sync prevent data races? Give a Send-but-not-Sync example.

Explain Send moves values and Sync allows shared references across threads; give Cell as Send but not Sync because it has interior mutability.

easy2 min read

What is the fundamental difference between a goroutine and an OS thread?

This tests your grasp of Go's M:N scheduler. A strong answer notes that goroutines are runtime-managed, multiplexed onto OS threads, and use far less memory per unit, enabling thousands of concurrent tasks.

easy2 min read

What is the difference between defining a Rust trait and implementing it?

Define with trait and signatures; implement with impl Trait for Type and concrete bodies.

easy2 min read

How does a Go type satisfy an interface? Provide an io.Reader example.

This tests implicit structural typing in Go. A type satisfies an interface by implementing every required method with exact signatures; no declaration links them. A red flag is claiming you need an implements keyword or explicit conformance.

easy2 min read

Rust's operator equivalent to Go's if err != nil return err

Tests if you know Rust's ? operator for error propagation. A strong answer names ?, explains it returns Err from the function via Result's Try and FromResidual traits, and unwraps Ok. Red flag: calling it .unwrap() or suggesting manual match is idiomatic.

easy2 min read

What are Rust Result's variants and how does the compiler enforce handling?

This tests Rust's explicit error model. A strong answer names Ok(T) and Err(E), explains must_use warns when Results are ignored, and notes pattern matching or ? is required to extract values.

easy2 min read

How do you idiomatically return a recoverable error and result in Go?

This tests Go's multiple-return error idiom. A strong answer gives a (T, error) signature with error last, returns nil on success, and checks err before using the result. A red flag is suggesting panic for recoverable errors or pointer out-parameters.

easy2 min read

Why are Rust's borrowing rules stricter than Go's pointers?

This tests compile-time versus runtime safety tradeoffs. A strong answer contrasts Go's aliasing with Rust's rule of one mutable or many immutable references to prevent data races without a GC. A red flag is calling Rust strict without citing race prevention.

easy2 min read

Explain Rust's Ownership and its three compiler-enforced rules

Tests your grasp of Rust's compile-time memory model. A strong answer lists the three ownership rules, links them to stack versus heap, and notes borrow checking enforces them at compile time. Red flag: calling it manual memory management.

easy2 min read

Describe Go's memory management, garbage collection, and trade-offs

Explain Go's GC recycles heap memory, the compiler stack-allocates locals, and automatic collection costs runtime overhead.

easy2 min read

Go package declaration, directory name, and import path relationship

Tests Go's separation of directory layout and package identity. A good answer states: import path is module path plus subdirectory; package clause is the in-code name; mismatch is legal and common for main or tests.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles