Home / Blog / How Not to Build a Music Player: Comments
Tech News

How Not to Build a Music Player: Comments

Developer Ali Chraghi purged half of AMP's Zig codebase over four months to remove AI slop after a Codeberg policy ban and an Anthropic account suspension.

By Dillip Chowdary • Nov 15, 2026 • Source: alichraghi.github.io

How Not to Build a Music Player: Comments

Independent developer Ali Chraghi documented the development history, architectural overhaul, and release roadmap for AMP, a native desktop music player built entirely in Zig, according to alichraghi.github.io's report. The software project emerged from extreme operating constraints across multiple state-mandated communications blackouts, evolving from an offline utility into an experimental software application shaped by language models and strict hosting mandates. Chraghi outlined how an initial reliance on extensive generative artificial intelligence created unmaintainable complexity that ultimately required a four-month ground-up code cleanup.

This report details the architectural origins of the AMP audio engine, the engineering hurdles of offline software distribution under severe network censorship, and the technical aftermath of removing artificial intelligence code from open repositories. Systems programmers, desktop application engineers, and developers evaluating large language models within native software stacks will discover practical lessons regarding codebase bloat, dependency management, and platform constraints. The narrative tracks the tool from early network disruptions through an account suspension and the subsequent engineering roadmap toward version 1.0.

01Offline Audio Playback And Lyric Synchronization

State-sponsored network disconnections during the Twelve-Day War demonstrated that cloud-dependent streaming services failed entirely under sudden national internet blackouts. Chraghi responded to the restoration of connectivity by locally archiving audio files and testing desktop alternatives like the Strawberry music player. While Strawberry offered broad offline playback capabilities, the application frequently fetched unsynchronized song text and surfaced raw timestamps beside lyrics, distracting listeners who sang along.

A friend subsequently pointed Chraghi toward established options such as foobar2000, but existing alternatives failed to fulfill specific native integration desires. The developer sought an uncluttered application environment tailored around clean visual presentations of lyric lines without distracting timing numbers. These interface frustrations sparked the decision to build an independent playback program named AMP, tailored specifically for resilient offline operation.

The initial engineering goals demanded complete avoidance of external C++ dependencies and prioritized tight system integration for genuine platform fluidity. Chraghi selected the Zig programming language for both application logic and custom graphics shaders to retain low-level memory control. Drawing inspiration from earlier programming efforts on the V language interface, the author chose to design a custom user interface toolkit rather than relying on bloated external widget libraries.

02Black Market Connectivity And Four Month Blackouts

Meaningful coding progress halted abruptly when civilian demonstrations erupted across the country following the tragedies of January 8 and 9. Authorities imposed a comprehensive network shutdown that severed standard telecommunications for more than four continuous months. The prolonged disruption forced domestic internet users into underground distribution channels simply to preserve personal communications and technical pursuits.

How Not to Build a Music Player: Comments
Illustration · Pexels

An informal black market emerged on Telegram where independent vendors sold illicit bandwidth through specialized White SIM cards, whitelisted servers, and Starlink terminal hardware. Bandwidth pricing surged to five dollars or more per gigabyte, generating substantial revenues for connected operators while straining personal finances. Chraghi spent hundreds of dollars on these costly private channels to download development documentation, language specifications, and essential Git repositories.

The throttled and intermittent data connections permitted minimal transfers, transforming repository downloads into delicate, deliberate technical operations. Despite the crushing social isolation and steep bandwidth expenses, advancing the music player provided crucial structure during months of enforced isolation. Engineering local audio parsing algorithms offered an intellectual sanctuary while civil unrest and infrastructure interference paralyzed surrounding digital ecosystems.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

03Prompt Assisted Generation And Geolocation Account Bans

Broad internet access eventually returned to domestic lines, though state monitoring systems continued filtering UDP traffic and crippled QUIC-dependent protocols. With partial network stability restored, industry discourse around frontier generative models prompted Chraghi to activate an idle Claude Max 20x subscription gifted by an employer in 2025. The high-capacity tier permitted continuous prompting without encountering rate caps, initiating an intensive multi-day generative programming sprint.

