← Bloomberg Interview Insights
Start by clarifying the existing abstractions and registry mechanism, then outline the concrete class that implements the required interface. Walk through the chunked reading, row normalization, error handling with retry/logging, and registration process, emphasizing how it integrates without modifying the base class. Conclude with trade-offs and potential improvements.
Pro tip: Show that you understand the importance of not modifying existing abstractions by explaining how you would use the registry decorator or explicit registration call, and mention that you would write unit tests for the new class to ensure it adheres to the contract.
Review the abstract base class to identify required methods and the registry mechanism (e.g., decorator or registration function). Determine how the CLI invokes processors by name.
Create a class that inherits from the abstract base and implements the required methods, ensuring it can be registered without altering the base. Plan the chunked CSV reading and JSON writing logic.
Use a CSV reader to iterate over rows in chunks, normalize each row into a JSON object (e.g., convert types, handle missing values), and write line-delimited JSON to the output file.
For each row, attempt processing; on failure, retry a configurable number of times, then log the error and skip the row. Ensure logging includes sufficient context for debugging.
Use the existing registry mechanism to register the new class under a unique name, so the CLI can invoke it. Verify that no changes to the base class or registry are needed.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.