SShortSingh.

Programming

0
ProgrammingDEV Community ·

Researcher Built a Canary Executable to Spy on VirusTotal Sandboxes

A developer created a Rust-based executable with a fake identity — dubbed 'ZeroToken Engine' — and submitted it to VirusTotal to observe the analysis environments that ran it. The program collected metadata such as OS version, CPU and memory specs, uptime, hostname, and running process names, then reported findings via DNS heartbeats and HTTPS dossiers to the researcher's own infrastructure. It used two reporting channels: compact encoded DNS lookups and fuller CBOR-formatted HTTPS payloads, each tagged with a random eight-byte run ID. The experiment captured 353 event rows across 21 run IDs over a roughly five-hour window on September 12, 2026. The researcher noted that the binary installed nothing, harvested no credentials or documents, and intentionally disclosed the canary's true behavior in the project's README alongside its cover identity claims.

0
ProgrammingDEV Community ·

Safer AI Automations: Why a Validation Layer Should Sit Between AI and Action

A software developer has shared a design pattern aimed at making AI-powered workflows safer and more reliable in production environments. The core idea is to separate the AI's role — understanding unstructured user input and extracting key details — from the workflow's role of enforcing business rules and triggering actions. Under this approach, an AI model never directly executes critical operations; instead, its output is validated against predefined rules before any action is taken. Recommended safeguards include duplicate-action prevention, retry limits, timeouts, and a human handoff option when the AI is uncertain. The pattern can be applied across popular automation platforms such as n8n, Make, or custom API-based systems.

0
ProgrammingHacker News ·

A curated list of sci-fi books exploring how societies are built and justified

A reader has shared a personal selection of science fiction books centered on the theme of how human societies are constructed and rationalized. The list is published on BookDNA, a book recommendation platform. The post appeared on Hacker News, receiving minimal engagement with 4 points and no comments at the time of reporting. The collection appears aimed at readers interested in the sociological and philosophical dimensions of speculative fiction.

0
ProgrammingDEV Community ·

Why AI Chat Failover Needs Accessible Origin Announcements, Not Just Spinners

A developer discovered a critical accessibility flaw while conducting a keyboard-only audit of a streaming chat application: when the local inference path failed and silently switched to a remote server, screen readers and keyboard users received no indication of the origin change. The skeleton overlay that appeared during the failover stole focus and marked the main landmark as aria-busy, trapping assistive technology users without any announcement of where their data was being sent. The root cause was a single boolean state variable that treated local and remote streaming as identical, collapsing a meaningful privacy transition into a generic loading animation. The developer argues that the real defect is not the spinner's appearance but the absence of an origin state model that distinguishes on-device processing from remote server calls. A structured state table is proposed — covering idle, streaming-local, needs-consent, streaming-remote, error, and cancelled states — to ensure focus management, live region announcements, and user consent controls are all tied to where tokens actually originate.

0
ProgrammingDEV Community ·

Silent Citation Decay: How a Green Coverage Check Missed 23 Wrong Line Numbers

A developer discovered that all 23 line-number citations in a specification table were incorrect by one or two lines, yet an automated coverage check remained green throughout. The check only counted whether citation cells were non-empty, never verifying whether the references actually pointed to the correct content. The citations had been accurate when first written but silently drifted as other edits shifted line positions in the source file. To fix this, the developer replaced line-number-dependent references with quoted text snippets, allowing the tool to detect whether a citation had moved, gone missing, or remained valid. This shift from positional to keyed checking meant the system could now name the specific failing row rather than simply returning a misleading count of zero uncovered items.

0
ProgrammingDEV Community ·

Prompt Injection Is a Permissions Problem, Not a Model Problem

Prompt injection attacks occur when malicious instructions hidden inside documents — such as PDFs — manipulate an AI assistant into executing unintended actions, like leaking private files. The attack works because language models process user instructions and document content as a single stream of tokens, making it structurally difficult to distinguish intent from data. Common defences like system prompts and refusal training raise the cost of attacks but cannot eliminate the risk, since they operate within the same text-based substrate as the attack itself. The author argues that true security requires placing access controls outside the model entirely — in a permission table that no document content can modify or influence. This approach ensures that blocked files remain invisible to the model, that access decisions are looked up rather than reasoned about, and that every failed injection attempt is logged for review.

0
ProgrammingDEV Community ·

Zero-item audit phases falsely passed as 'AHEAD' due to vacuous logic flaw

