What to ask an iOS Developer at their Interview

(UPDATE:  I’ve decided to update this post slightly to also reflect my increasing level of experience.)

I was asked to help out a neighbouring startup in Berlin with their interview process for an iOS developer.  Seeing as I continually seem to be the resident expert (I really don’t know how this happened and I look forward to the bigger fish!) I thought I’d put my thoughts down on paper as to how I would prepare for such an interview.

So, here it is, should you be in a situation where you need an iOS person.  Feel free to comment.  There is always a bigger fish, but I have amassed a lot of iOS experience so far.

  1. How much experience / how long have you worked with Objective-C / Cocoa / iOS ?
  2. What was the first version of iOS you worked with?
  3. How are your memory management skills?  (I only know ARC, I know about release/retain, I know about how to make both types work together)
  4. Do you have experience with…
    • Customizing UIViews with drawRect:  (i.e. CoreGraphics / QuartzCore )
    • CoreAnimation / CALayer manipulation
    • Container View Controllers ?  (i.e. childViewControllers on iOS 5+)
    • Customizing standard UI Components (UINavigationBar, UITabBar, etc.)
    • Custom UITableViews, UITableViewCells
    • Laying out Views (i.e. all layout code, setting frames, belongs in layoutSubviews)
  5. What Networking Frameworks are you familiar with / prefer?  e.g. ASIHTTPRequest, AFNetworking, RESTKit, MKNetworkKit, etc.
  6. Have you ever worked with blocks / written Block-based API’s ?
  7. What about categories?  Why would you typically write categories?  And with code you have source for?
  8. How do you tend to handle persistence on the device?  (e.g. NSCoding, CoreData, NSData with filepaths)
  9. Do you have experience with Asynchronous Image Loading?  i.e. subclass/category on UIImageView
  10. What do you have to be careful of?  (e.g. cancel image loading request when view disappears / is to be reused in tableView, don’t block UI on main thread, instead do image operations on a background thread)
  11. Do you have any favourite open source libraries for this, or do you create your own?
  12. In addition, what are your favourite Open Source Libraries / Use most often?  Why?
  13. Back to asynchronous communication.  How do you approach this in general?  (e.g. you update one data object from the server on which other objects in your App need to know about)  KVO?  NSNotificationCenter?  etc
  14. Have you discovered the greatness of NSOperation technology and are you competent with concurrency?  How might you create a block-based API that does work on a background thread and returns its result to the main thread?
  15. Do you have a public repository or a .zip file you could provide so we might look at your code examples?
  16. If you have a problem you need to solve and aren’t sure at the beginning how, what are your typical strategies to solving such problems?  (A vague question)
  17. How good are you at debugging?  i.e. NSLog tracing, breakpoints, Instruments, or what?
  18. (There is no correct answer, only to get a sense of the candidate’s style)  Are you formal in your design approaches (e.g. UML Diagrams), or are you more of a cowboy?  (Code first, design later).  How do you approach writing your classes?  (i.e. write headers first, comment what they are supposed to do, then implement later.  Pen and paper first, then coding.  Etc etc)
  19. What is your opinion / commentary on the topic of encapsulation?
  20. How many Apps have you worked on that have been published to the AppStore?
  21. Any you are particularly proud of, and why?   What was your role on them?
  22. Do you have experience dealing with Provisioning Profile management?
  23. What part of iOS Development do you like most?  e.g. writing custom components, designing the App’s architecture, integrating foreign services (like other webservices), etc.
    or, If someone asked you what area of the app you would like to primarily develop, what would you pick and why?  (basically to determine what *kind* of programming he’s into)
  24. Experience with working with Maps  (MapKit framework?)
  25. (on formality)  To what extent do you document your code?  e.g. Zero, Commented Headers, Official doxygen/appledoc style headers.
  26. To what extent do you use Instruments for debugging?

(UPDATE: As a companion to this post, please also see my thoughts on technical interviews)

SECOND UPDATE:  I also have the ultimate iOS Developer technical test you can assign a potential hire.  It should take 1-3 hours.  It is easy to communicate, allows a lot of freedom of implementation so you can really get a better picture into how a developer thinks, and will make sure this developer knows the absolute fundamentals.  Ready for it?

Calculate the and display each Fibonacci number from 1 -> max N possible on an iPhone with unsigned integers, and display each F(n) in a table view.  The UITableView scrolling MUST remain smooth.

That’s it.  You’ll be amazed at how profoundly simple this task sounds and yet how much iOS knowledge can be demonstrated.  Not just what they know, but how they structure their work.  You can assess their APIs, their separation of concerns when designing classes, the considerations they’ve made for performance, and their knowledge of concurrency.  (Not to mention their knowledge of recursive functions.)  It is ok to give them the formula, and allow them to use Google.  F(n) = F(n-1) + F(n-2).

Please let me know if any of this post was useful to you!  Cheers, S.

Advertisements

