Live data from Hacker News

Apple Developer Documentation Is Missing

v4.chriskrycho.com

81–90 of 400 posts

Re: Apple Developer Documentation Is Missing

#82
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" ?

Well a nil-coalescing operator is:

    a ?? b
Where this is shorthand for:

    a != nil ? a! : b
idk what cascaded means, but it sounds like a ternary operation from hell.

Re: Apple Developer Documentation Is Missing

#83
post #67

The Swift language has excellent documentation. For SwiftUI, the WWDC presentations are essential, IMO, for the high-level stuff. There is basic reference documentation, but there's no way to put it all together without a high-level understanding. It follows the patterns of some other frameworks so depending on your experience you may be able to get by without the WWDC presentations, but I'd still watch them or at le…

> For SwiftUI, the WWDC presentations are essential,

Are these videos, slides and transcripts? I do hope not because none of those things are documentation by any reasonable definition.

Re: Apple Developer Documentation Is Missing

#84
post #67

The Swift language has excellent documentation. For SwiftUI, the WWDC presentations are essential, IMO, for the high-level stuff. There is basic reference documentation, but there's no way to put it all together without a high-level understanding. It follows the patterns of some other frameworks so depending on your experience you may be able to get by without the WWDC presentations, but I'd still watch them or at le…

Noted the first two bits in the post. Did you read it? :)

As far as SPM goes: they've got it built into Xcode at this point, and are doing WWDC sessions about it. At what point does it become "official" enough to warrant "This needs to be better" criticism?

As far as "useless internet karma points": I couldn't care less. History has shown that when people make enough stink about this kind of thing, it sometimes—rarely, but sometimes—gets to the ears of people high enough in the management chain that it ends up shaking things loose at the mid-level spots where poor decisions around these things tend to get made.

I don't work at Apple. I can't go fix most of this stuff. In my day job, I spend a lot of time on these kinds of concerns. In this context, though, the only thing I can do is shout a bit and hope it shakes things up a bit.

Re: Apple Developer Documentation Is Missing

#85

Earlier quoted context omitted.

It's really funny to think about cyclical stuff and see how Blackberry used to treat their developers like shit (with stupid signing keys and stuff) and just look at Apple falling into the same trap.

And this reminds me of the documentation quality of Symbian around 2005-2007. I would highly recommend the author of the article the check it out, before lamenting Apple's documentation.

Symbian was plain horrible. I tried a project but gave up quickly.

Re: Apple Developer Documentation Is Missing

#86
This comment has nothing to do with apple, but about documentation in general.

I was trying to get into Kubernetes world via kubeflow, a machine learning platform that works on top of the Kubernetes. Well, I have run into a bunch of the missing examples, outdated articles, and things that just don't work (all of that in official documentation).

I decide to change this a bit and start working on a small tool [1] that can help check documentation (at least reduce deadlinks in the documentation, when someone moves git files or just original source of info dies). Since I start working on it, I meet only one project without issues, all others.. well, they all had issues.

Maybe one day I post it on HN as a standalone link, but now here we go [1]

[1] https://github.com/butuzov/deadlinks/tree/develop

Re: Apple Developer Documentation Is Missing

#87

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…

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

Re: Apple Developer Documentation Is Missing

#88
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" ?

Think the ternary operator, but worse.

In Swift, this is expressed by "??".

It means "If the previous test returns nil, then execute what is after the ??".

For example, if you have a concrete Int, but the source might be an optional, then you could do something like this:

    let a = b ?? 0
That means that if b is nil, then set a to 0. Otherwise, set it to whatever value b has.

You can chain these, like so:

    let b: Int? = 
    let c: Int? = 
    let a: Int = b ?? c ?? 0
So you have a couple of optional values coming in, but they could be nil, so you chain them.

You can have a lot more going on in the handlers than simple assignments, but this gives you an idea.

Re: Apple Developer Documentation Is Missing

#89

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…

If these are the 'best worst examples' you can come up with after ~3 years of iOS work, they are not really convincing. I just scanned the CoreLocation docs, and while it is true they do not explicitly state what sources are used for getting a certain accuracy, the documentation makes it very clear and unambiguous what you should use. You use kCLLocationAccuracyBest if you need to be absolutely sure you have the highest accuracy, otherwise you use one of the distance-based accuracy settings. How these get the location should be irrelevant to any application that doesn't need to force 'best available', and it's pretty clear from how the API is structured that iOS will combine whatever data is available to give you the accuracy you asked for (ie: if there is no cell tower or WIFI geolocation available, it will fall back to GPS even for the lower-accuracy setting). It took me only 5 minutes of reading the documentation to figure this out, I would say its an example of good documentation, not bad documentation.

As for 'how large is the maximum iPhone process address space', I don't really know how bad it is that you cannot easily find this documented. It doesn't really seem like something many apps need to know about, and highly specific to the iOS version and maybe even hardware it is running on. Not saying your app or whatever you are making doesn't need it, but I estimate this kind of information is irrelevant for close to 99% of apps. I don't think the iOS programming model is such that you can derive any kind of guarantees how much you can allocate from that number. What do you want to use it for?

Re: Apple Developer Documentation Is Missing

#90
post #11

Earlier quoted context omitted.

And the author acknowledges that those individuals are not the problem. > the problem is not individual engineers — who are not responsible for writing docs; that is the responsibility of dedicated coumentation teams. But that does not make it any less a failure of Apple’s engineering organization.

I get author's point, but this sentence reads weird. If a team ("dedicated [documentation team]") is responsible for something, surely the individuals in such team are responsible too? Or the author is making a distinction between "engineers" and team members of documentation teams?

Fair note. I've just pushed an update clarifing that sentence!
Post reply on HN