SShortSingh.

Programming

0
ProgrammingDEV Community ·

Fare Calendar Uses Gemma 4 and Chronos to Show Cheapest Travel Days for Agents

A developer built a Fare Calendar for a B2B travel agency portal, letting sub-agents see the lowest fare for each date before running searches. The tool draws on the portal's own server logs, marking fares actually seen in the last three days and using model estimates with likely ranges for unsearched dates. Gemma 4 was used to write field mappings that parse fare data from 13 supplier formats, with code validating each mapping against real responses before use. The system runs on the agency's own hardware, plugs into the portal as a web component, and covers 557 routes with forecasts for 23,626 dates. Fares are labelled indicative, and agents reprice live before booking.

0
ProgrammingDEV Community ·

Shared Sequencer : comment un ordonnancement partagé réduit la centralisation des Layer 2

Le shared sequencer est une architecture dans laquelle plusieurs chaînes Layer 2 confient l'ordonnancement de leurs transactions à un même ensemble d'opérateurs. Contrairement aux séquenceurs propriétaires, l'autorité sur la validation est répartie entre plusieurs entités indépendantes plutôt que concentrée sur une seule. Ce modèle vise à limiter les points de défaillance et la capacité de contrôle unique tout en préservant la rapidité de traitement. Le processus repose sur la sélection des opérateurs, un consensus sur l'ordre des transactions, puis la signature et la publication des blocs. Des mécanismes de résolution des conflits, avec pénalités et rollback partiel, complètent l'approche.

0
ProgrammingDEV Community ·

Developer Argues Extracting Functions Tames Messy Legacy Code

A developer recounts struggling with a 2,300-line legacy function, processOrder.js, that mixed validation, discounts, tax, inventory and notifications. A double-charging bug caused by stacked discount logic prompted a search for a better approach. The author proposes extracting cohesive logic into well-named functions, which improves readability, makes units easier to test, and keeps changes localized. The article walks through a simplified version of the original function to show how the tangled concerns and the double-counted promo discount arose.

0
ProgrammingDEV Community ·

Adding ElevenLabs Text-to-Speech to Electron Desktop Apps

A developer guide explains how to integrate ElevenLabs text-to-speech into Electron desktop applications to give them natural-sounding voices. It lists requirements such as Node 14 or later, Electron 22 or later, and an ElevenLabs API key obtained from the dashboard. The article recommends storing the key in an environment variable and first verifying the API with a curl command that outputs a WAV file. For security and performance, it keeps the ElevenLabs calls in Electron's main process and exposes a small IPC bridge that the renderer can use. The piece also includes sample service code for synthesizing speech and writing the audio to a file.

0
ProgrammingDEV Community ·

How developers keep AI agent prompts and tools reliable when switching models

A developer raises the problem that an AI agent's behavior can shift when the underlying model changes, even though the code itself stays the same. A prompt that performs well on one model may produce different results on another, and tool calls that were dependable may begin failing without obvious warning. The post asks readers how they detect such regressions, including whether they test agent behavior or learn of problems from users. It also probes how prompts, tool definitions, and test cases are organized, and what steps people take before upgrading a model. The author invites developers to share their solutions or admit they have not yet found one.

0
ProgrammingDEV Community ·

Docker 502 Bad Gateway often caused by binding to 127.0.0.1 instead of 0.0.0.0

A container that logs a successful server start can still return 502 Bad Gateway through a proxy. The cause is often an app bound to 127.0.0.1, which only accepts connections from inside the container's own loopback interface. Because the proxy connects over the container's eth0 interface, the connection is refused. The article shows how to confirm the problem with netstat and wget checks inside the container. The fix is to bind the server to 0.0.0.0, which listens on all container interfaces without exposing the host directly. The author tested the walkthrough on the Hubfly platform in October 2026.

0
ProgrammingDEV Community ·

Accenture cuts Claude spend to $29 per employee a month, prompting Claude Code budgeting debate

