SShortSingh.

Programming

0
ProgrammingDEV Community ·

Free keyless breach monitoring using curl, jq, and a cron job

A developer behind XposedOrNot, a free open-source breach index, has shared a lightweight shell script that monitors email accounts for new data breaches without requiring an API key or account signup. The script runs nightly via cron, querying the XposedOrNot API for each address in a list and sending an email alert only when the breach count increases from its last known value. State is tracked through small local files, and a built-in three-second delay between requests keeps usage within the API's per-IP rate limits. The tool currently indexes 774 known breaches, with the project noting that the median lag between a breach occurring and becoming publicly known is over four years. The entire codebase is MIT-licensed and available on GitHub, and domain owners can also verify ownership to access organisation-wide breach visibility for free.

0
ProgrammingDEV Community ·

Dev Team Automated Bug Root Cause Analysis, Unlocking Codebase-Wide Quality Insights

A software development team built an automated system that generates structured root cause analyses (RCAs) for every bug fix, completing the project in under two days. The tool runs a coding agent at the start of a bug fix, capturing context from specs, git history, and failing behavior before it disappears at ticket close. Each RCA follows seven fixed sections — including cause chain, defect category, detection gap, and prevention type — making the output machine-queryable rather than free-form text. Aggregating hundreds of these structured RCAs allowed the team to identify repeatedly failing modules, classify bugs as process versus architectural failures, and pinpoint gaps in their detection pipeline. The key insight was that the real value was not any single RCA, but the ability to query patterns across the entire defect history to guide quality planning.

0
ProgrammingDEV Community ·

New Claude Code Skill Replaces Screenshot Guesswork With Node-Level UI Verification

Developers have built a reusable Claude Code skill called 'implementing-figma-designs' that enforces pixel-accurate UI implementation by tracing every CSS value directly to a Figma node rather than relying on visual screenshot comparisons. The tool addresses a known weakness where AI models generate plausible-looking but incorrect values — such as invented borders or slightly off icon sizes — that pass screenshot checks while the actual DOM remains wrong. The workflow follows a staged protocol: extracting design tokens and metadata from Figma's MCP tools before writing any product code, then verifying each value in a live browser using getComputedStyle against the original node data. Design tokens take precedence over raw hex or pixel values, and any value without a token is flagged to the designer rather than silently hardcoded. The approach is slower and requires more tool calls than a PNG review, but it mechanically catches defects — such as specificity conflicts in CSS overrides — that human visual checks routinely miss.

0
ProgrammingDEV Community ·

BIOS tweak cuts workstation's idle power draw from 180W to 17W during sleep

A home lab operator discovered his high-end Threadripper workstation was consuming 179.8 watts while supposedly suspended, nearly as much as when fully idle. The problem was traced to Linux defaulting to 's2idle', a software-only sleep mode, instead of true S3 hardware sleep. A $15 energy-monitoring smart plug revealed the waste, which logs and software diagnostics had completely masked. Enabling S3 sleep in the motherboard's BIOS under the APM configuration settings resolved the issue immediately. After the firmware change, the machine's suspended power draw dropped to just 17 watts, with Wake-on-LAN functionality remaining intact.

0
ProgrammingDEV Community ·

Velociradix: C++17-Powered Node.js Framework Claims 180,000 Requests per Second

A developer has released Velociradix, an open-source web framework for Node.js built on a C++17 HTTP engine designed for high-throughput performance. Unlike standard Node.js frameworks that handle HTTP parsing and routing on the single-threaded V8 event loop, Velociradix offloads these tasks to native multi-threaded C++ background workers using kqueue/epoll and Radix Trie routing. Benchmarks cited by the author show roughly 181,000 requests per second in multi-threaded JavaScript mode and approximately 3.5 times faster throughput than Express in single-threaded mode. The framework ships with zero external npm dependencies and includes over 36 built-in middlewares covering JWT authentication, rate limiting, CORS, and session encryption. It also offers an Express-compatible drop-in replacement API, file-based routing, built-in Swagger documentation, and full strict TypeScript support.

