News for hackers. Stuff that matters.
Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @10:46AM (#25047213)
I’ve been picking at SwiftUI recently and run into this myself. You want to know how something works or how to use it, so you go to Apple’s documentation. “Here’s the type signature, have fun!”

Thanks. But I was hoping something more than what Xcode’s autocomplete already filled in for me.

So instead you end up on 3rd party tutorials (special thanks to John Sundell and Paul Hudson) and always looking at dates on Medium posts because something from before WWDC 2020 might no longer be useful. Or maybe it is. How do you know if the feature changed significantly in the more recent release? I don’t know, but I can tell you where you won’t find out: the official docs.

Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @10:57AM (#25047369)
I will say that the WWDC sessions are well presented, and are a good place to start. But you can't use a video for quick reference, and you might be missing context from knowing how it worked the previous year to understand what the new enhancements are. Expect to dig into 2019 videos too. SwiftUI being new at least has the benefit that its sessions can't be any more outdated than that (yet). At most you're reconciling two years.

The Landmarks tutorial is also very well done as a starting point. But a tutorial isn't a substitute for documentation.

https://developer.apple.com/tutorials/swiftui/

Re:On Apple's Piss-Poor Documentation by pornel on Tuesday November 10, 2020 @11:45AM (#25047958)
I hate that WWDC videos have essentially replaced docs. Videos have to be shallow, and code on slides has to be short. This medium is fine to sell an idea, and to give a high-level overview of how it works, but there's no way to include as much information as written documentation would.

Here's a TED talk on Thorium reactors. Why aren't you running them yet?

Re:On Apple's Piss-Poor Documentation by pak9rabid on Tuesday November 10, 2020 @01:23PM (#25049209)
For all the hate it gets, I think the way PHP does their documentation is ideal. Easy to search for what you need, it recommends other, similar classes/functions, gives a good description of the inputs and what something is expected to return. Then, in addition to that, there's the user-supplied examples and commentary to help further clarify things. I really like the model they went with.
Re:On Apple's Piss-Poor Documentation by wizzwizz4 on Tuesday November 10, 2020 @02:17PM (#25050267)
I concur. PHP is a horrible language, but I don't hate working in it. The documentation is the reason.
Re:On Apple's Piss-Poor Documentation by ljm on Tuesday November 10, 2020 @03:29PM (#25051468)
I concur and add that PHP has actually evolved quite nicely, and it's horribleness is merely an outdated meme. Java is still playing catchup to the stuff PHP has added in recent years.

Just because it was shit 15 years ago doesn't mean it's still shit now.

Re:On Apple's Piss-Poor Documentation by tonyjstark on Tuesday November 10, 2020 @07:06PM (#25053869)
IMHO there are still some edges that drive you mad until you remember them but the documentation is really good and every release is full of improvements. Also many available frameworks and tools in PHP world are outstanding. For me PHP provides a serious Rapid to Market Edge.
Re:On Apple's Piss-Poor Documentation by Phrodo_00 on Tuesday November 10, 2020 @07:21PM (#25053999)
is the PHP standard library still an inconsistent mess?
Re:On Apple's Piss-Poor Documentation by geerlingguy on Tuesday November 10, 2020 @08:15PM (#25054439)
The inconsistencies are either fully removed (many in 7.x, more in 8.x), deprecated, or at least very well documented these days (e.g. with top level documentation warnings about any potential pitfalls).
Re:On Apple's Piss-Poor Documentation by aszlig on Thursday November 12, 2020 @04:46AM (#25068190)
That's certainly true for the standard library and the documentation on the language itself. However for the internals, this wasn't always the case and it looked more like this:

http://web.archive.org/web/20060626083819/http://www.php.net...

Re:On Apple's Piss-Poor Documentation by elijahparker on Wednesday November 11, 2020 @08:40AM (#25058288)
Agreed -- and the examples in the user comments were invaluable to me way back when I was getting started.
Re:On Apple's Piss-Poor Documentation by njhaveri on Tuesday November 10, 2020 @12:18PM (#25048370)
I also really dislike that WWDC videos are now the de-facto documentation. It must be a lot of work to put them together – I wish they'd just write a doc instead. Would be way faster to read, search, etc. and could probably go into much greater depth.
Re:On Apple's Piss-Poor Documentation by andromeduck on Tuesday November 10, 2020 @01:10PM (#25049026)
Example programs would be nice too.
Re:On Apple's Piss-Poor Documentation by sixstringtheory on Tuesday November 10, 2020 @03:22PM (#25051359)
Many of them do come with sample code, but like the content of the sessions themselves, they age out very quickly.
Re:On Apple's Piss-Poor Documentation by an_opabinia on Tuesday November 10, 2020 @01:44PM (#25049482)
Yeah but on the other hand, I'm sure they look at the vibrant 3rd party tutorial content pipeline as evidence that they're doing the right thing.
Re:On Apple's Piss-Poor Documentation by Cthulhu_ on Wednesday November 11, 2020 @05:27AM (#25057192)
Same; there's so much important information in the WWDC videos, and part of me wanted to watch them all when I was still doing iOS development. But I can't watch videos, I don't have the attention span, and sitting to watch / listen just makes me go to sleep.

It's a me thing, not down to the presenters or anything. But all that I ask is documentation and / or blog posts.

I hope that anyone that is making a presentation also writes down the contents as a blog post and/or documentation. Please. For examples, Go's blog is pretty good (although there too one is often pointed at a presentation or slide deck for certain subjects)

Re:On Apple's Piss-Poor Documentation by Austin_Conlon on Tuesday November 10, 2020 @12:29PM (#25048492)
Global search for all WWDC transcripts also isn't good on the website, you now how to reveal the transcript for each individual result after you search. In the Apple Developer app (where I would've expected a better user experience) it's not even possible.
Re:On Apple's Piss-Poor Documentation by wool_gather on Tuesday November 10, 2020 @07:00PM (#25053816)
Try out https://asciiwwdc.com next time you need this.
Re:On Apple's Piss-Poor Documentation by yoz-y on Tuesday November 10, 2020 @04:10PM (#25051966)
On top of that they often contain pre-first-beta information so they are rapidly obsolete. Although the gist of the information is useful, the signatures and examples are not.
Re:On Apple's Piss-Poor Documentation by plorkyeran on Tuesday November 10, 2020 @12:55PM (#25048819)
I don't really consider most WWDC videos documentation. They're usually just marketing videos which show off the new features. Even the more in depth videos are rarely more than a shallow introduction.
Re:On Apple's Piss-Poor Documentation by jonhendry18 on Tuesday November 10, 2020 @04:27PM (#25052194)
Unfortunately there's bits of information that are important and only ever appear in the WWDC videos.
Re:On Apple's Piss-Poor Documentation by plorkyeran on Tuesday November 10, 2020 @06:14PM (#25053382)
There's also a lot of useful information that has only ever appeared in Twitter conversations between Apple developers but I wouldn't call that documentation either.
Re:On Apple's Piss-Poor Documentation by lostcolony on Tuesday November 10, 2020 @12:19PM (#25048375)
I've run into this more often than I can count with Java based things. "Just look at the Javadocs!" You...you mean the auto-generated API descriptors that have exactly zero usage information on them, and expect me to figure out how to piece things together just by type signature? That...that isn't how documentation works.
Re:On Apple's Piss-Poor Documentation by grimjack00 on Tuesday November 10, 2020 @12:55PM (#25048821)
You mean you can't figure things out from "public Session getSession(String, String, String, String, String)"?
Re:On Apple's Piss-Poor Documentation by lostcolony on Tuesday November 10, 2020 @04:58PM (#25052564)
That I could probably look at the source and figure things out.

No, what kills me is

public Session getSession(Foo, Bar, Baz)

where Foo, Bar, and Baz are themselves interfaces, and I have no idea what implementing class I need, so I go searching, and after an hour of pain piece together that I need to instantiate a NotAtAllAFooButNeverthelessImplementsFoo, then pass that into the BuildingFactory class' static factory method to get an instance of Bar, and then I can just pass in a null for Baz, and it -seems- to work.

Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @03:43PM (#25051651)
On the SwiftUI side, you might go digging in these docs for Previews, which are one of its biggest selling points: https://developer.apple.com/documentation/swiftui/previews

Take 30 seconds to read through that and the linked pages (that's all the time it will take) and see if you could figure out how to use a PreviewDevice to make your preview show a particular device.

It will tell you all the ways to initialize a PreviewDevice struct (from many different varieties of String), but you'll have no fucking idea what to do with that object.

And here's an actual code sample, via Paul Hudson:

  struct ContentView_Previews: PreviewProvider {
     static var previews: some View {
        Group {
           ContentView()
              .previewDevice(PreviewDevice(rawValue: "iPhone SE"))
              .previewDisplayName("iPhone SE")

           ContentView()
              .previewDevice(PreviewDevice(rawValue: "iPhone XS Max"))
              .previewDisplayName("iPhone XS Max")
        }
     }
  }
It turns out what you need to do is pass the PreviewDevice instance into a previewDevice modifier that you've applied to your view inside a struct adhering to the PreviewProvider protocol. I don't think this docs page even mentions that the previewDevice modifier exists, let alone how to put any of these pieces together to configure and display a preview.

You can find how to do this in tutorials elsewhere on Apple's site. But you can't find it in their documentation for Previews, because it's a bunch of automatically generated pages of function signatures with no explanation.

Re:On Apple's Piss-Poor Documentation by uryga on Tuesday November 10, 2020 @07:44PM (#25054197)
found something! kinda: https://developer.apple.com/documentation/swiftui/previewpro...

an example for `PreviewProvider#previews` uses `.previewDevice("iPhone X")`, and i'm guessing that that string gets turned into a `PreviewDevice` via one of those `fromBlahLiteral` methods it implements? my guess is that `PreviewDevice` is some kind of opaque handle thingy (which is why it has no visible members/methods) but that... really should be documented

Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @09:39PM (#25054965)
Good find! For some reason buried two levels deep from the Previews page. I believe you're right that it's silently building a PreviewDevice from the string. You can make the PreviewDevice explicit (as shown in the Hacking with Swift code sample), but nice tidbit that you don't have to.
Re:On Apple's Piss-Poor Documentation by andi999 on Tuesday November 10, 2020 @02:34PM (#25050578)
We tried to buy some mechanical equipment which can be steered by a computer API. I asked for the doc beforehand. Got something like your example (10 pages of C header). I asked any better docs? Answer:'a real programmer would know how to use this' - well somehow they didnt manage to sell the device to us. Later they managed to email the comprehensive docs (which existed!), but we alread spent a much larger amount (without regrets) to the competition.
Re:On Apple's Piss-Poor Documentation by freeone3000 on Tuesday November 10, 2020 @03:11PM (#25051194)
https://docs.oracle.com/javase/8/docs/api/java/time/Clock.ht... is a bit more involved than the autogenerated template. The Oracle documentation tends towards this level -- the javadoc template is simply where the docs are kept.
Re:On Apple's Piss-Poor Documentation by j-krieger on Tuesday November 10, 2020 @01:11PM (#25049052)
Rust and rustdoc (forget what it‘s called) have the same issues, sadly.
Re:On Apple's Piss-Poor Documentation by Rotten194 on Tuesday November 10, 2020 @01:25PM (#25049232)
rustdoc has the ability to embed usage examples in the doc comments, and automatically test them. also module-level documentation is doable via doc comments in the module main file. rust doesn't force you to write good documentation, but the tools are all there and I often see great documentation for rust crates that was generated with cargo doc. For example the Rocket docs are full of code examples on both the module and function level: https://api.rocket.rs

I think there's something to be said for javadoc, cargo doc, etc encouraging documentation to hew closely to the structure of the code as opposed to a free-form documentation system that can include multiple pages about tasks, getting started, etc. But the vast majority of projects don't bother to set that up, and the javadoc approach makes it very low friction to add docs to existing code that probably already has comments explaining how to use it.

Re:On Apple's Piss-Poor Documentation by sidlls on Tuesday November 10, 2020 @01:37PM (#25049413)
That’s the barebones minimum, because in those contexts the examples are going to be relatively trivial. Often I find them to be no more helpful than the signature doc itself.
Re:On Apple's Piss-Poor Documentation by teknopaul on Tuesday November 10, 2020 @04:11PM (#25051980)
Even trivial examples that actually compile are better than none. because rust uses real code and markdown reading code and docs is the same thing in many cases, no need to even render to html, absolutely minimal markup noise. I love rust docs. Speaking from many years of using mostly poorly maintained javadocs and well maintained man pages.
Re:On Apple's Piss-Poor Documentation by tonyjstark on Tuesday November 10, 2020 @12:06PM (#25048193)
I wholeheartedly agree. The documentation is sparse and 3rd party tutorials have to be recent. That's why I still hold back for adoption.

Paul Hudson has really good material but I wish I could just leave a tab open with the official documentation and be prepared for most challenges. OTOH, things like Core Audio where never really well documented.

For learning Swift I recommend https://www.swiftforgood.com, no affiliation (also there Paul Hudson wrote the chapter about SwiftUI).

Re:On Apple's Piss-Poor Documentation by xbar on Tuesday November 10, 2020 @12:33PM (#25048538)
Agreed. Great content. Of course, there is no excuse for Apple's chronic underinvestment in Documentation.
Re:On Apple's Piss-Poor Documentation by ProAm on Tuesday November 10, 2020 @12:15PM (#25048323)
> So instead you end up on 3rd party tutorials...How do you know if the feature changed significantly in the more recent release? I don’t know, but I can tell you where you won’t find out: the official docs.

Get ready for documentation subscriptions. I wish I were joking.

Re:On Apple's Piss-Poor Documentation by Ronsenshi on Tuesday November 10, 2020 @12:40PM (#25048632)
Already a thing:

https://apps.apple.com/us/app/a-companion-for-swiftui/id1485...

No affiliation. It's sad and a bit pathetic that trillion dollar company can't hire even one person to work on public documentation.

Re:On Apple's Piss-Poor Documentation by alblue on Tuesday November 10, 2020 @08:26PM (#25054529)
They actually have a department to write the documentation. The problem is that it’s a separate department from the people who design the libraries themselves, which means instead of having high quality documentation throughout, you only get the documentation that the doc team had time to write. It’s why most of the APIs are minimal at best in terms of documents.

While the level of documentation that exists is usually pretty good, the sad fact is that most documentation doesn’t exist, and it’s entirely due to the fact that they are handled by developers/documentors separately. If you had developers documenting in-situ in the code, instead of WWDC slides, then it would be a lot better.

Re:On Apple's Piss-Poor Documentation by doyouevensunbro on Tuesday November 10, 2020 @12:56PM (#25048845)
It’s because engineers don’t want to write documentation, and if you don’t force it this is the result.
Re:On Apple's Piss-Poor Documentation by dgritsko on Tuesday November 10, 2020 @03:35PM (#25051541)
I don't think this truism actually holds weight. Some engineers don't want to write documentation, sure. Maybe even most don't - but some actually do enjoy the process of writing good documentation, and they find satisfaction in creating knowledge artifacts that make their code easy to understand and use. It's not enough to just find these engineers, however - they need organizational support so that they have the right tools to create and share good documentation, and are appropriately encouraged to do so.
Re:On Apple's Piss-Poor Documentation by piva00 on Tuesday November 10, 2020 @01:01PM (#25048915)
A trillion dollar company should be able to hire some technical writers to embed into teams and write documentation as part of the process. It's just a lack of care when you have that amount of money.
Re:On Apple's Piss-Poor Documentation by ethbr0 on Tuesday November 10, 2020 @01:38PM (#25049420)
Just hire Microsoft's people. Not even joking.

https://docs.microsoft.com/en-us/dotnet/api/system.string.su...

Re:On Apple's Piss-Poor Documentation by markdoubleyou on Tuesday November 10, 2020 @05:42PM (#25053067)
For Microsoft it depends on when the docs were written.

The MS docs from the late '90s through about 2015 were stellar. For example, look at the Windows Sockets docs[1], which came out of that era. Here you see information architects working at the height of their power: Content is broken up into conceptual ("About Winsock"), task-based ("Using Winsock"), and reference ("Winsock Reference") topics. They were doing this kind of structured documentation before DITA was a thing. It's a pain in the ass to produce content this way, but the results are wonderful.

Then came .NET Core: a fast-moving, community-driven effort, where the philosophy seems to be to get it working and then scribble down some docs later. The result tends to be a huge wall of text with conceptual and sample topics jammed together ([2]), and you're lucky if the API reference gives you anything beyond parameter names.

Azure docs suffer from a different problem. It seems they've tried to apply some kind of rough information architecture, but the quality isn't great. I've looked at the GitHub history of some of the shoddier topics, and they're often written by junior Product Managers who are fresh out of college. I encounter a lot of imprecise, colloquial English describing out-of-date screenshots.

I don't mean to belittle the people who work on .NET Core and Azure. There's a ton of content that needs to be written for these products, and it's a thankless task for the devs & PMs who do the heavy lifting now. I'd really like to see some dedicated technical writers come in and bring the quality back up to their old standards.

[1] https://docs.microsoft.com/en-us/windows/win32/winsock/windo... [2] https://docs.microsoft.com/en-us/aspnet/core/fundamentals/ro...

Re:On Apple's Piss-Poor Documentation by tasogare on Tuesday November 10, 2020 @11:44PM (#25055558)
I use C# daily and most of the time the doc is fine. I agree that sometimes dotnet core docs are a bit messy and frustrating, but still quite good and useful.
Re:On Apple's Piss-Poor Documentation by jjkaczor on Tuesday November 10, 2020 @02:08PM (#25050061)
For all the crap that Apple, Java and other open-source people have piled on Microsoft over the years, their developer documentation has always been very good. Yes, there are rough-edges.

Back in the day, when Sun was still in-charge of Java, I had my 1-person consulting company partner with Sun and become an official "Certified Java" organization... Great, I thought - now I can get some better documentation...

Sure, Sun replied - but first you have to buy a $30,000 server... Thankfully, .NET hit public beta about then and I have never looked back.

Re:On Apple's Piss-Poor Documentation by sirmarksalot on Tuesday November 10, 2020 @04:32PM (#25052260)
I wouldn't say it's always been very good. How well do you remember MSDN? In the mid-2000s, Microsoft documentation lived on three or four separate sites, and I don't remember the names of all of them. The two that spring immediately to mind are MSDN and TechNet. MSDN had the infuriating issue of broken links. You'd be deep-diving on an issue, find a link to an article that looked like it might perfectly address your question, and... 404.

It got so bad that a VP ended up making a pronouncement, declaring a war on broken links. He announced a multi-year plan to reduce and eventually fix all the broken links on MSDN. This was the vacuum that was partially responsible for the birth of Stack Overflow.

Re:On Apple's Piss-Poor Documentation by teh_klev on Tuesday November 10, 2020 @08:49PM (#25054687)
> It got so bad that a VP ended up making a pronouncement, declaring a war on broken links.

Probably Scott Guthrie initiated that. As some nobody I once emailed him directly because I'd discovered a bug in some framework thing with a reproducible example. He actually replied and cc'd in the relevant people at MS and after a short while there was a workaround and a fix and a KB article or something (it's so long ago I barely remember). Impressed? absolutely. MS still have some pretty good and accessible folks, and I'm a huge fan of Scott Hanselman who's a great brand ambassador for DevDiv (and not beyond a few self-deprecating MS jokes about the company's past).

Re:On Apple's Piss-Poor Documentation by bhrgunatha on Tuesday November 10, 2020 @11:55PM (#25055611)
They also suffered the same problem mentioned in this post.

Documentation pages that showed a method's signature with no explanation of the function or example usage. So many times I'd look something up only to find the method name parroted as a full sentence; and those method names were often obscure to the point of meaninglessness.

Re:On Apple's Piss-Poor Documentation by int_19h on Saturday November 14, 2020 @11:29PM (#25098260)
In late-90s to mid-00, if you did any serious Win32 or .NET development, you had the MSDN Library installed locally - it had its own help browser, with integrated search and index. The latter was especially useful, since it contained all structs, classes, interfaces, functions etc, across all platforms for which docs were installed.

Anything that was available online, official or not, was inferior to that. I'm not sure if it was deliberate, but it significantly hampered the utility of pirated copies of Visual Studio - since MSDN docs would require a lot more CDs than the software, most warez releases stripped them out. And in the developing world, where such pirated software is readily available on physical CDs sold by street vendors, they would usually be priced per CD regardless of what's on it - so a complete VS+MSDN bundle would be a lot more expensive, and thus in relatively low demand, and not widely sold.

Re:On Apple's Piss-Poor Documentation by jjkaczor on Thursday November 12, 2020 @09:58AM (#25070529)
Heh... well, I am old enough to remember the offline MSDN - which was great, and the rough transition to online - which got better, eventually... (and the rise of StackOverflow makes more sense in that context) but then at the beginning of the "cloud-era", IMO, it got worse again - to the point that I was constantly complaining about blog articles by MSFT employee's that really should have been folded into the actual documentation/KB instead...

It's a hard sell to tell an IT decision-maker in a different team/group that you need to configure things "just so" (think TechNet versus MSDN for configuration/operational articles) when all you have to point them too is a non-official blog post...

(Don't even get me started about the quality/out-of-date materials for things like Dynamics 365...)

Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @02:54PM (#25050900)
There's an old saying at Microsoft: developers, developers, developers, developers, developers, developers, developers, developers
Re:On Apple's Piss-Poor Documentation by ethbr0 on Tuesday November 10, 2020 @03:17PM (#25051281)
It's mocked, but the underlying observation is astute.

In the personal computing world, first parties can't build enough user software.

Furthermore, software availability and reliability lag third party developer and development ecosystem health. A bad experience doesn't hurt the platform today, it hurts the platform in 1+ years.

And perhaps even worse, steps to address it take effect over a 1+ year timeframe as well.

Apple's been able to leverage iOS market share into papering over the desktop reality, but they're going to find the emperor has no clothes real quickly if anything about that calculus shifts in a bad way.

Re:On Apple's Piss-Poor Documentation by int_19h on Saturday November 14, 2020 @11:34PM (#25098278)
If you recall, back when the first iPhone came out, the idea was that Apple itself would be the only provider of first-class software for it, and everything else was relegated to web apps.

It didn't work out for them back then, and so we got native apps and the store. But I can't help but think that Apple still sees it as a sort of compromise of their ideal vision of what the platform should really be like, and thus dev ecosystem evolution is mostly on the backburner. Just look at how long it took for Swift to appear, despite Obj-C being really dated by that time.

Re:On Apple's Piss-Poor Documentation by jonhendry18 on Tuesday November 10, 2020 @04:32PM (#25052255)
Apple used to be better about developers, I think, back 2000-2010 or so.
Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @04:46PM (#25052415)
Mocked at the time, but looking back it sounds pretty good. Maybe Apple needs a Steve Ballmer.
Re:On Apple's Piss-Poor Documentation by Spivak on Tuesday November 10, 2020 @01:40PM (#25049442)
It's not really the size of the company. Anyone qualified to write good documentation can make better money, work on more interesting things, and advance their career by actually working on the code. Without a culture that rewards and values the work it doesn't get done.
Re:On Apple's Piss-Poor Documentation by chipotle_coyote on Tuesday November 10, 2020 @01:59PM (#25049873)
Well, not everyone who is qualified to write good documentation wants to work on the code, nor would they necessarily be as good at writing code as they are at writing documentation. If you're writing API documentation, you need to be enough of a coder to understand what the engineers are talking about -- and what they aren't talking about but really should be! -- but that doesn't mean you need to be coding at a level where you could have a career writing apps built on that API, let alone coding at a level where you could have a career implementing the API itself.

It's the "culture that rewards and values the work" that's really the issue, I suspect. Apple certainly used to have a culture of good documentation, and I know they've hired good writers, technical and otherwise, over the years. It's actually kind of difficult to explain why their docs are the way they are, other than just not putting any real priority on the necessary work.

Re:On Apple's Piss-Poor Documentation by jyounker on Thursday November 12, 2020 @02:31PM (#25073866)
This. Developers aren't getting credited or promoted for writing documentation, or assisting in the process.
Re:On Apple's Piss-Poor Documentation by jonhendry18 on Tuesday November 10, 2020 @04:30PM (#25052238)
You have to give them time to write it, too.
Re:On Apple's Piss-Poor Documentation by RockmanZero on Tuesday November 10, 2020 @06:21PM (#25053446)
wrong! bad engineers don’t want to write documentation
Re:On Apple's Piss-Poor Documentation by SilasX on Tuesday November 10, 2020 @01:17PM (#25049139)
Reminds me -- it used to be that I could plug my Macbook air into a monitor and arrange my windows, and it would return them to that position whenever I'd disconnect and come back. That feature vanished as of ~2018 and you have to buy some app to get it back.
Re:On Apple's Piss-Poor Documentation by tidbits on Tuesday November 10, 2020 @01:49PM (#25049583)
My Macbook pro still does this. Granted, it's a little wonky. If you alter the window in any way while disconnected then it might not return to the original location. It also doesn't preserve any new desktop environments created on the external display.
Re:On Apple's Piss-Poor Documentation by jonhendry18 on Tuesday November 10, 2020 @04:33PM (#25052276)
>Get ready for documentation subscriptions. I wish I were joking

I thought that was what the $99/year was for.

Re:On Apple's Piss-Poor Documentation by mrtksn on Tuesday November 10, 2020 @12:34PM (#25048551)
That actually sounds good. When you pay for something it implies that you might stop paying for the thing if you’re not happy which means the seller is likely to work hard to make you happy.

I would love to have paid version of most of the apps/sites I use. Not ad-free subscription but paid version where I can be the unhappy customer when I am unhappy.

Re:On Apple's Piss-Poor Documentation by grp000 on Tuesday November 10, 2020 @12:45PM (#25048683)
That would make sense if documentation were a standalone product, but it's completely complementary to the language, so that doesn't make any sense.
Re:On Apple's Piss-Poor Documentation by munificent on Tuesday November 10, 2020 @12:46PM (#25048711)
> Get ready for documentation subscriptions.

MSDN Library. Everything old is new again.

Re:On Apple's Piss-Poor Documentation by qayxc on Tuesday November 10, 2020 @01:11PM (#25049040)
That's a bogus claim! The MSDN documentation has always been freely available. The subscription service included all of Microsoft's software editions for development purposes and that's what subscribers actually paid for.

The documentation of software packages, APIs, and driver kits was freely available online.

Re:On Apple's Piss-Poor Documentation by dragonwriter on Tuesday November 10, 2020 @01:17PM (#25049140)
> The MSDN documentation has always been freely available

No, it hasn't. It was originally available exclusively to subscribers, and only on CD. MSDN started before the web existed.

Eventually, the documentation became free on the web.

Re:On Apple's Piss-Poor Documentation by qayxc on Tuesday November 10, 2020 @04:58PM (#25052567)
> It was originally available exclusively to subscribers

No it wasn't - the subscription service shipped CDs (and later DVDs) with technical articles, updated SDKs and the like. The actual documentation was always included with every Visual Studio version on the installation discs.

I remember quite vividly the "joy" of re-installing the latest version because the documentation format was incompatible between releases and you could either reinstall the new version from disc (which took ages) or convert the already installed one (which also took ages, but not quite as long as juggling 4 CDs - it had to "rebuild the index" or some nonsense like that IIRC).

So if you owned a physical copy of any Visual Studio edition, you also had the documentation and thus no need to subscribe to MSDN (apart from the technical columns, SDK updates and the magazine, which any reasonable boss would allow you to read during work hours).

Re:On Apple's Piss-Poor Documentation by throwaways885 on Tuesday November 10, 2020 @01:33PM (#25049351)
That's a bit unfair. The web is what made it easy to publish at no cost, CD's still had mail and print costs associated so it made sense to send documentation with the software packages it... documented.
Re:On Apple's Piss-Poor Documentation by dragonwriter on Tuesday November 10, 2020 @02:20PM (#25050338)
What's unfair? It's an accurate actual description with no value judgement.

You seem to be arguing against a negative value judgement which I did not make, or even suggest.

Re:On Apple's Piss-Poor Documentation by bluGill on Tuesday November 10, 2020 @03:13PM (#25051223)
Perhaps, but they didn't charge $3 for the CD, which is about the incremental cost of making a copy and mailing it out would be.
Re:On Apple's Piss-Poor Documentation by ChrisMarshallNY on Tuesday November 10, 2020 @11:14AM (#25047600)
SwiftUI's docs are a nightmare.

Here's a pretty damn cool app: https://swiftui-lab.com

Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @11:18AM (#25047641)
Excellent, thanks for this!

Most recent post is "Attributed Strings with SwiftUI" which is something I was wondering about. There's plaintext TextEditor view, but for rich text editing the impression I've gotten is to either fall back to something in UIKit or do it in a WebView. Will check this post out tonight, it might not change anything but I'd at least like a better idea where things stand in SwiftUI.

Props to Apple on this one, TextEditor has a real docs page. But it's only for plain text, sadly: https://developer.apple.com/documentation/swiftui/texteditor

Re:On Apple's Piss-Poor Documentation by terhechte on Tuesday November 10, 2020 @12:53PM (#25048791)
Yeah, for rich text you need to wrap a UITextView, there's currently no other way to do that. Also, if you have a large amount of text, TextEditor won't cut it either.

Even displaying rich text (non editable) is a wee bit tricky and severely under documented.

Re:On Apple's Piss-Poor Documentation by lukeh on Tuesday November 10, 2020 @08:24PM (#25054518)
Yeah, the sizing thing is a bit of a pain as the creates visible content fitting artefacts when contained in a list or stack.
Re:On Apple's Piss-Poor Documentation by jamil7 on Wednesday November 11, 2020 @02:14AM (#25056188)
For a small app I recently just wrapped SlateJS in a webview and passed json back and forth. Slate is pretty nice but it would be nice to use a native solution.
Re:On Apple's Piss-Poor Documentation by heavyset_go on Tuesday November 10, 2020 @12:35PM (#25048563)
Apple figures developers will still pay them $99/year even if they provide them with poor documentation, and unfortunately, it looks like they're right.
Re:On Apple's Piss-Poor Documentation by saagarjha on Tuesday November 10, 2020 @08:30PM (#25054550)
Many developers are paying for the ability to develop, not the development experience.
Re:On Apple's Piss-Poor Documentation by JAlexoid on Tuesday November 10, 2020 @03:06PM (#25051106)
Since developers are no longer geeks building "cool stuff in garages", but people who "make flappy bird" - you're not getting away from that $99.
Re:On Apple's Piss-Poor Documentation by leptons on Tuesday November 10, 2020 @01:51PM (#25049607)
Microsoft: Developers! Developers! Developers!

Apple: Fuck off Developers!

Re:On Apple's Piss-Poor Documentation by sk5t on Tuesday November 10, 2020 @08:12PM (#25054413)
Apple: There's no official documentation for this, but here's a haughty forum response from an unaffiliated volunteer sycophant directing you to the extant superficially-related documentation.
Re:On Apple's Piss-Poor Documentation by Humdeee on Tuesday November 10, 2020 @12:35PM (#25048564)
I believe someone like Paul Hudson and the work he has done can influence a language's adoption by nearly an order of magnitude in the language's infant stages.

I released a Swift 1.0 app back in 2015, and continue to provide irregular updates for it but still churns some decent income (to me). If not for him, I really don't think that spark of enjoyment would have happened. What he provided was two-fold: an enthusiast to Swift and the iOS environment, and also as a teacher and big source of documentation.

Re:On Apple's Piss-Poor Documentation by gentleman11 on Tuesday November 10, 2020 @12:52PM (#25048780)
Unreal engine is like that, except with fewer third party tutorials. It’s getting better but the c++ docs are almost as bad as having nothing. Some of them only have comments like “maybe refactor this” as a description, and the community wiki was taken down recently too
Re:On Apple's Piss-Poor Documentation by ffhhj on Tuesday November 10, 2020 @04:03PM (#25051876)
Years ago I worked on the documentation for one of those big game engines. Previously as a "user" I suffered a lot with their physics system, and there was a big gap about its performance and best practices. After a long research in the source code and emails back and forth in the company I was able to fill those holes. My motivation came completely from within me, because absolutely no one in the company seemed interested on fixing the docs. It's the least important thing in most of these big companies.
Re:On Apple's Piss-Poor Documentation by gentleman11 on Tuesday November 10, 2020 @11:09PM (#25055422)
Your work is deeply appreciated
Re:On Apple's Piss-Poor Documentation by on_and_off on Tuesday November 10, 2020 @12:33PM (#25048532)
stupid question : but is there any specific reason why swiftui is not open source ?

I am working with jetpack compose these days and it is both open source and documented. I am not sure how I would work with it without that, it is quite a big departure from the legacy ui api.

Re:On Apple's Piss-Poor Documentation by saagarjha on Tuesday November 10, 2020 @08:31PM (#25054563)
Probably because it’s a competitive advantage for Apple to keep to themselves.
Re:On Apple's Piss-Poor Documentation by on_and_off on Thursday November 12, 2020 @12:39AM (#25066821)
I wonder how much of an advantage it is practice ? It is one such toolkit among others, like React or Compose. It is different from making the whole OS open source.

I guess that since the benefit would be to make third party devs job easier, the incentive is not that great for apple .. devs will write mobile apps even if they have to write them in assembly.

Re:On Apple's Piss-Poor Documentation by Austin_Conlon on Tuesday November 10, 2020 @12:21PM (#25048402)
It needs to have more conceptual articles with code listings like this https://developer.apple.com/documentation/swiftui/managing-m....
Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @01:04PM (#25048945)
Yes please. Finding a “see also” link to one of those is the best, because you know it will actually show you how to use it. Otherwise you’re probably on your own.

For example, Previews are one of SwiftUI’s major features. Here’s its docs page: https://developer.apple.com/documentation/swiftui/previews

You could read through that and all of the linked pages and still have no idea how create a preview. Want to preview it on a particular device? Well, I can see there’s a PreviewDevice, it’s initialized from various kinds of strings, and absolutely no information on how to apply it.

Turns out this is a SwiftUI modifier that you chain off of your view inside the struct that adheres to the PreviewProvider protocol. See example here: https://www.hackingwithswift.com/quick-start/swiftui/how-to-...

Could you construct that example from having read the documentation? I doubt it.

Re:On Apple's Piss-Poor Documentation by SkyPuncher on Tuesday November 10, 2020 @02:21PM (#25050356)
I built a SwiftApp a few years ago. I absolutely loved working with Swift, but I could not stand the documentation.

Apple was so happy to push breaking changes (without good documentation), that it made it very difficult to work with.

Re:On Apple's Piss-Poor Documentation by rocho on Tuesday November 10, 2020 @03:50PM (#25051720)
> “Here’s the type signature, have fun!”

My experience with Go libraries in a nutshell. One of the factors that made me abandon that language for others that for me are much more productive.

Re:On Apple's Piss-Poor Documentation by EdwardDiego on Tuesday November 10, 2020 @06:22PM (#25053460)
Yeah, I've found that quite often in apps/libs written for K8s in Go - wasn't sure if it was a Go cultural thing or a K8s cultural thing.

If you're lucky you're getting an example or two in the README.md. The rest of the time, you're reading code to figure out the intricacies.

Re:On Apple's Piss-Poor Documentation by rdn on Tuesday November 10, 2020 @11:22PM (#25055481)
At least you can read the code, Apple's libs are closed source. You have to resort to reverse engineering techniques to fill in the documentation gaps.
Re:On Apple's Piss-Poor Documentation by EdwardDiego on Monday November 16, 2020 @10:22PM (#25119960)
That's a very good point. Reminds me of the bad old days of .NET (pre 2.0) where the documentation was a bit shit, and you ended up relying on Reflector to figure out wtf was going on.
Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @06:33PM (#25053566)
And on a related note, I just put on yesterday's Under the Radar podcast episode, and their main topic is complaining about this same stuff.

https://www.relay.fm/radar/204

Makes me fell a little better knowing that professional iOS developers are having a similarly hard time with this, I was starting to feel dumb about it. I'm reading the docs, why can't I figure out how to use this?

Re:On Apple's Piss-Poor Documentation by cvwright on Tuesday November 10, 2020 @06:48PM (#25053688)
Absolutely. I’m a CS academic writing “real” code for the first time in 20 years. It’s really reassuring to hear that Marco Arment is also googling for the same SwiftUI tutorials that I keep falling back on.
Re:On Apple's Piss-Poor Documentation by krtkush on Tuesday November 10, 2020 @12:06PM (#25048199)
> and always looking at dates on Medium posts

While I'm not an iOS dev I have seen a trend where people have stopped putting in dates of their coding tutorials.

Re:On Apple's Piss-Poor Documentation by elpakal on Tuesday November 10, 2020 @12:52PM (#25048775)
They have an `API Changes: Hide/Show` thing on their documentation (on the right, top) that I think is new fwiw.

https://developer.apple.com/documentation/swiftui/progressvi...

Re:On Apple's Piss-Poor Documentation by ben-schaaf on Tuesday November 10, 2020 @07:19PM (#25053987)
At some point I had to read through some issues on the Firefox and Chrome issue trackers in relation to rendering on macOS. I kid you not more than once I read someone saying something along the lines of "No idea how this works, lets ask some Apple people at the next conference".
Re:On Apple's Piss-Poor Documentation by mhh__ on Tuesday November 10, 2020 @11:35AM (#25047842)
How does it compare to Unreal's, I wonder. Seems to have the same problem, third party (Video, bleugh) tutorials.