Chraghi prompted the automated model through lengthy interactive sessions, rapidly synthesising tens of thousands of lines of application scaffolding into AMP. The developer planned to clean up structural deficiencies later, treating automated code generation as an expedient shortcut for personal hobby programming. The sheer volume of generated logic soon overwhelmed manual review capabilities, leaving vast modules of unchecked code throughout the codebase.

The automated generation experiment collapsed abruptly when Anthropic detected that connection origins mapped back to Iran and terminated the developer account immediately. This automated enforcement abruptly severed access to the prompting interface, stranding the unverified codebase without external assistance. The sudden cutoff exposed the fragile operational realities of using centralized commercial cloud intelligence from restricted jurisdictions.

04Codeberg Platform Policies And Codebase Reductions

Hosting friction emerged immediately after the account termination when open-source code forge Codeberg announced an explicit policy prohibiting artificial intelligence code. The mandate presented Chraghi with a stark choice between abandoning the platform to migrate repositories elsewhere or purging all generated logic. The author chose repository preservation, embarking on an exhaustive line-by-line inspection to dismantle all algorithmic contributions across the application.

Manual inspection revealed excessive algorithmic complexity, redundant abstractions, and convoluted structural designs that automated systems introduced across basic tasks. The absence of preserved pre-rewrite repository history complicated comparative benchmarking, yet the developer spent four intensive months systematically rewriting modules by hand. Chraghi observed that automated language models consistently complicated straightforward tasks that human engineers would solve with minimal, deterministic code.

The four-month manual reconstruction erased nearly half the total codebase while retaining every initial feature and introducing additional structural stability. Chraghi noted that while modern language models can accelerate repetitive editing comparable to complex regular expressions or sed streams, generative programming risks severe maintenance debt. The author resolved to bypass automated generation for future hobby efforts in favor of disciplined manual development.

05Custom Zig Shaders And Version Roadmap

Development milestones captured on May 25, 2026, documented a functional version 0.1 release featuring a custom graphical blur shader implemented directly in Zig. By avoiding heavyweight external frameworks, the player achieved responsive native rendering alongside low-level memory efficiency. The specialized interface renders clean lyric displays without distracting playback artifacts, fulfilling the original software vision established during the network crises.

The project roadmap toward version 1.0 outlines several ambitious technical expansions, including an integrated music streaming server for multi-device playback. Chraghi is developing native support for Android and Windows environments alongside portable packaging configurations for major Linux distributions. These upcoming releases aim to extend cross-platform compatibility while preserving the core lightweight architectural footprint established across the manual rewrite.

Community contributors have been invited to submit architectural recommendations and interface suggestions as version 1.0 milestones advance. By prioritizing deterministic system programming over rapid automated code generation, AMP demonstrates the enduring value of transparent, handcrafted software architectures. The player stands as a resilient offline media tool forged against state censorship, platform sanctions, and shifting open-source governance policies.

Not to Build a Music Player FAQ

What motivated the development of the AMP music player?

Ali Chraghi began designing AMP after government internet blackouts during the Twelve-Day War revealed the vulnerability of online streaming platforms. Existing offline alternatives like Strawberry displayed unsynchronized lyrics with visible timestamps, prompting the creation of a native Zig player without C++ dependencies.

How did the developer obtain internet access during the four-month blackout?

Chraghi accessed the web via a Telegram black market selling White SIM cards, whitelisted servers, and Starlink dishes. Bandwidth cost five dollars or more per gigabyte, requiring hundreds of dollars to download technical documentation and code repositories.

Why did Anthropic ban the developer's account?

Anthropic discovered the developer was connecting from Iran and promptly banned the account. This termination revoked access to an active Claude Max 20x subscription that had been gifted in 2025 by the developer's boss.

Why was the codebase rewritten to remove artificial intelligence code?

Codeberg announced a strict policy banning machine-generated code, leaving the author to either move repositories or remove the synthetic logic. Chraghi spent four months rewriting every line by hand, eliminating roughly half the codebase while improving overall stability.

What features are planned on the roadmap to version 1.0?

The version 1.0 roadmap targets an internal music streaming server, native Android and Windows support, and official packaging across major Linux distributions. Current builds feature custom graphics blur shaders written directly in Zig.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →