cd /news/developer-tools/missing-values-are-not-zero-in-a-sma… · home › topics › developer-tools › article
[ARTICLE · art-162522] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Missing values are not zero in a small TypeScript model

A developer outlined a TypeScript modeling pattern that keeps missing sensor readings distinct from observed zeros, using a discriminated union of 'observed' and 'missing' states rather than collapsing both into zero. The example, described as illustrative rather than deployed SIGNUM HQ code, argues that conflating an unavailable feed with a real zero can silently skew averages or conditions. The recommendation is to preserve the distinction through parsing, storage and presentation instead of trying to recover it after formatting.

by read1 min views1 publishedNov 2, 2026

This AI-generated design example is illustrative and does not describe deployed SIGNUM HQ code. A feed that is unavailable and an observed zero are different states. Converting both to zero can silently change an average or a condition.

type Reading = { status: 'observed'; value: number } | { status: 'missing' };
function observedValue(r: Reading): number | null {
  return r.status === 'observed' ? r.value : null;
}

Consumers must decide how to display or exclude missing observations. Keep the distinction through parsing, storage and presentation rather than trying to recover it after formatting.

── more in #developer-tools 4 stories · sorted by recency
── more on @signum hq 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/missing-values-are-n…] indexed:0 read:1min 2026-11-02 · —