Why is it so damn hard to find a good developer? How can I tell if someone knows enough to work with me without me losing my mind? We have little to no standards on how to quantify how qualified an iOS Developer is, so it makes it that much harder to really know what you're getting when you interview a potential candidate.
In this talk (given at CocoaHeads NYC in May 2015), we explore a set of interview questions, and, as a varied-level group, we took the challenge ourselves, and attempted to rate how difficult the questions would be for junior, senior, and expert level iOS Developers.
6. Rules
1. # of years you’ve been writing
Cocoa or Mac OS X/iOS Apps
2. Write the level of experience you
think you have (1 = Junior, 5 =
Senior)
3. For each question, rank the level of
experience you think a candidate
would need to answer the question
4. Star the question if you think it’s a
“good” interview question
Your answers to the
questions
Meta Page: Answer Page:
13. You have a method call. By using
the debugger or a print statement
you determine that the method is
never called even though it seems
plain that it should be. What is a
very likely cause?
#6
24. How do you use
NSNotificationCenter?
#1 Answer
1. Add an observer that can handle notification
2. Post notification
3. Remove observer
25. What are some ways that you
can persist data in an app?
#2 Answer
• NSUserDefaults
• CoreData
• SQLite
• Archive to Disk
26. What are the differences between
an array and a linked list? What
do you think an NSArray is?
#3 Answer
- Arrays require contiguous
memory
- Arrays allow index-based
access
- Array insertion/deletion
requires moving other
elements around
- Linked Lists’ insertion/deletion has
minimal impact to rest of set
- Linked Lists can have
hetereogenerous encapsulated data
- Linked Lists have increased memory
management overhead (dangling
pointers, incomplete freeing of memory)
NSArray is probably a linked list with helper methods to
make it more array-like.
27. What’s a delegate? Give an example.
#4 Answer
"Delegation is a simple and powerful pattern in which one object in a
program acts on behalf of, or in coordination with, another object. The
delegating object keeps a reference to the other object—the delegate—
and at the appropriate time sends a message to it. The message
informs the delegate of an event that the delegating object is about to
handle or has just handled. The delegate may respond to the message
by updating the appearance or state of itself or other objects in the
application, and in some cases it can return a value that affects how an
impending event is handled. The main value of delegation is that it
allows you to easily customize the behavior of several objects in one
central object." -- Apple
< insert a zillion examples here>
source: apple.com
28. Why shouldn’t you reference
self in a block?
#5 Answer
source: apple.com
29. You have a method call. By using the
debugger or a print statement you
determine that the method is never
called even though it seems plain that it
should be. What is a very likely cause?
#6 Answer
The receiver is nil.
30. What is a hash?
#7 Answer
Possible answers include:
• Data structure that enables constant
lookup given a unique string
(dictionary/hashmap)
• One way encryption
• …More
31. When you create an object (in a
running app, not while you’re
writing code), where are the bytes
located in memory?
#8 Answer
On the heap.
32. Have you worked with
NSOperationQueue? How does it work?
#9 Answer
source: nshipster.com
33. What is an NSZombie?
#10 Answer
“NSZombies is a runtime process that you can turn on with an
environment variable, when it is on released objects are not
returned to the heap, instead they are replaced with a “zombie”
version of their class that causes a crash. Why is crashing this
way useful? The answer is that when it crashes, the object which
called it will be in the stack trace — therefore you can quickly see
where you are accessing a released object, without NSZombies
the crash would happen in the next class which uses the same
address, this could be quite distant from the spot where the bug
really is.”
source: Scott Yelich
34. Name some of the
UIApplicationDelegate
protocol methods and
how to use them.
#11 Answer
source: Dash for Mac
35. How would you add another
element (@“delta”)
to the foo array?
NSArray *foo = @[@“alpha”,
@“beta”,
@“gamma”];
#12
(of the many solutions…)
Answer
36. #13 Answer
Describe what happens behind
the scenes when you tap an app’s
icon, you see the app open, and
you press the home button.
37. When responding to an NSNotification, what
will happen if the notification handler executes
for a long time? What can you do about it?
#14 Answer
The thread blocks.
NSNotificationCenter is single threaded. You
can use GCD to move it off the main thread.
38. How can you add a method to a class
that you don’t have the code for?
#15 Answer
41. • 3 years of experience ≈ iOS 6
• Acknowledge career arc of mobile developers
• Most places have no idea how to qualify your abilities
• Solve “The Apple Problem”
Conclusions about Employers seeking
Devs Like Us, After Looking through
~20 Fresh Job Postings:
42. Personal
Reference
• 2-3 years experience is 2-3 iOS Releases
• Culture and coachability
Conclusions as a Developer, Interviewing
iOS Candidates for her Employer
Live App
Sample Code