← OpenAI Interview Insights

OpenAI·Mobile Engineer·Onsite - Coding / Algorithms·Senior

SeniorPrefer not to say
Jun 2026

Summary

Round 2 for a Mobile Engineer role at OpenAI was a coding round focused on Android. The task was more involved than I expected, mostly because Compose doesn't hand you everything out of the box.

Questions Asked (1)

Q1

Build a rating card in Kotlin with Jetpack Compose where both a star rating and a comment are required before the user can submit. On successful submission, show a confirmation message. You'll need to implement the rating bar yourself since Compose doesn't include one natively.

Technical Trade-offsSystem DesignAPI & Integrations
Author's notes

The form validation logic was straightforward but I spent way too long second-guessing the rating bar implementation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline a clean architecture with state hoisting and a custom star rating composable. Walk through the implementation step-by-step, emphasizing validation logic, state management, and user feedback, while discussing trade-offs and testing.

Pro tip: Mention accessibility from the start—adding contentDescription and semantics to the custom star rating shows you think beyond the happy path and care about inclusive design.

1. Clarify requirements and constraints

Ask about rating scale (e.g., 1-5 stars), whether half-stars are needed, and if the comment has a character limit. Confirm that both fields are required and that submission should be disabled until valid.

2. Design state and architecture

Use a ViewModel to hold UI state (rating, comment, submission status) and expose it via StateFlow. Hoist state to the screen level and pass down to stateless composables for testability.

3. Implement custom star rating composable

Create a Row of clickable star icons (e.g., using Icons.Filled.Star and Icons.Outlined.Star) with a callback for rating changes. Add accessibility semantics and consider touch target size.

4. Build the rating card UI

Compose the card with the star rating, a TextField for comments, and a submit button. Enable the button only when rating > 0 and comment is not blank, using derivedStateOf or a simple boolean check.

5. Handle submission and feedback

On submit, trigger a ViewModel function that simulates or performs the submission, then show a confirmation message (e.g., Snackbar or a success state). Discuss error handling and loading states.

Key Points to Mention

  • State hoisting and unidirectional data flow for testable and reusable composables
  • Custom star rating implementation with click handling and accessibility semantics
  • Validation logic to enable/disable submit button based on both fields
  • Use of ViewModel and StateFlow for state management and separation of concerns
  • User feedback on submission (Snackbar, success message) and handling loading/error states
  • Trade-offs: simplicity vs. extensibility, e.g., supporting half-stars or custom icons

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