0
ProgrammingDEV Community ·

How MCP Tool Primitives Can Prevent Cascading Failures in Multi-Agent AI Systems

A development team using a LangGraph-powered support bot encountered cascading failures when a downstream order-data service went offline, causing the bot to loop indefinitely or return irrelevant responses. Investigation revealed the agents were tightly coupled to downstream services, meaning a single failure halted the entire workflow. To address this, the team adopted MCP's Tool primitive, which allowed them to build a reusable ServiceChecker component that monitors the availability of dependent services. The tool integrates with LangGraph's conditional edge logic to route the workflow toward a graceful outage-handling path when a service is unavailable. The team also noted that service-check latency must be managed carefully, recommending caching or asynchronous checks to prevent timeouts.

0
ProgrammingDEV Community ·

YiBoard Separates Offline Study from Live Play to Sharpen Gomoku Strategy

YiBoard, an online gomoku platform, is designed around a clear split between offline preparation and live competitive play, unlike most board game apps that combine both. Players are encouraged to study positions, review losses, and plan openings during idle moments, then execute those plans when they enter a live match. The platform's matchmaking system weighs a player's recent game history and form rather than relying solely on a static rank, aiming to produce more meaningful opponent pairings. On the technical side, all game-state decisions are validated server-side, meaning offline study tools stored in the browser cannot influence live match outcomes. The design philosophy prioritizes deliberate, studied play over in-the-moment improvisation, positioning the offline study loop as central to improving performance.

0
ProgrammingDEV Community ·

Cloudflare Tunnel Lets Developers Share Localhost Apps Publicly in One Command

Developers often struggle to share locally running applications with others outside their network without a full deployment. Cloudflare's free tool, cloudflared, solves this by creating a public URL that proxies requests to a local server using a single terminal command. The tool establishes an outbound connection from the user's machine to Cloudflare, meaning no inbound ports are opened on the local network. It is useful for client demos, webhook testing, and cross-device testing during development, though the generated URL is publicly accessible and should not expose sensitive endpoints. Free quick tunnels come with a 200 concurrent request limit and lack SSE support; permanent setups require a named tunnel with a custom domain.

0
ProgrammingDEV Community ·

Databricks Acquires Electric to Bring Local Postgres Databases Inside AI Agents

Databricks is acquiring startup Electric for an undisclosed sum to integrate WebAssembly-based local Postgres databases directly into AI agent environments. Electric's key assets include PGlite, a lightweight Postgres that runs inside browsers or app sandboxes, and Electric Sync, a tool that keeps local data aligned with a central database. The acquisition addresses a core bottleneck in agentic AI: frequent round trips to remote servers that introduce latency and slow down autonomous decision-making. PGlite will handle an agent's immediate local state, while Databricks' recently launched Lakebase platform will serve as the central store for shared enterprise data. The move also has cost implications, as reducing remote database calls lowers network strain and cuts compute overhead from maintaining large numbers of active cloud connections.

0
ProgrammingDEV Community ·

Understanding Variables, Memory Addresses, and Pointers in C

In programming, a variable like 'int age = 20' appears to be a simple container for a value, but it actually represents an abstraction tied to a storage location in memory. That location is identified by a memory address, which tells the processor where to find the stored data. The compiler decides how a variable is stored — it may reside at a specific memory address, in a CPU register, or be optimized away entirely. In C, the '&' operator lets programmers retrieve the memory address of a variable, which forms the basis for understanding pointers. A pointer is itself a variable that holds a memory address, making this concept fundamental to low-level programming, memory management, and working with references.

0
ProgrammingDEV Community ·

Siemens S7-300/400 End-of-Life: How Checksums Help Verify PLC Integrity

