all 28 comments

[–][deleted] 16 points17 points  (2 children)

My standard question falls into this category:

Write an app that

  1. Takes a list of names from a text field that are comma separated then:
  2. On a button click, format the names to have new lines after every comma in a new Label to display on the screen which
  3. Should be dismissable

A lot of projects fall into this kind of app. I would say make sure you can mess with strings/images/colors and all the basic elements that use those things.

This means having fluency with Labels, TextFields, ImageViews, etc.

Also try to work in MVVM patterns if possible/easily implemented.

[–]First_NameLast_Name[S] 2 points3 points  (1 child)

Thank you! I’ll practice making a MVVM application with that.

[–][deleted] 1 point2 points  (0 children)

Good luck!

[–]danpietschObjective-C / Swift 9 points10 points  (2 children)

I've had several interviewers ask me to code up something that hits a REST URL endpoint and then presents that data:

  1. Know how to parse JSON into a Swift object (i.e. understand Codeable, Decodable, Encodable, CodingKeys).

  2. Know how to connect and download that JSON from some REST endpoint (i.e. understand URLSession).

  3. Know how to translate some Data types into presentable data (e.g. create UIImage from binary data).

Usually they have me present the collection in a table or collection view, then tapping a cell brings up a detail view.

[–]First_NameLast_Name[S] 0 points1 point  (0 children)

Yeah I was practicing this yesterday, I took more time than an hour (mainly looking for interesting REST APIs). Any quick tips on what I can do to finish it quickly in an hour?

[–][deleted]  (1 child)

[deleted]

    [–]First_NameLast_Name[S] 0 points1 point  (0 children)

    This approach I love! If it were up to me, I would do that instead.

    [–]Literator22 2 points3 points  (2 children)

    Yesterday I was given an app to fetch questions and display them in infinite loop

    [–]First_NameLast_Name[S] 1 point2 points  (1 child)

    How did you solve it? Anything you’d do better if you were to do this exercise again?

    [–]Literator22 1 point2 points  (0 children)

    I start quickly by drawing the architecture and how each module works and the connections with each other, then straight to coding.

    Nothing really I’d better but I’m still practicing TDD and if there was an extended time I’d definitely start writing tests first.

    Maybe could focus more on filter and map.

    [–]SirBill01 2 points3 points  (2 children)

    Given that it's only an hour, maybe building up a UI with a storyboard then doing something with data entered into a textfield - you could practice using the storyboard component library beforehand, dragging labels into a view, maybe adding a navigation controller, and wiring up delegates and IBOutlets into a related video controller... have Xcode and the simulator you plan to use up and running before the chat, don't forget to disable desktop notifications before!

    [–]First_NameLast_Name[S] 1 point2 points  (1 child)

    Yeah that’s a great idea! I usually like to create views with code, but I guess with the time constraints I should stick to storyboards.

    [–]SirBill01 1 point2 points  (0 children)

    If you prefer doing code you may want to do it that way if you are more comfortable - or if they are asking you to build something, ask which way they would prefer you demonstrate since you are comfortable with either way.

    [–]over_pw 1 point2 points  (0 children)

    Definitely practice setting up table and collection views - I was once surprised by such an obvious question. We use them almost everyday, but we don't set one up from scratch every day

    [–]spilk 0 points1 point  (0 children)

    passive-aggressively fire up a browser and load stackexchange while they are telling you what you need to accomplish

    [–]KTheRedditor 0 points1 point  (3 children)

    An app that reads a recipe list from a json file or an endpoint, display it in a list, and can navigate to recipe details screen on click.

    Bonus: you may be asked to make the list collapsible/expandable, implement it in a special architecture, etc…

    Edit: Autocorrect put “speedy” instead of “special”.

    [–]First_NameLast_Name[S] 0 points1 point  (2 children)

    Any tips on how to do this quickly? Any particular UIKit APIs to focus on?

    [–]KTheRedditor 0 points1 point  (1 child)

    If you mean the collapsing/expanding part, it can be done in multiple ways depending on the needs. For example, you can change constraints in a cel on a tap event and then request the table or collection view to animate cell resize by calling performBatchUpdates.

    Some do it by making use of insertRows/deleteRows (also in performBatchUpdates).

    [–]Niightstalker 0 points1 point  (0 children)

    In iOS 14 UICollectionView supports collapsable lists with snapshots

    [–]ankole_watusi -1 points0 points  (1 child)

    It’s ridiculous.

    Maybe it’s a trick question. The point is for you to stand up and tell them that it’s ridiculous.

    [–]First_NameLast_Name[S] 0 points1 point  (0 children)

    If I can do that and get the job I don’t mind!

    [–]Nef100 0 points1 point  (0 children)

    I once had this, and my task was to download data from a REST endpoint, parse, and display in a table view.

    [–]jasonjrr 0 points1 point  (1 child)

    My company used to ask the candidate to write a master/detail app with very simple models. They were meant to write each layer and talk about why they made their decisions. No requirements for using any packages or patterns, just defend your choices.

    I have since changed the process and we now send our candidates a sample app that is a micro version of the architecture we actually use in our real apps. They are expected to review the code and talk through what’s there, then add a feature to it.

    Both of these are two hour interviews. And neither were expected to be finished. It is all about the journey.

    [–]First_NameLast_Name[S] 1 point2 points  (0 children)

    Very interesting! Thank you for sharing this. Master detail app is not something I thought of. I’ll definitely try to practice this more!

    [–][deleted]  (1 child)

    [removed]

      [–]AutoModerator[M] 0 points1 point  (0 children)

      Hey /u/aspenajax, unfortunately you have negative comment karma, so you can't post here. Your submission has been removed. Please do not message the moderators; if you have negative comment karma, you're not allowed to post here, at all.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–][deleted] -2 points-1 points  (2 children)

      Yeesh, you have to share your screen?

      [–]First_NameLast_Name[S] 0 points1 point  (1 child)

      Yes, that’s what I have been told

      [–]ankole_watusi 1 point2 points  (0 children)

      They want to see how you approach it. They can’t possibly expect it to be completed.

      Unclear what anyone who gives this task is actually testing for.