Live data from Hacker News

Apple Developer Documentation Is Missing

v4.chriskrycho.com

251–260 of 400 posts

Re: Apple Developer Documentation Is Missing

#251
Apple's developer guides were amazing. I was able to read through them and become a proficient iOS developer. They are now archived and not updated. Even with experience on the platform, I now often find it hard to navigate the docs and learn major new frameworks. It is a real shame.

Re: Apple Developer Documentation Is Missing

#252
post #187

Earlier quoted context omitted.

I stand corrected – updating the parent accordingly as well. Thank you! (Comment about documenting stuff you're recommending people use, even experimentally, stands though.)

I am totally with you regarding React: I've been distracted from my current SwiftUI project writing a React "teaser" version because it's so much easier to make progress in React, in large part thanks to the strong documentation. But even there, there are nontrivial problems. Look at the front page of reactjs.org: all of the examples use component classes. The tutorial introduces component classes without mentioning…

Component classes are not legacy, you can still use them. Functional are better in most cases.

Re: Apple Developer Documentation Is Missing

#253

It's funny to read this and have it compared to Ember's docs, especially since I've been using Chris's site a fair bit over the past few months... I only bring this up for posterity, but Ember's documentation is terrible, and what is even worse is the Typescript documentation is almost unusable its so outdated. Chris's site is the only place you can go to find anything and it's incredibly difficult to make sense of o…

1. You should file issues against Ember's docs! We have different experiences of it for sure. Even just as experience reports, I know the folks who work on it would love that. 2. The Ember TS stuff is in need of an update—desperately—as are my (several-years-old-now!) blog posts. Unfortunately (unlike Apple) none of those of us who work on it get paid to do so at the moment – at all, including docs. I'd love it if yo…

1. Totally, I have, will do more, and would like to...

One big difficulty I've had, because I want to fix things (like docs), is because everything post 3.12 is geared towards Octane and those docs are all quite a bit different than everything before it... (and I'm on 3.12) it makes finding the code to change, text, blob pretty difficult (IMHO) since master is mostly Octane.

2. I know you aren't paid and you're a saint for all you've contributed! You've helped me an insane amount, and I want to say "thank you," for it. I wasn't trying to give you too much shit, I just thought it was a little funny... Ember's docs are in disarray for a new language and design patterns, and so are Swifts! ;) I probably should've used a softer word than "awful," my apologies.

2.1 I'll see you in your issue tracker later today :)

Thanks for being friendly! I super appreciate it, and for letting me know about it being cool opening those kinds of issues. A LOT of Github repos are hostile to _any_ questions at all (i.e. "go to stackoverflow or take a hike"); so, I tend to not make issues and only PRs.

Re: Apple Developer Documentation Is Missing

#254
post #105

Earlier quoted context omitted.

Something like a.?b.?c which is syntactic sugar for: a && a.b && a.b.c (with a short-circuiting &&.)

This is Javascript/Typescript only, and not really correct. a?.b a && a.b will behave differently if a is false or 0 or an otherwise "falsy" value. It's identical to something similar though (a !== undefined && a !== null) ? a : b

That's right, of course. I was just trying to convey the idea. But details matter of course. I was thinking of variables that either contained nil or contained an object with the appropriate field. If that precondition isn't meant you need more robust code like yours.

But also, as another commenter pointed out, there is a distinction between "optional chaining" and "nil coalescing" and I explained (roughly) what optional chaining is.

Re: Apple Developer Documentation Is Missing

#255

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…

> not writing a cascaded nil-coalescing operator

Given that a large portion of the discussion in this thread is around what this operator is, it seems somewhat valid for a company to want to see you use this. It might represent a deeper experience in the language being used, or at least some previous study of syntactic options.

Re: Apple Developer Documentation Is Missing

#256
post #227

Earlier quoted context omitted.

"Also, it's never obvious how much someone contributed to their portfolio." You guys are absolutely correct about the reference questions. I can find no fault with that. However, there's absolutely no question that I'm the sole contributor to all my code. Most of my repos have only one contributor (Yours Troolie). A couple have been forked off. I do link to a number that have been turned into larger projects; with mu…

> However, there's absolutely no question that I'm the sole contributor to all my code. Most of my repos have only one contributor (Yours Troolie). A couple have been forked off. A bad actor could easily just have someone else write the code or copy it though.

I think that realistically, the only person who could fabricate a repository commit structure in a way that wouldn't be clear that is what they had done, would be someone who can program. If I am taking a working program, and slowly breaking it up into pieces starting with tests, and simpler components, fabricating the addition of new components each commit. That is work in my opinion, only an actual programmer could falsify, and if they are an actual programmer they would have actual repositories.

Re: Apple Developer Documentation Is Missing

#257
post #166

Earlier quoted context omitted.

Do you mean Swift? I didn't think Typescript had something like this yet.

Not sure about OP, but this is coming in Typescript 3.7 I believe. Currently you can use `||`, but as mentioned above it will also catch false, 0, "", etc

Bingo. TS 3.7

Re: Apple Developer Documentation Is Missing

#258
post #95

Earlier quoted context omitted.

Something like a.?b.?c which is syntactic sugar for: a && a.b && a.b.c (with a short-circuiting &&.)

This is just optionals chaining, not nil coalescing.

Thanks for correcting me, I actually wasn't aware of nil coalescing in Swift and guessed it meant the same thing as optional chaining. The nil coalescing operator seems to correspond to Haskell maybe function, that is, a ?? b is computed as follows: if a is nil, the result is b; otherwise a must wrap some actual value c and the result is c.

Is that the one you had in mind?

Re: Apple Developer Documentation Is Missing

#259

Earlier quoted context omitted.

> I'll make it clear that I'm NOT a fan of these. I am mediocre, at best, at them, as I don't come from a traditional CS background (I started as an EE). I come from a CS background and struggle with these too. The big problem I have is this performance stuff is often barely relevant to the position. You need to know the principle of a BST. Unless you're building a database working in a unique scenario, actually trav…

I wonder if the merit of these exercises is from reading the candidate's reaction to meaningless and trivial tasks. If they take it with a smile, or better yet if they spent part of their free time studying it in detail, they will make a terrific cog in the machine...

I suspect that the pre-employment drug screens are to test who washes their hands.

Re: Apple Developer Documentation Is Missing

#260
post #197

Earlier quoted context omitted.

I wonder if the merit of these exercises is from reading the candidate's reaction to meaningless and trivial tasks. If they take it with a smile, or better yet if they spent part of their free time studying it in detail, they will make a terrific cog in the machine...

Part of it might also be a way around age discrimination, as those relatively fresh from school (and thus, younger - and likely will take a lower salary) likely are able to pass them faster than older potential hires.

That doesn't make much sense to me. If they don't want to hire older people to save money, can't they just offer lower salaries and let older people self-select themselves out of the job?
Post reply on HN