SShortSingh.

Programming

0
ProgrammingDEV Community ·

Meta Muse case shows how malicious web content can hijack AI agents

Indirect prompt injection is a security flaw where attackers embed malicious instructions into data an AI agent consumes, such as web pages or documents. Unlike a traditional program that treats this as inert data, an AI agent interprets the content as language and may act on hidden commands. This can lead to unauthorized actions like accessing private files or sending data externally. The Meta Muse security architecture case study highlights the need for systems to treat all external data as untrusted by default.

0
ProgrammingDEV Community ·

Study finds most Gulf business websites track users without consent banners

A technical study loaded 2,103 websites from Saudi Arabia and the UAE in a real browser to test for data tracking compliance. It found a majority of sites deployed tracking cookies or third-party tools like Google Analytics without first displaying a consent banner. Many sites also began tracking before a visitor could make any privacy choice, potentially conflicting with regional data protection laws. The study was conducted by a firm that develops consent software and published its datasets openly for verification.

0
ProgrammingDEV Community ·

Developer argues for writing custom test doubles over using mocking libraries

A software developer explains they have stopped using popular mocking libraries like Moq or NSubstitute. They argue that writing custom test doubles, such as fakes, results in less cluttered and more readable test code. The developer states that custom test doubles reduce coupling to implementation details, making tests more resilient to changes in the underlying code. They also claim this approach provides more freedom during implementation and can be accelerated with the help of AI coding assistants.

0
ProgrammingDEV Community ·

New Java JSONPath library Treetrail offers RFC 9535 conformance and speed

Developer Christoph Sens has released Treetrail, a new JSONPath library for Java. The library implements the recently established RFC 9535 specification, providing a standard alternative to older, non-conforming libraries. Treetrail is designed for performance, showing benchmark results that meet or exceed popular libraries like Jayway JsonPath. It includes features for safe evaluation of untrusted expressions and offers migration tools to help projects switch from Jayway JsonPath.

0
ProgrammingDEV Community ·

Software developer advocates for custom test fakes over mocking libraries

A software developer argues that custom test fakes can be preferable to popular mocking libraries like Moq or NSubstitute. The author demonstrates that custom fakes can reduce wordiness and improve test readability compared to traditional mocking. Custom test-doubles also decouple tests from specific method signatures, making dependencies easier to change. This approach allows more implementation freedom and can lead to creating reusable testing tools. The developer concludes that while mocking libraries are powerful, custom fakes offer significant advantages for test design.

0
ProgrammingDEV Community ·

AI-powered hiking app Trailwise launched for Maharashtra trails

A developer has created Trailwise, an AI-powered web app for hikers. The application helps users discover trails within Maharashtra, providing details like difficulty and distance. It offers live weather data, risk assessments, and generates a gear checklist using the Gemma 3 AI model. The app is built as an open-source project using Flask and JavaScript, with photos stored locally.

0
ProgrammingDEV Community ·

Guide outlines key considerations for deploying on-premise voice AI systems.

A practical guide, originally from Fonix.AI, details the planning process for on-premise voice AI deployments. It emphasizes the need to clearly define which components like model execution and data storage are hosted within an organization's own infrastructure. The guide provides a worksheet for teams to inventory all system dependencies, including telephony paths and external service connections. It advises starting with a single business task and getting internal agreement on the system's scope before procurement. The process aims to ensure operational teams can properly evaluate a proposed system's architecture and data flows.

0
ProgrammingDEV Community ·

PageSpeed's 'Unused JavaScript' Warning Explained for Developers

PageSpeed Insights flags JavaScript files downloaded but not executed during a page's initial load. This 'unused' label specifically refers to code that did not run in the tool's simulated first-visit scenario, not necessarily code that is safe to delete. Large, unused files can delay page loading on slow connections, as the browser must download them before rendering content. Developers are advised to prioritize removing truly unnecessary scripts, like a slider on a page without one, while preserving interactive elements like menus that load on user interaction.

0
ProgrammingDEV Community ·

Developer finds multiple security flaws in common password reset flow

A developer identified four security vulnerabilities while reviewing the password reset feature of a task manager API. The issues included an email address enumeration leak, a lack of atomic database transactions allowing token reuse, multiple concurrent valid tokens, and side-channel timing attacks. The developer has proposed fixes such as uniform server responses, atomic database operations, and token invalidation upon use. The analysis emphasizes that seemingly simple authentication features can conceal significant security risks.

0
ProgrammingDEV Community ·

Python guide outlines proper API retry logic with exponential backoff

