Skip to content

How to Use This Guide

Every antipattern in this guide follows a consistent structure:

A brief explanation of what the antipattern is and why it’s problematic.

Actual code from the “Worst Backend Ever” project demonstrating the antipattern in action.

src/bad-example.js
// This is how NOT to do it

Detailed explanation of the problems this pattern causes:

  • Performance issues
  • Maintainability nightmares
  • Security vulnerabilities
  • Testing difficulties

Correct implementation of the same functionality:

src/good-example.js
// This is the proper way

How to spot this antipattern in code reviews and what tools can help.


The companion codebase can be run locally:

Terminal window
cd antipatterns
npm install
npm start

Throughout this guide, we use color coding to distinguish between good and bad practices:

This is an example of bad code that should be avoided.

This is an example of good code that you should follow.


Found an antipattern we missed? Want to improve an explanation? Contributions are welcome!


To fully understand these antipatterns, you should be familiar with:

  • JavaScript/Node.js
  • Basic web development concepts
  • REST API design
  • Database fundamentals
  • Basic security concepts