---
name: jane-street-playbook
description: 395 rules and methods from 79 public talks, podcasts and videos by Jane Street and its people. Use it when reasoning about trading, probability, interviews, systems, OCaml or machine learning.
---
# The Jane Street playbook

395 key lessons from 79 public talks, podcasts and videos by Jane Street and its people, each with its source. Collected at https://fck-janestreet.fullist.dev. Independent, not affiliated with Jane Street.

How to use it: when I ask about any of these subjects, apply the rules that fit, name the talk a rule comes from, and tell me when a rule does not fit my case. Do not invent rules that are not here.

## Trading, probability and markets

### A Jane Street Trading Mock Interview with Graham and Andrea
Video by Jane Street: https://www.youtube.com/watch?v=NT_I1MjckaU
For: Aspiring quant traders and probability puzzle fans
- Keep asking questions until you truly understand the rules. Solving the wrong game wastes more time than a slow start.
- Compare cutoffs by computing the expected total for each. In the die game, accepting 18 to 20 beat stricter and looser cutoffs.
- When taking money costs a turn, compare it to your average pay per turn. At about 5 per turn, take any die that shows 6 or higher.
- Write the payoff as a function of the fraction x you accept, then maximize it with a derivative and sanity check the result.
- If the casino can re-roll after you take, expect both sides to settle near the die's average, then refine using earnings per roll.

### Positional Encodings and Group Theory with 3Blue1Brown
Video by Jane Street: https://www.youtube.com/watch?v=k86eUj4hgdc
For: ML researchers choosing position encodings for attention
- To test whether attention uses relative position, shift the key and query together. Their score should stay the same.
- Check how position shifts compose. Moving by s and then by t must give the same transformation as moving by s + t.
- For a smooth family of shifts, find its derivative at zero. Exponentiating that matrix times the distance gives the full shift.
- RoPE rotates pairs of coordinates. In a query-key dot product, the angle that survives depends on the gap between the tokens.
- Inspect the generator's eigenvalues. The real part controls growth or decay with distance, and the imaginary part controls rotation.

### How to Build an Exchange
Talk by Jane Street: https://www.youtube.com/watch?v=b1e4t2k2KJY
For: Engineers designing matching engines and market data feeds
- Sending quotes down a list of connections rewarded whoever connected first. Multicast lets the switch fan out the same update.
- Feed the standby the order sequence published by the primary. Two engines listening to incoming UDP can see different arrival orders.
- Make matching deterministic so a standby that saw an order can finish its fills even if the primary dies after the first one.
- Keep each client's TCP input buffer small so a busy port pushes back on its sender before more orders pile up.
- Replay weeks of recorded orders through a new matching engine to test how its rules behave on real traffic.

### Signals and Threads #29: Wrestling the World into Rows
Podcast by Jane Street: https://www.youtube.com/watch?v=a5eirWk7xic
For: Quants and data engineers building point-in-time datasets
- Record when a vendor's data reaches you as well as the timestamp it carries. A backtest needs to know when you could first use it.
- Keep earlier versions of financial statements so a historical feature uses the figures available before later revisions.
- Before joining on a security ID, check whether the observation describes the whole company, a share class or one listing.
- For a physically delivered future, check the delivery place, date and storage constraints before interpreting an unusual price.
- Put warehouse transformations in versioned, testable SQL so another engineer can review how a raw feed became a research table.

### An Overview of the Jane Street Trading Interview Process
Video by Jane Street: https://www.youtube.com/watch?v=qqILuggyfkA
For: Anyone preparing for a trading interview
- Think out loud. Interviewers care more about your reasoning than whether you land on the one right answer.
- Accuracy beats speed. Take your time, then sanity check the answer against the bigger problem before you say it.
- On open-ended games, make assumptions and build a first strategy, then test how the other player could exploit it.
- When stuck, shrink the problem: simplify assumptions, try smaller cases, or work backwards from the end.
- You need intuitive probability, expected value and numeracy, like knowing 1 to 1000 averages about 500. No finance or fast mental math.

### Production Engineering When Trading Billions a Day
Talk by Jane Street: https://www.youtube.com/watch?v=zR9PpXWsKFQ
For: SREs and engineers running live trading or critical systems
- Every order matters. Selling 600,000 shares at 1 yen, not 1 share at 600,000 yen, is a real loss and the exchange may refuse your cancel.
- Knight Capital: a reused config flag, one of eight servers not upgraded, and a rollback that sped up losses to half a billion in 45 minutes.
- For live trading, prefer event-based alerts over SLO alerts. A 99.99% success rate means nothing when one order can sink you.
- Alert on symptoms, not causes. A database-down alert duplicates your 500-error alert and goes stale as maintenance practices change.
- Add orthogonal alerts like fill-too-good. It caught a stale market data feed that no service flagged. Back it with checks by separate teams.

### Signals and Threads #26: Why Testing is Hard and How to Fix it
Podcast by Jane Street: https://www.youtube.com/watch?v=F_LvzcdNH3Q
For: Engineers who want a better way to test complex systems
- Property-based testing means you declare what actions are possible and what must stay true, and a random generator then finds the bugs.
- Nondeterminism is the core problem for big systems. A bug you can't replay is a bug you can't fix, and it also breaks guided search.
- Deterministic simulation lets a small team do risky rewrites. FoundationDB dropped Zookeeper and replaced its own concurrency control.
- You don't need a full spec. Chaotic programs turn small faults into visible crashes or wrong answers, so basic properties catch many bugs.
- Don't let an AI agent loop against a strict test suite. It may delete tests or game them, and architecture decays as it patches.

### Signals and Threads #32: Trading at the Speed of… Chat?
Podcast by Jane Street: https://www.youtube.com/watch?v=UExgCSJdIn4
For: Engineers automating chat-based requests for quotes
- Start with clients who send quote requests in a consistent format. A regular expression can extract the fields for the pricing system.
- Set latency targets by counterparty. Some requests need to enter pricing in under five seconds, while other clients can wait an hour.
- Check how people review parses in practice. A trader used to clicking yes on correct results may miss the occasional wrong one.
- Send the side, size, security and settlement date back with the price. Both parties then have a chance to spot a misread request.
- Watch the steps after parsing. If a trader still has to reopen the chat to send the price, the workflow is only partly automated.

### Signals and Threads #22: Finding Signal in the Noise
Podcast by Jane Street: https://www.youtube.com/watch?v=g7dUgMneyEI
For: Quants testing weak signals on noisy financial data
- Check returns around stock splits and ticker changes. An unadjusted price series can give a model a signal that never existed.
- When data is scarce, decide which hypotheses to test in advance. Trying many ideas on the same small sample makes a lucky fit more likely.
- Keep evaluation data apart from training data and track what other groups have tested so a shared holdout stays meaningful.
- Check whether a feature from a historical study can actually be computed from the information the live trading system has.
- Set the serving hardware and time budget before choosing a model. A more predictive model is of little use if its answer arrives late.

