Clean Code for Modern Systems

Deep dives into Rust and Solidity. Because elegant code isn't just readable—it's safe, efficient, and built to last.

Latest Masterclasses

Designing Safe and Predictable Solidity Loop Patterns

Designing Safe and Predictable Solidity Loop Patterns

Building a Safe ERC20 Rescue Function for Accidental Token Transfers in Solidity

Building a Safe ERC20 Rescue Function for Accidental Token Transfers in Solidity

Preventing Insecure Randomness in Rust: Generating Tokens, Keys, and Nonces Safely

Preventing Insecure Randomness in Rust: Generating Tokens, Keys, and Nonces Safely

Solidity Storage vs Memory vs Calldata: Choosing the Right Data Location

Solidity Storage vs Memory vs Calldata: Choosing the Right Data Location

Building a Safe ERC20 Batch Transfer Helper in Solidity

Building a Safe ERC20 Batch Transfer Helper in Solidity

Building a Typed Finite State Machine in Rust

Building a Typed Finite State Machine in Rust

Preventing Secret-Dependent Branching in Rust: Writing Control Flow That Does Not Leak Sensitive State

Preventing Secret-Dependent Branching in Rust: Writing Control Flow That Does Not Leak Sensitive State

Preventing Storage Layout Collisions in Solidity Upgradeable Contracts

Preventing Storage Layout Collisions in Solidity Upgradeable Contracts

Rust `std::mem::take` and `std::mem::replace`: Moving Values Out of Borrowed Data Safely

Rust `std::mem::take` and `std::mem::replace`: Moving Values Out of Borrowed Data Safely

Optimizing Rust with `std::sync::OnceLock` for Lazy, One-Time Initialization

Optimizing Rust with `std::sync::OnceLock` for Lazy, One-Time Initialization