Siemens officially moved SIMATIC S7-300 and ET 200M to Product Phase-Out status from October 1, 2025, with S7-400 following by 2030, leaving many industrial facilities without vendor support or security patches. Russian enterprises face a sharper challenge, as Siemens exited the market in 2022, yet S7-300/400 controllers continue running critical infrastructure including power plants, chemical facilities, and metallurgical plants. In the absence of official support, engineers can use built-in 4-byte checksums — stored separately for hardware configuration and user program — to verify whether the code running on a controller matches its approved version. These checksums are accessible via Simatic Manager without halting processes or straining communication channels, making them a practical integrity indicator for aging PLC fleets. However, engineers must understand key limitations: checksums do not reflect real-time variable changes in data blocks, but will change if Actual Values are edited on the engineering station, requiring supplementary controls such as change logs and access restrictions.

0
ProgrammingDEV Community ·

How European SaaS Teams Can Build Safe, Idempotent Expired Session Cleanup

A technical architecture guide outlines how European SaaS platforms can reliably clean up expired user sessions without risking data errors or overloading worker systems. The recommended approach uses an authenticated HTTP trigger to enqueue cleanup batches rather than deleting sessions directly during a scheduled request. Four core invariants govern the design: a fixed expiry timestamp per run, deterministic batch keys, rate-limit-aware queue admission, and conditional deletion that checks session state at commit time. This last safeguard prevents a race condition where a refreshed session could be incorrectly deleted based on stale data. The architecture separates scheduler responsibility from application correctness, ensuring that delayed, duplicated, or retried triggers never corrupt the final set of active sessions.

0
ProgrammingDEV Community ·

Developer Builds Puerto Rican Mountain Kitchen Using Only HTML and CSS

A developer created 'Niebla', a one-page interactive concept kitchen inspired by Puerto Rico's mountain culture, built entirely with HTML and CSS — the only image file used is the favicon. Every visual element, including a steaming pot, rain on glass, fog, and floating roots, is rendered purely through code with no photographs, icon sets, or UI frameworks. The project centers on a sancocho dish whose ingredients users can interactively remove, with CSS custom properties dynamically adjusting steam speed and broth color in real time. Accessibility was a core priority, featuring bilingual Spanish and English support with proper ARIA live regions, and the developer removed a scroll-triggered reveal animation after discovering it hid content from headless browsers and screen readers. The project scored perfect 100s on Lighthouse for accessibility, best practices, and SEO, with zero external runtime assets loaded after the initial page paint.

0
ProgrammingDEV Community ·

AI Workloads Drive HBM Demand, Squeezing DRAM Supply and Raising Prices in 2026

In 2026, AI training workloads are dominating global DRAM demand, with generative AI models requiring High-Bandwidth Memory technologies like HBM3E and HBM4 that far outperform traditional DDR5. Major manufacturers Samsung, SK Hynix, and Micron are redirecting production capacity toward HBM, reducing supply of conventional memory used in PCs, smartphones, and consumer electronics. Hyperscale operators such as Microsoft, Meta, and AWS are consuming memory at unprecedented volumes, with OpenAI alone reportedly securing 10 percent of global DRAM supply in late 2025. This supply squeeze has pushed DRAM prices up roughly 30 percent compared to 2024 levels, disproportionately hurting smaller hardware makers who lack the financial leverage of large cloud providers. Geopolitical tensions, including the US-China trade dispute and China's push to develop domestic HBM alternatives through firms like ChangXin Memory Technologies, risk fragmenting the global memory market into separate regional ecosystems.

0
ProgrammingDEV Community ·

Dev Tutorial: A Three-Step Python Gate to Validate AI-Generated Code Patches

A DEV Community article proposes a lightweight validation loop for developers who use AI-generated code patches before merging them into a codebase. The approach treats model output as untrusted input and runs three sequential checks: contract verification, forbidden import detection, and regression testing against edge cases. A plain Python script called gate.py uses static AST analysis to catch missing functions, disallowed module imports, and logic that only handles the prompt's example input. The tool requires no model-specific SDK, making it compatible with output from any AI endpoint or manually written file. The author argues that skipping such checks effectively turns the developer into the integration test, often at the cost of late-night debugging in pull requests.

0
ProgrammingDEV Community ·