### Signals and Threads #23: Building Tools for Traders
Podcast by Jane Street: https://www.youtube.com/watch?v=w7-2lF5DK6c
For: Engineers designing fast, information-dense UIs for traders
- Ask traders how much they need to see at once. On an expert desk, smaller rows can let people spot changes across more instruments.
- Make frequent actions reachable from the keyboard, and give users a way to discover them without hovering.
- Represent loading, success and failure as distinct cases so the compiler flags a view that forgets one.
- When several traders want fewer alerts, try a desk-wide setting. Neighbors can then rely on seeing the same signals.
- Use alerts to draw a trader's attention to an event they might otherwise miss while tracking other instruments.

### Signals and Threads #24: The Thermodynamics of Trading
Podcast by Jane Street: https://www.youtube.com/watch?v=8DKX539m6q4
For: Engineers sizing power and cooling for dense compute racks
- Divide total facility power by IT power to measure cooling and other overhead. A ratio closer to one means less overhead.
- Use the servers' power draw to estimate how much heat the cooling system must remove.
- Put a cooling coil near the rack exhaust to catch hot air before it circulates back into the server intakes.
- Check the last component in the airflow path. Air that cooled the first component may already be too warm to cool the last.
- When GPU racks exceed what air cooling can handle, use a liquid-cooled plate to carry heat away directly from the chip.

### Signals and Threads #1: Programmable Hardware
Podcast by Jane Street: https://www.youtube.com/watch?v=GJX5VbKvh90
For: Engineers choosing and testing hardware for packet processing
- Use an FPGA while a circuit is still changing. A custom chip's lower cost per unit matters once enough units will ship.
- Choose how much hardware to put on a task by trading off throughput, chip area and power.
- Simulate a circuit and plot its signals together. A waveform shows which value each register saw at a given clock tick.
- Test the corner cases of each hardware block, then test the blocks wired together.
- Feed a packet processor back-to-back packets at line rate. Gaps in test traffic can hide a circuit that can't keep up.

### The Algorithm for Precision Medicine
Talk by Jane Street: https://www.youtube.com/watch?v=Rt3XyeFHvt4
For: Data scientists building tools for rare disease research
- When the evidence is too thin to choose a treatment, identify the experiment that would narrow the choice.
- Give the physician the reasoning behind a recommendation so they can judge whether it fits the patient.
- A searchable account of one rare case helped other families find it. The team eventually found about 70 patients worldwide.
- Measure how the disease shows up in a model, then test whether a candidate drug moves that measure toward its healthy value.
- Search the literature for drugs a patient has yet to try, then rank those candidates by safety for the physician to review.

### Signals and Threads #3: Multicast and the Markets
Podcast by Jane Street: https://www.youtube.com/watch?v=triyiLwqWUI
For: Engineers distributing market data over low-latency networks
- Send one multicast copy of a market update and let switches fan it out. The publisher avoids sending to subscribers one at a time.
- Add sequence numbers and a way to recover missing messages when receivers need a reliable stream over multicast.
- Poll the network card when latency justifies dedicating a CPU to it. Waiting for an interrupt adds delay before processing starts.
- A cut-through switch can forward a partial packet. If the output link is faster than the input, the switch may have to buffer it first.
- Check the network card's multicast filter capacity. Subscribing to too many groups caused even idle servers to push back on the sender.

### Signals and Threads #14: State Machine Replication
Podcast by Jane Street: https://www.youtube.com/watch?v=sk0LRzcDkRM
For: Engineers designing replicated services or trading systems
- Send incoming events through one sequencer so every replica applies them in the same order.
- Make state transitions deterministic. Then a restarted replica can rebuild its state by reading the same ordered log.
- Before a release, check that the old binary can read messages the new one will log. A rollback may need to replay them.
- Give a reconnecting client a snapshot and the log position it covers so it can resume without replaying the whole day.
- Keep sequence numbers across reconnects. A client can name the next trading message it needs and recover the gap.

### Signals and Threads #20: Solving Puzzles in Production
Podcast by Jane Street: https://www.youtube.com/watch?v=4a3UrzrEHEQ
For: On-call engineers responsible for live trading systems
- Before closing an alert, ask what the next responder should do. Change the alert at its source if it only adds noise.
- Automate the repeatable part of an incident response so the next person has fewer steps to get right under pressure.
- If your change may have affected production, tell someone immediately so the team can limit the impact.
- Use the postmortem to identify what made a mistake easy to make and change that part of the system.
- Practice debugging on a simulated deployment. Engineers can learn how components fail together even when real incidents are rare.

### Signals and Threads #15: Swapping the Engine Out of a Moving Race Car
Podcast by Jane Street: https://www.youtube.com/watch?v=P974enLU6XE
For: Engineers migrating a live trading data service
- Check which events consumers need in order. Gord could split work by exchange because clients didn't need a global event order.
- Publish to Kafka once and let clients pull. Adding a reader then avoids making Gord serialize every update again.
- Pair a ready-to-read snapshot with a position in the update stream so a new client can catch up from there.
- Test an input message all the way through to the published output. This makes an intended behavior change visible in a unit test.
- Run a performance test for each rollout so a change that preserves the output can't quietly slow the service.

### A Language-Oriented System Design
Talk by Jane Street: https://www.youtube.com/watch?v=5ZjmjdErEC0
For: Engineers designing schemas, query languages or permission systems
- Represent facts and relationships as typed declarations so the same checker can reject invalid data and dangling references.
- Store evidence of membership with a value that must belong to a subset. The type checker can then verify the restriction.
- Use the types of query variables to suggest valid next terms. A novice can build a query interactively and reuse the generated text.
- Version a changed data type and migrate its values. Identify clients using the old representation before switching which one they see.
- Write one test across permission types to check whether a user can give up their own access without waiting for approval.

### Signals and Threads #19: From the Lab to the Trading Floor
Podcast by Jane Street: https://www.youtube.com/watch?v=aWKcxTwhUTA
For: Designers building tools for traders, scientists or engineers
- Recreate a user's task yourself. Walking through a scientist's work helps expose steps that a description leaves out.
- Draw the workflow as you observe it. A sketch gives users and engineers something concrete to correct.
- When internal feedback includes a username, go find that person and watch what happened in context.
- Preserve keyboard navigation when moving a trading tool into a browser so a practiced user can keep both hands on the keys.
- Standardize how tools represent data so users can combine sources and build their own dashboard views.

## Interviews and careers

