Chart RS-26 · FN-10 2026-11-27 · 2 min read
Chart lighting

Field note FN-10

What research left in my production code

I spent five years building sensor platforms at a university before moving to backend work. The habits that came with me, found in my own code.

From 2017 to 2022 I worked on precision-agriculture platforms at the University of Trás-os-Montes e Alto Douro (UTAD), in Vila Real: mySense and THLogger, then, as a research fellow, the data pipelines of a pest and disease monitoring system that spanned several regions. Field devices sent sensor readings, and our backend took them in. I’m a co-author on two papers from that group: a low-power, low-cost field IoT device and VineInspector, a camera-and-sensor station for vineyards.

I didn’t think of myself as bringing research habits into backend work. Then, writing these field notes, I went through my own repositories, and the habits were everywhere. Here they are, with the evidence.

Measure before you decide

The clearest one. When I had to choose how Peak Horizon should work offline, I didn’t argue it. I measured both designs on the same area and wrote the result into the README: the panoramas took 19.4 MB even compressed, and a coarser grid was wrong by several degrees. The same area’s terrain tiles are 185 KB.

The same goes for alerting. SkyJourney’s alert thresholds come from a week of real traffic, not from what felt reasonable, and the alert levels are set against that baseline.

In research, a design choice without a measurement doesn’t get past review. In production nobody asks, which is exactly why it’s worth doing anyway.

Write the method down

A paper is mostly method: what you did, in enough detail that someone else could do it again. My code comments read the same way. They explain the reasoning, not the syntax. The one on a flight-time bug in SkyJourney walks through the whole failure before the fix.

They also cite sources. The list of airport code changes has a link next to every pair, to the authority that announced it. Nobody asked for citations in a code comment. But the next person to doubt one of those changes, probably me, can check it in one click.

Keep a reference implementation

Peak Horizon’s terrain tiles are compressed. The encoder is written in Python, readable and easy to check. The decoder on the watch is tested against the Python version on a real tile, including the tricky path where decoding resumes partway through a tile.

That’s the research pattern of a slow, obviously correct model that the fast one has to agree with. It costs one extra implementation, and it catches the bugs you can’t see by reading the fast one.

Build the evaluation before the model

“Ask your logbook” in SkyJourney uses two language models, one to write the database query and one to phrase the answer. Both are placeholders until an evaluation set of questions with known answers picks them. That set doesn’t exist yet. But the models won’t be chosen until it does, because a model picked from a handful of good-looking answers is an anecdote, not a result.

The same instinct is behind the answer check: every number the model writes must appear in the query’s result. That’s checking claims against data, done by code.

What carries over

If you’re making the same move, from research to production engineering:

  • Measure both options, and write the numbers where the decision lives.
  • Explain the method in the code, and cite your sources.
  • Keep a simple reference implementation, and test the fast one against it.
  • Build the evaluation before you choose the model.

Request
clearance