Front Matter

Preface

The other three Nex books each make a bet about how a reader learns. Programming with Nex bets on the language itself, taught in order, from first program to last chapter. Beyond Code bets on three evolving domains, deep enough to carry every software-engineering fundamental it wants to teach. Tight Core, Open Edge bets hardest of all: one running system, built to defend a single design thesis from its first chapter to its last. Each of those bets pays off precisely because the book commits to it completely.

This book makes a different bet, and a more modest one: that some things are best learned by building unrelated, complete, runnable programs, and noticing what stays true across all of them. There is no evolving domain here and no single thesis under trial. A word-frequency counter has nothing to do with a chat server, and a chat server has nothing to do with a dashboard UI — until you notice that all three were built the same way: state the contract before writing the code, let the type checker close the doors it can close, and let automatic validations guard the ones it cannot. That discipline runs through every chapter, but it isn't the subject. The subject is the practice of building whole, working software, project by project, in a language that makes the practice visible on the page.

Every project in this book actually runs, and getting there took real work. Each one was built, tested against a hand-written check suite, and run to completion before a word of its chapter was written. Appendix C lays out the layout convention every project follows, and each chapter closes with its own takeaways — the general lesson its project's particular design happened to prove.

This book is written for the reader who has finished Programming with Nex — or knows enough of another statically typed, contract-aware language — and wants to see the language hold up outside of exercises. If you are new to Nex, Appendix D can server as a short bridge. You do not need to read this book start to finish. Each part stands on its own, and a reader who only wants the networking chapters, or only the concurrency chapter, can start there directly — the one exception is Part VI, the capstone, which deliberately reuses code from five earlier projects and is best read last.

— Vijay Mathew