Lab note

What a qPCR lab taught me about writing product specs

Before I wrote production software, and long before I held a product title, I trained as a molecular biologist. My master’s thesis at TATAA Biocenter in Gothenburg investigated unspecific products in quantitative PCR: the artifacts that show up in a reaction and look like a result when they are not the thing you set out to measure.

I did not expect that work to shape how I write product specifications. It has, more than almost anything else I have learned since.

The question that connects them

Designing an experiment and specifying a product both come down to the same question: what would prove you wrong?

In a lab, you learn early that an experiment which can only confirm your hypothesis is not an experiment. It is a demonstration. Before you run anything, you decide what result would tell you that your idea does not hold, and you design the work so that result is possible to see.

A product spec deserves the same discipline. Most specs describe what the feature should do. Far fewer say what observation, after launch, would tell the team that the feature did not do its job. Without that, every outcome can be read as success, and the team learns nothing.

Controls: deciding in advance what normal looks like

qPCR taught me to respect controls. A reaction on its own tells you very little. A reaction next to a control that should be empty, and another that should certainly work, tells you whether the whole system is behaving before you read anything into your sample.

In product work, the equivalent is deciding what normal looks like before you change anything. If a metric moves after a release, you need to know how much it moves on an ordinary week, with no release at all. Otherwise you are reading noise as signal.

I try to write this into specs directly:

  • What is the baseline, and over what period was it measured?
  • What change would we treat as real, and what change is within normal variation?
  • What would we expect to see if the feature had no effect at all?
  • What would we expect to see if the measurement itself were broken?

That last question is the one most often missing, and it is the one the lab taught me to ask first.

Artifacts: when the signal is real but means something else

The core of my thesis was unspecific products. In qPCR, the instrument can report amplification that is perfectly real, chemically speaking, but comes from something other than the target. The signal is there. It just does not mean what you hoped it meant.

Product metrics have exactly the same failure mode. A count goes up because of a duplicated event, a test account, a retry loop, or a change in how something is logged. The number is real. It is just not measuring the behaviour you care about.

The lesson I carry is to be suspicious of any result that arrives too easily, and to ask what else could produce the same signal. If I cannot list at least one plausible artifact for a metric, I probably do not understand how it is collected well enough to trust it.

Null is not zero

A missing measurement and a measurement of zero are different facts. In a lab this is obvious: a failed well is not a sample with nothing in it. In software it gets lost all the time, because a database column, a chart or a spreadsheet will happily turn an empty value into a zero.

I built this rule into piano-agricolo, a farm planning dashboard I made for a planned agricultural venture in Calabria. Missing data is stored as null, never as zero, and estimates are labelled “to confirm” until they are. A crop with an unknown yield should not quietly look like a crop with no yield. The difference changes the cash-flow projection, and it changes the decision someone makes from it.

In a spec, this means writing down what the product should do when it does not know something. Show it as unknown. Do not let the absence of data become a confident number.

Two independent measurements

One more habit from the lab: when something matters, measure it two ways and see whether they agree.

In piano-agricolo, the business rules are written in both Postgres functions and TypeScript, and the two are tested against each other. If they disagree, one of them is wrong, and the tests say so before a user does. It is the software version of running the same sample with a second method. It costs a little more effort, and it removes a whole class of quiet errors.

What this looks like in a spec

In practice, the lab shows up in my specs as a few short sections that are easy to skip and expensive to leave out:

  • What would prove us wrong: the observation that would tell us the feature did not work.
  • Baseline and controls: what normal looks like, measured before the change.
  • Known artifacts: what else could move this metric without the behaviour changing.
  • Unknowns: how the product shows missing data, so it never reads as zero.

None of this needs a science degree. It needs the habit of assuming you might be wrong and designing the work so you would find out. A qPCR lab is a very good place to build that habit. A product team is a very good place to use it.

All lab notes