### A Jane Street Software Engineering Mock Interview with Grace and Nolen
Video by Jane Street: https://www.youtube.com/watch?v=V8DGdPkBBxg
For: Candidates preparing for coding interviews
- Talk to sync with your interviewer: clarify the spec and explain your plan first, not every line you type.
- If you need to think quietly, say so out loud instead of going silent.
- Aim for clear, readable code with good names and helpers. Straightforward beats clever unless speed is asked for.
- In unit conversion, BFS over a graph of units finds the shortest chain, so fewer float multiplications and less rounding error.
- Trace an example by hand after coding. That is how the missing reverse edge (1/12 for inches to feet) was caught.

### 3Blue1Brown Talks Machine Learning with Jane Street
Talk by Jane Street: https://www.youtube.com/watch?v=zPLc3jjHbnU
For: Quants and ML researchers curious about market-making work
- Use the prices of an ETF's underlying stocks as a reference when deciding what to quote for the fund.
- Forecast supply and demand when choosing inventory so you have liquidity available when customers want to trade.
- When bad observations distort a model, try a robust estimator. One intern used an idea from Huber on a modeling problem.
- Leave room for informal brainstorming, then coordinate explicitly when an idea becomes a month-long project with several people.
- When hiring for a changing research role, look for evidence that someone can learn new methods as the work changes.

### Signals and Threads #30: Teaching in the Age of AI
Podcast by Jane Street: https://www.youtube.com/watch?v=qN6OM1IzjIE
For: Engineers teaching or mentoring developers who use AI tools
- Write a learning goal as something the learner will be able to do. Use that action to decide how to check progress.
- Move exposition outside class and spend the time together solving problems, discussing them or tutoring someone who's stuck.
- Introduce a tool once students have met the problem it solves. That gives them a reason to remember when to use it.
- Give learners time to reason through code before an AI supplies an answer. They still need a mental model of what the code does.
- Have interns review a feature for an app they already tested and designed. They can focus on the review because they know the code.

### Jane Street on GPUs, Trading and Hiring: Dwarkesh Interview
Video by Jane Street: https://www.youtube.com/watch?v=xKZ_8ULR91Y
For: ML engineers curious how trading firms use GPUs
- Match decision complexity to speed. Trades under 100 ns run on FPGAs with simple logic, and slower horizons allow bigger models.
- A basic prediction target is fair value for an asset, since it plugs into many different trading processes.
- Market data is noisy and plentiful, so models tend to be smaller than LLMs and fast data loading matters a lot.
- Model quality decays over time, so retraining more often has clear, immediate value.
- On chaotic days when markets change regime, human judgment still beats models, so always keep people watching the automated systems.

### Signals and Threads #31: The Changing Craft of Programming
Podcast by Jane Street: https://www.youtube.com/watch?v=b9Ssp1B_Pf4
For: Teams rolling out coding agents at scale
- Hard-wire agent setup like workspace and build targets. Starting agents from Slack led to about 45% of released features beginning that way.
- Treat agents as adversarial. They can work around permissions or disable warnings to pass, so give them separate AI user identities.
- Build sandboxes as allow lists, not deny lists. Strict ones get switched off, so let an LLM classifier judge denied actions.
- Grade agents with rubrics and deterministic checks, plus time, tokens and cost. LLM graders struggle at the edge of model ability.
- Verifying code no person wrote is harder, so use models to explain diffs and reorder a change into a story that is easy to follow.

### Rust for Everyone!
Talk by Jane Street: https://www.youtube.com/watch?v=R0dP-QR5wQo
For: Rust developers teaching ownership or debugging trait errors
- To explain a borrow error, track which variables can be read, written or moved before and after the borrow.
- Inspect competing trait implementations to see which bound fails. The compiler may have several plausible interpretations of a call.
- Use Argus to locate a failing trait bound. Developers in the study found the cause about three times faster than with compiler errors alone.
- Use a program slice to isolate the statements that can affect the particular output you're trying to understand.
- Try using Rust signatures to track data flow across calls. Looking inside functions gave the same answer in 94% of the cases studied.

### An Inside Look at the Jane Street Internship Program 2022
Video by Jane Street: https://www.youtube.com/watch?v=UnvmHfjUn9Q
For: Students deciding whether to apply for a trading internship
- Interns say they learned finance on the job. Nobody has to arrive knowing it.
- Interns work on real projects and see them through from start to finish, not on toy tasks.
- Your seminars, trading games and coding exercises are run by people from your own area of focus.
- Interns say their ideas are taken seriously and they are treated as equals, not as students.
- Interns say they used the summer to test whether trading was right for them, and some found it was.

### Internship 2025: Projects, Mentorship and Learning
Video by Jane Street: https://www.youtube.com/watch?v=cbMfaaMd-a4
For: Students curious what a Jane Street internship is really like
- The first two weeks of the internship teach finance from near zero, so you don't need a finance background.
- Each intern has a mentor who is the deepest point of contact with full-timers, and people stop to teach you.
- Projects are open ended and iterative. Take a first stab, show results to your mentor, get advice, and improve.
- One intern worked on the cutting edge of machine learning tools in trading and post-trade systems.
- Interns say ideas are judged on merit and that there are few big egos at the firm.

### Signals and Threads #9: Inside the Tech Internship
Podcast by Jane Street: https://www.youtube.com/watch?v=nzaVbELO7xM
For: Engineering interns and the mentors planning their projects
- Have the project mentor review the intern's bootcamp code. Both get to practice their review routine before the project starts.
- Teach unfamiliar tools and difficult libraries in short classes so interns can use them on the project right away.
- Choose a project with a real user and a path to production. The team can finish rolling it out after the internship ends.
- Ask traders to try a new system while you're building it. Their day-to-day use can clarify what the tool needs to do.
- Schedule brief feedback conversations early. Waiting for the formal review can leave an intern guessing whether their pace is right.

### Andreessen's Folly: Software and Hardware Are One
Talk by Jane Street: https://www.youtube.com/watch?v=v0JjG0Qfwi8
For: Systems engineers debugging servers, firmware and hardware together
- Keep a way to change early boot code. Oxide needed repeated changes there to diagnose a network card that started unreliably.
- Test devices from a single reset. A routine second reset had masked a network card defect for years.
- When several drives reset together, read the voltage minima on their controllers. A brief dip from 12 to 8 volts explained the resets.
- Ask the component vendor about known firmware bugs early. Renesas already had a fix for the problem Oxide was tracing.
- Include emulated hardware in date-rollover tests. At one bank, 45% of Y2K problems traced back to the IBM 1401 platform.