A software audit tool incorrectly marked three phases as passing because they examined zero files, producing outputs like 'judged=0/0' and 'open=0' that technically satisfied pass conditions without measuring anything. The flaw stems from vacuous truth: rules designed to flag passing results fired correctly on empty data sets, making an unmeasured phase indistinguishable from a genuinely passing one. Unlike typical false positives, the output contained no suspicious numbers — the zeros were accurate, making the error nearly invisible. The developer resolved this by introducing a third audit state called VOID, distinct from pass or fail, to represent phases where no measurement was actually taken. Alongside this, enumeration and judgement logic were separated so that a zero result could be verified against whether data collection had genuinely occurred.

0
ProgrammingHacker News ·

Founder Struggles to Land First Customers for AI Security Audit Tool

A founder building an offline AI-powered security audit app for GitHub and local code repositories is struggling to acquire customers, having secured fewer than five to date. The tool is built on a fine-tuned small language model running inside an Electron desktop app. The founder posted on Hacker News seeking advice after observing peers on LinkedIn and X claiming to reach $500K–$1M in annual recurring revenue within months, apparently without paid advertising. The post reflects a common early-stage challenge for solo or small-team SaaS founders: converting a functional product into paying customers. The thread attracted minimal engagement, with only three comments at the time of posting.

0
ProgrammingDEV Community ·

EU Machinery Regulation deadline is January 20, 2027, not January 14 — here's why

The EU Machinery Regulation (EU) 2023/1230 carries an application date of 20 January 2027, not 14 January as widely cited in secondary sources. The original published text listed 14 January, but a Corrigendum dated 4 July 2023, published in OJ L 169, corrected the dates across Articles 6, 47, and 50 to 54. The regulation is significant for software developers because Annex I brings safety components with self-evolving or AI-driven behaviour into the scope of conformity assessment. Separately, the EU AI Act's Article 15 obligations for embedded AI systems are deferred until 2028, meaning no compliance breach exists today for firms that have not yet acted. Developers and compliance teams are advised to consult the corrigendum directly rather than relying on third-party summaries.

0
ProgrammingDEV Community ·

5-Step System Design Interview Framework Explained With 6 Classic Examples

A software engineer has shared a structured five-step framework aimed at helping candidates perform better in system design interviews. The approach covers clarifying requirements, estimating scale, sketching a high-level design, deep-diving the hardest component, and discussing tradeoffs. The framework is applied to six commonly asked interview problems, including URL shorteners, rate limiters, news feeds, and chat systems. The guide emphasizes that most candidates fail by jumping directly into solutions without first establishing clear requirements and numbers. The content has been published on DEV Community alongside an animated video walkthrough of all six examples.

0
ProgrammingDEV Community ·

How ChatGPT Actually Works: Tokens, Attention, and Next-Word Prediction Explained

ChatGPT does not truly understand language — it repeatedly predicts the most plausible next token based on patterns learned during training. Words are represented as mathematical vectors in a geometric space, allowing the model to capture relationships between concepts like similarity and analogy. A mechanism called attention determines which earlier words in a conversation influence each new prediction. The model is first trained on vast text data as an autocomplete system, then refined using human feedback to behave like a helpful assistant. Quirks such as hallucinations, forgotten context, and inconsistent outputs all stem directly from this underlying token-prediction architecture.

0
ProgrammingDEV Community ·

Why Adding More Servers Can Make a Viral Traffic Spike Worse

When an app suddenly receives massive traffic, the instinct to add more servers can backfire if the root bottleneck is not identified first. In most cases, the database is the true chokepoint, not the application layer, which merely appears busy while waiting on slow database responses. Spinning up additional app servers only multiplies the number of connections hammering the same database, quickly exhausting its connection pool. Targeted fixes — such as indexing frequently queried data, caching hot keys, and queuing non-urgent tasks — address each bottleneck in sequence more effectively than scaling hardware. Engineers are advised to trace a single slow request end-to-end before making infrastructure changes, as each resolved bottleneck typically reveals the next one in line.

0
ProgrammingDEV Community ·

Prompt Caching Can Cost More If Cache Writes Never Get Read Back

