SShortSingh.

Programming

0
ProgrammingDEV Community ·

How to Build a Scalable Persistence Layer in Spring Boot Using Specifications

As Spring Boot applications grow, simple JpaRepository method derivation becomes inadequate for handling complex, dynamic search queries with multiple optional filters. Spring Data JPA's Specification API offers a composable alternative, allowing developers to define individual query conditions and combine them flexibly without creating an explosion of repository methods. A project called NERV Persistence was developed to address recurring patterns in Criteria API logic, such as equality checks, ranges, and null handling, that tend to be duplicated across large codebases. The approach enables consistent pagination, sorting, and filtering by building reusable predicate components rather than writing bespoke query methods for every combination. The goal is to keep the persistence layer maintainable and understandable as application complexity increases over time.

0
ProgrammingDEV Community ·

Agent cost tracking is broken: token counts don't reveal which AI call spent what

Most AI cost dashboards show correct totals but cannot break down spending by individual agent run, tool call, or retry, making it impossible to identify what drove a bill higher. OpenTelemetry's GenAI conventions currently define no cost attributes in their published spec, and the open proposal has remained unresolved since August 2026. Cloud cost monitors like AWS Anomaly Detection operate on up to a 24-hour delay and evaluate only about three times daily, meaning alerts arrive after money is already spent. Complicating matters further, identical tokens can be billed at vastly different rates depending on cache state, creating up to a 12.5x price swing that raw token counts do not capture. Without per-span cost attribution built into the observability stack, engineers are left unable to trace large bills — illustrated by one reported case where roughly 100 agent instances accumulated over $1.3 million in a single month.

0
ProgrammingDEV Community ·

Developer releases native-state-react, a single-file global state library for React

A developer has published native-state-react, an open-source global state management library for React, available on npm and GitHub. The project was created to reduce boilerplate code found in solutions like Redux, Redux Toolkit, and the Context API while keeping the developer experience close to React's native feel. The library consists of a single file and relies on just a couple of React hooks, offering an API similar to useState but for global state. Performance optimizations include path-targeted subscriptions, pre-compiled property getters, and microtask batching to minimize unnecessary re-renders. A live demo is available on StackBlitz, and the repository includes usage examples for defining, updating, and consuming state across components.

0
ProgrammingDEV Community ·

How to Configure an AWS NAT Gateway for Private Subnet EC2 Internet Access

AWS EC2 instances in private subnets sometimes need internet access to download OS updates or reach external APIs, which requires a NAT gateway setup. A public NAT gateway, placed in a public subnet with an attached Elastic IP, allows private subnet instances to initiate outbound internet connections without being directly exposed. The traffic flows from the EC2 instance through the NAT gateway, then to the internet gateway, and finally to the internet. Correct route table configuration is critical: the private subnet must route 0.0.0.0/0 traffic to the NAT gateway, while the public subnet routes the same destination to the internet gateway. The NAT gateway must reach an Available status before any route table edits are made to ensure the setup functions correctly.

0
ProgrammingDEV Community ·

Python Virtual Environments Use Symlinks, Not Copies, of the Interpreter

On Linux and macOS, running python3 -m venv does not create a standalone copy of the Python interpreter. Instead, the python binary inside the virtual environment is a symlink that points back to the system-level Python installation. The only component that is truly private to a virtual environment is the site-packages directory, where user-installed packages are stored. This architecture means the venv depends on the system interpreter remaining intact and unchanged. Developers working on cloud VMs or production systems should understand this distinction to avoid unexpected breakage when system Python is updated or removed.

0
ProgrammingDEV Community ·

Bootstrap CSS Framework Helps Beginners Build Responsive Websites Faster

Bootstrap is a free front-end CSS framework that provides ready-made components and a responsive grid system for building modern websites. It allows developers to add navigation bars, buttons, and multi-column layouts without writing custom CSS from scratch. The framework is integrated into a project by adding its CDN link to the HTML file, after which its utility classes become immediately available. On larger screens, Bootstrap's grid displays content in multiple columns, while on smaller screens it automatically stacks elements for mobile compatibility. Beginners are encouraged to learn HTML and CSS first before adopting Bootstrap to accelerate their development workflow.

0
ProgrammingDEV Community ·

Cloudflare Workers AI Free Tier Offers 24 LLMs Including GPT-OSS-120B and DeepSeek

A developer tested Cloudflare Workers AI's free tier and discovered 24 usable large language models from providers including Meta, Mistral, Google, Qwen, DeepSeek, and IBM. The free tier operates on a daily neuron-based quota shared across an account, differing from the model-centric rate limits used by competitors like Groq. Among the standout options, GPT-OSS-120B was rated the best overall coding model, while DeepSeek-R1-Distill-Qwen-32B was highlighted for complex reasoning tasks. GLM 4.7 Flash from ZAI was noted as a surprise inclusion, as newer GLM models require a paid plan. The findings suggest developers can access a broad range of capable AI models through a single API without incurring cloud GPU costs.

