Horrible edge cases to consider when dealing with music (2022)
Handling recorded music in software turns out to be full of pathological edge cases: artists who constantly rename themselves, bands and albums sharing identical titles, tracks with extreme lengths, or names that rely on obscure Unicode, symbols, or even code. Commenters trade examples from real catalogs and their own libraries, showing how naive schemas, strict length limits, or simplistic search (e.g., ignoring common words, short tokens, or diacritics) routinely fail. Many argue that robust identifiers, Unicode-aware text handling, and flexible UI features like merging entities or full‑text search are essential if music services are to model the messy reality of music metadata.
Taxonomy vs Search and Identifiers
- Some argue against rigid hierarchies in music libraries, preferring full-text search and simple tags, even using a single giant directory plus good search.
- Others counter that categorization long predates tech; without structured metadata you can’t reliably find very specific editions or formats.
- Several comments emphasize that “edge cases” mostly vanish when you treat artists/albums/tracks as entities with stable IDs (e.g., MusicBrainz-style) and let the UI handle merging and grouping.
Metadata Edge Cases: Names, Titles, Releases
- Many examples of confusing band/album/track naming: identical names across levels (artist/album/track all the same), one-letter names, symbols, deliberate misspellings (“Untilted”), and names that collide with common words or search stop-words (“The”, “Who”, “A”, etc.).
- Repeated renaming of artists (marriage, symbol changes, alternate country-specific names) and multiple remasters or re-recordings (e.g., same song but different rights holders) complicate search, royalty logic, and “popularity” statistics.
- Some distribution platforms silently normalize or alter titles to fit internal “standards,” to the frustration of artists.
Unicode, Encoding, and String Handling
- Posters note that “horrible edge cases” often reduce to “use Unicode-capable strings and allow null/empty titles distinctly.”
- Others highlight that real-world examples stress-test Unicode support: obscure diacritics, mathematical alphanumeric symbols, hieroglyphs, private-use characters, emoji, and non-UTF-8 diacritics can lead to missing tracks or mangled display.
- The thread references “naughty strings” and fantasizes about bands weaponizing names for injections or filesystem/SQL mishaps.
Extreme Durations and Scores vs Recordings
- Several comments extend “long track” concerns with examples of multi-thousand-hour recorded pieces, works intended to last years, or short pieces specified to be repeated hundreds of times.
- Others remark that notated music and score generation have even nastier edge cases than recorded-music metadata.
Moderation, Censorship, and Legal Anxiety
- Album art and controversial covers raise worries about legality (e.g., in the UK) and how censorship bodies and ISPs have historically blocked access.
- Some reassure that mass visits to well-known controversial pages make individual “flags” impractical, but anxiety about surveillance persists.