> ## 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

> **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!).

## 2. Leadership & Mentorship

> **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.

> **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).

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

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

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

> **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".

> **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.

> **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).

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

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

## 3. Challenges & Failures

> **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.

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

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

> **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.

> **15. Handling pressure?**
>
> **Answer**:
> Prioritization (Eisenhower Matrix).
> delegation.
> Focusing on critical path.

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

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

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

> **19. Regret in engineering choice?**
>
> **Answer**:
> Over-engineering. Chose Microservices too early.
> **Result**: Operational overhead.
> **Lesson**: Start Monolith.

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

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

> **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.

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

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

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

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

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

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

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

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

> **30. Testing culture improvement?**
>
> **Answer**:
> Introduction of E2E tests (Cypress).
> Blocked PRs on failure.
> Increased confidence in deploy.

## 5. Situational (Rapid Fire)

> **31. Prod is down. What do you do?**
>
> Verify User impact -> Update Status Page -> Rollback recent change -> Investigate.

> **32. Use a new shiny framework?**
>
> Only if solves specific problem. Technology Radar assessment. POC first.

> **33. Tech Debt vs Features?**
>
> 80/20 rule. Allocate % of sprint to debt.

> **34. Code comments?**
>
> Why, not What. Code should be self-documenting. Comments for hacks/complex algorithms.

> **35. Pair Programming?**
>
> Love it for complex tasks / sharing knowledge. Expensive for trivial tasks.

> **36. Remote work challenges?**
>
> Over-communication. Documentation is key. Async updates.

> **37. Ideal team culture?**
>
> Psychological safety. Blameless. High standards.

> **38. Learning new tech?**
>
> Docs -> Tutorial -> Build project -> Read source code.

> **39. Definition of Done?**
>
> Coded, Tested, Reviewed, Documented, Deployed to Staging.

> **40. Estimate accuracy?**
>
> Break down tasks small (\< 1 day). Use buffers.

> **41. Handling burnout?**
>
> Time off. Speak to manager. Rebalance workload.

> **42. Accessibility?**
>
> Mandatory. Ethics + Legal + SEO.

> **43. Open Source?**
>
> Use it, contribute back if bug found.

> **44. Ethics in AI?**
>
> Bias checking. Data privacy.

> **45. Why this company?**
>
> Mission alignment + Tech stack challenge.

> **46. Questions for me?**
>
> "How do you handle production incidents?"
> "What is the team structure?"
> "Tech roadmap?"

> **47. Describe yourself in 3 words?**
>
> Curious, Resilient, Collaborative.

> **48. Tabs or Spaces?**
>
> Use the linter config (.editorconfig). Consistency > Preference.

> **49. Vim or IDE?**
>
> IDE (VSCode) for productivity. Vim for server editing.

> **50. Preferred Stack?**
>
> Fullstack JS/TS. But tool depends on problem.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.