trolls.dev

The Night Shift · Department

Engineering

How the software is really made: the decisions, the trade-offs, the details.

24 essays filed here

  1. 01

    The simplest way to find motion in a video is to subtract one frame from the next: whatever changed, moved. It works beautifully until the camera itself moves — a traffic cam pans, a webcam gets bumped, wind leans a pole — and then everything changed, so by that logic everything moved. The whole frame lights up and the one car actually crossing the intersection is lost in a field of false alarms. Thyseus reads public cameras it doesn't control and can't hold still, so before it can trust that something moved, it has to work out how much of the change was the world and how much was the lens. The fix is to measure the camera's own motion first, cancel it, and only then ask what's left.

    6 min read
  2. 02

    The portal says 'no more than ten pages,' and yours comes back rejected at twelve — even though you wrote exactly ten. A page limit isn't a byte limit: there's no slider that squeezes twelve pages down to ten, and the pages that put you over are almost always ones you never tallied — a cover sheet the template prepended, a signature page a tool appended, a blank verso your export left behind. Preflight counts the file the way the gate does, before the gate does: it reads the real page count, tells you exactly how many over you are, marks the blank pages that are safe to drop, and never touches the original — so the page you didn't count doesn't cost you the whole submission.

    6 min read
  3. 03

    You ship a change, and conversion climbs nine percent. Then someone splits the number by cohort and finds the truth: new users converted worse, returning users converted worse, every segment converted worse. The total rose anyway — because the release quietly changed who showed up, not how well the product worked. It's Simpson's paradox, and it's the trap a single headline metric is built to walk you into. code-results reads the number the only way that can't lie to you: split, and weighted by the mix that actually moved.

    6 min read
  4. 04

    You never typed a password, but the submission portal calls your PDF 'secured' and turns it away. The lock was there before you touched the file — set by a scanner, an export preset, or a download you forgot was protected — and it lives in a dictionary your reader honors silently, so the file opens fine and looks done while quietly refusing to be read by anything automatic. Preflight reads that dictionary before the gate does: it names the lock, tells you exactly what it forbids, and — if the file is yours — hands you a clean copy while leaving the original untouched.

    6 min read
  5. 05

    Every compressor you've ever used returns a smaller file, and smaller feels like success — so nobody checks what the bytes came off of. They come off the parts that made it a document: the selectable text flattened to a picture, the crisp vectors rasterized, the trim box nudged a hair. You find out at the far end, when someone can't select a word or the print shop finds the page moved. Preflight treats a pass that breaks one of those seals as a failure, not a win. If it can't hit the target while keeping the text selectable, the geometry exact, and the result independently verifiable, it refuses — and hands you back your untouched original instead of a smaller file that's quietly ruined.

    6 min read
  6. 06

    Ship one thing on a quiet afternoon and the number that moves after it is yours to read. Ship two things twenty minutes apart and the lift has no owner — it belongs to both changes and neither, and any clean split you draw between them is a number you made up. The honest move isn't to guess which deploy earned the win. It's to notice that, for now, the question can't be answered — and to say so out loud instead of picking a winner.

    6 min read
  7. 07

    Look at the Drudge Report at nine, then again at nine-forty, and the whole wall looks new. Most of it isn't. The same stories get reworded, resized, and shuffled through the day, and the page never tells you which lines are genuinely new and which just changed clothes. The trick to reading it the way a person wishes they could is knowing that the headline is a costume and the link underneath it is the name — so that's what DReader diffs.

    6 min read
  8. 08

    Two PDFs sit side by side on your screen, pixel for pixel identical. One is a real document; the other is a photograph of one. You can't tell them apart by looking — until you press Cmd+A and one of them selects nothing at all. That gap between what a page looks like and what's actually under it is where filings get bounced, citations go missing, and a finished document quietly fails a requirement no one showed you. Preflight reads the layer, not the picture.

    6 min read
  9. 09

    You finish the document, you go to submit it, and a box you never think about turns you away: the file is 5.31 MB and the limit is 5.00. All the work is done and the last obstacle is arithmetic. The reason it stings is that the upload form deals in exact bytes while every tool you reach for deals in vibes — 'compress,' 'reduce size,' a hopeful slider. Preflight is built to close that gap: it measures the file against the exact ceiling, builds a copy that provably fits, and never once touches the original.

    6 min read
  10. 10

    Ship a change, watch the metric, and sometimes the line just… doesn't move. Most tools treat that as a non-event — no green arrow, nothing to celebrate, nothing to file. But a confirmed 'no effect' is a real result, and burying it is how a team pays twice: once to build the thing, and again to relearn that it did nothing. code-results stamps the flat line as a finding, not a gap.

    6 min read
  11. 11

    A map stitched from strangers' browser tabs covers exactly the ground someone happens to be pointing a tab at — and nothing else. The tempting bug is to smooth over the gaps, to let a quiet block read as a clear one. Thyseus does the opposite: it draws its blind spots as blind spots, because a dark square that means 'unwatched' is honest and a dark square that means 'clear' is a lie the map can't back up.

    6 min read
  12. 12

    Almost every content app is a room — furniture arranged to keep you sitting in it, measured by how long you stay. The Drudge Report is the opposite: an index whose entire purpose is to send you somewhere else. So DReader's real product was never the page you look at. It's the round trip — out to the story fast, and back to the exact spot you left, so the next headline is one tap away.

    6 min read
  13. 13

    A change is a trade, not a gift. You ship to move one metric, you watch that metric, it moves, and you call it a win — while the number you never instrumented quietly moves the other way. The bill goes unread because it was never on the screen. code-results reads every deploy against the whole handful a business would notice, so the win and the cost arrive together, on the same board.

    6 min read
  14. 14

    A live map reads like a snapshot of one instant. Thyseus's never is — it's stitched from strangers' browser tabs, each on its own delayed clock, reporting what they saw seconds apart and out of order. The honest half of a live map isn't drawing the dots; it's manufacturing a *now* out of many moments, and admitting the picture is always a little bit in the past.

    6 min read
  15. 15

    The answer to 'did it work?' isn't worth the same on Monday as it is three weeks later. Not because the number changes — because you do. The reason you shipped, the alternatives you weighed, the file you were nervous about: all of it decays out of memory on a curve. A verdict that arrives after the why is gone is a fact you can't act on. code-results is built to catch the answer while the reason is still lit.

    6 min read
  16. 16

    The Drudge Report says what matters not in its words but in its type — one headline set enormous, another flashed red, the rest filed small. That ranking is the editor's whole opinion, and it's the first thing a feed reader throws away. DReader's real job isn't fetching the links. It's carrying the emphasis across.

    6 min read
  17. 17

    A detector can tell you there's a car in the frame and draw a tidy box around it. That box is a claim about pixels, not about the world — column 412, row 380 is not a street corner. The interesting half of Thyseus is the geometry that turns a spot in a camera frame into a coordinate on a map, and why we run it in the same browser tab that saw the car.

    6 min read
  18. 18

    A modern news page makes you download a few megabytes to read a paragraph of headlines. The words — the thing you actually came for — are a rounding error in the bytes. DReader is what's left when you ship only the rounding error, and why that isn't a diet you can apply to the heavy page but a different object entirely.

    5 min read
  19. 19

    Sign-ups are up since you shipped. That feels like a win — but 'up' is a level, and a level is the one thing that can't tell you whether your change did anything. The real question is whether the line broke where your deploy landed, and that's a question of alignment, not analytics.

    5 min read
  20. 20

    A live map drawn by strangers' laptops has an obvious problem: why trust any single detection? A cheap model watching a rainy feed will call a truck a bus. Thyseus doesn't answer that by building a better observer. It answers it the way a newsroom does — by corroboration — and turning agreement into confidence is the part that makes the map real.

    6 min read
  21. 21

    The Drudge Report has no RSS, no API, no app, and no intention of adding any. It is hand-edited HTML that changes dozens of times a day. DReader has to read it the way a person does — by looking at the page — and that constraint, not the styling, is the whole engineering problem.

    5 min read
  22. 22

    The usual way to build a live map of the physical world is to buy sensors and rent servers to watch them. Thyseus does neither. It turns cameras that already exist and browser tabs that are already open into a sensor network nobody had to install — and that inversion is the whole product.

    6 min read
  23. 23

    Most teams can tell you exactly what they shipped last quarter and almost nothing about whether it mattered. The feedback loop dies at the merge button — and that's the loop code-results is built to close.

    5 min read
  24. 24

    Our homepage used to hide its own headline behind 312KB of JavaScript. We rebuilt it to ship zero client-side JS — same animations, same design, visible before any script runs. Here's how, and why a tiny studio cares.

    5 min read