> ## Documentation Index
> Fetch the complete documentation index at: https://resources.devweekends.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Behavioral & Leadership

> STAR Method, Conflict Resolution, and Project Deep Dives

# Behavioral Interview Questions (50+ Detailed Q\&A)

## 1. The STAR Method Guide

<AccordionGroup>
  <Accordion title="What is STAR?">
    **Answer**:
    Standard format for answering behavioral Qs.

    * **S (Situation)**: Context. "At company X, we faced a 20% latency spike..."
    * **T (Task)**: Goal. "I needed to identify the bottleneck and fix it..."
    * **A (Action)**: Steps taken. "I profiled the DB, found missing index, implemented caching..." (Focus on 'I', not 'We').
    * **R (Result)**: Outcome. "Latency dropped 50%, saving \$10k/mo." (Quantify!).
  </Accordion>
</AccordionGroup>

## 2. Leadership & Mentorship

<AccordionGroup>
  <Accordion title="1. Tell me about a time you led a team technically.">
    **Situation**: Tech Lead for Migration.
    **Action**: Designed architecture, broke down tasks, reviewed code, unblocked juniors.
    **Result**: Delivered on time, zero regressions.
  </Accordion>

  <Accordion title="2. How do you handle a junior dev struggling?">
    **Answer**:
    Diagnosis (Knowledge gap vs Motivation).
    Pair programming.
    Smaller tasks.
    Code reviews as teaching moment (Positive tone).
  </Accordion>

  <Accordion title="3. Ensuring code quality in team?">
    **Answer**:
    Linting/Formatting CI checks.
    Code Review checklist.
    Design Docs before coding.
    Unit Tests mandatory.
  </Accordion>

  <Accordion title="4. Handling a low performer?">
    **Answer**:
    Feedback Loop (Early).
    Clear expectations (PIP if needed).
    Find their strength (maybe wrong task type).
  </Accordion>

  <Accordion title="5. Mentoring example?">
    **Answer**:
    Onboarding a new hire.
    Created "First Week" guide.
    Assigned a "Good First Issue".
    Weekly 1:1 check-in.
  </Accordion>

  <Accordion title="6. Persuading management for Tech Debt?">
    **Answer**:
    Speak Business Value. "Refactoring this api reduces error rate by X%, saving Y support hours."
    "Risk of security breach."
    Don't say "Code is ugly".
  </Accordion>

  <Accordion title="7. Conflict with Product Manager?">
    **Answer**:
    "PM wanted feature X, Eng said impossible by deadline."
    **Action**: Proposed compromise (MVP). Phased rollout.
    **Result**: Launched core value, added bells later. Focus on shared goal.
  </Accordion>

  <Accordion title="8. Conflict with another Engineer?">
    **Answer**:
    Disagreement on framework choice (React vs Vue).
    **Action**: Built prototypes (Spikes). Compared metrics.
    **Result**: Data-driven decision. Commitment even if one disagreed (Disagree and Commit).
  </Accordion>

  <Accordion title="9. Taking ownership beyond role?">
    **Answer**:
    Noticed CI was slow.
    Voluntarily optimized Docker caching.
    Reduced build time 50%. Benefit entire team.
  </Accordion>

  <Accordion title="10. Hiring strategy?">
    **Answer**:
    Look for "Slope" (Growth capability) over "Y-Intercept" (Current knowledge).
    Curiosity + Communication.
  </Accordion>
</AccordionGroup>

## 3. Challenges & Failures

<AccordionGroup>
  <Accordion title="11. Tell me about a time you failed.">
    **Answer**:
    Deployed bug to prod.
    **Action**: Rolled back. Fixed.
    **Key**: Post-mortem. Root Cause Analysis (5 Whys). Added test case to prevent recurrence. Blameless culture.
  </Accordion>

  <Accordion title="12. Worst production outage?">
    **Answer**:
    DB deletion / DDOS.
    **Focus**: How you stayed calm. Communication (Status page). Recovery steps.
  </Accordion>

  <Accordion title="13. Missed deadline?">
    **Answer**:
    Underestimated complexity.
    **Action**: Communicated EARLY. Negotiated scope cut (MVP).
    **Result**: Delivered core value. Learned to pad estimates.
  </Accordion>

  <Accordion title="14. Unpopular decision?">
    **Answer**:
    Deprecating a loved legacy tool.
    **Action**: Wrote RFC. Explained long term benefits. Migration plan.
    **Result**: Painful short term, better long term.
  </Accordion>

  <Accordion title="15. Handling pressure?">
    **Answer**:
    Prioritization (Eisenhower Matrix).
    delegation.
    Focusing on critical path.
  </Accordion>

  <Accordion title="16. Dealing with ambiguity?">
    **Answer**:
    "Build a recommendation engine." (Vague).
    **Action**: Talked to stakeholders. Defined KPIs. Built simple heuristic MVP first.
  </Accordion>

  <Accordion title="17. Giving difficult feedback?">
    **Answer**:
    "Your code reviews are too harsh."
    **Method**: SBI (Situation, Behavior, Impact). Private conversation.
  </Accordion>

  <Accordion title="18. Receiving difficult feedback?">
    **Answer**:
    "You speak too fast."
    **Action**: Acknowledged. actively paused during presentations. Checked understanding.
  </Accordion>

  <Accordion title="19. Regret in engineering choice?">
    **Answer**:
    Over-engineering. Chose Microservices too early.
    **Result**: Operational overhead.
    **Lesson**: Start Monolith.
  </Accordion>

  <Accordion title="20. Working with difficult stakeholder?">
    **Answer**:
    Change requirements constantly.
    **Action**: Documented requirements. Froze scope for Sprint. Trade-off slider ("Fast, Good, Cheap - Pick 2").
  </Accordion>
