A developer building a custom music player, AMP, recently purged nearly half of its codebase to eliminate complexity introduced by large language models (LLMs). The project, written in the Zig programming language, was initially developed using a Claude Max 20x subscription to rapidly generate features, but the author found the resulting tens of thousands of lines of code difficult to review and maintain.

An early version of the AMP music player interface with a dark theme.
An early iteration of the AMP music player showing the initial design of the music library and lyrics display.alichraghi.github.io

This image represents the early development phase of the project before the major manual refactoring.

Motivation for a Custom Player

The project began as a response to internet blackouts in Iran, which made online music streaming unreliable for those living under restrictive regimes. The developer sought an offline alternative to existing players like Strawberry, which they found lacked proper line-synced lyrics.

The goal for the new player, AMP, was to create a native-feeling application with a minimal feature set and no C++ dependencies. The developer chose to use Zig for the entire stack, including the UI shaders, to maintain a consistent system-programming approach.

“I was surprised by my own ignorance and how much LLMs like to complicate stuff.”

— How Not to Build a Music Player

The Shift to AI-Assisted Development

During a period of restored connectivity, the developer began experimenting with frontier LLMs to accelerate the project. They used a Claude Max 20x subscription to generate a large chunk of the application's code, a process the author described as 'vibecoding.'

While this approach provided rapid initial progress, it led to a codebase that the author felt was mentally overwhelming to audit. The developer noted that LLMs often complicate simple tasks, creating a 'slop' of code that was difficult to manage without a clear history of the previous iterations.

Policy Constraints and Manual Refactoring

The project faced a turning point when Anthropic banned the developer's account and Codeberg announced a no-AI policy. This forced the developer to choose between moving the repository or stripping out all AI-generated content.

The developer chose to manually rewrite every line of the AI-generated sections. Over four months, they removed nearly half of the codebase while actually increasing the application's robustness and adding new features. The author concluded that while LLMs can act as a 'fancy IDE feature' for simple commands, they can introduce excessive complexity in larger projects.

Technical Trade-offs and Limitations

A significant limitation of this transition is the lack of a pre-rewrite history. Because the developer did not use version control (like Git) to save the original AI-generated state, they cannot objectively compare the 'slop' against the new manual code.

The final version of AMP (v0.1) includes a blur shader written in Zig. The developer now advocates for an 'old school' approach to hobby projects, prioritizing manual oversight to ensure the code remains maintainable and understandable.

The AMP music player interface showing a music library and playback controls.
The final version of the AMP music player (v0.1) features a native-feeling interface with synchronized lyrics.alichraghi.github.io

This image illustrates the final product of the developer's manual rewrite, showcasing the application's UI and features.

What Hacker News readers are saying

  • Alternative: One commenter suggested that using physical CDs remains a reliable off-the-grid solution for music playback, noting that they are more resilient to data corruption than digital files. comment ↗
  • Experience: A user shared their experience with various free music players, claiming that many apps fail to provide true shuffle and instead play songs in a predictable order. comment ↗
  • Technical note: One commenter advised that using version control systems like Git would have allowed the author to preserve the history of the project before the rewrite. comment ↗

Summarized opinions from the Hacker News thread, not verified facts. Read the full discussion ↗