0
ProgrammingDEV Community ·

Developer adds tool-calling to Amazon Bedrock agent for controlled data access

A developer extending a ticket-selling script built during an AWS training course has integrated tool-calling capabilities using the Amazon Bedrock Converse API. Tools allow an AI model to retrieve external data or trigger actions—such as querying a database or generating a payment link—that it cannot access on its own. Rather than giving the model direct database access, the approach wraps specific queries in controlled functions exposed to the model through structured tool definitions containing a name, description, and input schema. When the model determines a tool is needed, it returns the tool name and required inputs to the agent, which executes the function and feeds the result back for the model to compose a final response. The implementation was demonstrated using a mock student registration database, where the agent looks up a user's ticket status by email address.

0
ProgrammingDEV Community ·

Developer Builds AWS Bedrock Chatbot, Navigates Quota Limits and Prompt Caching

A developer enrolled in the Formação AWS course by Henrylle Maia documented their hands-on journey learning Amazon Bedrock, AWS's fully managed service for accessing foundation AI models via API. Using Anthropic's Claude Sonnet 4.5, they built a ticket-selling chatbot that evolved from a single Bash script into an interactive, Node.js-based streaming application. Early testing was blocked by a throttling error tied to cross-region inference token quotas, which the developer resolved by manually requesting a quota increase through the AWS Service Quotas console. The developer noted that model quotas are not enabled by default and must be requested individually, a process they found poorly documented by AWS. The project concluded with the addition of prompt caching, which prevents the system prompt from being billed at full cost on every API call.

0
ProgrammingDEV Community ·

DEV Community Post Showcases Full Range of Markdown Formatting Features

A developer published a comprehensive Markdown demonstration article on DEV Community, originally hosted at jantolentino.dev. The post covers a wide range of Markdown elements, including headings, bold and italic text, inline code, and hyperlinks. It also demonstrates ordered and unordered lists, blockquotes, code blocks, and data tables. Additional features shown include image embedding, footnotes, and a Vue.js 3 code snippet. The article serves as a practical reference for developers looking to explore the full capabilities of Markdown formatting.

0
ProgrammingDEV Community ·

Omniston Widget Integrated Mode Lets TON dApps Reuse Existing Wallet Connections

Developers building TON decentralized apps can now avoid creating duplicate wallet connection layers by using the Omniston Widget's integrated mode. Instead of initializing a separate TON Connect instance for the widget, apps pass their existing TonConnect or TonConnectUI instance directly to the widget's configuration. This approach is recommended by STON.fi's official documentation, which warns that running multiple TON Connect instances in the same app can cause failures due to SDK limitations. In integrated mode, the application retains ownership of TON Connect while the Omniston swap widget simply accesses the shared connection. The result is a single, unified wallet session across all features of the interface.

0
ProgrammingDEV Community ·

Cloudflare's AI Security Audit Skill Gains 15,400 GitHub Stars in One Week

A security audit tool released by Cloudflare has surged in popularity on GitHub, accumulating roughly 15,400 stars within a single week despite being available since June. The tool, installable via a single npx command, turns AI coding agents such as Claude Code or Codex into structured, multi-phase security auditors. It operates through a six-phase process that includes reconnaissance, coverage-led vulnerability hunting, and an independent verification step designed to reduce false positives. Developers have noted that traditional security audits are often slow, costly, and reliant on scarce specialist expertise, making AI-driven alternatives increasingly attractive. The sudden spike in interest reflects broader industry pressure to deliver secure software faster without proportionally expanding security teams.

0
ProgrammingDEV Community ·

Ten IoT Platforms Indian Students and Institutions Can Use for Education in 2026

IoT education in India is evolving beyond basic experiments, with students now working with hardware like ESP32 and Arduino alongside cloud platforms, MQTT, and AIoT tools. A DEV Community article highlights ten platforms suited for student and institutional use in India in 2026, ranging from beginner-friendly tools to enterprise-grade systems. Platforms covered include KiwisIoT, Arduino Cloud, Blynk, ThingsBoard, ThingSpeak, and AWS IoT, each catering to different skill levels and project needs. The guide notes that the right platform depends on factors such as hardware compatibility, programming skills, dashboard requirements, and learning objectives. The piece aims to help students and educators identify suitable tools for hands-on IoT projects including smart agriculture, home automation, and environmental monitoring.

0
ProgrammingDEV Community ·

Feeling AI FOMO as a Developer? Focus on Fundamentals First, Says Engineer

