Live data from Hacker News

Apple Developer Documentation Is Missing

v4.chriskrycho.com

141–150 of 400 posts

Re: Apple Developer Documentation Is Missing

#141

Earlier quoted context omitted.

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? =…

In Objective-C (and some other languages with ternary operators) the same can be written like this: int a = b ?: c ?: 0

That one's straight up called the Elvis Operator.

I hate it when things like this get names that everyone's supposed to know and it's considered a mark against you if you've never heard it before, but I do think the name Elvis Operator is hilarious. :D

Re: Apple Developer Documentation Is Missing

#142
post #104

Earlier quoted context omitted.

To be honest, while documentation is extremely important in the real world, interviews are time-constrained, and it makes no sense to write documentation when you have 45 minutes to implement something like that.

Ignoring dozens of repos (non-forked), and thousands of lines of testable, shipping code, is probably not helpful. I was a manager for a long time. I loved long résumés and relevant material. I was hiring expensive people to work on really important stuff, and there was no way that I wanted to rush the vetting. Also, I never gave a single test, and I think I got it right, every time.

> Also, I never gave a single test, and I think I got it right, every time.

There's bound to be some confirmation bias there

Re: Apple Developer Documentation Is Missing

#143
post #117

Nowhere in the comments thus far has anyone pointed out that SwiftUI — the framework in TFA's crosshairs — is in beta. I've written a relatively large amount of SwiftUI code and I get the impression that the design is still in flux. There are corner cases (as well as much more mainstream one) that haven't been fully thought through. Beta 5 of Xcode 11 brought non-trivial changes to the API and I expect those to conti…

Edit: this first paragraph is wrong, see child comment. Leaving for posterity. The second paragraph I stand by.

SwiftUI is not in beta. It may be beta-quality, but they shipped it and encouraged devs to use it. Yes, it has undergone significant breaking changes since WWDC (and that's to be expected), but it's not described as beta anywhere in their docs about it. (See https://developer.apple.com/xcode/swiftui/ and https://developer.apple.com/documentation/swiftui/ for what the docs actually say!) My point is that if they want to say "This is ready for you to adopt" they need to back that up by documenting it. Even at an early stage.

Facebook manages this for React, even for stuff that is in "experimental" mode! It's possible! It just has to be prioritized. (I'm no FB partisan and don't use React; the point is independent of those.)

Re: Apple Developer Documentation Is Missing

#144

When I first learned iOS ten years ago I thought the documentation was outstanding. It had good API level documentation as well as a large number of guides that showed the right way to use the API to implement particular features. I recently returned to the platform and my experience is very much like the parents. The documentation appears to be almost completely missing. The built-in documentation does not appear to…

I have discovered that the previous documentation is still available in a “documentation archive” complete with banner warnings about how it is out of date and unsupported. It is almost impossible to find topics except by using google search. Newer functionality is missing and some of it is no longer accurate, but it is better than nothing.

Re: Apple Developer Documentation Is Missing

#145

The comments in header files are often the only (or only useful) documentation. So don’t give up before looking there. Sometimes they wait a few years to write docs. For example, NSWindowAccessoryViewController went undocumented for three or four years. Which was fine because it was too buggy for me to use anyway. The docs are enough to get you started but it’s only brutal experience that teaches you how to use thing…

Yeah, I developed software for a platform that isn't documented anywhere at all on the internet, and the documentation it comes with is sketchy. Discovering a new widget and spending time messing around with it was the norm.

Re: Apple Developer Documentation Is Missing

#146

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…

It sounds like you might not be quite getting the concept behind this sort of interview. Although some code is written, this is (usually) a test of how you talk about code. You want to show that, if a co-worker asks for your advice on how to solve a tricky problem, you will be able to help them figure it out. Part of this is understanding what they're asking for and adapting. If someone wants to know how to document…

Yep, this is exactly what happened. The OP didn't stop to consider the purpose of the exercise or what the interviewer was trying to get out of it.

The details of the exercise aren't the point...and I'm sure the reason the interviewer likely gave off mixed signals about the extensive documentation is because time is limited and a good interviewer makes sure to keep the candidate on track so that there's enough time.

Re: Apple Developer Documentation Is Missing

#147
post #117

Nowhere in the comments thus far has anyone pointed out that SwiftUI — the framework in TFA's crosshairs — is in beta. I've written a relatively large amount of SwiftUI code and I get the impression that the design is still in flux. There are corner cases (as well as much more mainstream one) that haven't been fully thought through. Beta 5 of Xcode 11 brought non-trivial changes to the API and I expect those to conti…

As I noted in another comment, the documentation for SwiftUI is actually pretty good, especially if you take into account how quickly the framework has changed. It includes some rich, progressive tutorials. [0] The author states that they are planning to write an app from scratch with SwiftUI. I think most iOS developers would hesitate to build an entire app on a beta framework. [0] - https://developer.apple.com/tuto…

They would also hesitate to build an app that only works in iOS 13+ when iOS 13 is the current iOS

Re: Apple Developer Documentation Is Missing

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

Python equivalent:

  return a or b

Re: Apple Developer Documentation Is Missing

#149
post #53

Still? It has been a while since I have done any Apple platform specific native development, but I remember about 5 or 6 years ago writing an iOS and OS X app for communicating with an audio modelling device, and the documentation for CoreMIDI was woefully lacking. I couldn't believe that a part of the Apple operating systems that had been ingrained for years had so little documentation and examples at that time. I e…

>I haven't checked, but are things like the MIDI framework still badly documented in the Swift docs? Documentation for the entire audio stack has actually gotten quite a bit worse. Many references have been removed without new replacements being provided. In many cases, there are broken links in what little documentation remains. (For example, TN2274, which describes the USB audio stack is still around, but several o…

I wonder if the people who worked on it don't work there anymore.

Re: Apple Developer Documentation Is Missing

#150
post #117

Nowhere in the comments thus far has anyone pointed out that SwiftUI — the framework in TFA's crosshairs — is in beta. I've written a relatively large amount of SwiftUI code and I get the impression that the design is still in flux. There are corner cases (as well as much more mainstream one) that haven't been fully thought through. Beta 5 of Xcode 11 brought non-trivial changes to the API and I expect those to conti…

As I noted in another comment, the documentation for SwiftUI is actually pretty good, especially if you take into account how quickly the framework has changed. It includes some rich, progressive tutorials. [0] The author states that they are planning to write an app from scratch with SwiftUI. I think most iOS developers would hesitate to build an entire app on a beta framework. [0] - https://developer.apple.com/tuto…

These tutorials are great (when they're working! That's been a bit spotty)—genuinely great. But they don't make up for everything that isn't present. Take a step off that beaten path and you're in for a world of pain today.
Post reply on HN