Skip to content
tezvyn:

Go & Rust

Go web services, Rust backends, systems programming

74 bites

Test yourself: Top 30 easy Go & Rust interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Easy everything in Go & Rust, page 4

easy2 min read

Rust's Copy Trait: Implicit Bitwise Duplication

Rust's Copy trait makes assignments duplicate a value instead of moving it, allowing the original to still be used. It's an implicit, bitwise copy for simple types like integers.

easy2 min read

Stack vs. Heap: Where Go Puts Your Data

The stack is a fast, last-in-first-out region for local, fixed-size data. The heap is slower, flexible memory for dynamic data or values that escape a function's scope.

easy2 min read

Go's Entry Point: The `main` Package and Function

A Go program's entry point is package main. The compiler finds this package and its main() function to create a runnable binary. The footgun is naming a library main; this name is reserved for executables and will cause build confusion.

easy2 min read

Rust Modules: Your Code's File System

Think of Rust modules as a file system for your code, grouping logic and hiding details. You declare them with mod, and Rust finds the code in corresponding files. The footgun: items are private by default, so you must use pub to expose them.

easy2 min read

Rust Crates: Your Unit of Compilation

A crate is the smallest unit of code the Rust compiler handles—either a runnable program (binary) or a shareable library. A package, defined by Cargo.toml, bundles one or more crates. The footgun: a package can have many binaries but only one library.

easy2 min read

Rust HashMap: Fast, Secure Key-Value Storage

A Rust HashMap is like a dictionary, mapping unique keys to values for fast lookups. Use it for caching or frequency counting. The footgun: never modify a key after insertion, as changing its hash will break the map's internal logic.

easy2 min read

Rust Vectors: Your Go-To Growable List

A Vec<T> is Rust's smart, growable array. It automatically gets more memory when full, keeping items together for fast access. Use it for lists of unknown size. The footgun: frequent reallocations can be slow if you don't pre-allocate capacity.

easy2 min read

Go Maps: Your Built-in Hash Table

Go maps are the language's built-in hash tables for fast key-value lookups. Use make(map[K]V) to initialize one before writing. The biggest footgun is writing to a nil map, which causes a runtime panic. Always initialize your maps first.

easy2 min read

Go Slices: A Window into an Array

Think of a Go slice not as a list, but as a lightweight window into an underlying array. It's used everywhere for managing sequences of data. The footgun: since slices can share memory, modifying one can unexpectedly alter another.

easy2 min read

Go vs. Rust: Variable Mutability by Default

Rust variables are immutable by default; Go's are mutable. Rust forces you to opt-in to changeability with mut for compile-time safety. Go prioritizes convenience, trusting the developer.

easy2 min read

Go Interfaces: Describe Behavior, Not Data

Go interfaces define behavior, not data. A type satisfies an interface implicitly by implementing its methods, without an implements keyword. This enables writing flexible functions, like io.Writer handling files or HTTP responses.

easy2 min read

Goroutines

A goroutine is a lightweight function managed by Go's own runtime scheduler rather than the operating system, letting a single program run hundreds of thousands of concurrent tasks cheaply instead of the handful an OS thread model allows.

easy1 min read

Rust's Philosophy: Documentation and Community First

Rust's philosophy is deeply tied to its learning resources and community, ensuring developers are well-supported. This is evident in its official book, which is bundled with the language installation itself.

easy2 min read

Go's Design Philosophy: Engineering Over Novelty

Go's design philosophy is engineering over novelty, built to solve Google's problems with slow builds and complexity in massive codebases. It excels at large, networked systems where maintainability and fast compilation are critical.

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