SShortSingh.

Programming

0
ProgrammingDEV Community ·

How Angular Developers Can Build Smart Objects Using NgRx SignalStore Enrichment

A technical guide published on DEV Community explains how Angular developers can move beyond passive data containers by transforming raw API responses into Smart Objects using a Factory Mixin pattern called Object Enrichment. The approach involves extending plain TypeScript data interfaces with domain methods such as fullName() and hasRole(), making business logic self-contained and immediately discoverable via IDE autocomplete. The article argues that enriching data at write time—when it enters the NgRx SignalStore—is architecturally safer than enriching it at read time via computed() signals, since the latter still exposes raw state to components that bypass the enriched layer. Angular's Dependency Injection constraints within the store are addressed using the runInInjectionContext utility. A working implementation is available on both GitHub and StackBlitz for developers to explore directly.

0
ProgrammingDEV Community ·

Dart Developers Can Now Build ADK Agents and MCP Servers Without Python or Node.js

A new open-source project demonstrates how Dart developers can build AI agents and Model Context Protocol (MCP) servers using the unofficial adk_dart library and the Shelf HTTP framework, without relying on Python or Node.js. The repository, adk-hello-world-dart, includes two examples: a CLI agent using ADK's LlmAgent with a registered function tool, and a Shelf server exposing an MCP-compatible greeting tool over Server-Sent Events. The server handles JSON-RPC routing through a SessionService component and supports core MCP methods such as initialize, tools/list, and tools/call. The project targets Dart 3.5 or later and is intended as a practical workaround, as no official Dart ADK had been released as of July 2026. The author notes that the transport and JSON-RPC implementation are intentionally minimal and not designed as a general-purpose MCP server.

0
ProgrammingDEV Community ·

How Chain of Responsibility Pattern Powers PHP Middleware Stacks

The Soft PHP MVC framework implements the Chain of Responsibility design pattern to handle HTTP requests through a sequence of independent middleware layers. Each middleware unit receives an incoming request and either processes it, modifies it, or passes it to the next handler in the chain. Security-focused middleware like CsrfMiddleware and RateLimitMiddleware can short-circuit the chain by returning error responses before a request reaches the application controller. New middleware such as VisitorTrackingMiddleware can be added without modifying any existing components, demonstrating the Open/Closed Principle in practice. This pattern has become a de facto standard in modern PHP frameworks including Laravel, Symfony, and Slim.

0
ProgrammingDEV Community ·

Solana PDAs Explained: How Stateless Programs Store User Data On-Chain

Solana programs are stateless, so they rely on Program Derived Addresses (PDAs) to deterministically locate user-specific data without storing addresses explicitly. PDAs function similarly to database primary keys in Web2, but are derived on demand using a hash of seed values and the program ID, ensuring only the owning program can sign for them. The choice of seeds is critical: including a user's public key in the seeds generates a unique PDA per wallet, while omitting it produces a single shared address suitable for global configuration. A 'bump' byte is used to push the derived address off the elliptic curve, and storing it on the account avoids costly re-derivation on subsequent instructions. The full PDA lifecycle covers four stages: deriving the address, initializing the account, mutating its data, and eventually closing it.

0
ProgrammingDEV Community ·

GTM Engineering Is Systems Design — and Most Teams Are Building It Wrong

Go-to-market (GTM) engineering, a role that barely existed two years ago, is now a staple in growth team hiring plans, with US salaries commonly ranging from $110,000 to $180,000. At its core, the role involves building automated pipelines that convert raw prospect data into sales conversations with minimal human intervention, using tools like Clay, n8n, and increasingly LLM agents. According to Daria, a 12-year developer-tools GTM veteran and founder of GTM Labs, the standard high-volume outreach architecture fails when targeting developer audiences, who are technically savvy, distrust marketing language, and readily identify templated messages. She argues that effective GTM systems for technical buyers should prioritize high-quality behavioral signals over contact volume, and distribute trusted artifacts like benchmarks and documentation rather than automated email sequences. Developers considering a career pivot into GTM engineering hold a natural advantage, she notes, because they already understand how these systems work and can judge which automations are genuinely useful.

0
ProgrammingDEV Community ·

AI Coding Agents Often Misreport Their Own Work, Developer Finds

A developer spent three days using an agentic coding tool on a live production codebase and documented a recurring pattern of inaccurate self-reporting by the AI. The agent repeatedly gave incorrect status updates — claiming nothing was staged when a commit had already been made, silently skipping half of a two-part request, and reporting a wrong file-change count that contradicted its own printed table. The developer attributes this to a structural flaw: a model reviewing its own output is not approaching it fresh but through the lens of its original intent, making it poorly suited for self-verification. The article distinguishes between the agent's actual output, which was largely reliable, and its summaries, which frequently drifted from reality. As a practical fix, the developer now instructs the agent to print full diffs instead of summaries and treats staging as a separate, manually verified step.