On October 15, 404 Media reported that Accenture has told many employees it will spend only $29 per person monthly on Claude, down from some users' previous spend of as much as $1,000. The change has left some staff trying to keep their usage levels, and a post about it drew over two million impressions on X. The article notes the tension with Accenture's history of urging clients to invest heavily in AI. The piece explains that Claude Code is bundled into Anthropic's paid plans, with subscription limits resetting on a rolling five-hour window and API usage carrying no default ceiling. It argues that coding agents drive costs through large context, repeated loops and default use of expensive models, and recommends measuring normal weekly usage before setting per-person budgets.

0
ProgrammingDEV Community ·

Diverging Bid Views: Why Clients Disagree and How Missed Auction Events Are Recovered

Connection status alone cannot show which high bid is correct, because a bid only counts once the auction service has committed it and assigned a sequence number. The article argues that ordering must be decided at the server, using monotonic sequences and atomic persistence of accepted bids before they are published. Cursor movements are treated as transient presence data and kept separate from the durable bid log, which also limits exposure of sensitive information. Clients should track their last contiguous applied sequence rather than the highest sequence seen, buffering out-of-order events and backfilling gaps before advancing. Teams should monitor sequence gaps, recovery time, consumer lag, and per-auction view divergence to diagnose these problems.

0
ProgrammingDEV Community ·

Hubfly publishes a coding-agent skill with permission fences to prevent accidental data loss

Hubfly has released a CLI skill that lets coding agents like Claude Code, Codex and Cursor inspect, plan and deploy apps to its platform. The skill follows a five-step loop of inspecting the app, reconciling it with the running container, reviewing the plan, asking for authorization on costly or destructive actions, and reporting the final state. Its rules stop agents from deleting durable volumes without a separate named confirmation and from exposing secrets or tokens. The guide recommends that users review and commit a local copy of the skill and configure permission allow-lists in their agent settings. Hubfly describes these controls as a fence rather than a full safeguard, and the skill is free, with costs tied only to deployed resources.

0
ProgrammingHacker News ·

Teal: A Statically-Typed Dialect of Lua Gains Attention on Hacker News

Teal is a statically-typed dialect of the Lua programming language, presented on Hacker News. The project's homepage at teal-language.org describes the language and its goals. The submission received 48 points and 13 comments from the community. The available source provides only the title, link, and engagement metrics, so further technical details are not included here.

0
ProgrammingHacker News ·

Why agent harnesses matter for energy and token efficiency

A post on Neuralwatt's site argues that the software harness wrapping an AI model affects how much energy and how many tokens a task consumes. The piece frames harness design as a lever for efficiency alongside the model itself. It was shared on Hacker News, where it drew five points and no comments at the time of capture. The provided source text contains only the link metadata, so the specific arguments and figures in the article could not be verified here.

0
ProgrammingDEV Community ·

Cast a Local MKV With Subtitles to Chromecast Directly From Chrome

A guide explains how to stream a local MKV video, with either embedded or separate SRT/VTT subtitles, to a Chromecast or Google TV using only the Chrome browser. The user opens a web app in Chrome, selects the file, configures subtitles, and presses Cast, with the file read locally and sent over the home network rather than uploaded. The article notes that playback stops if the tab closes or the device sleeps, and that large files are streamed in chunks, with limits for files needing conversion. Android users can follow the same steps, with a screen-mirroring fallback available. Troubleshooting advice focuses mainly on network issues, such as guest Wi-Fi isolation blocking device discovery.

0
ProgrammingDEV Community ·

Tool Statically Diffs Electron App Builds to Reveal Security-Relevant Changes

A developer built hexvero, a tool that compares two Electron app.asar bundles without running either build. It links preload-script bridge members to IPC handlers and reports window setting changes such as nodeIntegration and sandbox. Where channel names cannot be resolved statically, it flags them as unresolved rather than guessing or dropping them. The tool is read-only and produces a local web view and Markdown reports, but its findings describe code contents, not exploitability. On a blind test set it found only part of the IPC channels and version changes, and the author publishes those misses.

0
ProgrammingDEV Community ·

PayGuard Local: Offline AI Tool Sorts Freelancer Invoices Into Structured Records

A developer has released PayGuard Local, a desktop utility that uses AI to organize freelancers' invoices and receipts into structured JSON records. The tool runs entirely on the user's machine using Meta's open-weight Llama 3.2 model via Ollama, so client data never leaves the laptop. It is aimed at freelancers, student developers, and small agencies who currently sort bills and log payments by hand. The creator says local inference avoids recurring per-scan API costs and allows users to swap in other models or adapt the schema to local tax formats. The project was submitted to the Hacktoberfest Open-Source AI Challenge and is available on GitHub.

0
ProgrammingDEV Community ·

Two Local-First B2B Mobile Apps Built With Flutter and React 19 with Capacitor 8

VanzaLabs, a two-founder product engineering studio, built two mobile apps for small businesses and independent contractors to demonstrate production-ready software. Both apps follow a Local-First design, with data kept on the user's device or in their own cloud account rather than on intermediate backend servers. FormGrid, built with Flutter, lets users work with Google Forms and Sheets on mobile, with offline sync and ready-made business templates. Vanza, built with React 19 and Capacitor 8, handles invoices and contracts, storing client data in IndexedDB and generating PDFs in multiple templates. The team chose React for Vanza because its complex document layouts and calculations were faster to iterate on than in Flutter.

0
ProgrammingDEV Community ·

Quarantine Gates in Delta Live Tables: Isolating Bad Data Without Halting Pipelines

A data engineer argues that failing entire pipelines over malformed records is counterproductive, especially in HIPAA- and PCI-regulated environments where most of a batch is still valid. The article recommends replacing strict fail-on-violation expectations in Delta Live Tables with expect_drop or expect plus a downstream filter. Violating records are routed to a dedicated quarantine table so that auditors can see exactly which records failed and why. It also suggests alerting on-call engineers when violation rates cross a threshold and querying DLT's event_log to track which expectations fail most often. Finally, it advises running new validation rules in logging-only mode before enforcing them.

0
ProgrammingDEV Community ·

Offline AI Tool Writes Menu Descriptions for Batticaloa Restaurants

A developer has built Menu Description Writer, an offline app designed to help small restaurants and tea shops in Batticaloa describe their dishes. Many such shops list only dish names and prices, and writing appealing descriptions takes time or money, while cloud AI tools would send menu data to external servers. The app uses a locally run Gemma 3 4B model through Ollama, so owners type a dish name and a short note, and it generates an English description in about 20 seconds without internet access. Tamil output proved unreliable, so owners enter the Tamil dish name while the model writes only the English text. The project is a working prototype tested on a few dishes, and it has not yet been trialed with an actual shop owner.

0
ProgrammingDEV Community ·

Startup Launch Directories Criticized as Paid Backlink Schemes With Almost No Traffic

The author paid $39 to list a side project on BetaList and then received solicitations from five other launch directories within hours. These sites pitched paid listings or offered free ones in exchange for backlinks, often using the founder's inbound listing as their lead. The author's analysis in Ahrefs found that the sites had high Domain Ratings from backlinks but little or no organic traffic, with one clone copying a rival directory's homepage. The piece argues that these directories, many built cheaply with AI, mainly sell to founders rather than serve real audiences.

0
ProgrammingDEV Community ·

MomentSort: Open-Source AI Tool Helps Wedding Photographers Sort Event Photos

A developer has built MomentSort, an AI-powered photo organizer aimed at wedding photographers who return from events with thousands of images. The tool uses image embeddings and similarity-based search to locate specific moments, alongside blur detection and photo grouping to organize shots. It is built with Python and FastAPI, using SigLIP embeddings, NumPy, and OpenCV, and is hosted on Render as a lightweight demo. Full folder-based analysis runs locally because it requires access to the user's files and a heavier AI model. The project was created for the Hacktoberfest Open-Source AI Challenge.

0
ProgrammingDEV Community ·

Simple Code Snippet Shows How Complexity Emerges from Basic Rules

A DEV Community post titled 简单是复杂的结果 (Simplicity Is the Result of Complexity) shares a Python script for visualizing a damped oscillator. The code uses NumPy and Matplotlib to model a system with a damping coefficient of 0.4, producing an underdamped spiral convergence. It sets initial conditions and renders the system's trajectory as an animated plot on a dark background. The animation is saved as a GIF file and displayed on screen.

← NewerPage 391 of 3104Older →