Blog

Writing on agentic AI, blockchain, and AI systems architecture.

Technical writing by Mudassir Khan — agentic AI consultant and AI systems architect. New posts published directly on this site. Earlier writing on Dev.to.

Blockchain & Web3

Ethereum, Solana, smart contracts, wallets, on-chain transactions, and ERC token standards.

Cover illustration for: Solidity for Loop: Syntax, Patterns, and Gas Tips
BlockchainSoliditySmart Contracts13 min read

Solidity for Loop: Syntax, Patterns, and Gas Tips

Master the Solidity for loop. Counter syntax, break and continue, four iteration patterns, the unchecked-increment gas optimization, and a complete ScoreBoard contract with full code.

Read post →
Cover illustration for: while Loop in Solidity: Binary Search and Sentinel Patterns
BlockchainSoliditySmart Contracts13 min read

while Loop in Solidity: Binary Search and Sentinel Patterns

Master the Solidity while loop. Binary search with overflow-safe midpoint, unbounded loop dangers, four common mistakes, and a complete SortedBidList contract.

Read post →
Cover illustration for: do-while Loop in Solidity: Slot Scanning and At-Least-Once Patterns
BlockchainSoliditySmart Contracts11 min read

do-while Loop in Solidity: Slot Scanning and At-Least-Once Patterns

Master the Solidity do-while loop. The at-least-once guarantee, slot scanning patterns, wrap-around search, four common mistakes, and a complete SlotReserver contract.

Read post →
Cover illustration for: Loop Gas Optimization in Solidity: Five Techniques
BlockchainSoliditySmart Contracts12 min read

Loop Gas Optimization in Solidity: Five Techniques

Cut loop gas costs in Solidity with five proven techniques: cache array length, unchecked ++i, prefix increment, memory accumulators, and single SSTORE after loop. Complete airdrop contract.

Read post →
Cover illustration for: Loops with Mappings in Solidity: Enumerable Pattern
BlockchainSoliditySmart Contracts14 min read

Loops with Mappings in Solidity: Enumerable Pattern

Iterate over Solidity mappings safely. Enumerable mapping pattern, pull over push for unbounded sets, paginated reads, and a complete EnumerableStakingRegistry contract.

Read post →
Cover illustration for: Solidity Mapping with address: Patterns and Full Contract
BlockchainSoliditySmart Contracts13 min read

Solidity Mapping with address: Patterns and Full Contract

Learn how to use address as a key and value in Solidity mappings. Balance tracker, ownership registry, approval grant, and freeze flag with a complete smart contract.

Read post →
Cover illustration for: Solidity Mapping with uint256: Voting and Leaderboard Patterns
BlockchainSoliditySmart Contracts13 min read

Solidity Mapping with uint256: Voting and Leaderboard Patterns

Learn how to use uint256 as key and value in Solidity mappings. Voting tallies, leaderboards, staking counters, and a complete governance contract with full code.

Read post →
Cover illustration for: Solidity Mapping with bool: Whitelist and Access Control
BlockchainSoliditySmart Contracts12 min read

Solidity Mapping with bool: Whitelist and Access Control

Learn how to use bool as a mapping value in Solidity. Whitelist gates, role access control, and presale guards with complete smart contract examples and gas notes.

Read post →
Cover illustration for: Nested Mapping in Solidity: ERC20 Allowance and Two-Key Patterns
BlockchainSoliditySmart Contracts14 min read

Nested Mapping in Solidity: ERC20 Allowance and Two-Key Patterns

Learn nested mappings in Solidity. How ERC20 allowance works, the two-step keccak256 storage derivation, and a complete AllowanceToken contract with approve and transferFrom.

Read post →
Cover illustration for: Solidity Mapping with bytes32: Document Registry and Role Identifiers
BlockchainSoliditySmart Contracts13 min read

Solidity Mapping with bytes32: Document Registry and Role Identifiers