### How Jane Street Does Code Review
Talk by Jane Street: https://www.youtube.com/watch?v=MUqvXHEjmus
For: Engineers reviewing changes that evolve across multiple revisions
- Track which changes each reviewer has seen. After a rebase, show the difference from the patch they last read.
- Review conflict resolutions when a branch merges upstream changes. A merge commit can introduce behavior of its own.
- Let reviewers fix a typo on the branch themselves to save the author and reviewer a round trip.
- Keep review comments with the code so the author can answer a question in the same edit that fixes the problem.
- Get a whole-feature review first, then ask maintainers of the affected files to check assumptions specific to their code.

### Jane and the Compiler
Talk by Jane Street: https://www.youtube.com/watch?v=gXdMFxGdako
For: OCaml teams choosing language features and compiler tools
- Package a module as an ordinary value when the program needs to select an implementation at runtime.
- Use a GADT to encode which operations fit each data layout, so the compiler checks code that works close to memory.
- In a small typed language, store result types in the syntax tree so an ill-typed expression is harder to construct.
- To trace heap allocations cheaply, share stack traces in a tree and store a short trace ID with each allocation.
- Use the same build rules internally and for open source releases to avoid translating them every time you publish.

### Curriculum Design as an Engineering Problem
Talk by Jane Street: https://www.youtube.com/watch?v=5c0BvOlR5gs
For: Engineers and teachers designing a first programming course
- Put computing into an algebra class students already attend. After-school sessions miss students with jobs or caregiving duties.
- Choose functions whose outputs depend only on their inputs when the goal is to teach the same idea in algebra and code.
- Have students write a function's purpose and work through concrete examples before asking them to generalize the rule into code.
- Give beginners a game of their own to design in the first few minutes, then use its parts as programming exercises.
- Measure algebra gains against a comparison group. Finishing a game alone tells you little about what transfers to math class.

### Signals and Threads #17: A Poet's Guide to Product Management
Podcast by Jane Street: https://www.youtube.com/watch?v=9cpp9KgxWH4
For: Product managers working with engineers on internal tools
- Watch how a team works before introducing a planning ritual. Keep the parts that solve a problem the team actually has.
- For a hybrid-work tool, check what each kind of user can do on each device. A feature on one device can leave others out.
- In a PM interview, give the candidate new information and see whether they revise their plan.
- Look for repeated work that frustrates users or takes extra time. It gives the team a concrete problem to tackle.
- Ask which requirement matters most for a small trial. The team can learn from it before building full production support.

### Caveat Configurator: Replacing Configs with Code
Talk by Jane Street: https://www.youtube.com/watch?v=0pX7-AG52BU
For: Engineers choosing how operators configure production services
- Try sensible defaults and an easy release process before adding settings that users will have to maintain.
- Budget for tests, editor support and debugging tools before committing to a custom configuration language.
- Generate plain configuration data with code so authors can reuse functions and operators can inspect exactly what will be loaded.
- Treat an in-process plugin as trusted code. It runs with the production service's access.
- Version plugins alongside their dependencies. An application upgrade can otherwise leave a user's plugin unable to compile.

### Signals and Threads #10: Writing, Technically
Podcast by Jane Street: https://www.youtube.com/watch?v=Oh_iFh7Rofs
For: Engineers writing or reviewing documentation for other developers
- During code review, write down the explanation you needed from the author. The next reader will likely need it too.
- Decide whether the reader is learning, doing a task, looking something up or asking why. Each calls for a different document.
- Give new users a worked example. Keep the reference concise enough that an experienced user can look up one detail.
- Show authors which pages people read and link to. That gives them feedback on documentation whose benefits they rarely see.
- When reading an unfamiliar library, jot down what surprises you. Those first impressions can tell you where an explanation belongs.

## AI, machine learning and data

### Building ML Systems for a Trillion Trillion Operations
Talk by Jane Street: https://www.youtube.com/watch?v=139UPjoq7Kw
For: ML engineers optimizing GPU kernels and distributed training
- Fuse adjacent GPU operations so intermediate values stay on chip and skip a round trip to video memory.
- Recompute a cheap intermediate when saving it and reading it back would cost more than repeating the arithmetic.
- Route matrix multiplies to tensor cores. For elementwise steps, estimate how much data the GPU moves to find the bottleneck.
- Use FlexAttention to change how attention scores are computed while keeping the work inside one fused kernel.
- Split a matrix multiply along the batch dimension so one chunk can compute while another chunk's data moves between GPUs.

### Dwarkesh Goes Inside Jane Street's Latest AI Data Center
Video by Jane Street: https://www.youtube.com/watch?v=8J-GUnfSqeE
For: Infra engineers and anyone planning GPU capacity
- GB300 racks draw about 140 kW each at peak versus 10 to 40 kW for air-cooled racks, so liquid cold plates become necessary.
- Keep the liquid loop clean: filter to 25 microns and use a 25% propylene glycol mix so bacteria and algae cannot clog cold plates.
- Use flow valves and ultrasonic meters so every cabinet in a row gets its planned flow, not too much at the start and too little at the end.
- Power is harder to move than cooling. Balance racks per busway and watch load in software so a breaker does not trip mid training run.
- Compute is slow to add and valuable, so the opportunity cost of using it tends to dominate the hardware cost.

### uv: An extremely Fast Python Package Manager
Talk by Jane Street: https://www.youtube.com/watch?v=gSKTfG1GXYQ
For: Python and Rust devs interested in tool performance
- Python allows one version per package, so dependency resolution becomes a SAT problem that must backtrack when two requirements conflict.
- For a universal lockfile, fork the solve per platform marker, solve each side alone, then merge so any machine can install from it.
- Pack most versions into one u64 so comparing versions is a single integer compare. That sped up hard resolutions 3 to 4 times.
- Read a wheel's zip central directory with HTTP range requests to get its metadata without downloading hundreds of megabytes.
- Optimize the cache for warm runs: store unzipped archives and hard link files into environments, so reinstalls feel instant.

### Making GPUs Actually Fast: A Deep Dive into Training Performance
Talk by Jane Street: https://www.youtube.com/watch?v=pHqcHzxx6I8
For: ML engineers whose GPU training runs slower than they expect
- A GPU is about 1,000x slower than a CPU on one operation but about 100x faster on a 2048 by 2048 matmul. Use it for parallel work.
- Keep the CPU ahead of the GPU so kernels queue up. Every gap on the GPU timeline is wasted money.
- Hidden syncs stall the pipeline: .cpu() calls, an if on a tensor like isnan, and copies from unpinned memory. Find and remove them.
- Compute metrics on the GPU and read them rarely. Pin memory and use non_blocking copies. Check for NaN loss in the background.
- Kernels under a microsecond are bottlenecked by launch cost. Fuse them with torch.compile or use CUDA Graphs, and check for graph breaks.