A developer discovered that enabling prompt caching for an AI agent loop actually increased costs by about 25% instead of reducing them. The root cause was a volatile timestamp injected early in the system prompt, which changed the byte prefix on every request and prevented any cache hits. Prompt caching works as a prefix match over the fully rendered request, meaning any dynamic content placed before a cache breakpoint invalidates the entire cache entry. Cache writes cost 1.25x the base input price, while reads cost only 0.1x, so entries that are written but never read become a net surcharge. Developers can diagnose the issue by checking the usage fields: if cache_read_input_tokens stays at zero across repeated requests, something upstream is altering the prompt prefix.

0
ProgrammingDEV Community ·

Developer Experiments With Delegating Full TDD Cycle to an AI Agent

A software developer who previously used AI agents only for production code decided to explore delegating the entire test-driven development (TDD) cycle — including test writing — to an AI agent. The shift was inspired by a presentation from Lada Kesseler on augmented coding, which demonstrated that an LLM could follow the red-green-refactor TDD flow while keeping the process visible and inspectable. Using a prompt shared by Kesseler as a foundation, the developer built a reusable TDD skill and deployed it via Codex CLI, with the agent pausing for approval at each step of the cycle. The developer later refined the workflow so the agent could complete a full TDD cycle before handing back control, reducing friction while still allowing frequent human intervention. The experiment highlighted how AI-assisted TDD can preserve process transparency without requiring the developer to retain direct control over every step.

0
ProgrammingDEV Community ·

How Test-Driven Development Became One Developer's Answer to Coding Anxiety

Software developer and writer Edu describes how Test-Driven Development (TDD) became a personal coping mechanism for the anxiety and uncertainty he experienced throughout his programming career, dating back to his Computer Science studies in 2006. He recounts struggling with no reliable starting point for implementations, often needing to deliberately break working code just to trust that his manual tests were valid. After discovering Kent Beck's account of similar feelings, he began deliberately practising TDD in December 2022 while contributing to the open-source project now known as Seed4j. TDD's structured red-green-refactor cycle gave him a repeatable process to follow even on low-motivation days, independent of intuition or confidence. While he acknowledges broader technical benefits such as regression protection and simpler design, he identifies the psychological structure TDD provides as his primary motivation for adopting it.

0
ProgrammingDEV Community ·

Developer Builds End-to-End FMCG Sales Analytics Platform Using Power BI and ML

A developer built a full-stack retail analytics solution using a dataset of 100,000 transactions from a multi-city Indian FMCG retailer covering the year 2024. The dataset spanned 21 variables including product categories, customer demographics, sales metrics, store formats, and inventory data across eight FMCG segments. The project followed a pipeline from raw data cleaning and exploratory analysis through to Power BI dashboards, regression-based machine learning, and a Streamlit web application. A key data quality challenge involved roughly 40% missing values in the customer age field, which was addressed through imputation and indicator flagging. The final solution enables users to interactively explore sales trends and generate transaction-level margin predictions through the deployed Streamlit interface.

0
ProgrammingDEV Community ·

AI Pricing Tool Lists Used Item Above New Price Due to Rate-Limited Search Engine

A developer running a self-hosted AI tool to price second-hand eBay items discovered it had recommended listing a used Raspberry Pi case at £35.39 — 31% above its £26.99 new retail price. The error occurred because the tool's retail anchor, designed to prevent overpricing, relied on a single price-comparison source accessed via a rate-limited search engine that had been unresponsive all day. Without the anchor's corrective signal, the system priced solely from nine live asking prices ranging up to £240, producing a misleading result. Attempts to manually input the retail price exposed further bugs in the notes parser, where condition keywords like 'new' conflicted with price annotations, requiring regex fixes. The incident highlights how silent infrastructure failures in automated pricing systems can go unnoticed until a listing is already live.

0
ProgrammingDEV Community ·

Four Security Flaws to Fix in Every GitHub Actions Workflow Copilot Generates

GitHub Copilot can produce functional GitHub Actions workflows quickly, but functional does not mean secure, according to a developer analysis. The most critical flaw is command injection via github.event data — such as PR titles — interpolated directly into shell scripts using ${{ }} expressions instead of being passed safely through environment variables. Generated workflows also frequently omit explicit permissions blocks, leaving tokens with broad default write access that should instead be scoped to the minimum required per job. Third-party actions are typically pinned to mutable version tags like @v3 rather than immutable commit SHAs, allowing supply-chain attacks if a maintainer's account is compromised. Additionally, Copilot may suggest pull_request_target triggers combined with fork code checkout, a combination that exposes write tokens and secrets to untrusted contributor code.

← NewerPage 1557 of 3480Older →