Live data from Hacker News

Apple Developer Documentation Is Missing

v4.chriskrycho.com

91–100 of 400 posts

Re: Apple Developer Documentation Is Missing

#91
post #74

Some time ago, I was contacted by Apple to apply for a job. My code is insanely well-documented. I like to think that a lot of the inspiration for my code docs comes from Apple's open codebases. Their code is exceptionally well-documented. In any case, as is usual with all employers, these days, they completely ignored the focused, relevant links that I sent them to elements of my extensive portfolio of repos, and, i…

What is a "cascaded nil-coalescing operator" ?

I'm not sure how it looks in ObjC but in Typescript you could write something like:

  let studentScoreFormatted: string = student.formattedScore ?? 'Student has not taken this test yet.';
Whereas if the score is null it will return the value after `??`.

It is awfully helpful for ensuring you handle error states in displaying API values. Additionally if you want this behavior but when the value is falsey, then you can use `||` instead.

Re: Apple Developer Documentation Is Missing

#92
post #74

Some time ago, I was contacted by Apple to apply for a job. My code is insanely well-documented. I like to think that a lot of the inspiration for my code docs comes from Apple's open codebases. Their code is exceptionally well-documented. In any case, as is usual with all employers, these days, they completely ignored the focused, relevant links that I sent them to elements of my extensive portfolio of repos, and, i…

What is a "cascaded nil-coalescing operator" ?

A bunch of double question marks with some optionals in between would be my guess.

    optional1 ?? optional2 ?? optional3 ?? ifeverythingelsefailsvalue

Re: Apple Developer Documentation Is Missing

#93
post #74

Some time ago, I was contacted by Apple to apply for a job. My code is insanely well-documented. I like to think that a lot of the inspiration for my code docs comes from Apple's open codebases. Their code is exceptionally well-documented. In any case, as is usual with all employers, these days, they completely ignored the focused, relevant links that I sent them to elements of my extensive portfolio of repos, and, i…

What is a "cascaded nil-coalescing operator" ?

It's Swift's equivalent of Rust's `unwrap_or`, or the trick in python where you write `None or "Hi!" == "Hi!"`.

Re: Apple Developer Documentation Is Missing

#94

Developer goodwill is not really that essential to a lifestyle accessories brand.

Right because 50% of the US mobile market only buys a phone because it’s an “accessory”.

People would still buy iPhones even if Apple decided to purge 99% of apps from their store.

Re: Apple Developer Documentation Is Missing

#95
post #74

Earlier quoted context omitted.

What is a "cascaded nil-coalescing operator" ?

Something like a.?b.?c which is syntactic sugar for: a && a.b && a.b.c (with a short-circuiting &&.)

This is just optionals chaining, not nil coalescing.

Re: Apple Developer Documentation Is Missing

#96
post #74

Some time ago, I was contacted by Apple to apply for a job. My code is insanely well-documented. I like to think that a lot of the inspiration for my code docs comes from Apple's open codebases. Their code is exceptionally well-documented. In any case, as is usual with all employers, these days, they completely ignored the focused, relevant links that I sent them to elements of my extensive portfolio of repos, and, i…

What is a "cascaded nil-coalescing operator" ?

Someone that works in a Matryoshka doll factory?

Just a guess. I'm not a CS major either.

Re: Apple Developer Documentation Is Missing

#97

I am sure all the documentation this guy has ever written has been 100% perfect. /s Calling out other people's work as 'garbage' is pretty shameful. In my experience Apple's documentation is some of the best around. They have sample projects showing you how APIs work, good integration into their IDE, and lots of talks on video about their APIs given by the very engineers that built the thing. Not even to mention thei…

I agree wholeheartedly that it’s garbage. I don’t want to watch videos, I want comprehensive, detailed API documentation. Here’s one obvious example that comes to mind: how do I turn on the GPS on iOS? This is documented nowhere. The answer is that location requested with an accuracy above 100 meters will use cell towers, below 100 will use WiFi geolocation, and below some other threshold (10 meters? I forget) will u…

> They just tell you “use what you need”.

Huh? How is that not exactly the right answer? You tell the API how accurate you need it to be, iOS will get you that accuracy with the minimum energy consumption necessary.

It makes sense to not document the thresholds because they probably aren’t constants. (Or even if they are, they might not be in iOS 14.) It’s entirely possible that the accuracy of non-GPS methods may improve over time.

And they would certainly vary greatly depending on the environment. Who knows, if you’re in a concrete jungle with very dense wifi coverage, it could even be more accurate than GPS.

Conversely if you’re in a tiny rural town with one cell tower and no wifi, it might have to turn on GPS even if you only need 50 meter accuracy.

Re: Apple Developer Documentation Is Missing

#98
post #87

Earlier quoted context omitted.

I agree wholeheartedly that it’s garbage. I don’t want to watch videos, I want comprehensive, detailed API documentation. Here’s one obvious example that comes to mind: how do I turn on the GPS on iOS? This is documented nowhere. The answer is that location requested with an accuracy above 100 meters will use cell towers, below 100 will use WiFi geolocation, and below some other threshold (10 meters? I forget) will u…

I'll bite: What is the maximum size of a process’s address space on an iPhone?

It depends on the device. I think low double digit GB for the current big ones (maybe 10-15 GB). Don’t remember the details though.

Re: Apple Developer Documentation Is Missing

#99
post #74

Some time ago, I was contacted by Apple to apply for a job. My code is insanely well-documented. I like to think that a lot of the inspiration for my code docs comes from Apple's open codebases. Their code is exceptionally well-documented. In any case, as is usual with all employers, these days, they completely ignored the focused, relevant links that I sent them to elements of my extensive portfolio of repos, and, i…

What is a "cascaded nil-coalescing operator" ?

a = b ?: c;

if b is not nil, then a = b else a = c

Re: Apple Developer Documentation Is Missing

#100
post #81

Earlier quoted context omitted.

Right because 50% of the US mobile market only buys a phone because it’s an “accessory”.

Not sure if it is a sarcasm or not.

Of course it’s sarcasm. It’s just like people who sat that the iPhone is a “status symbol”. How can something be a status symbol when 50% of smart phone users have it in the US and that anyone on any of the four major carriers can buy one an interest free 24 month loan.

Geeks can’t stand to face the fact that people who can afford to have a choice, overwhelmingly shy away from Android.

Post reply on HN