SShortSingh.

Programming

0
ProgrammingDEV Community ·

Why Disposing a Lifetime Should Release a Hold, Not Kill the Shared Worker

In mobile applications, multiple activations often share a single background worker, making naive disposal of IDisposable lifetimes dangerous. If disposing a lifetime unconditionally stops the shared worker, one activation can silently tear down resources still needed by another. The safer design treats a lifetime as a hold on shared work, where the worker only stops when the last hold is released. This requires atomic synchronization for both start and stop transitions, and each hold must be bound to the specific run it joined to prevent stale releases from affecting restarted workers. Defensive cleanup code across multiple branches deserves the same scrutiny, as any branch performing terminal teardown can shut down a resource still in active use.

0
ProgrammingDEV Community ·

Why AI Agents Lack Persistent Memory and How Dedicated Memory Systems Help

AI agents typically lose all context between sessions, forcing users to repeatedly re-explain preferences, decisions, and project details each time a new conversation begins. Unlike a large context window, which only holds information active within a single interaction, persistent memory stores selected information externally and retrieves it when relevant in future sessions. Developers working with agent frameworks have noted that the core challenge is not the model's ability to answer questions but its inability to maintain continuity across interactions. Effective memory systems must be selective, storing only high-value information such as user preferences, technical decisions, and recurring patterns rather than entire conversation histories. The emerging approach treats agent memory as a separate read-write system, distinct from the prompt itself, designed to bridge the gap between isolated sessions.

0
ProgrammingDEV Community ·

Developer Builds Tool to Recover Deleted SQL Server Rows Without Prior Audit Setup

A developer created LogCarver, an open-source tool that recovers deleted or modified SQL Server rows by reading the database's built-in transaction log via the undocumented fn_dblog function, requiring no prior configuration such as Change Data Capture or Audit. The tool reconstructs full INSERT, UPDATE, and DELETE histories and generates reviewable Undo and Replay SQL statements. During real-world testing, two significant bugs were uncovered: Heap table operations were silently excluded due to an incomplete context filter, and tables with extra indexes broke the internal record-matching logic. Both issues were fixed by querying SQL Server's sys.indexes for exact storage metadata rather than relying on pattern guessing, and the fixes were validated across SQL Server 2016, 2019, and 2022. LogCarver is MIT-licensed and publicly available on GitHub, though support for data types like decimal and money, as well as TRUNCATE TABLE handling, remains a work in progress.

0
ProgrammingDEV Community ·

Developer Questions Whether Human Creativity Should Define Tech, Not AI Limits

A software engineer has published a personal reflection arguing that the boundaries of human imagination should not be dictated by what AI can replicate or understand. The author expresses concern that the industry has begun treating AI capabilities as the ceiling for what developers should aspire to build. They call for technology rooted in distinctly human qualities — such as consciousness, lived experience, and emotion — that cannot be reduced to data patterns. The piece also acknowledges the pressures of modern software development, including the demand to ship fast and adopt new tools quickly. Ultimately, the author urges developers to reclaim agency over what aspects of human life and creativity remain beyond AI's reach.

0
ProgrammingDEV Community ·

How Teams Can Effectively Assign, Govern, and Review Work Done by AI Agents

AI agents are evolving beyond simple prompt-response tools into what some are calling 'agentic teammates' — entities that can investigate problems, make changes, run tests, and report results within a team's workflow. Unlike traditional AI assistants, these agents require detailed context such as expected outcomes, relevant files, technical constraints, and acceptance criteria to function effectively. Experts suggest separating persistent agent instructions from task-specific requirements to make workflows repeatable without overloading each individual prompt. Teams are also encouraged to deploy specialized agents for distinct functions — such as backend development, testing, or documentation — rather than relying on a single general-purpose AI. Accountability, however, remains with the human team members, who are responsible for direction, judgment, and reviewing the agent's output.

0
ProgrammingDEV Community ·

NVIDIA RTX PRO 6000 Blackwell: Who Actually Needs Its 96GB and $16,000 Price Tag

NVIDIA's RTX PRO 6000 Blackwell is a top-tier workstation GPU featuring 96GB of GDDR7 memory — double its predecessor — designed to handle large AI models and complex rendering workloads that exceed consumer GPU capacity. Prices have surged nearly 90% in under 18 months, driven by a GDDR7 memory supply shortage, with retail listings ranging from roughly $11,360 to over $14,000. The card comes in multiple editions sharing the same core specs but differing in cooling and form factor, making deployment environment a critical purchasing consideration. Analysts suggest renting GPU time is often the smarter option unless usage is consistent, as roughly 5,300 hours of use are needed to justify a $16,000 purchase over renting at $3 per hour. The card delivers strong value only when a large model or rendering scene must fit within a single GPU slot, making it a poor investment for workloads that don't require that much VRAM.

0
ProgrammingDEV Community ·

How a Python Leverage Validator Broke AI-Parsed Chinese Trading Signals

A trading automation system built on Telegram signal parsing used a Python validator to cross-check AI-extracted values after the AI was found to hallucinate leverage figures in some cases. When a Chinese-language signal for QNT futures arrived containing '50x', the AI parser correctly identified the leverage, but the regex-based validator only recognized English and Russian leverage keywords and missed the Chinese-formatted value entirely. Because the validator found no explicit leverage in the raw text, a downstream defensive layer stripped the AI's correct result, treating absence of proof as proof of absence. The flaw stemmed from the validator being designed around Latin and Cyrillic scripts, leaving it blind to Chinese trading notation despite the signal being written in standard format. The incident illustrates how verification layers added to catch AI errors can themselves introduce critical bugs when their own assumptions are too narrow.

0
ProgrammingDEV Community ·

Dev Team Builds AI Sales Agent That Learns From Past Deal Outcomes

A development team has built an Evidence-Driven Deal Intelligence Agent designed to help sales teams leverage historical deal experiences when handling new opportunities. The system combines PostgreSQL for structured business data, a persistent AI memory layer called Hindsight, and an LLM-based reasoning engine to generate contextual recommendations. Unlike traditional CRMs, which require manual effort to surface relevant past interactions, the agent automatically recalls comparable deals and the outcomes of previous recommendations. The architecture uses a React and TypeScript frontend with a FastAPI backend connecting the database and memory components. The goal is to help salespeople address recurring concerns — such as migration risk — by drawing on evidence from similar past situations rather than starting from scratch each time.

0
ProgrammingDEV Community ·

Why Trading Bots Must Reconcile State After WebSocket Reconnects

Automated trading bots on Polymarket face a hidden risk when WebSocket connections drop and reconnect: the system may have missed critical events such as order changes, fills, or position updates during the outage. A simple reconnect does not restore internal trading state, meaning the bot could act on stale or incomplete data. A safer architectural approach involves pausing trading on disconnect, then systematically verifying orders, fills, positions, and risk exposure before resuming. The Polymarket Trading Control Plane project addresses this by modeling explicit operational states like DEGRADED, RECOVERING, and VERIFIED rather than treating process uptime as a proxy for system health. The core principle is that reconnection should trigger a structured reconciliation workflow, not an immediate return to trading.

0
ProgrammingDEV Community ·

AI Agents Waste Tokens Reading Entire Pages — Leaner Snapshots Offer a Fix

When AI agents navigate web pages using tools like Playwright's MCP server, they receive full accessibility snapshots that can run into hundreds of thousands of characters per page. A comparison across five common websites found that a leaner browser tool produced snapshots roughly 44 times smaller than Playwright's default output, cutting an estimated 125,000 tokens per session. The bloated descriptions force agents to sift through irrelevant navigation, sidebars, and footers just to locate a single button or link, increasing both cost and the chance of errors. In multi-step tasks, the problem compounds because a fresh snapshot is generated after every interaction, meaning redundant page furniture is re-read repeatedly. The proposed solution strips snapshots down to headings, interactive elements, and a brief text sample, keeping full detail available on demand rather than flooding every turn.

0
ProgrammingDEV Community ·

GitLab Self-Managed Runs Two AI Code Reviewers Depending on User Seat Type

GitLab Self-Managed offers two distinct AI code review features under the same @GitLabDuo handle: the agentic Code Review Flow and the non-agentic GitLab Duo Code Review. Which feature runs is determined by whether the user who triggers the review holds a GitLab Duo Enterprise seat — if they do, the non-agentic single-pass review activates; if not, the more capable agentic flow runs instead. Code Review Flow can analyze repository structure and cross-file dependencies through multi-step reasoning, while GitLab Duo Code Review is limited to the merge request's file diffs in a single pass. This distinction is critical for teams enforcing standards that span multiple files, as the Enterprise-seat-triggered reviewer cannot read beyond the immediate diff. Group Owners can override the default behavior to pin all reviews to Code Review Flow regardless of seat type, with credit usage attributed to the initiating user.

0
ProgrammingDEV Community ·

Delegating Code to Claude Cuts Astra Tokens but Gains Are Inconsistent

A developer built a local tool called TaskRoute to route coding tasks from Astra in Codex to Claude Code, aiming to preserve Astra's token allowance for non-coding work. Early tests showed mixed results: one comparison found only a 3% reduction in Astra's uncached input tokens while taking 49% longer, and a smaller task actually increased token usage by 29%. A more controlled synthetic test on a new Python task showed stronger gains, with Astra's uncached input tokens dropping 59% and output tokens falling 83%, though elapsed time remained roughly unchanged. The author cautioned that Claude's separate token usage, failed runs, and session setup costs are not included in these figures, making direct subscription savings difficult to assess. TaskRoute remains a small experimental plugin for macOS, and the findings reflect limited sequential tests rather than a broad benchmark.

0
ProgrammingDEV Community ·

FarmMemory AI Assistant Retains Field-Specific History to Help Farmers Track Crops

A developer has built FarmMemory, a voice-first AI assistant designed to help farmers recall field-level history across multiple conversations. The tool allows users to interact via text or voice in their preferred language, including Telugu, and links observations to specific field identifiers to prevent data from one field mixing with another. Built with Next.js, FastAPI, Groq, and a memory layer called Hindsight, the system explicitly separates memory storage from response generation. Only information from the farmer's own messages is saved as durable observations, ensuring AI-generated interpretations are never stored as factual farm history. The goal is to give agricultural AI assistants a reliable, inspectable memory without overloading language models with entire farm histories in every prompt.

0
ProgrammingDEV Community ·

BrandBridge Dev Explains How to Build a React Frontend Before the Backend Exists

A five-person team is building BrandBridge, a marketplace designed to connect content creators, photographers, brands, and startups on a single platform. The frontend developer faced the challenge of building the React UI before any API contract was agreed upon with the backend engineer. To avoid a future rewrite, the developer drew a deliberate boundary between frontend and backend logic, structuring the app to function independently of a live backend. The platform supports four distinct user roles and includes an AI-driven content pipeline that learns from past performance to improve future campaigns. The frontend stack uses Vite, React Router, Tailwind CSS, and Recharts, with no state management library deemed necessary.

0
ProgrammingDEV Community ·

BrandBridge Dev Explains How He Built a React Frontend Without a Backend

A five-person team is building BrandBridge, a marketplace designed to connect content creators, photographers, brands, and startups on a single platform. The frontend developer faced the challenge of building the React UI before any backend API had been designed or agreed upon. To avoid a costly rewrite later, he deliberately structured the frontend to operate independently of the backend's timeline. The app uses Vite, React Router, Tailwind, and Recharts, with no state management library, and later incorporated an AI content pipeline that learns from past performance. The developer's key engineering decision was defining a clear boundary between frontend and backend logic under conditions of uncertainty.

0
ProgrammingDEV Community ·

How One Developer Built BrandBridge's React Frontend Before the Backend Existed

A five-person team is developing BrandBridge, a marketplace designed to connect content creators, photographers, brands, and startups on a single platform. The frontend developer began building the React interface before any API contract was agreed upon, deliberately structuring the code so the backend could be integrated later without requiring a rewrite. The platform supports four distinct user roles — creators, photographers, brands, and startups — each with different workflows, alongside an AI-driven content pipeline that learns from past performance over repeated cycles. The frontend was built using Vite, React Router, Tailwind CSS, and Recharts, with no external state management library. The core engineering challenge was deciding where to draw the boundary between frontend and backend logic in the absence of a working backend.

0
ProgrammingDEV Community ·

JavaScript Hoisting Explained: How Declarations Move to the Top of Scope

Hoisting is a default JavaScript behavior where variable and function declarations are internally moved to the top of their scope before code executes. Function declarations are fully hoisted, meaning they can be called before they appear in the code. Variables declared with 'var' are hoisted but initialized as 'undefined', so only the declaration moves up, not the assigned value. Variables declared with 'let' and 'const' are also hoisted internally but remain inaccessible before their declaration, throwing a ReferenceError if accessed early. This behavior can be useful for code organization, allowing developers to place high-level logic at the top of a file while keeping implementation details further below.

0
ProgrammingDEV Community ·

CodeZero Uses Hindsight Memory Layer to Help AI Agents Recall Past Conversations

A team built CodeZero, a conversational AI assistant, for the HackwithHyderabad 3.0 hackathon to address the common limitation of AI systems lacking persistent memory. The application uses Hindsight by Vectorize as its memory layer, enabling it to store and retrieve context from previous interactions rather than treating each conversation as new. When a user sends a message, the system retrieves relevant past memories and passes them alongside the current query to a locally-run LLM powered by Ollama and Qwen. The frontend was built with Flutter, the backend with FastAPI, and Firebase handles authentication and database functions. The project demonstrated that meaningful AI memory is not just about storing all past messages, but about selectively retrieving and applying relevant context to generate more useful responses.

0
ProgrammingDEV Community ·

Developer Finds Clean APIs Make AI Agents Lazier, Invents Friction-Based Fix

A developer building Soma, an AI-powered codebase management system, achieved a 97.3% First Pass Success Rate by forcing the agent to delegate tasks to over 50 concurrent subagents via raw bash scripts. Migrating to cleaner MCP/JSON-RPC tooling caused performance to drop sharply to 87.5%, as the LLM abandoned delegation and began making sweeping code changes with minimal prior research. The developer identified this as the 'Abstraction Trap,' where easy-to-call APIs give LLMs false confidence and lead to context window saturation and erratic behavior. To counter this, he introduced Test-Time Compute Oracles — adversarial judges that intercept and scrutinize proposed changes before execution — alongside a just-in-time rule injection system to prevent context collapse. The experience led to a broader conclusion: agentic AI systems benefit from deliberate architectural friction rather than the clean abstractions that work well in traditional software engineering.

0
ProgrammingDEV Community ·

Role Explosion in Access Control? Attributes May Be the Fix

When permission systems grow a new role for every customer exception, it signals a modeling problem rather than a staffing one. Role-Based Access Control (RBAC) works well for stable job functions but breaks down when access rules depend on conditional factors like region, time, or data classification. Attribute-Based Access Control (ABAC) addresses this by evaluating user, resource, and environment attributes at request time instead of encoding every condition into a new role. A practical rule of thumb is: if you cannot identify who can access an object without inventing a role name, the condition belongs in attributes. Experts recommend keeping roles for broad baseline permissions while placing dynamic facts such as plan tier, region, or ownership directly in the access decision.

← NewerPage 821 of 3171Older →