SShortSingh.
Back to feed

Developer finds three self-passing checks that were structurally incapable of ever failing

0
·2 views

A developer at a fact-checking platform discovered three verifiers in their own codebase that always reported passing results regardless of actual correctness. One check compared a leap-year implementation against a line-for-line copy of itself, meaning both shared the same bug and agreed perfectly. A second verifier, on a page specifically about unfailing checks, constructed its expected result from the assertion count rather than the actual pass-or-fail verdict, displaying PASS 109/109 for two weeks while the real result was FAIL 106/109. A third check for Zipf's law used the wrong statistical estimator for two years, but all tests passed because the acceptable range was wide enough to accommodate any output the flawed estimator could produce. The author concludes that in all three cases, the assertion's expected value was derived from the very thing being tested, making failure structurally impossible.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Windows Showing 100% Disk Usage? Here's How to Find the Real Cause

Windows Task Manager occasionally shows 100% disk usage even when users appear idle, causing slowdowns in applications and system responsiveness. Background processes such as Windows Update, antivirus scans, cloud synchronization, and file indexing are among the most common legitimate causes of sustained high disk activity. Identifying the specific process responsible — via Task Manager's Disk column — is more informative than reacting to the percentage alone. Low available storage on the system drive can further compound performance issues, making it advisable to maintain adequate free space. Security concerns are better investigated by looking for patterns and combinations of unusual changes rather than treating any single spike as evidence of a problem.

0
ProgrammingDEV Community ·

Beyond Syntax: Why Soft Skills and Judgment Define Effective Coders

A piece published on DEV Community argues that modern developers need more than technical proficiency to create real impact. The author, promoting their 'Street-Smart Coding Manifesto', contrasts coders who obsess over abstractions and micro-optimizations with those who write purposeful, timely code. A 'street-smart coder' is described as someone who understands tradeoffs, stays emotionally detached from their own code, and communicates effectively with different stakeholders. The core argument is that as code itself becomes a commodity, a developer's edge increasingly lies in skills exercised outside the code editor.

0
ProgrammingDEV Community ·

Six Claude Code Skills Worth Installing for Everyday Development in 2026

As Claude Code's plugin ecosystem has grown to dozens of options by mid-2026, developers face the risk of installing overlapping skills that cause unpredictable AI behavior. A curated list of six recommended skills has been outlined, each mapped to a distinct phase of the development cycle: design, implementation, review, security, testing, and notifications. The selection follows three guiding principles — one skill per phase, preference for official or well-established plugins, and adding more only when genuinely needed. Highlighted picks include Superpowers for enforcing disciplined coding steps, skill-creator for building custom team workflows, frontend-design for deliberate UI aesthetics, security-guidance for real-time vulnerability detection, Playwright for end-to-end browser testing, and Discord for remote notifications. Most of the recommended skills are official Anthropic plugins or were added to the official marketplace in early 2026.

0
ProgrammingDEV Community ·

TCP vs UDP: How Transport Protocols Determine Speed and Reliability

TCP and UDP are two core protocols operating at the Transport Layer of the OSI Model, each designed for different networking needs. TCP prioritizes reliability through a three-way handshake, packet acknowledgment, automatic retransmission, and flow control, making it ideal for file transfers, emails, and web browsing. UDP skips these checks entirely, offering connectionless, low-latency transmission suited for real-time applications like video calls and live streaming. The trade-off is clear: TCP guarantees complete data delivery but introduces latency, while UDP is faster but accepts the risk of occasional packet loss. This distinction explains why a downloaded file arrives intact every time, while a video call may occasionally glitch or drop frames.