SShortSingh.

Programming

0
ProgrammingDEV Community ·

EF Core bug causes concurrency errors under load due to service lifetime issue

A bug in Entity Framework Core causes an 'InvalidOperationException: A second operation was started on this context' error specifically under production load. The issue arises when a scoped DbContext is incorrectly reused across parallel work items, such as in a hosted background service. The root cause is a service-lifetime design flaw where fire-and-forget tasks capture and hold the DbContext after its intended scope has expired. This corrupts the context's internal state, leading to intermittent failures that are not seen during local, non-concurrent testing. The solution requires designing for lifetime correctness by resolving the DbContext inside each task's own scope.

0
ProgrammingDEV Community ·

Critical vm2 Sandbox Escape Vulnerability Allows Host System Takeover

A critical vulnerability identified as CVE-2026-92951 has been discovered in the vm2 JavaScript sandbox library. The flaw, with a CVSS score of 9.9, allows attackers to bypass the package allowlist through incorrect authorization and directory traversal. This enables sandboxed code to execute arbitrary packages on the host filesystem with full privileges. The vulnerability affects vm2 versions before 3.11.7, primarily impacting systems running untrusted code. Developers are urged to upgrade to version 3.11.7 or implement stronger isolation mechanisms.

0
ProgrammingDEV Community ·

Structured logging and distributed tracing essential for modern microservices

Unstructured console logging is insufficient for diagnosing errors in complex, distributed systems like microservices. Developers advocate for machine-readable structured logging in JSON format and distributed tracing using correlation IDs. This approach allows for precise querying of logs to track specific requests across multiple services. Implementing these practices helps teams quickly identify the root cause of failures, such as which user or order was affected by an error.

0
ProgrammingDEV Community ·

JavaScript prototypes explained as key mechanism for inheritance and method sharing

JavaScript uses prototypes to enable inheritance, property lookup, and shared behavior between objects. This mechanism operates underneath modern class syntax, allowing methods to be stored once on a prototype and accessed by all object instances. When a property is not found on an object itself, JavaScript searches up the prototype chain until it locates the property or reaches the end. Understanding prototypes is essential for reasoning about both traditional constructor functions and contemporary class-based JavaScript code.

0
ProgrammingDEV Community ·

News platform implements x402 protocol for AI agents to buy data with crypto

A data seller has used the x402 protocol to allow AI agents to purchase B2B lead packs using USDC cryptocurrency. The system leverages the HTTP 402 status code as a machine-readable payment handshake, enabling agents to complete transactions without human intervention or traditional account setup. When an agent requests a paid resource, the server responds with a 402 containing payment terms; the agent then sends USDC and retries the request with a payment proof header. This approach is designed to solve the problem of AI agents being unable to handle standard subscription forms or billing processes.

0
ProgrammingDEV Community ·

Small teams can normalize multi-model API for invoice data extraction

A technical article from DEV Community proposes a practical method for small teams to extract structured data from invoices using multiple AI models. The approach centers on creating a single normalized API layer that works with OpenAI, Claude, and Gemini, keeping the specific model choice outside the core application code. This design prioritizes portability and simplifies future model swaps by focusing on common chat and JSON functions over vendor-specific features. The method emphasizes rigorous validation of extracted invoice data, such as invoice numbers, dates, and totals, to ensure accuracy over raw speed. The article includes a sample TypeScript script demonstrating the concept using environment variables for configuration.

0
ProgrammingDEV Community ·

Developer creates Orblune, a live Earth wallpaper for Windows

A developer created Orblune, a live wallpaper application for Windows 10 and 11. The software displays a real-time map of Earth showing daylight, nighttime city lights, and local times for selected cities. A free version is available, with a one-time purchase unlocking premium features like additional map themes and per-display controls for multiple monitors. The developer detailed significant technical challenges, particularly in integrating the application stably with the Windows Explorer desktop. The project is now available for download, with its source code hosted on GitHub.

0
ProgrammingDEV Community ·

Article Details Technical Integration of Dify AI Workflows with React 19

A technical article outlines challenges in connecting self-hosted Dify AI workflow streams to React 19 frontends using the Vercel AI SDK. The core issue is a protocol mismatch, as Dify streams structured JSON events while the AI SDK expects OpenAI-compatible data chunks. The author provides a solution involving a custom Next.js API route that transforms Dify's Server-Sent Events into the required format. This transformation prevents UI failures and maintains a smooth user experience during streaming. A React client component example demonstrates clean consumption of the transformed stream via standard hooks.

0
ProgrammingDEV Community ·

Tool detects hidden duplicate React copies that cause hook errors

A new command-line tool called onecopy helps developers identify duplicate React installations that cause 'Invalid hook call' errors. The tool addresses a scenario where npm ls reports only one version, but linked libraries or workspaces actually load separate copies from different directories. It works by tracing the actual file resolution path from each importing package's real location, grouping results by physical directory. The tool outputs which copies are being used, by whom, and the likely cause, and can be integrated into CI checks.

0
ProgrammingDEV Community ·

Developer details technical requirements for compliant data audit workbench

A developer writing for DEV Community argues that effective data audit systems should focus on creating immutable evidence pipelines rather than dashboards. They recommend capturing specific control events like access, export, and deletion in a hash-chained, append-only format to prove sequence integrity. Practical implementation requires object storage with write-once-read-many (WORM) locks and long retention periods, though this increases costs. The author also addresses challenges like handling high-throughput events and reconciling immutable logs with data erasure requests through technical patterns like salting personal data keys.

