Archive

1290 posts · Page 98 of 108. ← Blog

Pratik Dhanave · ·8 min read

Shared State: Arc and Mutex

Moving data into a single thread is safe but limiting — sometimes multiple threads genuinely need to share and mutate the same data. This is exactly where data races live in other languages, and where Rust's guarantees shine brightest. The answer is a pair of types, `Arc` and `Mutex`, that let you share mutable state across threads — and the compiler will refuse to compile code that shares it unsafely. You literally cannot forget the lock, because the data lives inside it.

Sometimes multiple threads genuinely need to share and mutate the same data — exactly where data races live in other languages, and where Rust's guarantees shine brightest. The answer is Arc and Mutex, which let you share mutable state across threads while the compiler refuses to compile unsafe sharing. You literally cannot forget the lock.

Pratik Dhanave · ·6 min read

Threads and Fearless Concurrency

Rust's boldest promise is "fearless concurrency" — the claim that you can write multithreaded code and have the compiler guarantee, at compile time, that you have no data races. Coming from languages where concurrency bugs are a dark art of subtle, intermittent horror, this sounds too good to be true. It isn't: the same ownership and borrowing rules that give Rust memory safety extend naturally to threads. This module explores concurrency, starting with the basics — spawning threads and moving data into them.

Rust's boldest promise is fearless concurrency — write multithreaded code and have the compiler guarantee, at compile time, that you have no data races. It isn't too good to be true: the same ownership and borrowing rules that give memory safety extend naturally to threads. Module 3 begins with the basics — spawning threads and moving data into them.

Pratik Dhanave · ·8 min read

Product Management in Practice and as a Career

Product management, seen up close, is less glamorous and more valuable than its reputation suggests: a lot of talking to people, deciding what matters, and helping a team build the right thing — mostly through influence, not authority. This closing post steps back to the day-to-day reality of the role, the path into it (especially from engineering), and how product thinking makes any engineer more effective. Whether you become a PM, work with one, or found a company, understanding product management pays off — because building the right thing is the point of building anything.

Product management, seen up close, is less glamorous and more valuable than its reputation: a lot of talking to people, deciding what matters, and helping a team build the right thing — mostly through influence, not authority. The day-to-day reality, the path in from engineering, and how product thinking makes any engineer more effective.

Pratik Dhanave · ·8 min read

Shipping and Iterating

The hardest thing for perfectionist builders to accept is that a product is never "finished" before it ships — and shouldn't be. The most reliable way to build the right thing is to ship something small, learn from real usage, and improve, rather than perfecting in isolation and discovering at launch that you built the wrong thing. Shipping and iterating — the MVP, the feedback loop, the pursuit of product-market fit — is how good products are actually made: not by getting it right the first time, but by getting it right through iteration.

The hardest thing for perfectionist builders to accept is that a product is never 'finished' before it ships — and shouldn't be. The most reliable way to build the right thing is to ship something small, learn from real usage, and improve. Iteration beats perfection.