Skip to content

Instantly share code, notes, and snippets.

@MattyAyOh
Last active January 13, 2021 21:29
Show Gist options
  • Save MattyAyOh/f832690d91eef41716eed1d3331ffea9 to your computer and use it in GitHub Desktop.
Save MattyAyOh/f832690d91eef41716eed1d3331ffea9 to your computer and use it in GitHub Desktop.
Android Takehome

BettyLabs Android Engineer Takehome Project


Please spend no more than 5 hours on this project, afterwards we'll have a 30 minute discussion review and discuss what we could add to the project

  • Please make an initial commit once you start, and incremental commits as you see fit

So here’s the outline for the exercise:

We would like you to build a quick table that displays searched users, and importantly supports paging

As we do not have any Android developers in-house, we'll need to see you build a project from scratch, including client networking setup/management.

You will need to hit development endpoints we have setup

  • POST https://auth.betty.wtf/auth/signIn Params: { username: String, password: String }
  • GET https://disco.betty.wtf/user/me/user-search Params: { query: String, skip: Int, limit: Int }

Use username: {We'll provide you with a username}, password: asdfghjkl

/auth/signIn will return JSON: {token: String, userId: String}
The token is a bearer token that you'll need to pass in the authorization header of the search request

This is our User model:

struct User {
    let id: String
    var photoUrl: URL?
    let username: String?
    let firstName: String?
    let lastName: String?
    let bio: String?
    var verified: Bool? //is this user a "Verified" person, like Twitter checkmark
    var isFollowing: Bool? //are we following this user?
    var twitterUsername: String?
}

What we're looking for:

  • A table that displays user data, designed however you'd like (think searching for users on a social media platform)
  • A search field that filters the table's data source
  • Paging, so that only 10 results are received at a time

Criteria:

  • Maintainability
    • Modular
    • Readability
  • Performant
  • Looks pretty (not beautiful, but delivered to live users)

Output:

  • A code repository, including /.git, zipped
  • A list of features you would add to this project if you had more time, as well as any improvements you could make (if applicable)
  • Please email your submission to matt@bettylabs.io

That's it! Please let us know if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment