Urgent.News

What's breaking now, across thousands of outlets.

Tech

Never silently change a number someone gets paid on

Our algorithm decided a driver had travelled 4km less than they thought. It was probably right. Shipping that silently would still have been wrong. When cleaning stops being technical Mileage tracking ends in an expense claim. Someone drives, the app measures, and the measurement becomes money. Our pipeline removes several categories of distance: readings from mock location apps, physically…

A driver's mileage tracking is crucial because it directly impacts their earnings. However, an algorithm might sometimes adjust the recorded distance, leading to potential underpayment. It's essential to maintain transparency in this process. The algorithm removes various types of distance readings, including those from mock location apps, physically implausible jumps, and sudden jumps over five kilometers.

The modified distance is more accurate than the raw sum, but the mistake lies in assuming accuracy is the sole objective. A driver who believes they covered 40km but sees 36km cannot differentiate between a meticulous algorithm and a covert expense reduction. From their perspective, both scenarios appear identical: a smaller number without explanation.

Accuracy, while important, is not the entire job. The algorithm's output should be visible to the driver, allowing them to understand the original distance and the proposed distance after adjustments. The algorithm's changes should be explicitly labeled in the user interface, showing the original distance next to the cleaned figure.

Both numbers should be present in the data model, so displaying them both is feasible. The user should be informed about the removed categories, such as abnormal distance, mock distance, and spike distance. The categories should be easily identifiable, unlike vague explanations. Users should have the option to override the algorithm's decisions.

This is possible because the driver was physically present, and they possess information that the algorithm does not. If the algorithm's threshold is incorrect, this toggle provides the quickest feedback mechanism available. The alternative would be for the driver to escalate the issue to their finance team, who would then escalate it to the company, three weeks later, without any supporting data.

An app-killed event, which the tracker recovers from automatically, should not be classified as an irregularity. If every notice is alarming, users may dismiss them all, rendering the disclosure ineffective. The data model must support this transparency. If the pipeline discards what it rejects, transparency becomes impossible. Naming the categories and allowing users to toggle removal requires the removed distance to still be present in the data model.

Transparency is a data-modeling decision made earlier, not a UI decision. The principle applies to various systems where the output becomes an input for someone's money, time, or reputation, such as fraud scores, ranking systems, time trackers, and usage-based billing. In all these cases, correctness is fundamental. Being right silently is insufficient; showing the working is how you earn trust.

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

What breaks when you self-host a TURN server (coturn — symptom, cause, fix)

The first article in this series was the traps inside the code. The second was the layer underneath — the candidates that lie, the UDP firewall nobody looks at, the reverse proxy that reaps an idle…

  • TURN server issues may stem from misdiagnosing relay as solution
  • Verify coturn service and port configuration for proper operation
  • Open relay port range in firewalls for TURN port allocation

React.js ~The Latest Ref Pattern ~

This pattern holds callback passed to a customhook in the ref and update existing value everytime rendered to have the latest value.

  • Ref maintains a current value without triggering re-render, preventing infinite loops.
  • React 19 introduces useEffectEvent to incorporate the latest Ref pattern into the official API.

How I Built Authentication in Go and React: Doing It Right

Every tech blog will tell you the same thing: don’t roll your own auth. It makes sense not to do that for production applications with a large number of users, where more is at stake, and to use…

  • Author built authentication system in React, Go, and PostgreSQL for learning purposes
  • Chose JWTs for stateless verification, set 15-minute expiry to limit validity
  • Stored refresh tokens in HttpOnly, Secure cookies to prevent XSS and MITM attacks

What I’ve Been Building While Looking for My Next Opportunity

For a while now, I’ve been wondering what it actually takes to land an international role, especially one that could eventually lead to relocation. I’ve thought about it a lot.

  • Author builds SaaS web application (Flowwbook) for appointment-based businesses.
  • Develops AI-powered EdTech mobile app for exam preparation (JAMB, WAEC, NECO).
  • Seeks full-time Product Design role or contract opportunity in international product teams.

More from Sunday 20 September →