← Stripe Interview Insights

Stripe·Software Engineer·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Stripe bug-fix round for a software engineer role, focused entirely on the SnakeYAML Java library. Two failing tests, a time limit, and no hand-holding. More forensic than algorithmic, which I wasn't fully prepared for.

Questions Asked (2)

Q1

You're given a fork of SnakeYAML with a failing test. The YAML scalar 'On' isn't being resolved to boolean true. Find the bug in the resolver logic and fix it with a minimal diff.

Root Cause AnalysisTechnical Trade-offs
Author's notes

Spent the first few minutes just grepping for where boolean resolution happens.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by reproducing the failing test and tracing how the resolver determines scalar types, focusing on the boolean resolution logic. Compare the resolver's regex patterns against the YAML 1.1 spec, which includes 'On' as a boolean, and identify the minimal change needed to match it. Then apply the fix, run the test, and verify no regressions.

Pro tip: Mention that you'd check the YAML spec version and the resolver's regex patterns, and that you'd add a regression test for 'On' and 'Off' to prevent future breakage. This shows you think about correctness and maintainability, not just the quick fix.

1. Reproduce and isolate

Run the failing test to confirm the issue and locate the resolver code responsible for boolean resolution.

2. Analyze resolver logic

Examine the boolean regex patterns and compare them to the YAML 1.1 spec, noting that 'On' should match but doesn't.

3. Identify minimal fix

Determine the smallest change to the regex or resolver logic that makes 'On' resolve to true without affecting other types.

4. Apply and test

Implement the fix, run the failing test, and execute the full test suite to ensure no regressions.

5. Add regression test

Add a test case for 'On' (and possibly 'Off') to guard against future regressions.

Key Points to Mention

  • YAML 1.1 boolean values include 'On', 'Off', 'Yes', 'No' (case variations), but YAML 1.2 core schema only includes true/false.
  • SnakeYAML's Resolver uses regex patterns to match scalars; the boolean pattern likely omits 'On' or has a case-sensitivity issue.
  • The fix should be minimal: adjust the regex to include 'On' (e.g., add 'on' to the pattern) or correct case handling.
  • Consider backward compatibility and whether the change aligns with the YAML spec version the library targets.
  • Run existing tests to ensure the change doesn't break other resolutions (e.g., strings that look like booleans).
  • Add a regression test to prevent future breakage and document the change.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

A second failing test shows that parsing a CSV-like document through SnakeYAML throws an error. Trace the parser code path, find the broken rule, and produce a minimal fix.

Root Cause AnalysisAPI & Integrations
Author's notes

This one was rougher.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by reproducing the error and capturing the full stack trace to identify where SnakeYAML fails. Then trace the parser code path from the entry point to the exception, focusing on the CSV-like document's structure and how SnakeYAML interprets it. Finally, isolate the broken rule, propose a minimal fix, and verify it with a test.

Pro tip: Demonstrate a systematic debugging process: use logging or a debugger to step through the parser, and consider edge cases like special characters or delimiters that might confuse SnakeYAML. This shows you can methodically solve complex parsing issues.

1. Reproduce and Capture Error

Run the failing test to reproduce the error and capture the full stack trace. Note the exact exception type and message, and the input document that triggers it.

2. Trace Parser Code Path

Starting from the SnakeYAML entry point (e.g., Yaml.load), trace through the parser methods (Scanner, Parser, Composer) to see where the exception is thrown. Use breakpoints or logging to follow the flow.

3. Identify Broken Rule

Examine the parser state and the input at the point of failure. Determine which YAML rule (e.g., indentation, tokenization, implicit typing) is violated by the CSV-like content.

4. Propose Minimal Fix

Based on the broken rule, suggest a minimal code change—such as adjusting the parser configuration, escaping special characters, or modifying the input preprocessing—to resolve the error without breaking other functionality.

5. Verify and Test

Apply the fix and rerun the failing test to confirm it passes. Also run the full test suite to ensure no regressions, and consider adding a new test case for the specific scenario.

Key Points to Mention

  • Understanding SnakeYAML's parsing stages: Scanner, Parser, Composer, Constructor.
  • Common YAML pitfalls with CSV-like data: unquoted strings, special characters (e.g., colons, commas), and indentation issues.
  • Using debugging tools (breakpoints, logging) to trace the exact failure point.
  • The importance of minimal fixes: avoid broad changes that could introduce new bugs.
  • Testing the fix with the original failing test and additional edge cases.
  • Communicating the root cause clearly and explaining why the fix works.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.