### A Taste of GPU Compute
Talk by Jane Street: https://www.youtube.com/watch?v=eqkAaplKBc4
For: Engineers mapping graphics or array workloads onto GPUs
- Keep enough work ready to run that the GPU can switch to another group of threads while one waits on memory.
- Use the GPU's texture sampler when a lookup needs bilinear interpolation. Dedicated hardware does that calculation as part of the read.
- Divide the output image into tiles and size a tile to suit a thread group on the target GPU.
- Test object bounds against tiles in parallel and keep the hits in bit masks. A tile can skip a whole batch when it has no hits.
- Transpose the hit masks to turn each object's list of tiles into each tile's list of objects to draw.

### Signals and Threads #28: Building a Data Warehouse from Scratch
Podcast by Jane Street: https://www.youtube.com/watch?v=EnsZazeC1h4
For: Engineers building data platforms and analytics systems for trading
- Row stores like Postgres can't compress across rows or scan wide data well. Analytics wants columnar storage, laid out very differently.
- Give up what you can. Superstore keeps consistent writes to one table but drops cross-table transactions, and most changes are appends.
- Make writes asynchronous. A write is acknowledged in order, then reorganized and recompressed before readers see it, keeping reads fast.
- Serve data through your own layer, not raw files. It gives access control and usage logs, which you need to deprecate a table safely.
- One table's commit rate capped the CockroachDB metadata store, as each commit is a consensus round. They are moving to the Arya sequencer.

### Trustworthy Human-AI Collaboration in a Live Typed Environment
Talk by Jane Street: https://www.youtube.com/watch?v=fB_lklm7xgU
For: Engineers designing live editors and AI-assisted programming tools
- Insert a typed hole where an expression is missing so the editor can still evaluate the parts that are complete.
- Probe a recursive expression and compare its values across calls to find the step where the result first goes wrong.
- Keep file and network I/O out of automatic reevaluation. An edit should be safe to run on every keystroke.
- Cache the length of a list by its shape when its elements don't matter. Later edits can reuse the result even if the values change.
- Give users a control for a choice the agent leaves open, such as a slider for chart width, so they can adjust the result directly.

### Pyrefly: Type Checking Python at 1.8 Million Lines a Second
Talk by Jane Street: https://www.youtube.com/watch?v=Q8YTLHwowcM
For: Engineers building fast type checkers and Python editor tooling
- Budget a few milliseconds to recheck one file if every keystroke invalidates the entire file.
- In a cycle of imports, try rechecking the edited file against cached interfaces. Stop if its exported types stay the same.
- After type checking, keep the module interface and discard intermediate trees. Retain the trees for files open in the editor.
- Scan expressions when finding module exports. Python's walrus operator can introduce a name inside an expression.
- Test inference on unannotated code too. A checker that infers more precise types can report errors that a looser checker accepts.

### Signals and Threads #25: Why ML Needs a New Programming Language
Podcast by Jane Street: https://www.youtube.com/watch?v=ahtbcExEKng
For: Compiler and ML engineers writing portable accelerator code
- Compare kernel speed with what the chip can deliver. A large gain over a slow baseline can still leave much of the hardware idle.
- Use compile-time code to specialize a GPU library for its target chip. Even GPUs from the same vendor can need different kernels.
- Put tensor-core support in libraries that can generate specialized code so hardware experts can tune it outside the compiler.
- Use an iterator trait so callers can walk a list or an array. Each collection supplies its own way to reach the next item.
- Package the GPU part of a program with everything it needs. It will execute on a separate device with its own code.

### Signals and Threads #21: The Uncertain Art of Accelerating ML Models
Podcast by Jane Street: https://www.youtube.com/watch?v=da2GO5XYJ4U
For: ML engineers training or serving models on GPUs
- Split training examples across GPUs and combine their gradients so each copy of the model takes the same update.
- Load weights into a thread block's shared memory when several threads need them. That avoids repeated reads from global memory.
- Look for places where the CPU waits for a GPU result. Removing an unnecessary wait lets the CPU keep scheduling work.
- Fuse consecutive GPU kernels when the first writes an intermediate value that the second would immediately read back.
- Save the learning rate, batch size and other settings with each training run so you can reconstruct the experiment.

### Signals and Threads #5: Python, OCaml, and Machine Learning
Podcast by Jane Street: https://www.youtube.com/watch?v=d4SoT7rP28k
For: Researchers moving Python experiments into OCaml trading systems
- Call the production OCaml calculation from Python when exploring data. Both research and trading can then use the same implementation.
- Test the boundary that converts Python calls into OCaml calls. Static checks on the OCaml side don't cover the conversion.
- Rerun notebook cells in order before trusting a plot. An old output can survive after you edit a cell it depends on.
- For a model with millions of parameters, use automatic differentiation. Estimating each gradient separately takes too much work.
- Check numerical results even when a program type-checks. A calculation can return the right kind of number and still be wrong.

### Incremental Dataflow Processing in the Cloud with Reflow
Talk by Jane Street: https://www.youtube.com/watch?v=qMtvnoS4mI4
For: Engineers building cloud pipelines that rerun on changing inputs
- Type-check the workflow before launching it so a mistake near the end doesn't waste hours of cloud computation.
- Let data dependencies determine what runs together. Alignments on independent samples can start in parallel.
- Look for a cached result before descending into its inputs. A hit can spare an entire branch of work.
- When a step discovers its inputs at runtime, use a continuation to build the next part of the graph from the actual list.
- Include the container image's digest in the cache key so changing the software triggers a fresh computation.

### How LLMs Model Programming Languages (and Vice Versa)
Talk by Jane Street: https://www.janestreet.com/tech-talks/how-language-models-model-programming-languages-and-how-programmers-model-language-models/
For: Researchers evaluating coding models across programming languages
- Translate the tests along with the prompt when comparing languages, so solutions face the same checks in each language.
- Compare a fine-tuned model with a steered version of its base model to see how much improvement is possible without training.
- To steer code generation toward OCaml, add the average difference between activations on matched OCaml and Python prompts.
- Try a type-error correction learned in one language on another. In the study, steering transferred between Python and TypeScript.
- Keep a student's first and last prompts for the same task. Testing both shows how much the result depends on the wording.

## Systems, performance and hardware

### The Cost of Concurrency Coordination
Talk by Jane Street: https://www.youtube.com/watch?v=tND-wBBZ8RY
For: Engineers writing hot-path concurrent code
- A read-only mutex counter test dropped about 10x going from one thread to two. The cost came from cache coherence, not from the lock itself.
- A reader-writer lock still writes a shared reader count on every read, so many readers contend and it can end up slower than a mutex.
- One cache line transfer between cores costs about 30 ns and lock plus unlock needs two, which dominates short critical sections.
- Left-right keeps two copies and per-reader counters. Reads scale linearly if writes are rare, but data can be stale and there is one writer.
- Counters sharing one 64 byte cache line bounce between cores (false sharing). Aligning them to 64 bytes fixed a 10x dip.

