Urgent.News

What's breaking now, across thousands of outlets.

Tech

Zero Dependencies, 456 Tests, and One Bug All of Them Missed

The test suite was green. All of it. Every assertion about the QR encoder I'd written passed, the way it had passed for weeks. I held my phone up to the screen anyway, more out of habit than suspicion, and the camera just sat there. No beep, no flash, no redirect. Nothing. A perfectly scannable-looking grid of black and white squares that no scanner on Earth could actually read. That…

The test suite for a photo timeline app, named Darkroom, was functioning perfectly. The app allows users to view their photos on a Wi-Fi network, sorted by the date they were taken. Darkroom was unique in that it had no dependencies listed in its Cargo.toml file, meaning all its functionality was custom-built. Despite this, the app had 456 automated tests that all passed, demonstrating the robustness of the code.

However, the app was missing one crucial feature - the ability to generate QR codes. This oversight led to a bug that went unnoticed by the extensive test suite. The bug was discovered when external QR code decoders were used to scan the generated codes, revealing a single bit of incorrect ordering. This seemingly small mistake had a significant impact on the functionality of the app.

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 Happens When You Type a URL: Answer It With Three Interactive Simulators

"What happens when you type a URL and press enter?" is the most reused interview question in infrastructure, and for good reason: the honest answer touches DNS, TCP, TLS, CDNs, load balancers and…

  • DNS Simulator illustrates DNS resolution process with caches and resolver queries
  • TCP vs UDP Simulator explains handshake-based TCP vs UDP connectionless protocol
  • Packet Journey Simulator visualizes full path from DNS to web server response

Practical Magic 2 Review

Sandra Bullock, Nicole Kidman and the rest of the Practical Magic 2 cast toil and trouble to conjure up a worthwhile sequel, but they’re cursed with a very messy script.

How I Built a Chrome Extension to Improve Reading on Medium

I read a lot of articles on Medium. Mostly technical stuff, product stories, startup ideas, and random things I find while browsing.

  • Author built Chrome extension to improve Medium reading experience
  • Addresses paywall access, Dark Mode, and article saving issues
  • Extension merges multiple solutions into one cohesive tool

More from Tuesday 8 September →