Learn how to use bytes32 as a mapping key in Solidity. Document registries, keccak256 role identifiers, and hash-based storage patterns with complete smart contract code.

Read post →
Cover illustration for: uint Array in Solidity: A Beginner Smart Contract Guide
BlockchainSmart ContractsSolidity16 min read

uint Array in Solidity: A Beginner Smart Contract Guide

Learn the uint array in Solidity end to end. push, pop, delete, swap and pop, memory arrays, fixed length, and a Remix contract with every method.

Read post →
Cover illustration for: int Array in Solidity: A Beginner Smart Contract Guide
BlockchainSmart ContractsSolidity16 min read

int Array in Solidity: A Beginner Smart Contract Guide

Learn the int array in Solidity end to end. push, pop, delete, swap and pop, signed values, memory arrays, fixed length, and a Remix contract with every method.

Read post →
Cover illustration for: string Array in Solidity: A Beginner Guide With Code
BlockchainSmart ContractsSolidity16 min read

string Array in Solidity: A Beginner Guide With Code

Learn the string array in Solidity end to end. push, pop, delete, swap and pop, the memory keyword, fixed length, and a Remix contract with every method.

Read post →
Cover illustration for: address Array in Solidity: Beginner Guide With Code
BlockchainSmart ContractsSolidity16 min read

address Array in Solidity: Beginner Guide With Code

Learn the address array in Solidity end to end. push, pop, delete, swap and pop, the zero address, memory arrays, and a Remix Whitelist with every method.

Read post →
Cover illustration for: Struct Array in Solidity: A Beginner Smart Contract Guide
BlockchainSmart ContractsSolidity17 min read

Struct Array in Solidity: A Beginner Smart Contract Guide

Learn the struct array in Solidity end to end. push, pop, delete, swap and pop, field updates, memory and storage, and a Remix StudentRegistry contract.

Read post →
Cover illustration for: Create an ERC20 Token: Remix Step by Step
BlockchainAI Engineering13 min read

Create an ERC20 Token: Remix Step by Step

Build an ERC20 token from scratch and deploy it on Remix IDE. Full interface, contract code, deploy walkthrough, and the approve and transferFrom pattern.

Read post →
Cover illustration for: Create an ERC721 NFT in Remix: Step-by-Step Tutorial
BlockchainAI Engineering14 min read

Create an ERC721 NFT in Remix: Step-by-Step Tutorial

Build a complete ERC721 NFT contract on Remix IDE, end-to-end. Full IERC721 interface, mint and transfer code, IPFS metadata, safeTransferFrom receiver pattern, and how to verify on Etherscan.

Read post →
Cover illustration for: Create an ERC1155 Multi Token: Remix Tutorial
BlockchainAI Engineering14 min read

Create an ERC1155 Multi Token: Remix Tutorial

Build an ERC1155 multi token contract on Remix IDE. Full interface, batch operations, mint and transfer code, and a deployable game ready example.

Read post →
Cover illustration for: ERC-1155 With OpenZeppelin: A Beginner Tutorial With Code
BlockchainSolidity16 min read

ERC-1155 With OpenZeppelin: A Beginner Tutorial With Code

Learn ERC-1155 with OpenZeppelin from zero. Six Solidity examples: single mint, batch mint, safe transfers, metadata URIs, and a game inventory.

Read post →
Cover illustration for: Solana vs Ethereum: Blockchain Fundamentals Compared
BlockchainAI Architecture13 min read

Solana vs Ethereum: Blockchain Fundamentals Compared

Solana vs Ethereum — which blockchain should you build on? Distributed ledgers, Proof of History vs Gasper consensus, speed vs decentralization, and a VC perspective on chain selection.

Read post →
Cover illustration for: Blockchain Networks: RPC, Chain IDs, and MetaMask Setup
BlockchainAI Architecture13 min read

Blockchain Networks: RPC, Chain IDs, and MetaMask Setup

