SShortSingh.

Programming

0
ProgrammingDEV Community ·

UUIDv7 Offers Database Speed but Its Embedded Timestamp Is Not a Reliable Clock

UUIDv7 identifiers are gaining favor because they keep database indexes efficient while staying unique without central coordination. Each ID embeds a millisecond timestamp, which means anyone who sees an ID can roughly infer when it was created. A reproduction described in an October 19, 2026 post showed that the embedded time can drift from the real clock, running about an hour ahead after the system clock was set back. The RFC allows implementations to adjust the timestamp, so it should be treated as a hint rather than an accurate record. Developers debate whether exposing this metadata matters, with the author recommending UUIDv7 internally while avoiding exposing it in sensitive public-facing contexts.

0
ProgrammingDEV Community ·

Pre-commit hook fixed to check staged translation files, not working tree

The author's Locale Guard tool, a GitHub Action and CLI for translation files, added a pre-commit hook in version 1.3.0. The first version of that hook checked files on disk, so it approved a commit that held an English key but lacked matching entries in other language files. The fix makes the check read staged content directly from git, so incomplete commits are now blocked. A pre-push hook and the pull request check were also added to catch anything skipped with --no-verify. Demo repositories for Husky and Lefthook are available for testing.

0
ProgrammingDEV Community ·

What spec-driven development is and why AI coding tools are splitting into competing camps

The article explains spec-driven development (SDD), where requirements are written as a clear document that AI agents work from rather than from chat memory. It describes three traits of SDD: specs are version-controlled files, humans approve them before code is written, and every implementation step can be traced back to the spec. The author notes that the real differences between SDD tools lie in how specs relate to verification, not in feature counts. Three maturity levels are outlined: spec-first, spec-anchored, and spec-as-source, each answering differently who judges whether code is correct. The piece is the first part of a series comparing these tools.

0
ProgrammingDEV Community ·

uv Adds Experimental Type Checking for Single-File Python Scripts

Astral has announced an experimental integration between its uv package manager and the ty type checker, targeting standalone Python scripts. The new uv check command sets up a script's environment, installs its declared dependencies, and runs type checking using the inline metadata defined by PEP 723. Setting up the environment is opt-in because it involves installing and running third-party code. Requirements include uv 0.12.3 or later and ty 0.0.76 or later, and Astral plans to make script support the default and add Ruff to the command. Early community feedback praises ty's speed but notes concerns about false positives and library support, along with governance questions following Astral's 2026 acquisition by OpenAI.

0
ProgrammingDEV Community ·

Browser-Based Speaker Tone Can Help Clear Water From Phone Grilles

A developer rebuilt the water-ejection tone Apple Watch uses after swimming as a plain web page that runs on any phone without an app. The approach uses a 145–165 Hz sine wave played in short on-off bursts, since low pitches move the speaker cone more and pulsing keeps a droplet from settling. On iPhones, the page needs the Audio Session API so sound plays even when the silent switch is on, and the first tap must trigger audio directly for it to work. Vibration only works on Android, since Safari doesn't support the Vibration API. The author stresses that the tone only helps with water in the speaker grille and does nothing for water inside the phone, and that saltwater, pool water or sugary liquids can still cause residue or corrosion.

0
ProgrammingDEV Community ·

PHP2Shell: Two Critical PHP Flaws Patched, But Running Servers May Still Be Exposed

The PHP project released fixes on October 21, 2026, for two remote code execution vulnerabilities, CVE-2026-109618 and CVE-2026-109619, both scored 9.2 on CVSS v4.0. Details reportedly leaked a day earlier, and Amazon's honeypots reportedly recorded exploit attempts as early as October 17. The flaws affect the PHP runtime itself, including PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed, so Composer updates will not resolve them. PHP 8.1 and older have no official release, leaving teams on those branches to upgrade or rely on source backports. Security experts stress that organizations must confirm the patched version is actually running in production, not just available.

0
ProgrammingDEV Community ·

eMudhra CA Intermediate Keys Found Weak; Browsers Blocked Them, Server Trust Stores Lag

