π Programming Best Practices
Your comprehensive guide to writing better code across 30+ languages and frameworks
Curated resources from industry leaders β’ Production-ready practices β’ Always updated
π Quick Links
Backend β’ Frontend β’ Database β’ Mobile β’ DevOps β’ AI/ML β’ Tools β’ Featured
π Introduction
This repository is a curated collection of programming best practices across multiple languages, frameworks, and tools.
It is not an exhaustive list but rather a practical resource containing articles, guidelines, and style guides that have proven helpful in real-world development.
The focus is primarily on Web Development (Ruby, Rails, JavaScript, etc.), but it also covers databases, DevOps, cloud practices, AI tools, and career growth.
With this collection, I hope to support developers in writing cleaner, more maintainable code and growing in their careers.
Status: π§ Work in Progress β continuously updated
π― Why This Repository?
β¨ Curated Quality β Hand-picked resources from industry leaders and experienced developers
π Production-Ready β Practices that work in real-world applications, not just theory
π Multi-Language β Covers 30+ programming languages and frameworks
π Comprehensive β From code style to architecture, security to performance
π Always Updated β Regularly maintained with the latest best practices
π‘ Community-Driven β Open to contributions from developers worldwide
π Quick Start Setup
π― Automated Setup (Recommended)
The fastest way to get started is using our automated setup script:
# Clone the repository git clone https://github.com/dereknguyen269/programing-best-practices.git cd programing-best-practices # Run the interactive setup script ./scripts/quick-start.sh
The script will guide you through different setup options:
| Mode | Time | What's Included |
|---|---|---|
| Minimal | ~1 min | Dependencies only, no crawling |
| Test | ~2-3 min | Dependencies + 20 sample resources |
| Full | ~10-15 min | Everything + all 150+ resources + AI summaries |
| Custom | Varies | Choose specific categories to crawl |
Quick Options:
# Minimal setup (just dependencies) ./scripts/quick-start.sh --minimal # Full setup (everything) ./scripts/quick-start.sh --full # Test with 20 resources ./scripts/quick-start.sh --limit 20 # Crawl only Python resources ./scripts/quick-start.sh --category python
π For detailed documentation and troubleshooting, see the Quick Start Guide
π Manual Setup (Alternative)
Prefer to set up manually? Follow these steps:
Step 1: Clone the Repository
git clone https://github.com/dereknguyen269/programing-best-practices.git
cd programing-best-practicesStep 2: Install Crawler Dependencies (Optional but Recommended)
The crawler downloads all external resources locally for offline access:
# Create virtual environment (recommended) python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies pip install -r scripts/crawler/requirements.txt
Step 3: Crawl Resources (Optional)
Download all best practices content locally:
Note: Make sure your virtual environment is activated before running these commands:
source .venv/bin/activate # On Windows: .venv\Scripts\activateOr use the venv Python directly:
.venv/bin/python3instead ofpython3
# Crawl all resources (~150+ links, takes 10-15 minutes) python3 scripts/crawler/crawl.py # Or crawl specific categories python3 scripts/crawler/crawl.py --category python python3 scripts/crawler/crawl.py --category javascript # Or crawl a limited number for testing python3 scripts/crawler/crawl.py --limit 20 # Update existing content python3 scripts/crawler/crawl.py --update
Step 4: Generate AI Summaries (Optional)
Create condensed summaries optimized for AI assistants:
python3 scripts/crawler/generate_summaries.py
Step 5: Use with Your AI Coding Editor
The repository is now ready! Your AI coding editor will automatically detect:
| AI Editor | Config File | Auto-Detected |
|---|---|---|
| Claude Code | CLAUDE.md |
β |
| Kiro | .kiro/project.md |
β |
| Antigravity | .agent/instructions.md |
β |
| Cursor | .cursorrules |
β |
| Windsurf | .windsurfrules |
β |
π Repository Structure
After setup, your repository will look like:
programing-best-practices/
βββ README.md # Main knowledge base (curated links)
βββ CLAUDE.md # Claude Code instructions
βββ AGENTS.md # Universal AI agent instructions
βββ .agent/ # Antigravity config
β βββ config.json
β βββ instructions.md
βββ .kiro/ # Kiro config
β βββ project.md
βββ .cursorrules # Cursor AI rules
βββ .windsurfrules # Windsurf AI rules
βββ content/ # π¦ Crawled content (after running crawler)
β βββ index.json # Master index of all resources
β βββ metadata.yaml # Crawl statistics
β βββ backend_development/ # Content organized by category
β βββ frontend_development/
β βββ ...
βββ summaries/ # π AI-ready summaries (after generate_summaries.py)
β βββ SUMMARY.md # Master overview
β βββ [category].md # Category summaries
βββ scripts/
β βββ crawler/ # π·οΈ Crawler tools
β β βββ crawl.py # Main crawler
β β βββ search.py # Search tool
β β βββ generate_summaries.py
β β βββ requirements.txt
β βββ setup-kb.sh # Quick setup script
βββ templates/ # π Templates for your projects
β βββ CLAUDE.template.md
β βββ agent/
β βββ kiro/
β βββ cursorrules.template
βββ docs/
βββ INTEGRATION.md # Integration guide
π Searching the Knowledge Base
After crawling, you can search locally:
# Search for JavaScript content python3 scripts/crawler/search.py "javascript style guide" # Search within a specific category python3 scripts/crawler/search.py "best practices" --category python # Get results as JSON python3 scripts/crawler/search.py "security" --json
π How to Use This Repository
For Beginners
- Start with your primary language β Navigate to your language section in the Table of Contents
- Read style guides first β Understanding code style is fundamental
- Practice with examples β Apply the practices in your own projects
- Bookmark for reference β Keep this as a go-to resource when coding
For Experienced Developers
- Explore new languages β Learn best practices before starting a new tech stack
- Code review reference β Use during code reviews to maintain quality standards
- Team onboarding β Share relevant sections with new team members
- Stay updated β Check back regularly for new resources and practices
For Team Leads
- Establish standards β Use these guides to create team coding standards
- Training resource β Assign relevant sections for team learning
- Quality benchmarks β Set expectations for code quality
- Architecture decisions β Reference system design and scalability sections
π€ Use for Existing Projects
Want to integrate this knowledge base into your existing project? We provide multiple options:
Option 1: Quick Setup Script
# Run the setup script in your project directory curl -sSL https://raw.githubusercontent.com/dereknguyen269/programing-best-practices/main/scripts/setup-kb.sh | bash
Option 2: Git Submodule
# Add as a submodule in your project cd your-project git submodule add https://github.com/dereknguyen269/programing-best-practices.git .kb/best-practices
Option 3: Copy Templates
Download the templates from the /templates directory and customize for your project:
| Template | Copy To | Purpose |
|---|---|---|
CLAUDE.template.md |
CLAUDE.md |
Claude Code |
agent/instructions.template.md |
.agent/instructions.md |
Antigravity |
agent/config.template.json |
.agent/config.json |
Antigravity |
kiro/project.template.md |
.kiro/project.md |
Kiro |
cursorrules.template |
.cursorrules |
Cursor |
π Full integration guide: See docs/INTEGRATION.md
β Featured Resources
Here are some standout resources that every developer should know:
π Must-Read Guides
- Airbnb JavaScript Style Guide β The gold standard for JavaScript coding
- Clean Code JavaScript β Software engineering principles for JavaScript
- System Design 101 β Essential system design concepts
- The Twelve-Factor App β Methodology for building modern cloud-native apps
- OWASP Top 10 β Critical security awareness for developers
π¨ Design Patterns
- Design Patterns in Python β Comprehensive pattern guide
- Design Patterns in Go β Go-specific implementations
- Design Patterns in Swift β Swift pattern examples
π§ Language-Specific Gems
- Uber Go Style Guide β Production-grade Go practices
- Ruby Style Guide β Community-driven Ruby standards
- Google HTML/CSS Style Guide β Google's web standards
π Table of Contents
πΉ Backend Development
Systems Programming
Enterprise & JVM Languages
Web Backend
Functional & Specialized
πΉ Frontend Development
Core Technologies
Frameworks & Libraries
Performance
πΉ Database & Data
SQL Databases
NoSQL & Big Data
πΉ Mobile Development
πΉ DevOps & Infrastructure
Cloud & Deployment
Security
πΉ AI & Data Science
πΉ Development Tools & Practices
Version Control & Collaboration
Scripting & Automation
Performance & Architecture
πΉ Specialized Languages
πΉ Backend Development
Systems Programming
π₯οΈ C Best Practices
π₯οΈ C++ Best Practices
- 3 Coding Best Practices for C++
- Collaborative Collection of C++ Best Practices β @lefticus
- The C++ Core Guidelines β @isocpp
- C++ Best Practices (CppCon)
- C++ Best Practices by Puppet Labs β @puppetlabs
- Modern C++ Exception Handling β Microsoft
- Top Ten Tips for Correct C++ Coding
π¦ Rust Best Practices
- Rust Style Guide β @ubsan
- Rust Design Patterns
- Design Patterns in Rust β Refactoring.Guru
Enterprise & JVM Languages
β Java Best Practices
- Java Best Practices β @in28minutes
- Selenium Best Practices β @previousdeveloper
- Java Style Guide (Ray Wenderlich) β @raywenderlich
- Java Best Practices Guide
- 30 Java Programming Tips for Beginners
π Kotlin Best Practices
- Best Practices in Kotlin β @JackyAndroid
- Kotlin Style Guide β @yole
- Kotlin Style Guide (Ray Wenderlich) β @raywenderlich
π Scala Best Practices
- Scala Best Practices β @alexandru
- Databricks Scala Guide β @databricks
π₯οΈ C# Best Practices
Web Backend
π’ Node.js Best Practices
- Node.js Style Guide β @felixge
- RisingStack Node.js Style Guide β @RisingStack
π Python Best Practices
- Python Best Practices β Become an Expert
- Best of the Best Practices (BOBP) Guide β @sloria
- Python Best Practices (Toptal)
- Python Code Style Guide
- 11 Tips to Write Better Python Code
- Python Tutorial: Best Practices & Mistakes
- Design Patterns in Python β Refactoring.Guru
π Ruby Best Practices
- Ruby Style Guide β @airbnb
- Ruby Tricks & Best Practices β @franzejr
- Best Practice Patterns in Ruby β @avdi
- Ruby Best Practices (Gregory Brown) β @practicingruby
- The Ruby Style Guide β @bbatsov
- Shopify Ruby Style Guide β @Shopify
- 53 Ruby on Rails Interview Questions
- Ruby Best Practices (Toptal)
- Ruby Best Practices for Beginners
- Ruby Timeouts Guide β @ankane
- Design Patterns in Ruby β Refactoring.Guru
- Best Practices for Writing Ruby
- 6 Ruby Best Practices for Beginners
π Rails Best Practices
- Rails Style Guide β @bbatsov
- rails_best_practices β @flyerhzm
- RSpec Style Guide β @reachlocal
- RSpec Best Practices β @abinoda
- Rails Database Best Practices
- Active Record Query Optimization Tips
- ActiveRecord SQL Query Optimization
- Arel Cheatsheet
- Production Rails β @ankane
- Securing Sensitive Data in Rails β @ankane
- Toptal Rails Best Practices
π PHP Best Practices
- PHP: The Right Way β @codeguy
- PHP Knowledge β @php-earth
- PHP Coding Standards β @maxdmyers
π― Laravel Best Practices
- Laravel: The Right Way β @laraveltherightway
- Laravel Best Practices β @uonick
π£ NestJS Best Practices
Functional & Specialized
π§ͺ Elixir Best Practices
- The Elixir Style Guide β @christopheradams
- Elixir Style Guide β @lexmag
- Credo's Elixir Style Guide β @rrrene
- 10 Killer Elixir Tips #1
- 10 Killer Elixir Tips #2
- 10 Killer Elixir Tips #3
- Elixir Cheatsheet
- Elixir Metaprogramming Cheatsheet
πΉ Go (Golang) Best Practices
- Uber Go Style Guide β @uber-go
- Go Best Practices β @mehrdadrad
- Go Style Guide β @AgtLucas
- Golang Tutorial Series
- Golang Cheat Sheet (Golang Dojo)
- Soham Kamani β Golang
- Design Patterns in Go β Refactoring.Guru
π Swift Best Practices
- Swift Style Guide (Eure) β @eure
- Design Patterns in Swift β @ochococo
- Swift Style Guide (Ray Wenderlich) β @raywenderlich
π Objective-C Best Practices
- NYTimes Objective-C Style Guide β @NYTimes
- Objective-C Style Guide (Ray Wenderlich) β @raywenderlich
- GitHub Objective-C Style Guide β @github
- Code Style & Best Practices for Objective-C β @wangshengjia
πͺ Perl Best Practices
πͺΆ Lua Best Practices
π¨ Frontend Development
Core Technologies
π HTML Best Practices
- HTML Best Practices β @hail2u
- HTML5 (and Some CSS) Best Practice
- Frontend Guidelines β @bendc
- Google HTML Style Guide β @google
π¨ CSS Best Practices
- Airbnb CSS / Sass Styleguide β @airbnb
- Dropbox (S)CSS Style Guide β @dropbox
- CSS Coding Standards & Best Practices β @stevekwan
- Google CSS Style Guide β @google
π¨ SASS Best Practices
- Sass Coding Guidelines β @bigcommerce
- Sass-Guidelines β @blackfalcon
- Sass-lang Style Rules
π JavaScript Best Practices
- Airbnb JavaScript Style Guide β @airbnb
- ES6 Cheatsheet β @DrkSephy
- Common JavaScript "Gotchas" β @stevekwan
- Pragmatic JavaScript Standards β @stevekwan
- JavaScript θ§θ β @adamlu
- Google JavaScript Style Guide β @google
- JavaScript The Right Way β @braziljs
- MDN JavaScript Guidelines β @mozilla
- W3C JavaScript Best Practices β @w3c
- Clean Code JavaScript β @ryanmcdermott
π¦ TypeScript Best Practices
- TypeScript Best Practices β @BestCoderDotInfo
Frameworks & Libraries
βοΈ ReactJS Best Practices
- Advanced ReactJS Patterns β @kentcdodds
- React Interview Questions & Answers β @sudheerj
π± React Native Best Practices
- React Native Guide β @reactnativecn
πΌοΈ Vue Best Practices
- Tips & Best Practices (Vue 0.12)
- 10 Good Practices for Large Vue.js Projects
- 12 VueJS Best Practices for Pro Developers
π
°οΈ Angular Best Practices
- AngularJS Style Guide β @mgechev
- Angular 2 Style Guide β @mgechev
- Angular.js Advanced Design Patterns β @trochette
β‘ Next.js Best Practices
- Best Practices for Clean React/Next.js Projects
- 10 Tips for Optimal Next.js Performance
- Best Practices to Increase Next.js Speed
β‘ Nuxt Best Practices
Performance
π Frontend Performance Best Practices
- Frontend Performance Best Practices (Roadmap.sh)
- Web Vitals Best Practices (Google)
- High Performance Web Apps (MDN)
ποΈ Database & Data
SQL Databases
π SQL Best Practices
- SQL Style Guide
- Best Practices for Writing SQL Queries
- SQL Performance Explained (Markus Winand)
- GitLab SQL Style Guide
π PostgreSQL Best Practices
- PostgreSQL Performance Best Practices
- Best Practices for PostgreSQL Database
- Run ANALYZE, Run ANALYZE, Run ANALYZE
- Best Practices for Designing PostgreSQL Databases
π¬ MySQL Best Practices
NoSQL & Big Data
π¦ NoSQL Best Practices
- 10 NoSQL Data Modeling Best Practices
- MongoDB Schema Design Best Practices
- 11 MongoDB Security Features & Best Practices
π± Mobile Development
π± Flutter Best Practices
- Performance Best Practices
- Flutter: Best Practices and Tips β Kinjal Dhamat
- Flutter Development Best Practices β Derrick Mwiti
π― Dart Best Practices
- Dart & Flutter Best Practices
- Performance Best Practices
- Writing Clean Code in Dart: Best Practices & Design Patterns
βοΈ DevOps & Infrastructure
Cloud & Deployment
βοΈ AWS Best Practices
π¦ Microservices & Cloud-Native Best Practices
- 12 Factors for Building Cloud-Native Apps
- Microservices Best Practices (Microsoft)
- Cloud-Native Patterns (CNCF)
Security
π API Security Best Practices
π DevSecOps & Security Best Practices
π€ AI & Data Science
π€ AI/ML Engineering Best Practices
- MLOps Best Practices (Google Cloud)
- Responsible AI Practices (Google)
- Best Practices for LLM Applications
- IBM Data Science β Best Practices
- AI Best Practices (XenonStack Blog)
- Best Practices for Deep Learning in Julia (FastAI.jl)
- ETL Best Practices with Airflow
π€ AI Tools for Developers
- 9 of the Best AI Tools for Software Developers in 2024
- The Best AI Tools for Developers in 2024
- Awesome AI Tools β @mahseema
- Awesome AI-Powered Developer Tools β @jamesmurdza
- Best Practices for Coding with AI (2024)
- AI Tools for Developers: 5 Types of Tools & How to Choose
- The Do's and Don'ts of Using AI in Software Development
- 10 Best Practices for Secure AI Development
- AI Hacks to Maximize Productivity in 2024
π οΈ Development Tools & Practices
Version Control & Collaboration
π Code Review Best Practices
π§βπ€βπ§ Team & Collaboration Best Practices
Scripting & Automation
π Bash Script Best Practices
- Bash Best Practices
- progrium/bashstyle
- Best Practices for Bash Scripts
- Best Practices for Writing Bash Scripts
Performance & Architecture
ποΈ System Design Best Practices
- System Design 101 β @ByteByteGoHq
β‘ Performance & Scalability Best Practices
π Specialized Languages
π R Best Practices
- Beyond Basic R β Introduction & Best Practices
- R Code β Best Practices
- Best Practices for Writing R Code β @swcarpentry
- R Coding Style Best Practices
- Good Practices in R Programming (ETH ZΓΌrich)
π What's New
Stay updated with the latest additions to this repository:
Recent Updates
- β Enhanced README β Added quick navigation, featured resources, and usage guides
- β AI/ML Section β Expanded with LLM best practices and MLOps resources
- β Security Focus β Added DevSecOps and API security best practices
- β Performance Guides β New frontend performance and scalability resources
- β Modern Frameworks β Added Next.js, Nuxt, and NestJS best practices
Coming Soon
- π Video Tutorials β Curated video resources for visual learners
- π Code Examples β Practical code snippets demonstrating best practices
- π Interactive Checklists β Ready-to-use checklists for code reviews
- π Language Comparison β Side-by-side best practices across languages
- π Community Picks β Top-voted resources from contributors
π Community & Support
π¬ Get Involved
We believe in the power of community! Here's how you can participate:
π€ Ways to Contribute
- π Submit Resources β Found a great article or guide? Share it!
- π Report Issues β Broken links or outdated content? Let us know!
- π‘ Suggest Improvements β Ideas for better organization or new sections?
- β Star the Repo β Show your support and help others discover this resource
- π Share β Spread the word on social media, blogs, or with your team
π’ Discussions
- Questions? Open a GitHub Discussion
- Ideas? Share your thoughts in the Ideas category
- Showcase β Share how you're using these best practices in your projects
π Contributors
A huge thank you to all our contributors! π
π Star History
π‘ Related Resources
Looking for more? Check out these complementary resources:
- Awesome Lists β Curated lists of awesome things
- Developer Roadmaps β Step-by-step guides for different tech careers
- Free Programming Books β Extensive collection of free learning resources
- Design Resources for Developers β Design and UI resources
- The Book of Secret Knowledge β Collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more
π― Repository Stats
π€ Contributing
Contributions are always welcome! π Before contributing, please read the Contribution Guidelines.
οΏ½ Support This Project
If you find this repository helpful, here are some ways you can show your support:
β Star This Repository
Click the β button at the top of this page β it helps others discover this resource!
π Share With Others
π€ Contribute
See our Contributing Guidelines to add your favorite resources!
β Sponsor
If this project has saved you time or helped your career, consider sponsoring to support continued maintenance and updates.
οΏ½π License
This project is licensed under Creative Commons Zero v1.0 Universal (CC0 1.0) β Public Domain Dedication.
β Frequently Asked Questions
How often is this repository updated?
This repository is actively maintained and updated regularly. We add new resources as they emerge and remove outdated ones. Check the What's New section for recent updates.
Can I suggest a resource?
Absolutely! We welcome contributions. Please read our Contributing Guidelines and submit a pull request with your suggestions.
Are these practices suitable for beginners?
Yes! We've organized resources for all skill levels. Beginners should start with the How to Use section and focus on style guides first.
How do I know which resources to prioritize?
Check out our Featured Resources section for must-read guides. Also, resources from well-known organizations (Google, Airbnb, etc.) are generally excellent starting points.
Can I use this for my team?
Definitely! Many teams use this repository as a reference for establishing coding standards. Feel free to share relevant sections with your team or use them in onboarding materials.
Is this repository language-specific?
No, we cover 30+ programming languages and frameworks. Use the Table of Contents or Quick Links to navigate to your preferred technology.
How can I stay updated with new additions?
- β Star and Watch this repository on GitHub
- Check the What's New section periodically
- Follow the repository for notifications
π License
This project is licensed under Creative Commons Zero v1.0 Universal (CC0 1.0) β Public Domain Dedication.
Made with β€οΈ by developers, for developers