SShortSingh.

Programming

0
ProgrammingDEV Community ·

Mid-stream failover made my chat API answer the same prompt twice — switch models before the first token or not at all

A client's transcript came in looking like a slip of the tongue from a language model: three cut-off sentences about caching, then the exact same question answered again, in a slightly different voice, spliced together as one continuous message. The culprit was failover logic in my chat router. I run an OpenAI-compatible /v1/chat/completions endpoint with 50+ models behind one integration (https://x402.freeq.one/tools/llm_chat.html), and the eco tier picks the cheapest healthy provider for each request. One night an upstream started handing out 429s — but only after accepting the connection an

0
ProgrammingDEV Community ·

Study Buddy

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend I built StudyBuddy—an all-in-one, distraction-free study companion web app designed to help learners conquer exam fatigue, stay in deep focus, and retain knowledge effectively. I built this for my friend who has been preparing for demanding tech certification exams and software engineering interviews. Like many students and self-learners, they found themselves constantly context-switching between 4 different tools: A noisy Pomodoro timer app filled with ads. A clunky online flashcard app that required an account a

0
ProgrammingDEV Community ·

Day 3: I stopped hand-rolling mock JSON and unblocked three teams

Every frontend team has the same folder. src/mocks/, fixtures/, stubs/ — a pile of JSON files someone wrote during the last backend delay, lovingly shaped to make the demo look good. They have exactly two properties in common: they do not match the real API, and deleting them feels dangerous. Day 3 of the the series is about replacing that folder with a mock server generated from the OpenAPI spec we wrote on Day 2. The distinction that matters: a mock should answer the contract, not whatever shape made the component render.

0
ProgrammingDEV Community ·

GHSA-JQMF-MX4F-HFR6: GHSA-JQMF-MX4F-HFR6: Multiple Remote Code Execution and Security Flaws in Vibe-Trading AI-Agent Pipeline

GHSA-JQMF-MX4F-HFR6: Multiple Remote Code Execution and Security Flaws in Vibe-Trading AI-Agent Pipeline Vulnerability ID: GHSA-JQMF-MX4F-HFR6 CVSS Score: 10.0 Published: 2026-10-02 An in-depth technical analysis of multiple critical security flaws identified in the Vibe-Trading ecosystem (vibe-trading-ai). These issues range from unauthenticated remote command injection via agent tool executions to arbitrary Python execution through dynamic module loading and unsafe Jinja2 template autoescaping, allowing full system compromise. Unauthenticated remote attackers can execute arbitrary OS command

0
ProgrammingDEV Community ·

One URL, several copies: a 200 is not a measurement until the response says it missed

Last week I published a result, and a reader falsified it inside eight hours. He was right, and the way he was right is the subject of this post. What follows is the reproduction I owed him. I had a comment with a reply under it. Two endpoints of the same service disagreed about it: GET /api/comments/3gb2c -> children: 0 GET /api/comments?a_id=4641246 -> children: 1 Same object, same minute, two answers.

0
ProgrammingDEV Community ·

ShopEase: Advanced Backend Features with Webhooks, GraphQL, gRPC & Load Balancing

In Modules 30.12–30.15, I worked on four advanced backend concepts: 💳 Payment Webhooks These modules helped me understand how real-world backend systems handle payment events, flexible data fetching, high-performance service communication, and distributed traffic. 💳 Module 30.12 — Payment Webhooks Payment processing doesn't end when a user completes a payment. A payment provider can send asynchronous updates about events such as payment success, failure, or other payment-status changes. For ShopEase, I implemented the payment webhook flow using Razorpay, including: Webhook endpoint One of th

0
ProgrammingDEV Community ·

Vertical Slices: Rethinking Software Architecture

“Your architecture should scream what the system does.” — Martin Fowler On September 26, 2026, I participated one of the best technology events we have here in São Paulo: MVP Conf. Being surrounded by so many technically exceptional people was one of the best experiences I could have for my career. Among the various talks I attended, a few particularly caught my attention: Event Sourcing in production: implementing Aggregates and Event Store with C# and EF Core — Antônio Falcão Jr. Ports, Adapters & Vertical Slices — William Santos Both talked about a relatively new trend in software architect

0
ProgrammingDEV Community ·

CodeBuddy — An AI Coding Mentor That Learns From Your Mistakes

What I Built I built CodeBuddy, a local-first AI coding mentor for a friend who is learning programming and DSA. My friend often gets stuck while debugging code and usually has to ask someone else for help. The problem isn't always finding the correct solution — it's understanding why the code is wrong and how to avoid making the same mistake again. CodeBuddy lets them paste their code, select the programming language, and provide an error or describe the expected behavior. Instead of immediately giving them the answer, it guides them through the problem using progressive hints and explanation