A researcher reported on October 17, 2026 that private keys for eight eMudhra intermediate certificate authorities had been compromised. Analysis showed the keys were tiny numbers rather than random 384-bit values, so they could be guessed almost instantly. eMudhra attributed the problem to a flaw during an April 2025 key ceremony and said root keys were unaffected and no certificate for a real site had been issued. Chrome and Firefox revoked the intermediates within hours, but operating system, Python, Java and vendored trust stores update only when their packages are rebuilt or upgraded. Security experts warn that businesses should check where their services source trusted certificate authorities and when those lists were last refreshed.

0
ProgrammingDEV Community ·

Munchable's test suite enforces 605 label words so common ingredients never return 'not assessed'

Munchable scans ingredient labels to flag whether products suit a user's digestive condition, but it sometimes returned a 'not assessed' result for ingredients central to that condition, such as kefir for lactose intolerance, soya for IBS, and tea for reflux. To prevent this, the team maintains a data file listing 605 label words that the product must always be able to address, covering conditions, allergens, and shopping filter preferences. The list is written in the words printed on packs rather than internal identifiers, so the tests cover the full path from user input to answer. These words are checked by 31 generated tests that fail the build if any listed word would come back unassessed. The approach is designed to hold regardless of whether background data-curation jobs have run.

0
ProgrammingDEV Community ·

Four Django ORM Tools That Replace Most Raw SQL Queries

Many Django developers rely on only a small part of the ORM and fall back to Python loops or raw SQL when queries get more involved. The article argues the ORM already handles most of these cases through four under-taught tools. Q objects enable OR and NOT conditions, which plain keyword filters cannot express since they combine only with AND. F objects allow comparing one column to another or performing arithmetic between columns directly in the database, including race-safe updates. The piece also clarifies the commonly confused distinction between annotate, which adds computed values per row, and aggregate, which produces whole-table summaries.

0
ProgrammingDEV Community ·

A single dynamic route at a domain root needs two settings to avoid soft 404s

The munchable.app site serves 461 question-style pages, such as ones about low-FODMAP status of ingredients, directly from the domain root under one dynamic route. Without extra configuration, that route would render content for any unmatched path, turning typos into indexable soft 404s that can dilute search performance. The author fixes this with two exports, dynamicParams set to false and dynamic set to error, along with generateStaticParams, so only pre-generated slugs resolve and everything else returns a true 404. Curl output from the live site confirms that real answer pages return 200 while fake-looking URLs return a cached 404. The pages are generated at build time from ingredient data rather than stored as manual content files.

0
ProgrammingDEV Community ·

Developer Isolates AI Coding Agents on Separate Drives to Protect Project Files

A developer describes how a single destructive command, such as a mistyped recursive delete, could wipe out an entire project folder. To prevent this, they stopped letting AI agents work directly on their main drive. Instead, each agent is assigned its own drive letter, mapped either to a local folder or a WebDAV cloud location, so it sees a standard Windows drive with access limited to that space. The author says this isolates projects from one another and works with any AI coding tool, and they recommend setting up the sandbox before letting an agent begin work. The article is presented as a personal workflow rather than a formal product announcement.

0
ProgrammingHacker News ·

JetBrains Unveils ThinkRail, a New Product Announced on Hacker News

JetBrains has introduced a product called ThinkRail, according to a post shared on Hacker News. The linked page at thinkrail.ai serves as the main source of information about the offering. The Hacker News submission received 28 points and 20 comments from the community. The source material does not provide details on the product's specific features, pricing, or intended audience.

0
ProgrammingHacker News ·

Node2Shell Flaw Evolves into HTTP2Shell, Affecting Many HTTP Libraries and Apps

A security vulnerability previously known as Node2Shell has reportedly developed into a related issue called HTTP2Shell. The flaw is said to affect a wide range of HTTP libraries and applications that depend on them. Aikido, a security firm, published an analysis focusing on Python packages that are vulnerable, with the issue linked to a Brotli-related CVE. The original source is a Hacker News post that had gained modest attention at the time it was indexed. Further technical details beyond the linked analysis were not available in the source material.

0
ProgrammingDEV Community ·

PS4 Pro DDR3 Read Speed Raised From 10.6 MB/s to 504 MB/s via DMA Patch