A technical article on DEV Community explains how to implement retry logic for API calls in Python. The author details a method to handle temporary service failures, such as network blips or server errors, to prevent workflow interruptions. The solution emphasizes rules like retrying only temporary errors, using increasing wait times, and avoiding duplicate actions. The provided helper code is under 90 lines and uses only Python's standard library.

0
ProgrammingDEV Community ·

Node.js 26's default Temporal API corrects daylight saving time drift

Node.js 26, released in May, enables the Temporal API by default without requiring a flag. The new API provides a modern date and time alternative to the legacy Date object. A key improvement is correctly handling calendar-day additions across daylight saving time boundaries, which the Date object miscalculates. The Temporal API prevents a one-hour drift error that commonly occurs in scheduling and billing code. However, this accuracy comes with a performance cost, as Temporal operations are significantly slower than Date operations.

0
ProgrammingDEV Community ·

AI Benchmark Tests if Models Can Identify Unique Optimal Solutions

A Kaggle benchmark evaluated whether AI models can determine if an optimization problem has a single best solution or multiple equally optimal ones. It used 87 small, exhaustively solvable problems across five types to provide exact ground truth data. Models were scored on three criteria: finding an optimal solution, correctly stating its uniqueness, and precisely counting the number of optimal solutions. In the primary test, Gemini 3.7 Flash significantly outperformed gpt-oss-120b, scoring 0.90 versus 0.55 accuracy on a fixed set of 29 instances. The study found that counting multiple optima is difficult for models, with accuracy dropping sharply as the number of optimal solutions increased.

0
ProgrammingDEV Community ·

Developer launches 'warden', an agentless homelab security tool for low-resource systems

A developer has released an open-source security tool called 'warden' for monitoring homelab environments. The tool runs on minimal hardware, requiring only 1 vCPU and 512 MB of RAM for its core functions. It operates without installing agents on monitored machines, instead using SSH connections and existing scanners like Trivy and Lynis. warden consolidates data on intrusion attempts, vulnerabilities, and system hardening, presenting proposed actions for user approval rather than acting autonomously. The software is designed to be a lightweight alternative to more resource-intensive security platforms.

0
ProgrammingDEV Community ·

Medical data market sees billion-dollar deals for de-identified patient records

A company acquired de-identified medical records of approximately 50 million Americans for about $1 billion in 2021. The data, sourced from hospitals, includes diagnoses, prescriptions, and lab results stripped of personal identifiers. This information is highly valued for AI training due to its longitudinal, labeled, and multimodal nature. The market for such clinical data involves insurers, pharmaceutical companies, and AI labs. Critics argue that de-identification does not guarantee anonymity and that patient consent for treatment does not cover data use for commercial AI development.

0
ProgrammingDEV Community ·

Method to monitor public Telegram channels for free without API or bot

A developer explains a free method for monitoring public Telegram channels without using the official API or creating a bot. The technique involves polling a public web page that Telegram provides for each channel, which contains the latest approximately 20 posts in HTML format. By checking this page at regular intervals, such as every five minutes, new sequential post IDs can be detected. This approach grants access to public data like subscriber counts and repost flags but does not provide full historical data or access to private channels. The article promotes an extended guide available for purchase while offering the core technique for free.

0
ProgrammingDEV Community ·

Developer details method for turning code review feedback into Cursor AI rules

A developer has outlined a method for converting human code review comments into actionable rules for the Cursor AI coding assistant. The process involves analyzing comments on merged pull requests and tracking subsequent code changes to identify genuine team patterns. The developer emphasizes that repeated feedback across different pull requests is stronger evidence than multiple comments on a single one. An experiment scanning 15 pull requests yielded only two viable candidate rules, highlighting the need for rigorous evidence. The author recommends testing a small set of reviewed rules on real code to see if they prevent repeated mistakes.

0
ProgrammingHacker News ·

Blog Post Details Exclusive Access and Cacheability Issues on AArch64

A technical blog post by Joel Siks explores a specific scenario where the Ldaxr instruction fails on AArch64 processors. The article investigates the interaction between exclusive accesses and cacheability settings. It was posted on Hacker News, where it received community discussion. The post aims to clarify a low-level architectural detail relevant to systems programmers.

0
ProgrammingDEV Community ·

News platform outlines tech stack for automated, rapid lead response systems

A news platform details the technical components required to automatically reply to potential customers within one minute of an enquiry. The process involves a CRM system to capture data, an automation platform to trigger a response, and an AI model to draft a tailored reply. Key considerations include compliance with data privacy regulations and ensuring proper user consent for messaging. The system aims to provide a useful initial response while flagging when human intervention is necessary.

← NewerPage 540 of 3138Older →