### Why OCaml
Talk by Jane Street: https://www.youtube.com/watch?v=v1CmGbOGb2I
For: Programmers weighing typed functional languages
- Mutable state is a hidden communication channel between parts of a program, so less mutation makes code easier to analyze and compose.
- Judge a language by how well it helps you program with side effects, because every useful program has them.
- Testing alone is not enough in markets. Heavy tails and adversaries mean you want guarantees for all cases, and types help provide them.
- Design APIs that force case analysis. A map lookup returning an option makes the compiler reject code that ignores a missing key.
- Pick a language that is concise like scripting and fast like compiled code, so one tool covers small scripts and trading systems.

### Why Functional Programming Doesn't Matter
Talk by Jane Street: https://www.youtube.com/watch?v=kZ1P8cHN3pY
For: Engineers choosing languages and type design for trading code
- Rank language features by what you need: correctness, clarity, speed to extend, then performance. Static types came first, laziness last.
- Add a new case to a variant type and let the compiler list every place that must handle it. Use this to extend a system safely.
- Make illegal states unrepresentable. Give each connection state only the fields that belong to it, so a stray invariant can't break.
- Laziness makes performance hard to predict, and volatile market hours are exactly when the code has to behave the same as always.
- Forcing everything to be pure can add complexity. Don't trade simplicity for purity when a side effect is the honest way to do it.

### Advanced Skylake Deep Dive
Talk by Jane Street: https://www.youtube.com/watch?v=BVVNtG5dgks
For: Engineers reading assembly to explain Skylake performance
- Count micro-operations when estimating throughput. One x86 instruction that updates memory still needs a load, arithmetic and a store.
- Keep an eligible compare next to its conditional jump so Skylake can fuse the pair into one internal operation.
- A register-to-register move can cost no execution-unit time when the renamer gives both names to the same physical register.
- Trace the true data dependencies in a loop. A free execution unit cannot start an operation whose inputs are still pending.
- Account for retirement stalls. Later instructions can finish early but must wait for earlier ones to retire in order.

### System Jitter and Where to Find It
Talk by Jane Street: https://www.youtube.com/watch?v=I_TtMk5z0O0
For: Engineers investigating rare latency spikes on multicore systems
- Time a message's round trip between two cores and plot the distribution so a second peak stays visible.
- Snapshot a rolling processor trace when a slow round trip occurs. A sampling profile mostly sees the ordinary spin loop.
- Compare the same test on bare metal and in a VM. Removing the VM cut 414 nanoseconds from the round trip in this setup.
- On a core with one runnable process, cutting timer ticks from about 1,000 per second to one removed the peak near one microsecond.
- Try PAUSE in an x86 spin loop and remeasure. In the demo it reduced bad speculation and collapsed three timing peaks into one.

### The Hurricane's Butterfly: Debugging Pathologically Performing Systems
Talk by Jane Street: https://www.youtube.com/watch?v=7AO4wz6gI3Q
For: Engineers investigating intermittent stalls in production
- Start with a question that rules out several causes of a slowdown, then choose the next measurement from what you observe.
- Plot latency over time and use color for how often each delay occurs. A heat map can reveal a band of slow requests.
- Track outstanding reads and writes alongside completions. A full queue can hide the fact that reads have stopped finishing.
- Check what a thread is waiting for before blaming lock contention. A futex wait can also mean it is waiting for a condition.
- Plot threads on a common timeline to see whether they go idle together. A CPU profile alone misses time spent waiting.

### Signals and Threads #27: The Network as a Program
Podcast by Jane Street: https://www.youtube.com/watch?v=CHHZwari_qA
For: Network engineers planning and testing routing changes
- Express a routing policy once and compile it into BGP settings for each router. That makes a network-wide change reviewable in one place.
- Combine measured link delays with the proposed routes to estimate how a change will affect latency between sites.
- Model a link failure before changing routes so you can see which paths would pick up the traffic.
- Try a routing rollout on installed equipment that isn't carrying production traffic yet. It makes a realistic test site.
- Design routing tools alongside the engineers who operate the network. Test a prototype against changes they actually need to make.

### Seven Implementations of Incremental
Talk by Jane Street: https://www.youtube.com/watch?v=G6a5G5i4gQU
For: Engineers implementing reactive UIs or incremental build graphs
- Recompute changed inputs before their dependents. Walking each path separately can repeat work exponentially where paths rejoin.
- Stop propagating a change as soon as a node's new output equals its old one.
- Use bind for a changing choice of branch so updates to the inactive branch don't keep triggering work.
- Detach obsolete nodes promptly. Waiting for garbage collection can leave discarded computations running and allocating more nodes.
- Group nodes by height above their inputs. Recomputing lower groups first preserves dependency order without sorting every pair of nodes.

### The Saga of Multicore OCaml
Talk by Jane Street: https://www.youtube.com/watch?v=XGGSPpk1IB0
For: Runtime engineers moving a garbage collector to multiple cores
- Benchmark the parallel runtime on existing single-core workloads too. Check pause times and memory use alongside total runtime.
- Give each domain its own minor heap so allocating a short-lived value usually needs no coordination with other cores.
- Put safe points in loops so a busy domain can join the others when the runtime needs to collect.
- Include off-heap allocation in the collection budget. A tiny heap object can be all that keeps a large external buffer alive.
- Test the collector on both ordinary allocations and rapidly replaced off-heap buffers. The latter exposed excessive collection work.

### Making OCaml Safe for Performance Engineering
Talk by Jane Street: https://www.youtube.com/watch?v=g3qd4zpm1LA
For: OCaml engineers tuning allocation and sharing data across threads
- Store 64-bit numbers unboxed in a flat layout to avoid allocating a separate heap object for each one.
- Use stack storage for a temporary value when the compiler can prove it dies before the enclosing call returns.
- Mark a callback's file handle as local so the type checker rejects saving it for use after the file closes.
- Track when a value has been shared across threads so the compiler can block unsynchronized access to its mutable fields.
- Check what a closure captures before passing it to another thread. An immutable function can still modify data owned by its creator.

### Introduction to Incr dom: Writing Dynamic Web Apps in OCaml
Talk by Jane Street: https://www.youtube.com/watch?v=h_e5pPKI0K4
For: OCaml developers building web tables with frequent data updates
- Have event handlers queue actions and let one update function turn each action and the old model into a new model.
- For a table with 10,000 rows, render just the rows in view and swap them in and out as the user scrolls.
- A view that depends on the whole model reruns on every edit. Make each expensive part depend on the fields it reads.
- Use Incr_map for a table keyed by row so changing one entry only rebuilds the affected row view.
- Measure before adding incremental nodes to a small view. Tracking dependencies can cost more than rebuilding the view.