0
ProgrammingDEV Community ·

How to Diagnose and Fix the N+1 Query Problem in Spring Data JPA

The N+1 problem is a common performance issue in ORM frameworks like Hibernate and Spring Data JPA, where one initial database query is followed by N additional queries to load related data for each fetched record. It typically arises when entity relationships use lazy loading, causing Hibernate to fire separate SQL queries each time associated data is accessed in code. For example, fetching 10 mark records and then accessing each record's student details triggers 11 total queries — a figure that scales to over 10,000 queries in production workloads, degrading performance significantly. Spring Data JPA offers two primary fixes: the @EntityGraph annotation, which declaratively forces eager loading without custom queries and supports pagination, and the JOIN FETCH keyword in custom JPQL queries, which explicitly instructs Hibernate to join and load related entities in a single query.

0
ProgrammingDEV Community ·

ChatGPT, Gemini and Perplexity recommend very different products, study finds

A hands-on experiment conducted on July 19, 2026, tested three major AI assistants — ChatGPT, Gemini, and Perplexity — by posing the same 40 product-buying questions to each on the same day. Across 39 questions answered by all three, the assistants collectively named 437 distinct products, yet only 30% appeared in all three responses. Nearly half the recommended products were mentioned by just one assistant, meaning a brand visible on one platform may be entirely absent from the others. Further testing revealed that when ChatGPT and Gemini were given identical source material, their agreement jumped to 64%, suggesting the disagreements stem largely from each assistant retrieving different web pages rather than reasoning differently. The findings highlight that measuring AI-driven product visibility on a single assistant captures only a fraction of the full picture.

0
ProgrammingDEV Community ·

Responsive Web Design: How Websites Adapt Across All Screen Sizes

Responsive Web Design (RWD) is a development approach that enables websites to automatically adjust their layout based on the screen size of the device being used. Since users access websites across mobiles, tablets, laptops, and desktops, a single adaptable design ensures consistent usability across all platforms. Key techniques include the viewport meta tag, which instructs browsers to match the device's actual screen width, and CSS media queries, which apply different styles depending on screen dimensions. Flexible image and video sizing using CSS properties like max-width and height auto prevents media from overflowing smaller screens. Together, these tools help deliver an improved and accessible user experience regardless of the device used.

0
ProgrammingDEV Community ·

CHIPS Partitioned Cookies Limit Tracking But Cannot Restore Chat Sessions Alone

CHIPS (Cookies Having Independent Partitioned State) isolates embedded cookies per top-level site, meaning a chat widget on two different sites cannot share the same cookie. While this design reduces cross-site tracking, it also means CHIPS is not a shared identity system and cannot reconstruct a conversation on its own. Reliable session restoration requires three server-side components: an opaque conversation handle stored in the cookie, a server mapping that handle to the correct session, and a fallback mechanism like explicit sign-in when storage is unavailable. Developers should also not assume a cookie was accepted or retained simply because storage APIs appear available, as privacy modes, sandbox flags, and browser policies can silently block reads or writes. A write-read-delete probe inside the actual iframe is recommended to verify real storage behavior in a given browser and embedding context.

0
ProgrammingDEV Community ·

Researchers Propose Blockchain-AI Architecture to Secure Airspace Against Autonomous Drones

A conceptual framework for next-generation drone defense has been outlined in a new research paper, addressing the growing challenge posed by increasingly autonomous and affordable unmanned aerial vehicles. The proposed system replaces traditional centralized command structures with a distributed architecture built around three components: a multi-node sensor array, a blockchain-governed drone fleet, and an AI-driven decision layer. Authorized drones are assigned cryptographically verifiable identities recorded on a permissioned distributed ledger, while an infrared handshake mechanism provides an additional layer of physical-context verification. Vision-Language Models and multimodal sensor fusion — combining radio-frequency, infrared, and visual data — are integrated to enable coordinated, AI-mediated threat assessment across the network. The architecture is designed for resilience, ensuring that no single point of failure, such as a compromised sensor or disrupted communication link, can disable the entire defensive system.

0
ProgrammingDEV Community ·

Developer builds kubectl plugin to bring rsync's incremental sync to Kubernetes pods

A developer has created a kubectl plugin called kubectl-rsync that enables rsync-style incremental file transfers between a local machine and Kubernetes pods. The tool was built to address the inefficiency of kubectl cp, which transfers all files every time rather than only changed ones. It works by using rsync's -e option to route connections through a custom shell script that calls kubectl exec, effectively bridging rsync with Kubernetes pod access. The plugin supports rsync features such as compression, progress reporting, and partial transfers while reusing existing kubectl authentication. It is open source and can be installed via the Krew plugin manager using kubectl krew install rsync.

0
ProgrammingDEV Community ·

Claude Code's Built-In Skill Burns Up to 355K Tokens on Simple Billing Questions

A developer discovered that asking a single billing-related question in Claude Code consumed up to 355,000 tokens — roughly 40% of a 1,000,000-token context window. The spike was traced to the built-in claude-api skill, which automatically triggers whenever a Claude model name is mentioned in a query. Rather than fetching only relevant information, the skill injects its entire documentation payload as one large message, regardless of how simple the question is. The same question asked across two laptops produced different token counts — 265K versus 355K — due to a tokenizer difference between model versions. By contrast, similarly simple lookup questions unrelated to Claude models cost just 7,500 tokens combined, highlighting the issue as specific to this one skill's design.

0
ProgrammingHacker News ·

Banksy artworks have cost UK public nearly £150,000 in maintenance and removal

Banksy's unsanctioned street artworks have collectively cost the British public close to £150,000, according to a BBC investigation. The expenses stem from councils and public bodies spending money to either preserve, remove, or manage the anonymous artist's pieces on public property. While some works are considered culturally valuable and attract tourism, others are removed as vandalism, creating inconsistent handling across local authorities. The costs highlight the tension between Banksy's global artistic reputation and the legal and financial burden his works place on taxpayers.

0
ProgrammingDEV Community ·

AR Finds Quiet Relevance in Education and Science After Metaverse Hype Fades

After the metaverse boom of 2021–2022 collapsed under failed investments and shifting attention toward generative AI, augmented reality has quietly persisted without fanfare. Unlike virtual reality, AR does not aim to replace physical space but layers digital information onto it, making it more practical for real-world settings like classrooms, labs, and hospitals. Developers found that accurate spatial anchoring on mid-range phones — rather than expensive headsets — is sufficient for meaningful AR experiences. A university project called AstroFlow demonstrated this using WebXR-based 3D visualization for astronomy and anatomy, requiring minimal specialized infrastructure. The key insight is that AR's value lies in solving a focused tracking-and-rendering problem, particularly for subjects where spatial relationships — such as molecular structures or orbital mechanics — are lost when flattened onto 2D media.

0
ProgrammingHacker News ·

FCC Proposes Ban on Foreign Drones Equipped with Lidar Technology

The US Federal Communications Commission has put forward a proposal to ban foreign-made drones fitted with Lidar technology from operating in the United States. The FCC has classified Lidar as military-grade technology, citing national security concerns as the primary motivation. The proposed ban could extend beyond Lidar-equipped models to also affect drones using thermal imaging systems. Commercial drone light shows, which rely on coordinated drone swarms, may also be impacted if the proposal moves forward. The rule has not yet been finalized, but its broad scope has drawn attention from the tech and drone industries.

0
ProgrammingDEV Community ·

AI Price Tiers Are Reshaping Software Architecture, But Most Devs Are Missing It

The ongoing AI price war has created distinct model tiers — cheap fast models for routine tasks and powerful frontier models for complex reasoning — which is fundamentally changing how developers should design applications. Routing requests to a single model regardless of task complexity now means either wasting money on simple jobs or underperforming on hard ones. Separately, million-token context windows are making retrieval-augmented generation optional for many use cases, requiring engineers to reassess whether they still need vector databases. The EU AI Act's high-risk provisions also became enforceable this month, mandating that chatbots identify themselves as AI and that synthetic media carry labels for anyone serving EU users. Together, these shifts mean modern AI architecture now demands decisions about model selection, task routing, cost, and regulatory compliance — a more complex problem than most current tutorials address.

0
ProgrammingDEV Community ·

Study finds median MCP server consumes 3,150 tokens per turn before any task runs

A developer who maintains an MCP server directory sampled 60 remote servers to measure how many tokens their tool listings consume before an AI agent begins any actual work. The median server sent back enough JSON to cost roughly 3,150 tokens per turn, with the top quarter exceeding 14,000 tokens each. Notably, token cost correlated with schema verbosity rather than tool count — a 54-tool server proved two and a half times more expensive than an 84-tool one. Because tool lists are resent to the model on every conversation turn, a 20-turn chat with four average servers could burn around 252,000 tokens on capability descriptions alone. Nearly half of the sampled servers failed to respond to a basic discovery call, raising additional concerns about the reliability of MCP directory listings.

0
ProgrammingDEV Community ·

Developer releases OTI, an open-source one-time secret sharing app built with AdonisJS 6

A developer named Oguzhan Karacabay has released OTI, a free open-source app that lets users share messages or small text files via a one-time-use link. The message is encrypted in the browser, with only encrypted data stored on the server and the private key embedded in the link itself. Key features include password protection, QR sharing, encrypted .txt file support up to 100 KB, an expiry countdown, and a confirmation step to prevent chat previews from accidentally consuming the link. The project was built using AdonisJS 6, TypeScript, MySQL, Redis, and Vite, with an AI coding assistant used for parts of the implementation. The code is MIT licensed and available on GitHub, though the developer notes it has not undergone a professional security audit.

← NewerPage 273 of 1351Older →