</AccordionGroup>

## 4. Project Deep Dive (The "What did you build" Q)

<AccordionGroup>
  <Accordion title="21. Most challenging project?">
    **Structure**:

    1. **Goal**: High scale chat app.
    2. **Challenge**: Websocket server memory limit.
    3. **Action**: Moved state to Redis. Horizontal scaling.
    4. **Result**: 1M concurrent users.
  </Accordion>

  <Accordion title="22. Performance optimization example?">
    **Answer**:
    Slow API (2s).
    **Action**: Profiling. Found N+1 query.
    **Fix**: Batch loading + Redis Cache.
    **Result**: 200ms (10x gain).
  </Accordion>

  <Accordion title="23. Scaling a system?">
    **Answer**:
    Monolith splitting.
    Identified seam (Billing module).
    Extracted to service.
    API Gateway routing.
  </Accordion>

  <Accordion title="24. Security implementation?">
    **Answer**:
    Moving from Basic Auth to OAuth2/OIDC.
    Implemented Role Based Access (RBAC).
    Audit logging.
  </Accordion>

  <Accordion title="25. Complex bug fix?">
    **Answer**:
    Race condition in inventory.
    **Action**: Reproduced with heavy load test.
    **Fix**: DB Transaction with Row Lock.
  </Accordion>

  <Accordion title="26. Architecture decision?">
    **Answer**:
    SQL vs NoSQL.
    Chose Postgres because data was relational (Orders/Users). JSONB for flexibility.
  </Accordion>

  <Accordion title="27. Migration legacy system?">
    **Answer**:
    Strangler Pattern.
    Proxy in front.
    One route at a time.
    Verify data consistency (Shadow writes).
  </Accordion>

  <Accordion title="28. Innovation?">
    **Answer**:
    Automated a manual spreadsheet process with a Python script / Internal Tool.
    Saved 10 hours/week.
  </Accordion>

  <Accordion title="29. Cross-team collaboration?">
    **Answer**:
    Working with Mobile team and Backend team on API contract.
    Used Swagger/OpenAPI to define spec first.
  </Accordion>

  <Accordion title="30. Testing culture improvement?">
    **Answer**:
    Introduction of E2E tests (Cypress).
    Blocked PRs on failure.
    Increased confidence in deploy.
  </Accordion>
</AccordionGroup>

## 5. Situational (Rapid Fire)

<AccordionGroup>
  <Accordion title="31. Prod is down. What do you do?">
    Verify User impact -> Update Status Page -> Rollback recent change -> Investigate.
  </Accordion>

  <Accordion title="32. Use a new shiny framework?">
    Only if solves specific problem. Technology Radar assessment. POC first.
  </Accordion>

  <Accordion title="33. Tech Debt vs Features?">
    80/20 rule. Allocate % of sprint to debt.
  </Accordion>

  <Accordion title="34. Code comments?">
    Why, not What. Code should be self-documenting. Comments for hacks/complex algorithms.
  </Accordion>

  <Accordion title="35. Pair Programming?">
    Love it for complex tasks / sharing knowledge. Expensive for trivial tasks.
  </Accordion>

  <Accordion title="36. Remote work challenges?">
    Over-communication. Documentation is key. Async updates.
  </Accordion>

  <Accordion title="37. Ideal team culture?">
    Psychological safety. Blameless. High standards.
  </Accordion>

  <Accordion title="38. Learning new tech?">
    Docs -> Tutorial -> Build project -> Read source code.
  </Accordion>

  <Accordion title="39. Definition of Done?">
    Coded, Tested, Reviewed, Documented, Deployed to Staging.
  </Accordion>

  <Accordion title="40. Estimate accuracy?">
    Break down tasks small (\< 1 day). Use buffers.
  </Accordion>

  <Accordion title="41. Handling burnout?">
    Time off. Speak to manager. Rebalance workload.
  </Accordion>

  <Accordion title="42. Accessibility?">
    Mandatory. Ethics + Legal + SEO.
  </Accordion>

  <Accordion title="43. Open Source?">
    Use it, contribute back if bug found.
  </Accordion>

  <Accordion title="44. Ethics in AI?">
    Bias checking. Data privacy.
  </Accordion>

  <Accordion title="45. Why this company?">
    Mission alignment + Tech stack challenge.
  </Accordion>

  <Accordion title="46. Questions for me?">
    "How do you handle production incidents?"
    "What is the team structure?"
    "Tech roadmap?"
  </Accordion>

  <Accordion title="47. Describe yourself in 3 words?">
    Curious, Resilient, Collaborative.
  </Accordion>

  <Accordion title="48. Tabs or Spaces?">
    Use the linter config (.editorconfig). Consistency > Preference.
  </Accordion>

  <Accordion title="49. Vim or IDE?">
    IDE (VSCode) for productivity. Vim for server editing.
  </Accordion>

  <Accordion title="50. Preferred Stack?">
    Fullstack JS/TS. But tool depends on problem.
  </Accordion>
</AccordionGroup>