Public RPC endpoints are rate limited. How RPC nodes work, mainnet vs testnet, Chain IDs, and how to add a custom network to MetaMask with Alchemy.

Read post →
Cover illustration for: Solidity Smart Contracts: Complete Beginner Guide
BlockchainAI Engineering14 min read

Solidity Smart Contracts: Complete Beginner Guide

Solidity is the language for Ethereum smart contracts. This guide covers variables, functions, loops, control flow, and your first deployable contract.

Read post →
Cover illustration for: Solidity Mapping with Struct: Patterns and Examples
BlockchainSolidity14 min read

Solidity Mapping with Struct: Patterns and Examples

Mapping with struct is Solidity's workhorse for per-user state. Learn the pattern, see a full voting registry, master storage packing, and avoid the four common pitfalls.

Read post →
Cover illustration for: Solidity Arrays with Loops: Smart Contract Examples
BlockchainSolidity13 min read

Solidity Arrays with Loops: Smart Contract Examples

Arrays plus loops in Solidity: for vs while, the vote tally pattern, the unbounded loop bug, pagination, and pull over push. Six patterns and a complete worked example.

Read post →
Cover illustration for: Solidity Arrays From Scratch: A Practical Guide
BlockchainSolidity12 min read

Solidity Arrays From Scratch: A Practical Guide

Learn arrays in Solidity from scratch. Fixed and dynamic arrays, push, pop, length, delete, storage vs memory vs calldata, plus a full worked contract.

Read post →
Cover illustration for: Build a Solidity Calculator Contract: Beginner Tutorial
BlockchainSolidity10 min read

Build a Solidity Calculator Contract: Beginner Tutorial

Build a Solidity calculator smart contract from scratch. Add, subtract, multiply, divide with pure functions, stored state, events, and require, deployed in Remix.

Read post →
Cover illustration for: Solidity vs. Rust: Smart Contract Languages
BlockchainAI Engineering13 min read

Solidity vs. Rust: Smart Contract Languages

Solidity powers Ethereum DeFi. Rust powers Solana's Sealevel parallel runtime. Here is how the two languages differ on safety, performance, learning curve, and ecosystem depth.

Read post →
Cover illustration for: How Ethereum Wallets Work: Keys, Addresses, Signing
Blockchain9 min read

How Ethereum Wallets Work: Keys, Addresses, Signing

How an Ethereum wallet actually works — private and public keys, address derivation, seed phrases, and how a signed transaction proves ownership without revealing your key.

Read post →
Cover illustration for: How Ethereum Transactions Work: Lifecycle and Gas
Blockchain10 min read

How Ethereum Transactions Work: Lifecycle and Gas

An Ethereum transaction is a signed message. This guide walks through every field, the wallet to mempool to block lifecycle, gas pricing, and why some transactions fail.

Read post →
Cover illustration for: ERC Token Standards Explained: ERC20, ERC721, ERC1155, ERC1400, ERC4337, ERC6551
Blockchain11 min read

ERC Token Standards Explained: ERC20, ERC721, ERC1155, ERC1400, ERC4337, ERC6551

All major ERC token standards explained — ERC20 fungible tokens, ERC721 NFTs, ERC1155 multi-token, ERC1400 security tokens, ERC4626 vaults, ERC4337 account abstraction, and ERC6551 token bound accounts.

Read post →
Cover illustration for: Crypto Wallets: Setup to Your First Transaction
Blockchain13 min read

Crypto Wallets: Setup to Your First Transaction

What a crypto wallet actually stores, the difference between custodial and non-custodial, and a step by step guide to installing MetaMask and Phantom and sending your first testnet transaction.

Read post →

More posts coming soon

A 30-post technical series on agentic AI architecture, LangGraph patterns, blockchain compliance engineering, and production AI systems is in progress. Follow on Dev.to or LinkedIn to be notified.

Blog — Agentic AI, Blockchain & AI Architecture Writing