A developer working on Linux for the PS4 Pro found that reads from its DDR3 memory were capped near 10.6 MB/s because the CPU fetched data in tiny 8-byte chunks through a narrow PCI window. The chip's southbridge contains a DMA engine that could handle the transfers, but no Linux driver existed for it, and Sony's gameOS driver is closed-source. The developer reverse-engineered the kernel binary to recover the chip's address mapping and the DMA command sequence. A patch was then built that binds the engine as a PCI device and routes transfers through a coherent buffer allocated at startup. Reported results show reads improving to about 504 MB/s and writes to about 425 MB/s, with the engine capable of roughly 1.4 GB/s.

0
ProgrammingDEV Community ·

Mozjpeg Gives Smaller White-Background JPEGs With Fewer Off-White Pixels Than Pillow or Sharp

A developer compared Pillow, sharp, and sharp with its mozjpeg option for saving white-background product photos as JPEG. Pillow and default sharp produced identical pixels, while the mozjpeg flag yielded smaller files with fewer stray non-white background pixels at the same quality. None of the encoders kept the background at a pure 255 value across every pixel. The tests were run on three Wikimedia Commons photos using an Apple M4 Mac with Pillow 11.3.0 and sharp 0.34.5. The author found mozjpeg at quality 85 with 4:4:4 sampling roughly matched Pillow at quality 95 in stray-pixel share while using less than half the bytes.

0
ProgrammingDEV Community ·

Why browser extension UIs break on many sites and how a Shadow DOM wrapper fixes it

Badges injected by browser extension content scripts often render incorrectly on real websites, appearing oversized, misplaced, or missing controls. The problem stems from aggressive global CSS resets, utility classes, and broad element selectors on supermarket web shops that leak into extension widgets. The author, while building the open-source ShrinkWatch EU extension, found a fix by placing the widget inside a Shadow DOM with a reset host element and self-contained styles. The approach also recommends fixed pixel units instead of rem, and attaching the host to the document root so page navigation or body transforms do not disrupt its positioning. The author reports that since version 0.3.2 the badge has looked consistent across the shops tested in a real browser.

0
ProgrammingDEV Community ·

Keeping Telegram Inline Keyboard Callbacks Within Limits in PHP

Telegram bots that use inline keyboards for approval or routing workflows often break in production. Telegram enforces a 64-byte limit on callback_data, and oversized payloads can cause keyboards to fail silently or trigger API errors. Another common problem is failing to call answerCallbackQuery promptly, which leaves the client showing a loading spinner until it times out. The article recommends short, compact payload formats instead of embedding full context in buttons. It also proposes a dedicated cURL-based Telegram client that checks HTTP codes and error responses, rather than relying on file_get_contents.

0
ProgrammingDEV Community ·

Heatmap shows where pure-white pixels drift after JPEG compression

A white-background sneaker photo saved as a JPEG at quality 85 lost exactly-255 values, with 10,403 pixels changing and most of them clustered along the shoe outlines. The author built a heatmap and distance count to show the drift sits close to the subject rather than across open white. Counting drift at lower thresholds shows most changes are only one or two levels below pure white, though a few background pixels fall as low as 239. The author warns that whole-image percentages can understate the problem because they also include bright pixels from the shoe itself. The test was run to check compliance with Amazon's requirement for RGB 255 main images.

0
ProgrammingDEV Community ·

Developer Proposes Isolating AI Coding Agents on a Separate Windows Drive

A DEV Community post argues that AI coding agents can access sensitive areas of a Windows system, such as the .ssh folder and hosts file, and could damage the whole C: drive. The author recommends mapping the agent's workspace to its own drive letter so it sees only that drive and cannot reach anything else. The approach uses built-in Windows drive mapping rather than Docker Desktop or a virtual machine. The post points to two tools, one for local folders and one for WebDAV or cloud workspaces, each described as a one-time purchase.

0
ProgrammingDEV Community ·

Scraper filters ignored in wrong mode, with no warning in run logs

A scraper that switches between review and episode modes accepted filter fields that did not apply to the selected mode, and the run still reported success. Because the Apple Podcasts Actor is pay-per-result, a buyer could be charged for every episode while believing a keyword filter had narrowed the results. The developers already had warnings for some out-of-scope inputs but had not covered the full set of review-only and episode-only filters. They added a check that logs exactly which ignored fields were set and states that nothing was filtered out by them. A follow-up test confirmed the warning fired, and a related case showed rows with missing duration kept because Apple's data omits durations for many episodes, not because the filter failed.

← NewerPage 41 of 2884Older →