A concrete example of what goes wrong with Apple's docs
amimetic.co.uk
amimetic.co.uk
Add to that the annoying use of videos: I hate finding out that something I’m interested in is buried in a WWDC video instead of written up. I don’t have time or the desire to watch videos as reference material: please stop.
The latest SwiftUI is just the best with modern "reactive" approaches working really well. Good community and documented patterns of how things should be developed, packaged and deployed.
The closest alternative is Electron.
The native Windows development is just terrible with tens different ways and frameworks which were abandoned by Microsoft at one time or another.
The problems begin when you are doing less trivial or obvious things on iOS/Mac, like interacting with Bluetooth, or displaying large amounts of data in a list, or forms that scroll like your designer wants them to, or background processing, or…
Layers of false layers of false layers of false laysers ... until you get to, pointer.
HorribleRunOnNameLandOfNoEnd::ThatGoesForeverOffThePageOnEverySingleFunctionCall::WithMassiveChainsThatCompletelyOverwhelmTheirOwnIDE::AndMakeYouTrailYourVisionAcrossMassiveGulfsOfTimeAndSpace::ToFind( int* ptr )
You grab some command line example off the web that seems kind of simple and get:
ExternalDependencies[7777]:
1: _msvc_bit_utils.hpp
1000: DirectXMath.h (?? it's not a graphics app)
2000: joystickapi.h (?? same. totally confused)
3000: processtopologyapi.h (?? we're doing topology calcs?)
4000: windows.devices.smartcards.0.h (?? not a smartcard app)
5000: xpolymorphic_allocator.h
And in using the IDE for a week or so, I've already found so many bugs I don't know what to do. Functions are perpetually listed broken because of an array upfield slightly wrong. It seems compelled to format my code the absolutely worst way available at any given time. It would be better to simply turn off formatting. And ... their example broke. Inside of a bag maze I had no interest in navigating.
As an observer... I'd recommend you find the oldest book on making Windows apps that still works on modern Windows and use that. If Microsoft hasn't killed it by now, it's probably going to keep working for the next two decades.
Or even worse, in a wwdc video that apple has tried to scrub off the face of the internet (anything older than 2017). I still don't understand why they would do this.
The irony is that Apple's documentation used to be excellent, and if you look in the "Documentation Archive", it still contains a lot useful information, especially for Mac and Objective-C development. https://developer.apple.com/library/archive/navigation/
I taught myself Mac development way back in the day using those very docs, which are now sadly "retired".
In my view, there are several reasons for the severe decline of Apple's docs. First, the yearly OS release schedule, which began in 2012 on the Mac, didn't leave enough time to write documentation. (And it doesn't leave enough time to fix bugs!) Second, the arrival of Swift in 2014 forced Apple to rewrite all of the documentation with dual tracks for Swift and Objective-C. Third, Tim Cook and Craig Federighi just don't give a crap about quality.
> Badly designed, legacy OOP APIs
That sounds like a n00b opinion.
Check the updated docs for "The Standard File Package" which is the UI for selecting files. Page 3-4 (all page numbers has section number). It has full description of the UI, keyboard shortcuts, data structures and example code. It even includes how to customize the dialog.
There is 69 pages of documentation of just how to select a file!
https://vintageapple.org/inside_r/pdf/Files_1992.pdf
Apple no longer understands that good docs is a competitive advantage. The web has such good docs at developer.mozilla.org that it is a world apart.
Apple's competitive advantage is the rock-solid, durable hardware (compared to what's considered "acceptable" in the Windows world) and the lock-in effect of things like the App Store and its customer base, iMessage and Find My.
Apple doesn't need to attract developers any more, and so the documentation gets little love.
Maybe not, but I have found that better documentation helps me write better, more reliable software with less time wasted on trial and error and fruitless internet searches.
Presumably SwiftUI should also be easier to write code for than the classic Mac toolbox?
Out of curiosity, when was that?
https://developer.apple.com/library/archive/documentation/Fi...
(Third link when searching DDG for "NSSavePanel example".)
I'd think this problem could be partly solved with money, i.e. hiring more writers.
Even if the docs had to lag the OS release by a few months, I still suspect the fundamental reason is:
> Third, Tim Cook and Craig Federighi just don't give a crap about quality.
That's classic Mythical Man-Month thinking.
Besides, how large do you think the talent pool is of good documentation writers? I would estimate that it's actually harder to find good technical doc writers than it is to find good programmers.
1) The minimum qualifications for a good API doc writer is practical experience programming with the technology to be documented. That already narrows the field significantly. You can't just a hire a comp sci grad straight out of college.
2) Indeed, a comp sci grad straight out college probably wouldn't want the job anyway. A lot of people aspire to be programmers, because it seems cool, fun, and has excellent compensation. Not many people aspire to become doc writers as a career.
3) The compensation for doc writers is generally lower than for programmers, so if you're already an experienced programmer per 1, then why would you take a step down?
4) The natural retort is going to be, "Just pay doc writers more!" But that's not going to work for several reasons. First, the programmers will be unhappy if the doc writers are paid more than them. Second, companies don't value doc writers as much. Third, once you get off the programmer career track and write docs, it can be difficult or impossible to get back on the programmer career track if you ever want or need to leave Apple. In general, the market is not huge or lucrative.
What you tend to get for documentation writers, then, is often older programmers who are starting to experience age discrimination, finding it harder to get a programming job, so they settle for writing API documentation. But that's not a huge pool of available workers.
And as far as the "career track" aspect goes, have them keep coding part of the time and keep calling them a programmer.
It sounds like you have a reading comprehension problem?
> And as far as the "career track" aspect goes, have them keep coding part of the time and keep calling them a programmer.
1) You're missing the part where the majority of programmers don't want to be doc writers, aren't qualified to be doc writers, and aren't good at being doc writers.
2) It's not as simple as having them "keep coding part of the time", because the standards for hiring a coder are different from the standards of hiring a doc writer. Apple wouldn't necessarily hire the same person to do both. It could be a rare situation where Apple would consider the same person to be good enough for both jobs. This is like saying of an American football team, "Why not just have the quarterback play defense part of the time?"
Remember, the point of this is to produce high quality docs. Quality over quantity. Apple is already churning out low quality docs.
> Apple is already churning out low quality docs.
The article listed some stats where Apple is not churning out enough docs. So there isn't even quantity
I can see that you have no respect for the difficulty of writing good documentation.
Well that's extremely rude.
You listed objections people might have and I'm calling those objections shallow and bad.
> This is like saying of an American football team, "Why not just have the quarterback play defense part of the time?"
This is a situation where you need experience on the defense to be a good quarterback, and physical shape is irrelevant, and the quarterback is worried about permanent salary loss because other teams don't value quarterbacks. In that case it would make sense to have a single job title and have them do a mix so they stay fresh on their defense experience.
Even if the doc writer isn't the optimal programmer, consider the gap as a training expense and a way to make sure you have enough doc writers applying. If it's a bad idea then there is always the option of paying them even more to compensate for career damage.
And nowhere did I suggest making the normal programmers do the doc writing.
And the talent pool at the level of a single company is practically infinite unless you indeed introduce artificial constraints like not wanting to pay to tap into that wide pool
Hence the "Besides..."
> And the talent pool at the level of a single company is practically infinite unless you indeed introduce artificial constraints like not wanting to pay to tap into that wide pool
I just explained how that's untrue, and it feels like you completely ignored what I said.
You can't just say that Apple is "a single company" like any other company. Apple is the largest platform vendor in the world. How many other single companies have platforms like iOS, macOS, watchOS, tvOS, and now VisionOS? How many other single companies have effectively two bespoke programming languages, Swift and Objective-C, much less one? Perhaps only Google and Microsoft are comparable in their massive need for platform docs.
The world is HUUUUGE (even limiting by language), so not only can I say "a single company", I can raise it to the level of "a single tiny company", especially when it comes to such a small scale issue
> How many other single companies have platforms ... bespoke programming languages
How does it matter? There are gazillions of educated people in the world with all the skills for a couple of order of magnitudes more languages than just 2! And it's especially preposterous making this arguments after waves of layoffs in the tech sector
And you can't reject a simple solution "just pay more" with "companies don't value doc writers": that explains why they don't hire enough people/don't care about the quality of their output, not that there are some inherent talent pool limitations
I already explained how it matters: "The minimum qualifications for a good API doc writer is practical experience programming with the technology to be documented. That already narrows the field significantly."
You seem to think that it's just a trivial skill: https://news.ycombinator.com/item?id=38914104 But when you look at the Apple documentation archive, and the extensive, excellent conceptual articles, it's clear that this accomplishment required a lot of care, experience, and skill.
Besides, that's another misapplied requirement of yours: experience can be gained, it will take longer, but it's just another "takes more resources" issue, not something that narrows the field since for some reason you added that requirement before hiring, not before writing docs.
I don't think it's a trivial (that's your straw man), I just disagree that it requires rare man of mythical set of skills to accomplish to make it justifiably hard for poor Apple
I see why you said that, but I don't think that's the case here.
The tech writers don't necessarily need to collaborate with the developers as the software is being developed.
E.g., the tech writers might be able to look at new APIs, the source for for their implementations, and any in-house code that uses / tests those APIs. And then write documentation based on what they find.
If they're able to talk to the developers during or after the API is released, all the better.
Disclaimer: I'm not a tech writer. I'm just speculating on how this could be made to work.
That applies to trying to get a specific project done faster, when it's already pretty far along in the development cycle.
The problem of an area not getting enough attention for years is a great opportunity for more workers.
Apple’s documentation offers neither examples nor answers to common questions (features of stellar documentation), however it works well with a first principles, read-it-twice mentality. The key info is there, just not emphasized.
For those who read the documentation twice and feel comfortable organizing the architecture without guidance, the documentation is highly workable.
I wonder if folks more grounded in web development favor a quicker, architecture-agnostic, copy/paste, just-work-out-the-box style of documentation. (When I’m working on the web, I do!) But Apple’s platforms are native, their frameworks build upon native infrastructure, and so they require consideration of the fundamentals and underlying systems, features that preclude just-give-me-the-snippet development.
(That’s my take, with my own biases. I don’t mean to contradict or put down any other perspectives. I am certain that in many ways, including many of which I am unaware, I am naive.)
I often code offline with only the Apple docs as reference, not a problem.
"Core Audio 124 / 618 (20.1%"
At least SwiftUI gives you a very nice paved road of productivity. Again if you need something off the beaten path good luck, but it’s never been easier to make app-shaped tools for Apple platforms.
I put the query in the top of the page into chatGPT with the same requirements (Mac OS, in swift) and I got back detailed explanations, sample code, and basically all the writer was looking for.
Not great that OpenAI is serving as better docs than apple’s own, but at least there is an alternative.
Foundational knowledge. Before you delve into x11, you learn how graphics works at the lower level first, and then you build upon this. Before the actual implementation, there was a design. Once you figure it out, you can guess how the implementation is done. You confirm your guess from the docs and code if it’s available.
It's honestly baffling that we have no mechanism by which to increase accountability within technical domains from these large corporations.
And if you reach out to Apple, you're more than likely to get either radio silence or a canned PR response that doesn't answer anything.
It makes me wish that we had powerful technical figures willing to hold other tech figures accountable in public. Why isn't there anyone capable of setting up an interview with the Apple CTO and questioning them directly on the importance of developer tooling and relations?
Like a deaf grandpa still being able to do great stuff but not remembering to keep the shop in order or to take notes so you have to ask loudly.
There's a few that participate in the apple developer forums (quinn is the most notable one). There's also DTS tickets which you can file
One guess: maybe it's related to their culture of internal secrecy? If a team works on a project for years without anyone outside of that team having any visibility of it, writing comprehensive documentation is presumably a lot less valuable - at least while it's under development.
My hypothesis is that in the old days, technical writers on teams would lead the docs effort, but today’s culture may have many teams with only developers, and those developers are primarily interested in shipping code, not docs.
And writing good documentation involves a fair bit of QA and remediation effort as well - you don't want your consumers to yell at clouds "why is the stuff in the official documentation not working", so the writers should actually go and test stuff themselves to see if the docs are actually still valid.
This is what permanently burned my relations with Openstack - half the stuff in the docs was broken when I tried it, either from old age or never being tested out of Redhat.
Nowadays, folks have to develop for iOS whether they like it or not, and macOS is on the backburner.
So often as a developer I end up just creating a single-line static wrapper function that does something that interfaces with Apple code, then call that instead. Things like a share sheet are incredibly complicated for seemingly little if any actual need. Example: I have a static wrapper function for sharing that accepts the following parameters:
- The View Controller to present the share sheet from
- The originating view/button that it should be presented from (on iPad)
- The URL of the file
- A subject and message, either one, both or neither, appropriate to the share
And that's it. Five pieces of information. Inside that function I:
- Load the data from the file into a Data object, and confirm the URL is good
- Save a second copy of the file to the file system with the appropriate name I'd like it to show the user
- Convert the "Any" object passed into the button (view, button, bar button item, etc.) as a set of coordinates from which to spawn the popover, because Apple's code does not do this reliably
- Instantiate a Share Sheet Subject Body Provider, which is an object you have to provide the share sheet which contains... 2 strings
- Instantiate a UIActivityViewController, which is a subclass of View Controller using the subject/body provider and the URL to the file copy I created as the arguments for that
- Set the source view of that controller to an arbitrary View I've placed that's just the coordinates from earlier, with a height and width of 1, placed onto the view controller
- UNLESS it's a bar button item, in which case I set the bar button item property to that and skip the coordinates altogether
- Then I present this view controller on the origin view controller
And I'm sorry, I'm willing to grant that some of this complexity is down to engineering concerns I'm not aware of, or taking into account things I've never done. But holy. Shit. What a process to go through. To simply share a file as Apple intends, I need a class that is fifty lines of code, and a second class of another 20-ish lines, to provide subject and body. Which again, I cannot stress this enough, is TWO. STRINGS.
SURELY. SURELY SOMEHOW we could make this easier.
Such a sad state of affairs.
> On Android, this does not guarantee connection to Internet. For instance, the app might have wifi access but it might be a VPN or a hotel WiFi with no access.
While I unterstand the technical reasons for this limitation, I don't get why it's different on Android. What happens on iOS or web builds?
Also check out this FAQ which is full of platform internals which I don't want to care about. If I need to know what permission from the library map to which platform-specific permission, it's not doing a very good job at Abstraktion. And yes, it is a very hard problem.
Example from Friday: I spend about an hour figuring out why my iOS app was not showing an error response when the server refused an upload. The iOS standard library URLRequest class was not sending the "Expect:100-Continue" HTTP header. I found nothing about this in the docs. I found the answer on Stack Overflow: add the header to the request and the class will automatically use it and wait for the "100 Continue" response before sending the body.
Last week, I spent multiple hours getting UIPickerView to work. The docs omit critical info like how to update the widget. Also, the API design is confusing: one must implement UIPickerViewDataSource but that isn't actually used as the source of the data, only the count of components. To make the picker work, one has to implement UIPickerViewDelegate which provides the actual data. It's a very confusing widget.
Earlier in this project, I wasted multiple weeks struggling, unsuccessfully, to get UITableView and UIStackView to work for my use-case. This took so long because the docs are missing lots of important info.
Shameless plug: Backend engineers can use Applin to build iOS apps, without writing any frontend code and without struggling to understand Apple's poorly-documented buggy APIs. https://www.applin.dev
I have done ZERO development in Apple/iOS/macOS. I have written ZERO lines of Swift or Objective C. My experience is with Java and C#.
But when I opened the first link in the blog that took me to https://developer.apple.com/documentation/appkit/nsopenpanel the very first thing I saw was
class NSOpenPanel : NSSavePanel
And after scrolling through the page, before I even went back to the author's blog I had already clicked on "NSSavePanel", saw what was listed there https://developer.apple.com/documentation/appkit/nssavepanel, and then even further up to https://developer.apple.com/documentation/appkit/nspanel, and so on.
For me, this was absolutely the most natural way to navigate around an unfamiliar SDK/library/codebase. Understand everything that's available on the object from it's inheritance chain.
So when I went back to the blog and eventually came to:
> Ah, it inherits from NSSavePanel! That was not at all obvious (and I'm sorry OOP devotees, that makes damn all sense in principle). Oh, look, loads of new functions and properties. Ah, so I'm meant to query the NSOpenPanel object for the directory.
I was extremely confused.
I'm far from an OOP devotee, but I don't understand how you can attempt to write code in an OO-language without understanding that inheritance is one of the most important concepts for code separation. (and is almost always an anti-pattern, but regardless).
This is all absolutely information I would expect to discover from within my IDE, I wouldn't even go to the browser for it.
I suppose I will have to admit that "Open Panel" inheriting from "Save Panel" is weird - it's definitely a code-reuse paradigm and not a correct use of "isa" inheritance. Except this is literally how it works in every other desktop UI framework I remember using - MFC, Visual Basic, Java Swing. I could be wrong, but I think it's a pretty common convention in desktop UI development.
Are they mad at Java docs? Or C# docs? Or any other OOP doc that follows the same pattern of not repeating the parent's documention on the subclass unless the subclass adds to it.
Your example of dotnet/C# doesn't seem to be the best - DotNet/C# repeats the base documentation - for example the SaveFileDialog class [1] lists all of the methods but indicates when the methods come from the base class.
Flutter also seems to list inherited methods - for example the TextButton [2].
[1]: https://learn.microsoft.com/en-us/dotnet/api/system.windows....
[2]: https://api.flutter.dev/flutter/material/TextButton-class.ht...
I long for time and place where I can download a standalone user-guide, a technical guide, and an API reference as PDFs and rendered as searchable docs.
For reference I am a backend dev at a SaaS company dealing primarily in Python & Go, doing HTTP/gRPC services and talking to databases.
Last night I attempted to make a program that would display an image and allow the user to click the image and then display the hex value of the colour under the cursor.
I wanted my application to use a crosshair cursor and after an hour of looking at the docs for NSCursor[1] and stackoverflow I just gave up.
I don't know how someone gets started in this ecosystem but I am sure once you know it this stuff is easy.
[1] https://developer.apple.com/documentation/appkit/nscursor
That weird "relaxed" notation that Swift brought to Apple's current doc format/structure made it so frustrating if you just want to use a certain thing without capturing the whole framework.
In 2024 you better have some scratch paper at hand to make notes when browsing Apple Swift docs...
I like learning from 3rd party sources, but there HAS to be an official, maintained 1st party source or there is no point.
Not sure where you got that, but I know some people inside Apple, and it sounds totally wrong and baseless.
https://www.haiku-os.org/legacy-docs/bebook/BFilePanel_Overv...
I was dealing with TransferRepresentation the other day and this API must be extremely confusing to someone who's new to Swift. The documentation reads like you're supposed to already be familiar with some concept that is never explained.
I think even for the new APIs added in non-public betas, it's all on the main website now.
Also there's docs that aren't on the dev.apple site for things like Apple Pay, but it's not a perk of paying $99 a year. I suspect the actual hardware docs for the Vision headset are private too (they were for the Apple Silicon DTK).
The only hit for the word “documentation” on the linked page is this paragraph which explicitly says you don’t need to pay to learn:
> You can learn how to develop apps for Apple platforms for free without enrolling. With just an Apple ID, you can access Xcode, software downloads, documentation, sample code, forums, and Feedback Assistant, as well as test your apps on devices.
If only it was simple. I had a paid account and lots of test devices. I let it lapse.
Now I can’t test on my own device with my normal iCloud account as I have too many registered devices for a free account, and I can’t access the interface for deleting those old devices.
This edge case has existed since ‘free’ accounts came into existence.
This reminds me of a UNIX programmer I worked with who called up our Apple sales rep and berated her and Apple because programming macOS wasn't like programing UNIX. When I called her to apologize, she was nearly in tears.
You are way outside this field. Programming the macOS can be very different and difficult. Either learn its concepts or work on something else.
/satire, but only barely -- upvote if you want this to exist!
I've seen so much outdated documentation recently that I'm starting to ignore it and go straight to code (+1 for open source I guess).
How the future works is probably:
1. Tutorials / case specific guides 2. documentation-annotated code base read by an LLM to yield answers to questions.
Already now, the most popular open source projects seem to prioritise guides for common use cases over extensive documentation.
https://www.writethedocs.org/videos/eu/2017/the-four-kinds-o...
I think you mean something a bit more specific, maybe "comprehensive reference documentation written by humans", though I'm not sure codebase annotations get away from that.
Anyhow, I am concerned about how the new wave of AI tech is going to affect the software development market. A lot of people are focusing on code synthesis. I don't think that is just around the corner. I think think it is going to be in assistive technology, such as learning / helping writing code.
I also think a lot of contemporary programmers are attached to documentation and overly focus on it's value, which indeed was important in an age of that being the only way to disseminate the intended workings of a library.
I can say that already know https://inkeep.com/ is working on this type of tech (The I prefer over reading documentation on bun.sh), Pulumi also have https://www.pulumi.com/ai that I prefer over reading Pulumi's documentation.
Anyhow, the future will show how this works out.
OP wants to read documentation. It's in the article.
Quite a few commenters say that they're resorting to LLMs, not because that's how they want to learn about the code they're using, but because the documentation is terrible and LLMs summarising snippets from dozens of different forum questions and blog posts is the only alternative they have to terrible documentation.
> most popular open source projects seem to prioritise guides for common use cases over extensive documentation.
Open source projects that people aren't being paid to work on probably don't have extensive documentation, because writing extensive documentation is hard, and the kinds of people who like hacking on code that solves their problems are probably not people who enjoy writing extensive documentation when they could be implementing another feature. Even if a large segment of their users would prefer that, and it's what would be best for the project.
> the documentation is terrible and LLMs summarising snippets from dozens of different forum questions and blog posts is the only alternative they have to terrible documentation.
and
> aren't being paid to work on probably don't have extensive documentation
This will only get strengthened when people discover that the outputs of LLMs suffice.
From my perspective, it seems to have diminishing value as we are getting other means of disseminating software documentation.
Also, how do you disseminate documentation that does not a priori exist? It doesn't come out of thin air.
As some of your sibling commenters have also pointed out, my proposal is just that some types of documentation is becoming obsolete. Ie. LLMs will probably rely heavily on tutorials and less structured documentation to explain how certain functions work, in what case we don't have to write that out.
I want to read documentation but then I have been programming for 45 years and am used to reasonable documentation.
If you are not experienced in language X the being told to look at its source code to see what and how it works is not good as the reason you are asking is because you don't yet understand X. Documentation has to be written assuming you don't know what is happening.
Even UNIX/Emacs documentation is frustrating as if you know Unix/Emacs than searching will give the information you need but if you have not user that port before then the documentation is opaque.
I suspect that documentation works when it is written by a separate team than the developers of the product and the documenters use the product.