WebReflection / uland

A µhtml take at neverland
ISC License
108 stars 2 forks source link

Document the API #15

Open jaydenseric opened 3 years ago

jaydenseric commented 3 years ago

The API is not entirely documented in the readme.

Let's take the async API for example. I actually recalled hearing of some sort of way to do async rendering, and wanted to see if that can be used to better demo race conditions for here. So lets see what the developer experience is trying to figure out how to use the async API...

Firstly, the readme of this repo searching "async":

Screen Shot 2021-06-25 at 8 46 32 pm

There's a file called async, lets see what's in it:

Screen Shot 2021-06-25 at 8 46 46 pm

Not helpful. Lets see what else is in the readme about "async":

Screen Shot 2021-06-25 at 8 47 00 pm

No documentation for what the exported async utilities are or how to use them, maybe there is some documentation at https://github.com/WebReflection/uhooks-dom (not hyperlinked, so lets manually type in the repo URL to look at it):

Screen Shot 2021-06-25 at 8 47 35 pm

No documentation here either. Lets see if there is any at https://github.com/WebReflection/uhooks-fx (also not hyperlinked, so lets manually type in the repo URL to look at it):

Screen Shot 2021-06-25 at 8 49 02 pm

No documentation here either. Lets try the mentioned https://github.com/WebReflection/uhooks (also not hyperlinked, so lets manually type in the repo URL to look at it):

Screen Shot 2021-06-25 at 9 04 18 pm

Now we're getting somewhere. But what is a hooked() call? Does that enable hooks when rendering? Doesn't uland automatically have hooks enabled when rendering, so how do we integrate already integrated hooks? What exactly even is an async hook anyway?

There is nothing to see at the final end of the road explaining what this is, or how it's used. But, even if there was documentation in this uhooks package, there are no guarantees that it would apply to uland since the wording in readmes mentioning these other hooks related packages says things like "based on" which doesn't inspire confidence that they are the same, i.e. a dependency. Perhaps they are loosely inspired.

This is an example of what the developer experience for me has been like the last week, really trying to make a solid attempt at using the micro family of packages. Not for profit mind you, but to promote your work in another open source project. Almost nothing is documented, and there is a huge amount of confusingly similar packages that often seem to have large overlapping concerns.

I've given significant time to reporting some problems with the micro API design for context, and from the start the response has been weirdly hostile. That I'm an idiot, doing wrong things, wasting your time. Later you get outraged for some reason that an issue belongs in another one of these myriad of related repos, and instead of using the GitHub issue transfer feature, you close it and lock it. Even you're confused which repo the issue belongs in, since you say uhooks here, and then later say uland-ssr here.

I'm not out to get you, I'm trying to help. I wasn't being disruptive, you asked in that issue for me to share more example code to reproduce the problems, which I was doing. As I explained in comments the context API design issues apply both to the server and client environments, and I just happened to be using the SSR version for reproductions as that's easier for us than making HTML files and firing up the browser.

In my own open source projects with millions of users, I can't recall ever locking someone's issue. I've collaborated on all sorts of GitHub repos over the years, and there are few times I can remember experiencing so much friction or such a hostile reception to participating. Please don't just shoot the messenger, it would be easier for me to just walk away and not leave any constructive feedback. I'm not here for an argument. Reflecting on this experience might help to explain why people are not adopting your frameworks which you're written is something you want to improve upon this year.

WebReflection commented 3 years ago

Let me recap:

The result:

Recap Again:

This is not how I do Open Source, this is how I do Open Source, and you kinda scored all negatives in both DOs and DONTs points, but on top of that, all minutes needed to read this huge rant are minutes removed from my free time to fix things, so the result is that ... if before I was happy to move the issue in the right place and work on it, now I honestly don't give a damn, because this is not rewarding, this is not fun, this is just outrageous, non respectful, boring, and the opposite of the meaning of collaboration.

That being said, with uland/async there's nothing to document, because it's the exact same API, but anything asynchronous within the flow, gets resolved before outputting a single char, so it solves async component, async interpolations, and that's pretty much it, and literally nothing you should change, except it works for your asynchronous render cases (in uland, 'cause in uland-ssr I've realized it might not be the case, but that's something that will be fixed, eventually, afterward).

Yeah, the documentation could be improved, but thank you for not even trying to help me out even there.

This "contribution" of you didn't start right, and it's going to hell pretty quickly.

I won't tolerate this attitude, insults, or non respectful conversations anymore, so take this as a warning.

Have a lovely weekend 👋