Skip to content

Latest commit

 

History

History
287 lines (224 loc) · 9.25 KB

File metadata and controls

287 lines (224 loc) · 9.25 KB

Contributing to Common Questions

Thank you for your interest in contributing to the Common Questions project! This guide will help you get started with contributing to our programming interview and development resource hub.

🎯 Ways to Contribute

Content Contributions

  • Improve existing content: Fix errors, add clarity, update outdated information
  • Add new questions: Contribute new interview questions or coding challenges
  • Enhance code examples: Add implementations in different programming languages
  • Create new guides: Write comprehensive guides on new topics

Technical Contributions

  • Fix bugs: Report and fix issues in the documentation or scripts
  • Improve infrastructure: Enhance CI/CD, testing, or deployment processes
  • Add features: Implement new functionality or tools

Community Contributions

  • Review content: Help review pull requests for accuracy and quality
  • Answer questions: Help other contributors in discussions and issues
  • Share feedback: Provide suggestions for improvements

🚀 Getting Started

Prerequisites

  • Basic understanding of Git and GitHub
  • Familiarity with Markdown for documentation
  • Knowledge of relevant programming languages for code examples

Setting Up Your Development Environment

  1. Fork the repository

    # Click the "Fork" button on GitHub or use GitHub CLI
    gh repo fork hkevin01/Common-Questions
  2. Clone your fork

    git clone https://github.com/YOUR_USERNAME/Common-Questions.git
    cd Common-Questions
  3. Install development dependencies

    pip install -r requirements-dev.txt
    npm install -g markdownlint-cli2 markdown-link-check
  4. Create a new branch

    git checkout -b your-feature-branch

📝 Content Guidelines

Writing Style

  • Clear and concise: Use simple, direct language
  • Comprehensive: Cover topics thoroughly with examples
  • Practical: Focus on real-world applications and scenarios
  • Inclusive: Use inclusive language and diverse examples

Code Examples

  • Multiple languages: Provide examples in popular languages when possible
  • Complete and tested: Ensure all code examples work and are complete
  • Well-commented: Include explanatory comments for complex logic
  • Best practices: Follow language-specific best practices and conventions

Structure and Formatting

  • Consistent headers: Use appropriate heading levels (H1, H2, H3)
  • Code blocks: Use proper syntax highlighting for code blocks
  • Links: Verify all external links work and are relevant
  • Table of contents: Include TOCs for longer documents

Content Categories

Coding Challenges

  • Clear problem statement
  • Multiple solution approaches
  • Time and space complexity analysis
  • Test cases and edge cases
  • Implementation in multiple languages

Interview Questions

  • Both behavioral and technical questions
  • Framework for answering (STAR method for behavioral)
  • Example responses and explanations
  • Common follow-up questions

Security Topics

  • Current and relevant security threats
  • Practical prevention techniques
  • Code examples showing vulnerabilities and fixes
  • Testing and validation approaches

Development Practices

  • Industry-standard methodologies
  • Practical implementation guides
  • Benefits and trade-offs
  • Real-world examples and case studies

🔧 Technical Guidelines

File Organization

content/
├── coding-challenges/     # Programming challenges and solutions
├── interview-questions/   # Behavioral and technical interview prep
├── web-security/         # Security vulnerabilities and prevention
└── development-practices/ # Best practices and methodologies

Markdown Standards

  • Use ATX headers (#, ##, ###)
  • Include alt text for images
  • Use relative links for internal references
  • Follow the markdownlint configuration in .markdownlint.json

Code Quality

  • Follow PEP 8 for Python code
  • Use consistent indentation (2 spaces for YAML, 4 for Python)
  • Include type hints for Python functions
  • Add docstrings for functions and classes

🧪 Testing Your Changes

Validate Content

# Check Markdown formatting
markdownlint-cli2 "**/*.md"

# Validate internal links
python scripts/check_internal_links.py

# Test code examples
python scripts/validate_code_examples.py

Test Code Examples

# Extract and test Python examples
python scripts/extract_code_examples.py
pytest tests/extracted_examples/ -v

Local Preview

# Install dependencies for local preview
npm install -g @11ty/eleventy

# Build and serve locally
npx @11ty/eleventy --serve

📋 Submission Process

Before Submitting

  1. Review your changes: Ensure all content is accurate and well-formatted
  2. Test thoroughly: Run all validation scripts and tests
  3. Check links: Verify all external and internal links work
  4. Follow guidelines: Ensure your contribution follows all style guidelines

Creating a Pull Request

  1. Commit your changes

    git add .
    git commit -m "Add comprehensive guide on [topic]"
  2. Push to your fork

    git push origin your-feature-branch
  3. Create pull request

    • Use the pull request template
    • Provide clear description of changes
    • Link to related issues if applicable
    • Mark as draft if work is in progress

Pull Request Review Process

  1. Automated checks: CI/CD pipeline will run automated tests
  2. Content review: Maintainers will review for accuracy and quality
  3. Feedback incorporation: Address any feedback or requested changes
  4. Approval and merge: Once approved, your contribution will be merged

📏 Quality Standards

Content Accuracy

  • Technical correctness: All technical information must be accurate and current
  • Source verification: Cite authoritative sources for claims and best practices
  • Code testing: All code examples must be tested and working
  • Peer review: Have technical content reviewed by experts when possible

Documentation Quality

  • Completeness: Cover topics comprehensively with sufficient detail
  • Clarity: Ensure content is understandable to the target audience
  • Examples: Include practical examples and use cases
  • Structure: Organize content logically with clear navigation

Code Quality

  • Functionality: Code must work as intended
  • Readability: Code should be clean and well-documented
  • Best practices: Follow language-specific conventions and best practices
  • Security: Ensure code examples don't introduce security vulnerabilities

🐛 Reporting Issues

Bug Reports

Use the bug report template and include:

  • Clear description of the issue
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots if applicable
  • Browser/environment details

Content Issues

Use the content improvement template for:

  • Accuracy corrections
  • Clarity improvements
  • Missing information
  • Outdated content

Feature Requests

Use the feature request template for:

  • New content areas
  • Tool improvements
  • Infrastructure enhancements
  • User experience improvements

📞 Getting Help

Communication Channels

  • GitHub Issues: For bug reports and feature requests
  • GitHub Discussions: For general questions and community discussion
  • Pull Request Comments: For specific feedback on contributions

Resources

🏆 Recognition

Contributors

All contributors will be recognized in:

  • README.md contributors section
  • Git commit history
  • GitHub contributor statistics

Types of Recognition

  • Code contributors: Those who contribute code, documentation, or content
  • Community contributors: Those who help with reviews, discussions, and support
  • Special thanks: Those who provide significant guidance or resources

📜 Code of Conduct

This project adheres to a code of conduct that ensures a welcoming and inclusive environment for all contributors. By participating, you agree to:

  • Be respectful: Treat all community members with respect and kindness
  • Be inclusive: Welcome people of all backgrounds and experience levels
  • Be constructive: Provide helpful feedback and support
  • Be collaborative: Work together towards common goals

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers. All complaints will be reviewed and investigated promptly and fairly.

📄 License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project (MIT License).


Quick Start Checklist

For your first contribution:

  • Fork the repository
  • Set up development environment
  • Find an issue or improvement to work on
  • Create a feature branch
  • Make your changes following the guidelines
  • Test your changes thoroughly
  • Submit a pull request using the template
  • Address any feedback from reviewers

Thank you for contributing to Common Questions! Your efforts help make this resource better for developers worldwide. 🎉