A software developer writing on DEV Community argues that the rapid pace of AI announcements and new tools is fueling widespread FOMO among coders. The author notes that new concepts like agents, MCP, and prompt engineering trend almost weekly, making it hard to keep up. Despite the hype, many existing codebases still suffer from basic issues such as N+1 queries, missing pagination, and SQL injection vulnerabilities. The developer advises coders to prioritize building strong foundational skills before adopting AI tools, rather than chasing every new trend. To support this approach, the author has published a guide called Street-Smart Coding aimed at helping developers build lasting, practical skills.

0
ProgrammingDEV Community ·

Learner Shares Week 2 Progress in Linux Essentials Course at Akwannya Hub

A student enrolled in Akwannya Hub's Skill Pods program has shared their second weekly update on learning Linux essentials. The learner completed chapters covering open-source concepts, core Linux commands, and practical lab exercises. Rather than passively reading, they actively typed commands themselves to reinforce understanding. The student noted that the key lesson from this stage was not memorizing commands but developing problem-solving instincts within the Linux environment.

0
ProgrammingDEV Community ·

Memory layer cuts LLM input tokens by 94%, but real-world cost savings unconfirmed

Belcore, a memory and context layer for LLM applications, published benchmark measurements showing that replacing full conversation history with a selected memory context reduced input tokens per call by approximately 93.9% on the LongMemEval_S dataset of 500 questions. Tests were run in August 2026 using GPT-5 on sessions averaging around 109,000 tokens of prior conversation each. A multi-pass retrieval feature tested on 27 hand-picked questions improved correct answers from 16 to 20, but showed no statistically significant effect on a random 103-question sample and was not approved for release. The company acknowledged that answer quality and real-world billing costs — which include retries and fixes — were not measured in this study. The post also flagged that 38% of audited wrong answers involved questionable gold labels, and that the benchmark dataset does not represent production traffic.

0
ProgrammingDEV Community ·

How to Build a Resilient Live Sports Odds Feed Using SSE and Snapshot APIs

Maintaining a live sports odds display requires two steps: loading an accurate initial state via a REST snapshot and keeping it updated through a Server-Sent Events stream. Developers must use the same market filters on both the snapshot and stream endpoints to ensure consistency between the starting data and incoming changes. The SSE stream emits three message types — delta, heartbeat, and resync — each requiring a distinct response, including full snapshot reloads when a resync is received. To avoid data loss on crashes, the resume cursor and updated state must always be saved together atomically, never in separate steps. On disconnection, clients should reconnect using the last valid cursor with catchup mode enabled and apply jittered exponential backoff to avoid overloading the server.

0
ProgrammingDEV Community ·

What Is Seccomp: The Linux Mechanism That Limits What a Process Can Ask the Kernel

Seccomp, short for Secure Computing, is a Linux kernel feature that restricts which system calls a process is permitted to make. System calls are the only way user-space processes can request privileged operations from the kernel, such as reading files, creating sockets, or spawning new processes. By default, a Linux process has access to hundreds of system calls, creating a broad attack surface if the process is compromised. Seccomp allows developers to define a policy that sits between a process and the kernel, blocking any system call not explicitly permitted. This limits the potential damage an attacker can cause even after gaining control of a vulnerable process.

0
ProgrammingDEV Community ·

Why AI test systems need a failure ledger, not just a pass/fail score

Software engineer Derek Wang argues, in an essay published on DEV Community, that AI harness testing should be modeled on philosopher Karl Popper's principle of falsification — advancing knowledge by eliminating wrong answers rather than accumulating right ones. Wang contends that a test system capable of recognizing and classifying failures is far more valuable than one that simply returns a pass or fail verdict. He describes a regression suite his team built, called fulltest, which maintains a structured ledger cataloguing each class of failure along with its root cause and known repair strategies. The system distinguishes between known failures — previously documented debts — and unknown failures, treating the latter as the most critical signal for genuine improvement. Wang concludes that fast, trustworthy feedback is what enables AI agents to make bold correct changes while remaining cautious about potentially harmful ones.

0
ProgrammingDEV Community ·

Why Shipping Broken Software Early Beats Waiting for Perfection

A software developer argues that releasing imperfect products early is more effective than polishing them in isolation before launch. Drawing on the philosophy of a colleague named Marek, the piece contends that live, production software exposes real bugs and user behavior that internal reviews simply cannot replicate. Delaying a release to refine a product risks optimizing for untested assumptions, often resulting in larger, harder-to-fix errors at launch. The author advocates for an iterative, public-facing build cycle — ship early, observe failures, fix specifically, and repeat. The core argument frames building in public not as a marketing tactic but as an epistemological discipline that grounds development in real-world feedback rather than speculation.

← NewerPage 851 of 3173Older →