15 thoughts on “What to ask an iOS Developer at their Interview

  1. Hey the fib + tableview scrolling question is pretty good, but I’m curious as to why it shows a demonstration for “knowledge of concurrency”. I tried it out with a simple memoization scheme and it was fast enough. Is there a better solution that makes use of asynchronous computation of these rows?

    • Of course it will depend on your implementation. If you are caching your computations, then you can get an incredible speed increase. If you don’t, it can take a while to calculate fib(42). So, depending on the programmer’s knowledge, you can see the approach they take. You shouldn’t see the fibonacci question as having a right answer and a wrong answer, but rather an indicator as to the programmer’s knowledge. (And even then, many people choke in an interview so it’s still not always the best test. Nobody has to program with a gun to their head, but for many, an interview is like that). You can then assess what they know, and the quality of their solution. The only time a programmer really has to get the best solution is if they are working alone.

      But I would say it is good practice to do any heavy lifting off of the main thread.

      • Thanks for your response. These are great points. I’ve been tuning our interview process recently, and one thing I wanted to try was to replacing the phone screen with a take home do-it-on-your-own question that can be completely in less than 2 hours. I think a “build a TableView/ListActivity with each row being the result of some computation” might work really well for Android and iOS candidates.

      • Hi Charith,

        very concise code! Well done! I only had superficial things that I noticed could be improved but generally very good solution!

        – Always take care about spelling mistakes. FibonacciManager (2 c’s)
        – You don’t need to retain another reference in your ViewController to the FibonacciManager since it’s a singleton. This is perhaps a style thing. It can be sometimes less writing to keep a ref to him. A weak ref would do though not a big difference.
        – Hard-coded values like 91 rows should at least be accompanied with comments as to WHY that value was chosen.
        – Why 91? You’ll see that you are at the limit of what an NSUInteger can store at a lower i than 91. This is why your rows are sometimes positive values and sometimes negative.
        – Good work with encapsulating the ViewController in a private interface. I would say in objective-C there is no reason to have these ‘short names’ such as ‘str’. That doesn’t tell anyone about its intention. This isn’t 1985. We are allowed names longer than 8 characters! 😀 tempString would do. Anyway, this isn’t used anywhere…
        – Warnings in the compiler should ideally be treated as errors. In this small project there were a few warnings. These add up over the lifetime of a project. Always aim to have 0 warnings if possible.
        – Again, it never hurts to put comments in your code to help the next person understand your thought process a bit.
        – Caching the computation was the key to performance! As such you probably avoided a potential bug that could occur in your tableview code:

        when you have an asynchronous API with table cells you need to watch out that the result that is returned asynchronously is still ‘relevant’. Imagine computation takes a while. The cell comes into view. You tell it to go compute (A). Now you scroll the table cell off the screen. that cell gets reused and then configured for another computation (B). But, now the callback A finishes and sets a value in the cell that is intended for B. Bug. It is good to keep a reference to what should be calculated so that you can compare when the callback fires. This is most relevant for table cells.

      • Dear horseshoe,

        Thank you very much for your time.really appreciate.please see my comments.

        – Always take care about spelling mistakes. FibonacciManager (2 c’s) – noted

        – You don’t need to retain another reference in your ViewController to the FibonacciManager since it’s a singleton. This is perhaps a style thing. It can be sometimes less writing to keep a ref to him. A weak ref would do though not a big difference. – this for my easiness of accessing the referenece. Otherwise it will be too long to access.

        – Hard-coded values like 91 rows should at least be accompanied with comments as to WHY that value was chosen.
        – Why 91? You’ll see that you are at the limit of what an NSUInteger can store at a lower i than 91. This is why your rows are sometimes positive values and sometimes negative. – if this is higher than 91 it will overflow the max of NSUinteger. How to get rid of this problem?

        – Good work with encapsulating the ViewController in a private interface. I would say in objective-C there is no reason to have these ‘short names’ such as ‘str’. That doesn’t tell anyone about its intention. This isn’t 1985. We are allowed names longer than 8 characters! 😀 tempString would do. Anyway, this isn’t used anywhere… – this is a mistake. This was for a testing purpose. 🙂

        – Warnings in the compiler should ideally be treated as errors. In this small project there were a few warnings. These add up over the lifetime of a project. Always aim to have 0 warnings if possible. – agreed. If we put %d in 64 bit simulator for nslog, it will warn. If we put %ld in 32 bit simulator again it will warn. Whats the solution for this?

      • You’ll see that you are at the limit of what an NSUInteger can store at a lower i than 91. This is why your rows are sometimes positive values and sometimes negative. – if this is higher than 91 it will overflow the max of NSUinteger. How to get rid of this problem?

        — I guess you are on a 64-bit architecture. On 32-bit it’s much less. If I remember part of the task was to calculate n for the maximum possible using NSUInteger. For me it’s enough to write a unit test that determines the max value, then put that (91) as a constant, then explain your results.

        – Warnings in the compiler should ideally be treated as errors. In this small project there were a few warnings. These add up over the lifetime of a project. Always aim to have 0 warnings if possible. – agreed. If we put %d in 64 bit simulator for nslog, it will warn. If we put %ld in 32 bit simulator again it will warn. Whats the solution for this?

        — I would cast the indexPath.row to an int, then use the %i specifier.

  2. Pingback: Interview Time Part 1 |

  3. Pingback: Interview Stuff | Zeeshan Khan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s