Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your Code Cannot Tell Blank From Unanswered

The report said forty percent of customers had opted out of marketing. Forty percent had not opted out. Forty percent had never been asked, because the question arrived eighteen months after they signed up, and the column was created with a value already sitting in it. Three different things are wearing the same clothes. Nobody was ever asked. Somebody was asked and said no. Somebody said yes,…

A study revealed that 40% of customers had opted out of marketing. However, 40% had not opted out and 40% had never been asked for their preferences. The reason for this discrepancy is that the question arrived 18 months after they had signed up and the column was already populated with a value. Three different situations were being represented with the same data.

Nobody had ever been asked directly. Some had been asked and declined, while others changed their mind and removed their preference. With only one column and two possible values, the absence of a value and a zero value were treated as equivalent, leading to ambiguity. This issue appears at two stages: the condition and the update.

In the condition, the language treats an empty string, empty list, missing key, and zero as the same. In the update, when a form posts every field it renders, fields that were not touched come back as blank, leading to incorrect recording of customer data. It is crucial to make the request specify which fields it intends to change rather than listing all fields the page happened to draw.

Additionally, at the counting stage, sums and averages can disregard values they cannot add up. The resulting number may appear accurate, but it only reflects the opinions of those who responded. To ensure clarity, it is essential to be precise about the states and record them early in the type. If there is only room for two options, document which two were kept and what was discarded.

Someone may review this column in four years to make a decision about real people, and they should be aware that the third meaning once existed unless explicitly stated.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

DORA Metrics: The Complete Guide for Engineering Teams (2026)

In 2023, Google's State of DevOps report revealed that "Elite" engineering teams deploy 208 times more frequently than Low performers, and restore services 2,604 times faster after incidents.

  • DORA Metrics were developed by Google's State of DevOps report in 2014
  • Elite teams deploy 208 times more often and recover 127 times faster than low performers

How to Measure Developer Productivity Without Surveilling Your Team

"How do I know if my developers are productive?" It's one of the most common questions from newly promoted engineering managers — and one of the most dangerous if answered badly.

  • Focus on outcomes, not outputs like lines of code or tickets closed
  • Measure impact metrics such as deployment frequency and lead time for changes
  • Use source control systems for objective data without surveillance

I Resurrected a Dead CRC Crate and It Suddenly Went Viral

Bonjour 👋! So there I was, browsing crates.io at an hour that most reasonable people would describe as "the middle of the night", doing what all emotionally stable developers do at that hour…

  • Developer revived abandoned crc32 crate on crates.io
  • Modernized crate with CI/CD, Debian/RPM packaging, Ferris logo
  • Optimized CRC-32 algorithm for speed and safety

The Part of the Job You Only See by Staying

The advice you hear most often is to move every couple of years, and there are good reasons behind it. There is also a category of learning that only arrives if you are still there, and nobody talks…

  • Staying in one job reveals insights from watching decisions age and evolve.
  • Workarounds abandoned as temporary can become essential, relied upon by multiple teams.
  • Time in a role allows consulting before decisions are made, significantly altering workweek.

More from Sunday 20 September →