0
ProgrammingDEV Community ·

Hacktoberfest 2026 Weekend Challenge Offers Prizes for AI Projects

DEV Community has launched a weekend Hacktoberfest challenge where participants build a new project. The project must use open-source AI at its core to solve a real problem for a specific person. Submissions, which require a written post on DEV, are due by October 5 at 6:59 AM UTC. A total of $2,450 in prizes will be awarded to 17 winners, including one overall winner and 16 category winners for specific partner technologies.

0
ProgrammingDEV Community ·

Overly broad training requirements block engineers from essential PLM access, creating shadow processes

Engineers in regulated industries are often blocked from accessing Product Lifecycle Management systems due to expired training on irrelevant safety modules. This stems from companies assigning all training courses to all employees as a defensive compliance measure, rather than tailoring them to specific roles. For example, a software engineer can be locked out for missing a forklift safety course they will never need. This practice contradicts ISO 13485, which requires competence training to be appropriate to an employee's specific activities. The resulting delays and workarounds create shadow processes that can actually increase operational risk.

0
ProgrammingDEV Community ·

Developer re-evaluates importance of test evidence over code metrics in AI era

A developer argues that test evidence, not just code coverage metrics, has become a crucial professional indicator of work quality. This shift in perspective followed a personal incident where a critical authentication bug was missed by unit tests but caught by a Docker-based test. The author notes that with AI-generated code becoming common, concrete proof of a system's reliability through field tests and failure reports is now more valuable. They have started publicly committing detailed test reports and failure lists to their repositories, which has led to constructive external audits and discussions.

0
ProgrammingDEV Community ·

Free Python method builds resilient B2B lead scraper, avoiding SaaS fees

A new guide details how developers can build a cost-free local B2B lead scraper in Python, avoiding monthly fees for commercial scraping services. The article argues most B2B extraction tasks, like scraping public directories or vendor listings, do not require expensive proxy services. It proposes a resilient architecture using techniques like Gaussian jitter delays, user-agent rotation, and multi-selector fallback parsing to avoid detection and handle website changes. The method is designed to prevent common failures like rate-limiting and DOM updates that break simpler scripts. The guide includes production-ready code for a core scraping session class to implement this approach.

0
ProgrammingDEV Community ·

Agent memory bugs in widely used AI tools cause data loss and retrieval issues

An analysis of public issue trackers for major AI agent platforms reveals recurring memory-related bugs. In widely used coding agents, idle sessions can trigger compaction that silently discards needed context without user consent. Other common failures include poor retrieval quality due to storing lossy summaries and accumulation of stale data from past sessions. The report, compiled by a developer working on a memory layer for agents, argues these issues stem from treating memory as a simple context window with summarization. It proposes design rules, such as writing data durably before compaction and separating facts from noise, to address the core problems.

0
ProgrammingDEV Community ·

FTC AI safety probe highlights compliance checklist for solo developers

The U.S. Federal Trade Commission is investigating major AI firms like OpenAI and Anthropic for potential product risks, such as models causing serious user harm. While the full list of companies under review is not public, all providers of large models are potential targets. The investigation's scope means even small-scale services, like a chatbot on a 1GB VPS, could be affected if they operate as autonomous agents. Developers without legal teams must proactively implement safeguards like input validation, output filtering, and activity logging to mitigate regulatory risk.

0
ProgrammingDEV Community ·

Gmail's dot-ignoring feature led to API keys being issued to six strangers

A developer discovered six accounts signed up overnight using Gmail addresses with dots inserted in different positions. Gmail treats addresses with and without dots in the local part as identical, which bypassed the system's uniqueness check. This resulted in six API keys being issued to six different real people who had never requested them. The incident highlights risks to email deliverability if recipients mark such emails as spam.

0
ProgrammingDEV Community ·

Published Congressional Trades Dataset Raises Legal and Ethical Concerns

A recently published dataset contains 10,809 congressional trading filings covering 183,675 individual trades. While technically impressive, it lacks legal, ethical, and compliance analysis. The dataset's open distribution assumes public data can be freely redistributed without restrictions. This approach risks privacy violations and non-compliance with regulations like GDPR. Experts recommend legal audits and risk assessments to prevent misuse and potential legal action.

0
ProgrammingDEV Community ·

Developer Proposes 'Project DNA' Concept for Understanding Codebase Evolution

A developer proposes 'Project DNA' as a structured approach to understanding software project evolution beyond current code. The concept combines architecture, git history, dependencies, and complexity metrics to reveal why codebases developed certain patterns. This method aims to help developers quickly understand unfamiliar repositories by showing how components evolved together and where maintenance hotspots exist. The developer is working on an open-source tool called RepoDNA to implement this repository intelligence approach.

0
ProgrammingHacker News ·

Singapore Government's 'FirstDate' Dating Service Detailed in Report

An article published on Singapore Samizdat examined the workings of Singapore's government-run dating service, FirstDate. The report describes how the initiative functions as a state-facilitated matchmaking program. The topic subsequently generated discussion on the online forum Hacker News. The platform's users engaged with the article, which provided an inside look at the unique public service.

← NewerPage 730 of 3159Older →