0
ProgrammingDEV Community ·

Long-Horizon Agents: Why Multi-Turn Reasoning Breaks and the Practical Training Tricks That Fix It

Almost every modern language model looks impressive on a two-step demo. You ask it to check a database or summarize a document, it calls the right tool, formats the answer, and looks like an autonomous engineer. The illusion falls apart the moment you ask that same model to complete a 30- or 50-step workflow: diagnosing a failing Kubernetes cluster, navigating a multi-file pull request, or running a 48-hour industrial simulation. Around step 10, the agent makes a small typo in a terminal command. By step 15, it misinterprets a confusing error message.

0
ProgrammingDEV Community ·

[Boost]

I Built StudyBuddy AI for a Friend Who Was Tired of Turning Notes Into Study Material 📚🤖 Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝 Jainil Chavda Oct 3 #weekendchallenge #hf26challenge #devchallenge #ai 1 reaction Add Comment 5 min read

0
ProgrammingDEV Community ·

Keepsake: an offline memory companion I built for my grandmother

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend I built Keepsake for my grandmother — Dadi. It is a private, offline AI companion that becomes her long-term memory. We feed it her stories, recipes, routines, and the people in her life. It remembers them in Tiger Data (Postgres + pgvector + full-text + Timescale), talks through Gemma 3 running locally via Ollama, and gets a little more like her every time we chat — because every conversation is written back into the archive. It does not have to be huge.

0
ProgrammingDEV Community ·

Why Unsupported Token Contracts Need Alternate Routes

Unsupported token contracts need alternate routes because a bridge can transfer only tokens its contracts know how to represent safely on the destination chain. The token’s name and ticker are not enough: its Ethereum contract address, behavior, and Polygon representation all matter. Check the token by contract address on both chains; matching names do not prove that two tokens are the same asset. If the Polygon PoS Bridge has no usable mapping, compare an issuer-supported route, a liquidity bridge, or an exchange withdrawal. Before sending, confirm the destination token’s identity and how you

0
ProgrammingDEV Community ·

I Built StudyBuddy AI for a Friend Who Was Tired of Turning Notes Into Study Material 📚🤖

I Built StudyBuddy AI for a Friend Who Was Tired of Turning Notes Into Study Material 📚🤖 This is my submission for the Hacktoberfest 2026 Weekend Challenge: Build for a Friend. Build something with open-source AI at its core. Instead of building another generic AI chatbot, I wanted to build something practical for a student. So I built StudyBuddy AI — an AI-powered study assistant that turns raw study notes into a structured study pack with summaries, key takeaways, practice questions, answers, and explanations. A friend of mine often has the same problem before exams: They already have the

0
ProgrammingDEV Community ·

My AI Coding Agent Is Brilliant Until the Bug Is in Production

Apparently knowing the entire codebase isn’t the same as knowing what actually happened. Coding agents have reached a slightly ridiculous level. I can point one at a repo and say: add rate limiting to this endpoint and it will happily wander through files I forgot existed, figure out how everything connects, write the implementation, update the tests and hand me a diff. Great. Then I give it a real production bug: some users can’t finish checkout And suddenly we’re both detectives.

0
ProgrammingDEV Community ·

Five video metrics that lied to us (and the one-frame rule that caught them)

A broken pixel metric does not crash. It keeps returning numbers. The numbers are in range, the table looks consistent, the histogram has a sensible shape, and you write a conclusion under it. We build a tool that reframes landscape video into vertical clips, so we measure a lot of things per frame: where the face is, where the captions sit, whether the frame is empty, who is speaking. Five of those measurements were wrong in ways that no other number could have told us.

0
ProgrammingDEV Community ·

See who's attacking your server in Grafana — fail2ban metrics with Prometheus

Most people set up fail2ban and forget about it. It's running, it's banning IPs, but you have no This post shows how to add fail2ban metrics to your Prometheus stack and visualize them in Grafana ## What you'll see Active bans per jail in real time Total banned IPs over time Which jails are firing most — SSH? Nginx? Recidive? Ban spikes correlated with traffic and load ## Step 1 — Add the exporter fail2ban doesn't expose Prometheus metrics natively.

0
ProgrammingDEV Community ·

MongoDB Write Concern, Journaling, and the Durability Illusion: What w:1 Actually Guarantees

MongoDB Write Concern, Journaling, and the Durability Illusion: What w:1 Actually Guarantees Most Go services that talk to MongoDB treat w:1 as "write succeeded." That's a category error. w:1 is an acknowledgment that the primary received the write and applied it to its in-memory view. Whether that data survives a sudden primary crash before the next journal flush depends entirely on how you've combined write concern with journaling, and most production codebases get this combination wrong because the driver defaults are designed for throughput, not durability. This article is about the mechan

← NewerPage 682 of 3154Older →