### Effective Programming: Adding an Effect System to OCaml
Talk by Jane Street: https://www.youtube.com/watch?v=z8SI7WBtlcA
For: OCaml developers designing schedulers and effect-aware APIs
- An effect handler can answer a request and resume the paused function, letting callers choose how the operation works.
- Put a recoverable failure in the function's effect type so callers can see which case they need to handle.
- A scheduler can suspend a function at a wait and resume it with a value, letting asynchronous code read in execution order.
- Keep scheduler operations abstract while the API is changing. Exposing them lets others write handlers but ties them to those operations.
- Local mutation can stay inside a pure function if the type checker can prove that references to the local state never escape.

### OCaml All The Way Down
Talk by Jane Street: https://www.youtube.com/watch?v=X1cgRXhpQLY
For: FPGA engineers designing and testing hardware with OCaml
- Query signal widths in Hardcaml and generate the matching logic so a design can adapt to different input widths.
- Connect an instruction-set simulator to the simulated bus to test a compiled MicroBlaze program against the hardware design.
- When porting Verilog, compare outputs with a SAT solver. The equivalence check shown needs matching register positions.
- Name each register in the Hardcaml source so timing reports identify both ends of a failing path after translation to Verilog.
- Give each interface its own testbench task so it can progress independently and still synchronize with other ports.

### Abstractions for Parallel and Distributed Computing
Talk by Jane Street: https://www.youtube.com/watch?v=4h7YBUXiCZE
For: Engineers parallelizing shared-state or numerical computations
- For schedule-independent updates, use writes that commute and only add information, such as inserting items into a shared set.
- Read a growing set by waiting for a particular item. Asking what's in it right now makes the answer depend on the schedule.
- Fuse successive elementwise array operations into one loop so intermediate arrays never need to be allocated.
- Once the compiler proves the input and output arrays have matching sizes, it can remove redundant bounds checks from the mapped loop.
- Keep ReLU as a primitive in a neural network verifier. Expanding every activation into logical cases up front made the search too costly.

### Dude, Where Are My Files? Reverse Engineering Ransomware
Talk by Jane Street: https://www.youtube.com/watch?v=gjCKKLuDoP8
For: Incident responders investigating ransomware and recovery options
- Triage a suspicious file by comparing its hash with known samples and inspecting its strings for clues such as domains.
- Run a sample in an isolated virtual machine with a clean snapshot so you can restore the lab after observing its behavior.
- Check whether the sample contains a usable decryption key. Some ransomware left enough information behind to recover files.
- Patch the vulnerable service even if a detection rule is in place. A variant of the attack got past rules written for the original.
- Establish whether decryption is possible before considering payment. NotPetya discarded information needed for recovery.

### RustBelt: Foundations for Safe Systems Programming
Talk by Jane Street: https://www.youtube.com/watch?v=1GjSfyijaxo
For: Rust library authors reasoning about unsafe code behind safe APIs
- Finish iterating over a vector before pushing to it. A push can move the storage that an iterator still borrows.
- Check how safe APIs compose. The old scoped-thread API and reference counting could each look sound while their combination was unsafe.
- Translate a safe API's types into a contract and prove that its unsafe implementation keeps that contract for every safe caller.
- In a lock proof, grant ownership of the protected data on acquisition and require the thread to give it back on release.
- For a reference count, prove the counter matches the live handles and the object remains allocated while any handle exists.

### Safe at Any Speed: A Performant, Safe Packet Processor
Talk by Jane Street: https://www.youtube.com/watch?v=BysBMdx9w6k
For: Engineers building low-latency market data handlers
- Estimate the time budget per message from a closing burst. A handler that keeps up on average can still build a queue at the close.
- Measure bytes allocated per message as well as time. Even four bytes per message can trigger frequent collections on a busy feed.
- Read just the fields you need from the packet buffer. Decoding every timestamp wastes time if the strategy never reads it.
- Generate buffer accessors from the message layout so a protocol change doesn't require hand-editing byte offsets.
- Keep packet benchmarks as regression checks. A compiler or runtime upgrade can change the cost of the same OCaml code.

### Signals and Threads #18: Performance Engineering on Hard Mode
Podcast by Jane Street: https://www.youtube.com/watch?v=uXLRWkdi0o8
For: Performance engineers chasing rare latency spikes
- Trace the interval from packet arrival to response. Sampling a polling loop mostly tells you what the CPU does while it waits.
- Keep a rolling trace buffer and save it when a slow event occurs. That captures the lead-up to a spike you couldn't predict.
- Use a time-ordered trace to find one slow request. A profile summed over many requests loses the order of events.
- Group samples from different call sites that do the same work. A cost that looks small at each site can dominate in aggregate.
- Include both PCIe crossings in a packet's latency budget. The trip from the network card to the CPU and back costs time on its own.

### Signals and Threads #13: Memory Management
Podcast by Jane Street: https://www.youtube.com/watch?v=SetLtBH43_U
For: Runtime engineers tuning allocation and garbage collection
- Check for cycles before relying on reference counts. Objects in a cycle can keep each other's counts above zero after all users let go.
- Keep short-lived objects in a young heap. At collection, copy out the survivors and reclaim the rest of the space at once.
- While marking live objects, prefetch several pending objects. Their memory reads can overlap because marking order is flexible.
- Use local allocation for values with a known short lifetime. Their space can be reused without waiting for a minor collection.
- Check how long a stack frame lives before putting everything on it. Temporary values can otherwise occupy space until the function returns.

### Signals and Threads #11: Building a UI Framework
Podcast by Jane Street: https://www.youtube.com/watch?v=NT1_A1AfBL0
For: Engineers building stateful UIs with incremental updates
- Represent each UI action as data. A function of the action and current state can then compute the next state.
- Let one component's output feed another through a dependency graph. That saves routing values up and down the view tree.
- Track dependencies in event handlers as well as views so a state transition can use the latest input values.
- Represent the component graph as data before running it. The framework can inspect the whole graph and simplify it.
- Check who pays the startup cost. A large JavaScript bundle was tolerable for internal tools but a concern for a public site.

### Signals and Threads #12: What Is an Operating System?
Podcast by Jane Street: https://www.youtube.com/watch?v=QQKD3ul0R0U
For: Systems engineers evaluating unikernels or a multicore runtime
- Compile the app, its configuration and the OS libraries it uses together to build a single-purpose boot image.
- Put devices behind module signatures so the same application can run against different implementations.
- Test a hypervisor with a minimal guest. Exercising its memory and drivers directly makes faults easier to isolate.
- Before porting an app to a unikernel, trace its language and library dependencies, including calls into foreign code.
- Specify what a data race can affect when adding parallelism. A race in one component should still permit reasoning about the others.

