Live data from Hacker News

The Elephant at WWDC

eclecticlight.co

181–190 of 213 posts

Re: The Elephant at WWDC

#181

Earlier quoted context omitted.

> Explanations of design intent might be the most underrated kind of documentation. There's so little of that nowadays in general, in any technology. Personally, I blame shortened attention spans, the death of programming books, and the rise of Stack Overflow. I'm not familiar with the Apple ecosystem, is it really worse in this regard than others? I also blame dogmatic misunderstandings that have crystalized around…

I completely agree. I never understood the argument of docs getting out of sync. If an organization prioritizes documentation then the comments are just as likely to stay in sync as the variables.

In-line documentation getting out of sync is a purely organizational problem. If documentation is valued by the organization inline documentation won't get out of sync.

It's the easiest to keep in sync. It lives in the code it documents. It's in the same version control repo and the same version of the source building a binary can build the docs. If it ever does get out of sync with the code it's the most straightforward to fix because it's the same process for fixing an issue in the code itself.

Re: The Elephant at WWDC

#182

Earlier quoted context omitted.

No. Modern programming languages and frameworks are explicitly designed so that you don't need to see how your code fits into the whole. That's the whole point of building abstractions, because it's too hard to keep all of the details in your head at one time. Writing code is generally concerned with the low-level details, which are hidden from other parts of the system (and that's a good thing). When you ask someone…

> you don't need to see how your code fits into the whole. GP said a whole, not the whole. A subsystem, abstraction, or whatever, works as a whole, not as unconnected pieces, and the code needs to reflect the organization and concepts within itself as a meaningful whole.

> GP said a whole, not the whole.

That reinforces the idea that a programmer might be good at one kind but not another.

Re: The Elephant at WWDC

#183
post #145
post #30

Conversely, I have noticed that Microsoft has been kicking some serious ass in the documentation arena lately. If you haven't taken a look at their stuff in a while, you would probably be shocked. Here's a high level overview of GC to give you an idea of how thorough these documents are now: https://docs.microsoft.com/en-us/dotnet/standard/garbage-col... After reading through all of those sections, I will have develo…

> The best thing for me is that when I click the "Edit" button on Microsoft's documentation, it takes me directly to the latest markdown source file on GitHub and I can immediately submit a PR We had better than that 10+ years ago: actual wikis. We've regressed quite a bit. Even developer.mozilla.org has gone backwards. Had devmo not been a wiki, I'd have never poured so much effort into the JavaScript docs between 2…

It's better because we can earn GitHub Internet Point® by editing, isn't it?

Aside from joking, now internet is no longer peaceful enough to keep publicly editable wiki.

Re: The Elephant at WWDC

#184

Earlier quoted context omitted.

I completely agree. I never understood the argument of docs getting out of sync. If an organization prioritizes documentation then the comments are just as likely to stay in sync as the variables.

In-line documentation getting out of sync is a purely organizational problem. If documentation is valued by the organization inline documentation won't get out of sync. It's the easiest to keep in sync. It lives in the code it documents. It's in the same version control repo and the same version of the source building a binary can build the docs. If it ever does get out of sync with the code it's the most straightfor…

And presumably you can track down when the inline docs diverged from the implementation, and who did it.

Re: The Elephant at WWDC

#185

Earlier quoted context omitted.

That’s very useful information that would be very useful i the docs! Thank you. I’m a little confused as to how it differs from the existing method for loading data: https://developer.apple.com/documentation/webkit/wkwebview/1... but I suppose it allows for more customisability. Marking the existing one as deprecated would go a long way to solving the mystery. Assuming that’s even correct! This is where documentation…

As I read it, the simulated response call doesn’t actually hit the URL, it just sets up the object like it’s going to then loads the data you supplied. Not sure when that’s useful since I’m not an iOS programmer.

Unit testing?

Re: The Elephant at WWDC

#186

I remember the documentation being pretty good up to and including OS X Tiger - back when Apple was still fighting for marketshare. I haven't tried to write anything for their platforms since then, specifically because the documentation is so poor. I don't have time to track down a bunch of old WWDC videos and hope that they approach something like usable minimum developer documentation when combined. I start that pr…

I wonder NeXT was better or bad for documentation.

Re: The Elephant at WWDC

#187
post #148

Earlier quoted context omitted.

I'll write a crawler and get this done for CGA docs (Compute, Graphics and AI). Thanks for the tip.

Sarcastic? I can't tell. I didn't mean to imply it was trivial, but the concept of crawling your own documentation is quite sound and should just be part of good document maintenance. There are some plenty good crawlers already. I'm guessing one of them has a 404 report that could hopefully be used to find dead links.

not sarcastic, and yes I'll probably use a crawler library :)

Re: The Elephant at WWDC

#188

I just watched https://developer.apple.com/videos/play/wwdc2021/10166/ to learn about docC, and it looks pretty much like what folks have been doing in other languages for a long time. For example R developers usually document functions, data, etc using Roxygen in-line comments and they use vignettes for tutorials and the like. An additional advantage of R is that it checks that the documented function arguments line…

> it looks pretty much like what folks have been doing in other languages for a long time. It looks pretty much like what folks have been doing in Swift for a very long time. DocC is just Apple’s own version of Jazzy / SwiftDoc / appledoc. There’s no catchup here, it’s just Apple making an “official” version of something that already exists.

Also: Xcode has been able to parse and display the Markdown documentation comments in Swift code for years. It's really nice! Doesn't mean DocC isn't worthwhile, but at least the PSOTU and Meet DocC presentation seemed to not only ignore outside prior art, but Xcode's existing capabilities too.

Re: The Elephant at WWDC

#189

Does `docc` works only for Swift? Could we use it for other programming languages? eg. Java

Basically every other programming language has already had something like this for a long time, e.g., Javadoc and Doxygen. Is there a particular reason you'd rather use DocC than these well-established alternatives?

I'd love to use it for Objective-C too. I work on a mixed language SDK and right now use Jazzy which is fine but I think there's a realistic chance DocC will lead to Jazzy being abandoned sooner than we can get rid of all the Objective-C.

Re: The Elephant at WWDC

#190
post #187

Earlier quoted context omitted.

Sarcastic? I can't tell. I didn't mean to imply it was trivial, but the concept of crawling your own documentation is quite sound and should just be part of good document maintenance. There are some plenty good crawlers already. I'm guessing one of them has a 404 report that could hopefully be used to find dead links.

not sarcastic, and yes I'll probably use a crawler library :)

Cheers! Good luck to you.
Post reply on HN