Pakistan Outlines Cyber Defense Strategy Amid Surge in State-Sponsored Attacks

Pakistan is experiencing a sharp rise in cyberattacks targeting government networks, banks, telecom systems, and citizen data, with dozens of federal institutions compromised in recent months. The country's National Cyber Emergency Response Team (NCERT) has attributed many intrusions to state-sponsored actors and declared cybersecurity inseparable from national security. In response, the government has begun establishing a 24/7 National Cybersecurity Control Room, a threat-intelligence sharing system linking civilian and military units, and a proposed National Cyber Security Authority reporting to the Prime Minister. A cybersecurity professional from Nowshera argues that defending Pakistan digitally requires active participation from youth, the private sector, and academia — not just government institutions. The strategy calls on young Pakistanis to pursue formal certifications, hands-on training, and responsible vulnerability research to help build a credible national cyber workforce.

0
ProgrammingDEV Community ·

AI-Generated Python Server Passed Health Checks But Failed Clean Shutdown Test

A developer testing MonkeyCode's free AI model generated a minimal Python HTTP server that appeared functional during standard smoke testing. The server responded correctly to health checks but revealed a critical flaw when a shutdown signal was sent while a slow request was still in progress. Because ThreadingHTTPServer does not use daemon threads by default, the process refused to exit until all active handler threads completed, causing a 30-second hang. The author devised an 'exit contract' test that sends SIGTERM mid-request and requires the process to terminate within a fixed time window, which the generated code failed. Adding a single line — setting daemon_threads to True — resolved the issue, highlighting that graceful shutdown behavior is often overlooked in both human-written and AI-generated server code.

0
ProgrammingDEV Community ·

DeepSeek V4-Pro Ignores Token Limits, Billing Users for Empty Responses

A developer building an AI-powered Liar's Dice game discovered that DeepSeek's V4-Pro model silently ignores token limit parameters, continuing to generate thousands of tokens regardless of the cap set. In tests conducted on August 14, 2026, three consecutive API calls with a 3,072-token budget each consumed the entire budget on internal reasoning, returning zero visible output while still charging the full cost. The API accepted unrecognized and even fabricated parameters without error, making it impossible to confirm whether any limit had taken effect. With reasoning enabled, costs ran 16.7 times higher than with it disabled, and a working disable command existed but was not consistently documented. The developer nearly misattributed the token-budget failure as a model-compliance failure, as empty responses triggered a fallback that logged the model as disobeying instructions in over 94% of game hands.

0
ProgrammingDEV Community ·

React useFocus Hook Offers One-Line Focus State Tracking and Control

A new custom React hook called useFocus, part of the @reactuses/core library, lets developers track and control element focus state with a single line of code. The hook returns a live isFocused boolean and a setter function that can programmatically focus or blur any element, covering both observation and control in one API. It addresses known limitations of native browser tools like document.activeElement, which provides only a static snapshot, and autoFocus, which fires just once at mount. Hand-rolled focus listeners are prone to bugs such as missed late-mounting elements, incorrect initial state, and repetitive boilerplate across form fields. The hook handles these edge cases internally, including support for lazy element references that re-resolve as the DOM changes.

0
ProgrammingDEV Community ·

Publish Script's Duplicate Check Vulnerable to Race Condition Between Concurrent Runs

A developer maintaining a DEV.to auto-publishing script identified a time-of-check-to-time-of-use (TOCTOU) race condition in its idempotency guard, following two earlier fixes to the same function. The flaw means two simultaneous script invocations — each in a separate container — could both pass the duplicate-title check before either has posted, resulting in the same article being published twice. This scenario becomes plausible because the script's scheduled task runs twice daily and the repository has a documented history of long or hanging runs that could cause overlapping executions. Unlike the previous bugs, which involved a single check returning incomplete information, this issue arises when the state changes between two individually correct checks with no lock or reservation in between. The developer reproduced the race deterministically using two threads and a threading.Barrier against a fake server, since testing against a live shared DEV.to account across real containers was not feasible.

← NewerPage 144 of 1333Older →