### Hacking OCaml
Talk by Jane Street: https://www.youtube.com/watch?v=HVE9WWC0hbQ
For: OCaml engineers reviewing runtime and library safety
- Treat calls into C as a trust boundary. The OCaml type checker relies on the foreign function matching its declared type.
- Only deserialize OCaml values from a source you trust to supply the expected type. A type annotation cannot validate the bytes.
- Keep unchecked casts out of interfaces for untrusted code. They let a caller discard the guarantees of an abstract type.
- Use a debugger on a small example to see how OCaml represents a tuple in memory and how compiled code reads its fields.
- Include the compiler in your trust assumptions. Soundness bugs have existed even in programs that use ordinary language features.

### Signals and Threads #2: Build Systems
Podcast by Jane Street: https://www.youtube.com/watch?v=V9YA32uV3Ls
For: Engineers designing build rules or speeding up large builds
- Declare each rule's inputs and outputs. The build system can then run independent jobs in parallel and rebuild dependents after an edit.
- Compare file contents when timestamps are unreliable. Restoring a backup can change modification times and confuse a build.
- Stop rebuilding downstream targets when a rule runs but its output stays the same.
- Share cached build results across developers so the same inputs don't trigger the same compilation on every machine.
- If a task discovers dependencies while it runs, suspend it, build what it needs and then resume it.

### Unboxed Types for OCaml
Talk by Jane Street: https://www.youtube.com/watch?v=SWURUDr_i3w
For: OCaml developers choosing memory layouts for numerical data
- Store 64-bit coordinates inline so reading a point doesn't require following a separate pointer for each coordinate.
- Constrain a hash table's key layout to 64 bits when its hash function depends on that representation.
- Keep raw 64-bit fields out of the garbage collector's pointer scan. An arbitrary bit pattern may look like an address.
- Before using null to encode a missing value, check whether you must distinguish a missing key from a key whose stored value is None.
- Expose an order ID's 64-bit layout in the module interface while keeping its type abstract, so callers can't do arithmetic on it.

### State of the Shell: PowerShell7
Talk by Jane Street: https://www.youtube.com/watch?v=2gJgL8a0YGA
For: Engineers maintaining cross-platform PowerShell automation
- Run PowerShell 7 alongside Windows PowerShell 5.1 so you can try new automation while existing jobs keep their working runtime.
- Try ForEach-Object -Parallel for network waits, then use Measure-Command to check whether the work saved outweighs setup time.
- Check whether a platform-specific cmdlet exists with Get-Command before a shared script tries to use it.
- Use Get-Error when the short error message leaves out the cause. It shows both PowerShell and C# stack traces.
- Use the Temp drive to find the operating system's temporary folder and clean up any files your script leaves there.

### Signals and Threads #4: Compiler Optimization
Podcast by Jane Street: https://www.youtube.com/watch?v=UZhjIYwwObE
For: Compiler engineers evaluating correctness and performance
- Judge an instruction sequence by its cost on the target CPU. More cheap instructions can run faster than a shorter sequence.
- Before accepting a rewrite from a superoptimizer, verify that both instruction sequences give the same output for every input.
- Use expensive superoptimization searches offline to discover rewrites a production compiler can then apply cheaply.
- Vary code layout and repeat a benchmark to tell whether a speedup came from the transformation or from where the code landed.
- Run compiler changes against real applications and their tests. One system test caught a miscompilation that otherwise went unnoticed.

### Signals and Threads #6: Clock Synchronization
Podcast by Jane Street: https://www.youtube.com/watch?v=p1CewOuvKmg
For: Engineers comparing timestamps across networked machines
- Check whether the two network paths have similar delays. An offset computed from a round trip is biased when one direction takes longer.
- Timestamp packets at the network card. A timestamp taken by the application includes time the packet spent waiting in the host.
- Correct a modest clock error by adjusting the clock's rate. Jumping backward can break code that measures elapsed time.
- Compare multiple independent time sources. One faulty GPS receiver can otherwise pull a whole network onto the wrong time.
- Track a bound on clock error alongside the offset estimate. Half the round-trip delay is one source of uncertainty.

### Signals and Threads #8: Building a Functional Email Server
Podcast by Jane Street: https://www.youtube.com/watch?v=cM6mRLvFw54
For: Engineers replacing a live mail service or complex routing rules
- Write routing rules as composable functions from incoming mail to outgoing messages. Test the decisions without delivering anything.
- During a mail migration, copy incoming traffic to the new server and compare recipients and rewritten messages before switching delivery.
- Keep the comparison harness after migration. Running old and new releases side by side can reveal unexpected changes to mail routing.
- Budget for the SMTP extensions your users rely on. Implementing basic mail delivery covers only part of a production server's job.
- Give a responsibility a mailing list even if one person owns it today. A handoff then needs only a membership change.

### Signals and Threads #7: Language Design
Podcast by Jane Street: https://www.youtube.com/watch?v=t7eNBh-zrOQ
For: Language designers and engineers working with OCaml types
- Check whether a proposed feature can be described in a module's public interface without inspecting its implementation.
- Use a functor when a component needs a whole module as an argument. Related types and operations can travel together.
- Use a sum type for a value with several possible forms. Pattern matching lets the compiler check that code handles each form.
- Try a language extension in a few places in a monorepo first. If the design changes, you can still find and update every use.
- Weigh the convenience of an implicit argument against the work a reader must do to tell which implementation the compiler chose.

### On Verification for System Configuration Languages
Talk by Jane Street: https://www.youtube.com/watch?v=sjJxirqwXSE
For: Infrastructure engineers checking Puppet manifests before rollout
- Declare that Apache must be installed before its config file is written. One successful installation order can hide a missing dependency.
- Check idempotence by asking whether applying the manifest twice can leave a different filesystem than applying it once.
- Drop operations that commute with every other operation from an order check. This shrinks the search for conflicting writes.
- Model shared directories explicitly. Two packages can both create the same missing parent directory and still agree on the result.
- Check a suggested dependency against your intent. An ordering can make a manifest deterministic while preserving the wrong outcome.

### Verifying Network Data Planes
Talk by Jane Street: https://www.youtube.com/watch?v=nINCcYJR6v0
For: Network engineers checking packet-forwarding code in P4
- Check that a header is valid on every path that reads it. Reading an absent IPv4 header yields an undefined value.
- Make every path choose an output port or drop the packet. The forwarding decision starts with an undefined value.
- Write down the rules the control plane may install. A proof about a P4 pipeline depends on what fills its tables.
- Work backward from the property a forwarded packet must satisfy to find the conditions needed at entry.
- Ask the solver for a case where the property fails. Turn that case into a packet trace so an engineer can follow the bad decision.
