← Workday Interview Insights

Workday·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

Workday software engineer interview with a meaty OOP design question about building a file parser system. The scope was broader than I expected, covering everything from class hierarchy to streaming large files.

Questions Asked (1)

Q1

Design a file parser system that handles multiple formats like CSV, JSON, XML, and custom delimited files. Cover the class hierarchy, how you'd share common behavior across formats without duplicating code, a factory or registry for selecting the right parser, and how you'd add new formats without touching existing code.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one took me a while to get my footing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (formats, file sizes, streaming vs. in-memory, error handling). Then design a class hierarchy with an abstract Parser interface and a template method pattern to share common parsing logic, using a registry-based factory for format selection. Emphasize extensibility via the Open/Closed Principle and discuss trade-offs like performance, memory, and error recovery.

Pro tip: Mention that you'd use a registry with self-registration (e.g., decorators or class attributes) so new parsers automatically register themselves, avoiding central factory modifications. Also, discuss how you'd handle schema evolution and malformed data gracefully, as Workday deals with enterprise data integration.

1. Clarify Requirements and Constraints

Ask about expected file sizes, streaming needs, error handling, and whether schemas are known. This shapes the design (e.g., streaming vs. loading entire file).

2. Define Core Abstractions

Design an abstract Parser interface with methods like parse(InputStream) and supports(format). Use a template method pattern to implement common steps (open, read, validate, close) in a base class, leaving format-specific parsing to subclasses.

3. Implement Format-Specific Parsers

Create concrete parsers (CSVParser, JSONParser, XMLParser, CustomDelimitedParser) that extend the base class and implement only the format-specific logic, reusing common behavior.

4. Design a Factory/Registry for Parser Selection

Implement a ParserFactory that uses a registry mapping format identifiers (e.g., MIME type, file extension) to parser instances. Use a self-registration mechanism so new parsers register themselves without modifying the factory.

5. Ensure Extensibility and Discuss Trade-offs

Explain how adding a new format requires only creating a new parser class and registering it, adhering to Open/Closed Principle. Discuss trade-offs: performance overhead of abstraction, memory usage, and error handling strategies.

Key Points to Mention

  • Abstract base class with template method pattern to share common parsing steps (open, read, validate, close).
  • Registry-based factory with self-registration (e.g., using decorators or class attributes) to avoid modifying existing code when adding formats.
  • Strategy pattern for interchangeable parsing algorithms and support for streaming large files.
  • Open/Closed Principle: new formats added via new classes, not by editing existing ones.
  • Error handling and validation: consistent exception hierarchy, partial results, and logging.
  • Trade-offs: performance vs. flexibility, memory footprint, and complexity of the registry.

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