|
status posted:I wouldn't really expect a whole lot of autorelease knowledge these days...maybe the specifics of ARC instead? If someone applies for a senior iOS dev position and doesn't know autorelease, for me, that's an instant no-hire. At least down to the @autoreleasepool directive or NSAutoreleasePool class, and some details there. Better if they can go down to the NSRunLoop level. If nothing else, how low they can go is a hint for how deep you can go with your other questions. Those questions are pretty decent for a quick evaluation of iOS knowledge to the point you can start jumping into the details of whatever they've done before, or if your style is to interview them on algorithms, to do that.
|
# ? May 11, 2015 02:05 |
|
|
# ? Jun 6, 2024 09:09 |
|
So are you talking about how it works as in "what do autorelease pools do/what are the benefits of @autoreleasepool vs NSAutoreleasePool instances/etc" type of answers, or how it works as in "how is autorelease implemented"?
|
# ? May 11, 2015 02:12 |
|
Don't forget the cool ARC autorelease callstack-walking optimization poo poo if you're collecting trivia.
|
# ? May 11, 2015 02:24 |
|
status posted:So are you talking about how it works as in "what do autorelease pools do/what are the benefits of @autoreleasepool vs NSAutoreleasePool instances/etc" type of answers, or how it works as in "how is autorelease implemented"? pokeyman posted:Don't forget the cool ARC autorelease callstack-walking optimization poo poo if you're collecting trivia. All of the above, but if someone is ARC-trained I'd expect them to still know the basic workings of autorelease. Another good weeder question is to ask how long a frame is (~16ms, 1/60 of a second), and pick their brains on how to hit that target (do stuff in the background wherever possible). Also, what things they might punt to a background thread, and what they might not.
|
# ? May 11, 2015 03:23 |
|
All that I bother asking about with autorelease is for an example of when it's still relevant with ARC (simplest answer is probably when you're allocating temporary objects in a loop). As long as they have a vague understanding of autorelease pools the details are basically just trivia. Especially the return value optimization.
|
# ? May 11, 2015 05:57 |
|
On the flip-side of this topic, if I want to get an iOS dev job, what sort of intricate details should I know, versus what's good to leave as look up as-needed? I've done a few small projects now, but as I've taught myself and the projects were fairly superficial I haven't had to go very deep.
|
# ? May 11, 2015 13:54 |
|
One question we do is a series about NSInteger, int, NSNumber etc what they, are differences usages etc. It filters too many people to stop asking.
|
# ? May 11, 2015 15:07 |
|
I had an ex-intern who told me was asked in an interview what happens if you call a selector on `nil`, and he answered along the lines of "it'll throw an exception" I know that he knew better and probably just tensed up, but I had to tell him "yeah I wouldn't have hired you either". Edit: And to elaborate, nil handling is something I think I've had come up in every iOS-related phone-screen I've had (though not as often in the interview proper). There's always at least a quick question along the lines of "what if <function that adds an element to a collection> is passed nil" or "what would you expect if someone passed in nil and you called x with it" (the answer usually being "crash" or "nothing but maybe unexpected state", if you forgot to nil-check). ultramiraculous fucked around with this message at 05:44 on May 12, 2015 |
# ? May 12, 2015 05:36 |
|
ultramiraculous posted:I had an ex-intern who told me was asked in an interview what happens if you call a selector on `nil`, and he answered along the lines of "it'll throw an exception" Oh, on that note, another trivia question: what's the difference between 0, nil, Nil, NULL, nullptr, and NSNull?
|
# ? May 12, 2015 05:50 |
|
Doctor w-rw-rw- posted:Oh, on that note, another trivia question: what's the difference between 0, nil, Nil, NULL, nullptr, and NSNull? Now that I would definitely classify as trivia. When interviewing candidates I sometimes ask trivia-ish questions but just to see what they know - I'd never make the actual yes/no recommendation only based on that. Interviewing is weird. We just had a guy with a really "meh" interview submit excellent homework code, tests, good patterns, and did all the extra credit items. I've been pushing for more of that because it lets people do what they're actually good at in a low pressure environment.
|
# ? May 12, 2015 16:30 |
|
Ender.uNF posted:Now that I would definitely classify as trivia. When interviewing candidates I sometimes ask trivia-ish questions but just to see what they know - I'd never make the actual yes/no recommendation only based on that. Yeah, definitely trivia beyond NULL/nil/NSNull - but I think that makes it a decent question for calibrating someone's depth of experience with ObjC/C++, since it gives room for them to elaborate. Code samples are way more important in general, though.
|
# ? May 12, 2015 16:55 |
|
Trivia is not a good use of scarce interview time. You can learn a lot more about a candidate in those 2 minutes with better questions. But the essential thing is: what do you want to learn about the candidate, and what questions will lead to the right conversation to reveal those things?
|
# ? May 12, 2015 16:57 |
|
Subjunctive posted:Trivia is not a good use of scarce interview time. You can learn a lot more about a candidate in those 2 minutes with better questions. To be fair, it's not a huge timesuck from other parts of an interview, and it lets me transition into more complex questions more easily. Also, I've been interviewed with terrible and worse interview questions often. Care to throw us a bone and elaborate? I'd prefer to ask better questions.
|
# ? May 12, 2015 17:07 |
|
I don't know poo poo about interviewing but if I were trying to gauge a candidate meaningfully I would present them with a problem that they can't know in advance or rattle off of the back of a flash card.
|
# ? May 15, 2015 03:03 |
|
Thanks for that insight!
|
# ? May 15, 2015 05:24 |
|
fleshweasel posted:I don't know poo poo about interviewing but if I were trying to gauge a candidate meaningfully I would present them with a problem that they can't know in advance or rattle off of the back of a flash card.
|
# ? May 15, 2015 05:30 |
|
My way of interviewing people is The One True Way.
|
# ? May 15, 2015 15:21 |
|
Does anyone development on an iPhone that you don't have a wireless contract / data plan? I think I'm going to run out and get an iPhone 6 Big and just get an unlocked one. Do I need a SIM card?
|
# ? May 17, 2015 18:18 |
|
I recently booted a new one* up without a card, and setup definitely demanded I put a sim in at some point. Edit: *unlocked, straight from apple King of Gulps fucked around with this message at 18:44 on May 17, 2015 |
# ? May 17, 2015 18:41 |
|
King of Gulps posted:I recently booted a new one* up without a card, and setup definitely demanded I put a sim in at some point. Cool thanks.
|
# ? May 17, 2015 19:22 |
|
lord funk posted:Cool thanks. I'm not sure it needs to be a valid SIM. I've definitely got the "failed to activate cellular network" message before but still managed to get into the phone. You should be able to use a prepaid SIM from a carrier that supports iPhones just to get it going.
|
# ? May 17, 2015 20:25 |
|
Yeah I'm back from the fruit stand + olde computer shoppe and the $4.99 no carrier SIM card worked fine. The 6+ is big.
|
# ? May 17, 2015 20:31 |
|
Doctor w-rw-rw- posted:Oh, on that note, another trivia question: what's the difference between 0, nil, Nil, NULL, nullptr, and NSNull? What an annoying question, the full answer is so long and boring. I dunno though, maybe it's a good way to filter people who know C, too, and not just Objective C
|
# ? May 19, 2015 09:44 |
|
hackbunny posted:What an annoying question, the full answer is so long and boring. I dunno though, maybe it's a good way to filter people who know C, too, and not just Objective C (0, NULL) for C, (nil, Nil, NSNull) for Objective-C, nullptr for C++.
|
# ? May 19, 2015 18:56 |
|
The existence of NSNull makes me angry. I still have nightmares about checking for NSNull in KVO operations. What elegant code that was!
|
# ? May 19, 2015 20:15 |
|
There was a period of time early on where I was rolling with a category on NSNull that caused it to act like nil when sent a message. I mean why fix your problems when you can just ignore them?
|
# ? May 20, 2015 00:58 |
|
The way objective C collections use nil to have a special meaning and the lack of generic types in the language make me sad.
|
# ? May 20, 2015 03:22 |
|
The pre-eminence of Swift as the only language to write new code in cannot come soon enough, in my opinion. ...I admit my ignorance on all the different null types. I've not encountered anything but nil of that list in what I've worked on. Does someone experienced care to explain the difference for those of us who don't know, or at least point out some good reading material on the subject?
|
# ? May 20, 2015 04:30 |
|
http://nshipster.com/nil/ covers the obj-c side of that question.
|
# ? May 20, 2015 05:00 |
|
ultramiraculous posted:There was a period of time early on where I was rolling with a category on NSNull that caused it to act like nil when sent a message. I mean why fix your problems when you can just ignore them?
|
# ? May 20, 2015 05:20 |
|
So NSNull freaks out like a null in most programming languages when you send it a message?
|
# ? May 20, 2015 05:33 |
|
ManicJason posted:I'd be tempted to do the same if I run into a similar KVO mess in the future. Is there a reason for having NSNulls be bombs in a language where nil objects are dandy? I'm sure the reason is there but just beyond me. For holes in NSArrays before NSPointerArray existed? Same NSMapTable. The initializer lists were nil-terminated. It wasn't that long ago that we didn't have array or dict or number literals. Also for JSON values where the key is present but the value is null, and the parser isn't set to ignore the key.
|
# ? May 20, 2015 05:34 |
|
fleshweasel posted:So NSNull freaks out like a null in most programming languages when you send it a message? It's just a singleton object that doesn't do anything which is used as a sentinel value. It behaves like any other object when you send it a message it doesn't respond to.
|
# ? May 20, 2015 05:45 |
|
Axiem posted:The pre-eminence of Swift as the only language to write new code in cannot come soon enough, in my opinion. I enjoy not working in Objective-C anymore but I can safely say Swift and the tools supporting it just aren't there yet. Soon though. Soon (I hope )
|
# ? May 20, 2015 16:00 |
|
The worst part of Swift for me is Xcode's lovely auto-indentation. Like if I wrap a func declaration to the next line (which almost always happens because hey, ObjC-derived names are long as gently caress), then I indent that wrapped line in 4 more spaces, then it wants to put the first line of the body 2 more spaces in from THAT, instead of 2 spaces from the start of the first func line. Come onnnn Would give anything for clang-format to support Swift. I love having format-on-save enabled and I never think about formatting in ObjC again.
|
# ? May 20, 2015 17:00 |
|
Flobbster posted:The worst part of Swift for me is Xcode
|
# ? May 20, 2015 17:00 |
|
I understand why NSNull exists. I do not understand why it throws exceptions for unknown selector.
|
# ? May 21, 2015 00:04 |
|
ManicJason posted:I do not understand why it throws exceptions for unknown selector.
|
# ? May 21, 2015 00:16 |
|
ManicJason posted:I understand why NSNull exists. I do not understand why it throws exceptions for unknown selector. I'd sum it up as: If you want nil semantics then use nil. If your collection doesn't support nil then don't violate its assumptions. It's otherwise just a sentinel object, not some special class of object that isn't like other objects. Not being different means it's simpler to reason about. Which is basically what status said.
|
# ? May 21, 2015 04:29 |
|
|
# ? Jun 6, 2024 09:09 |
|
status posted:because that's what NSObjects do when you send them an unknown selector It makes sense for normal objects. It does not make sense for me in the one case of NSNull in a language where nil objects happily accept anything. It can easily be made to behave that same way, but it was not for some reason that's above my pay grade. I'm sure there are cases where that behavior makes sense, but the only times I've encountered NSNull have been in cases where I'd be much happier if it worked like a nil object, e.g. the KVO change dictionary. I imagine I'm totally wrong for a million reasons since I have barely ever seen NSNull outside of KVO and JSON. I'm not trying to start some religious argument; I'm genuinely curious where it makes sense and why it was done that way. If I'm just an idiot for thinking the current way is stupid, so be it.
|
# ? May 21, 2015 06:03 |