SShortSingh.
Back to feed

Developer Builds AST-Based Scorer to Grade Python Retry Loop Safety

0
·20 views

A developer created a static code analysis tool called a 'hygiene scorer' that reads Python source files and grades retry loop implementations for safety properties. The scorer walks the abstract syntax tree (AST) and awards points for features like attempt caps, wall-clock timeouts, backoff, jitter, and idempotency keys, while penalizing unbounded loops. The motivation was to address a common pattern in agent and automation code where retry loops lack hard stop conditions, potentially causing runaway processes. The tool was built and tested using a free AI model accessed via MonkeyCode, with outputs validated against fixture files rather than trusted outright. The author argues that verifying whether a loop can terminate is a more practical engineering concern than evaluating an AI model's reasoning quality.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

ElevenLabs and Murf.ai Compared for Enterprise Voice AI in 2026

An engineering analysis compares ElevenLabs, a research-driven platform focused on neural audio synthesis, low-latency streaming, and voice cloning, with Murf.ai, a studio-style tool built for voiceover production and localization. The review examines each platform's architecture, pricing structure, learning curve, API capabilities, integrations, and security certifications. ElevenLabs is presented as better suited to real-time conversational agents, developer-driven pipelines, and very low-latency streaming, while Murf.ai is positioned for corporate video, e-learning, and marketing content managed by non-technical teams. Both platforms are reported to hold SOC 2 Type II and GDPR compliance, though their approaches to commercial indemnification and voice watermarking differ. The author frames the choice as depending on whether a team prioritizes API throughput and latency or a timeline-based editing workflow.

0
ProgrammingDEV Community ·

Solo-Developed Megabonk Sells Over One Million Copies in Two Weeks Using Unity

Megabonk, a 3D survivors-style game built by solo developer Vedinad in Unity, launched on Windows and Linux in September 2025. The title reportedly sold over one million copies within two weeks and peaked at 117,336 concurrent players on Steam. The article argues that Unity suited the game's 3D movement, procedurally generated maps, and large volume of characters and items. Compared with Vampire Survivors, which had to be ported to Unity later, Megabonk started on the engine, avoiding a costly rewrite. The developer also withdrew the game from a Game Awards nomination, though the article notes that rough visuals drew some early criticism.

0
ProgrammingDEV Community ·

Nvidia GPU leasing deals are pushing up prices, and a Python tool can track the drops

Nvidia's GPU leasing and repurchase arrangements, run through banks and specialized funds, let customers rent cards and return them after a set term. Returned units then cycle back into the secondary market, keeping supply tight and lifting used prices that serve as benchmarks for new ones. An 8-K filing reportedly indicates that 30% of RTX 4090 and H100 units sold in the US in October 2026 were sold under such contracts. Reported price increases from October to November 2026 ranged from about 12% to 19% across new and used RTX 4090 and H100 cards. The article also offers a Python script that monitors prices and sends an alert when a GPU falls below a chosen threshold.

0
ProgrammingDEV Community ·

Wisp: A tiny, dependency-free Go static file server with Docker image of about 3 MB

Wisp, originally codenamed LWS (Lightweight Web Server), is a small static file server written in Go using only the standard library. Its author built it because existing web servers are either too large and complex or too limited for modern deployments. The project's Scratch container image is roughly 3 MB, starts almost instantly, and has no runtime dependencies. Wisp includes features such as confined file serving, hidden-file protection, precompressed content support, SPA fallback routing, built-in Prometheus metrics on a separate port, and Kubernetes health probes. Its source code is available on GitHub, with setup driven by a simple JSON configuration file.