Urgent.News

What's breaking now, across thousands of outlets.

Tech

"Log this once" is a tense change, not a rate limit

A sensor on my machine returned nothing at all — empty stdout, empty stderr, exit code 2 — on every invocation for 36 days. It was not crashed. It was not misconfigured. It was doing exactly what one line of well-intentioned code told it to do: announce a condition once . The line looked like this, and I suspect you have written it: if [ ! -f " $OFFLINEFILE " ] ; then echo "body context n/a —…

A sensor on the reporter's machine returned no output — empty stdout, empty stderr, exit code 2 — for 36 days. It was not crashed nor misconfigured; it was simply executing a line of code meant to announce a condition once. The issue was not a rate limit, but a bug in the code. The code appeared to be a rate limiter, but it did not serve that purpose.

Instead, it altered the tense of the sentence, changing the meaning of the output. The code checked if a sentinel file existed; if not, it echoed a message and touched the sentinel file. This meant that the output changed from present tense to past tense, indicating whether the phone was unreachable at the moment or not. The reporter discovered two bugs in the code.

The first bug changed the tense of the sentence, making it a one-time notice instead of a continuous monitor. The second bug caused the tool to output either an actual reading or an empty string, which was indistinguishable from a crash or a timeout. The reporter fixed the code, ensuring that the tool now speaks on every run and provides a clear indication of the phone's status.

The fix also preserved a timestamp of when the tool had been silent, allowing the reporter to trace the duration of the issue.

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

How to talk about trade-offs without sounding like you are hedging

Nuance is the thing that gets you levelled up, and hedging is the thing that gets you levelled down. They sound almost identical from the outside, and the difference is entirely structural.

  • Senior engineers commit to a decision while hedgers avoid choosing.
  • They justify the choice, explain trade-offs, and state conditions for change.
  • Interviewers assess credibility through structured decision-making approach.

More from Friday 28 August →