finds.dev← search

// the find

trekhleb/state-of-the-art-shitcode

★ 6,184 · MIT · updated Nov 2025

💩State-of-the-art shitcode principles your project should follow to call it a proper shitcode

A satirical list of anti-patterns dressed up as 'best practices' for writing bad JavaScript. It's a joke repo, but one where every example is a real mistake you'll recognize from codebases you've worked in. Aimed at developers who want a laugh and maybe a checklist to audit their own bad habits.

The 'good/bad' inversion format makes each anti-pattern immediately recognizable — you see the shitcode first, then the correct version, which lands better than a dry 'do this, not that'. The examples are concrete JavaScript snippets, not abstract principles, so there's no ambiguity about what the bad pattern actually looks like. It covers a genuinely wide range: naming, nesting, error handling, type checking, dependency locking, testing — the full spectrum of how codebases rot. Three language translations (EN, ZH, KO) suggest it resonated beyond the original audience.

It stopped growing in 2025 and the list is relatively short — about 20 items — so it covers the obvious sins but misses whole categories like async/concurrency mistakes, security anti-patterns, or framework-specific disasters. It's JavaScript-only; the principles are universal but the code samples don't translate, so developers in other ecosystems get less value. There's no contribution guide or structure for adding new entries, which explains why the fork count (338) hasn't produced more content. At 6k stars it probably peaked early and isn't likely to evolve.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →