-
Notifications
You must be signed in to change notification settings - Fork 18
Public User Feedback request - Promises #77
Comments
What is your primary role in your workplace?
|
Which do you use the most often in order to write async code:
|
Do you use async iterators and |
Which of the following tools do you use in order to debug Node.js code at least once a week:
|
What should the policy Node.js takes when an unhandled rejection occurs? For example - when an exception is
Note: this is only the default and users would still have the ability of code to opt into different behaviour. |
Do you use promises with async_hooks?
If you answered "I am using promises with async_hooks in my code" to the previous question - please elaborate how?
|
Is the performance of Node.js promises sufficient to you:
If you have answered that Node.js promises are slow, please write down why that factor limits your usage of promises:
Note: see this note |
What's the necessity of this? A large proportion of Node.js users are using it for tooling; Node.js may only be used to bundle a site or run tests. Those users may say they aren't using Node.js in production (I would).
Is this "which do you use most often" or "which do you prefer?"
Maybe this question could use a code example. 😉
Maybe "IDE or Editor" should be added to this list. I debug from VSCode wherever possible.
Users may not have an opinion, not care, or don't know. But otherwise, unless the user is running Node.js 10, will the feedback be useful? If they complain it's slow, and they're using Node.js < 10, would it be an impetus to backport Promise performance improvements? (Apologize if some of these have been answered already; I was not in attendance at relevant meeting) |
To validate that our survey reached a diverse set of developers - and to check the bias of various groups. For example in the meeting some participants mentioned they believe operations engineers use post-mortem debugging techniques differently from developers.
It is "which do you use most often".
Not really sure, it's basically "whether or not you have
👍 added thanks
Well - if people complain they're slow then sure - but there is a possibility they won't. If people complain about performance in older versions that's something to keep in mind as well. More question suggestions welcome by the way. |
I believe you forgot:
Which is what I use to debug my tests when I'm not running them under a debugger (looking at the stack trace helps me figure out what the problem is.) |
@giltayar |
How about adding a question about the use of |
Native promises have them with the inspector attached - as a "protip" you can run mocha with the node inspector running which enables long stack traces. Following the Berlin summit the V8 team are prioritizing and working on async stack traces in production. I will add the option - thanks for clarifying. |
I thought bluebird's long stack trace support was largely from native functionality |
On the async_hooks question, most people aren't aware that a tool like APM or a library is using hooks. A question more towards the goal of hooks with promises might give better results. As for the current question, it could use clarification whether it's about just using promises and hooks in the same codebase or something specific about using them together. |
@justsml no, we actually keep context. V8 does it on their side. @naugtur thanks for the suggestion - I agree that it's not optimal - I think "Do you track (or wish to) metrics on the time each function in your promise chains runs." will go above peoples' heads a little - I'm very open to suggestions though. Maybe we should ask about the most popular packages with async hooks? (That is, I use a tool such as ....) |
@yunong it would be great to get your input on these questions. |
For a number of them "Which of the following tools do you use in order to debug Node.js code at least once a week:" I think adding an other where people can add their own would be good. |
I think adding Chrome developer tools as an option to "Which of the following tools do you use in order to debug Node.js code at least once a week:" would be good. |
@benjamingr what might also help is separately listing out what we want to understand based on the survey. That will help when looking at the questions to see if there are any gaps. |
At Netflix, everyone is full cycle engineers that are responsible for development and devops. If your intent is to understand responsibilities, just separate out into explicit questions on each responsibility and whether that is part of their work/role. You could also provide a scale of how frequently or what percent of their role/time is that responsibility. "Typically" is vague and open to many interpretations. Example: larger teams with longer on call rotations. On primary role, I find your choices may have some possible implicit bias built in it. Again would focus on responsibilities not titles. Importantly, what do you mean by "debug"? There are many ways to debug production issues and often depends on the issue. Is that meaningful to you? If so, be explicit, or your responses won't help you as much. Example:
|
Should you have a other writein option? What about Generators or Observables? Is it useful to learn about those cases too? |
Why does it have to be "at least once a week"? Are my usages not valid otherwise? What about "which do you use frequently" I would allow an other writein. |
Was this discussed in #95 ? I'm interested in helping move this and #96 forward in tandem if that makes sense and is possible. |
Hey everyone @/here. I updated the Google Doc trying to collect the questions there. I am still parsing the comments on the questions though, so if someone wants to help, that would be great. The folks from the Foundation are ready to help us get this out there, so I'd like to get something together ASAP. Thanks! /cc @benjamingr @misterdjules @dshaw @ktrott @justsml @naugtur @justsml @boneskull @giltayar https://docs.google.com/document/d/1ZwS8ITwsgzcmIdoqFw5jKlx4_C0S1_pY4vqSPSI_Sfs/edit?usp=sharing |
Thanks for the update @joesepi - i added minor notes to the google doc. There's one big thing that would really help people w/ Promises that might fit alongside the
I realize this could be desired behavior (e.g. log something async & ignore its result, while continuing to load app data), however 99% of the time it's a bug that leads to race conditions & some of the nastiest bugs I've encountered. Example: // ❌ Should warn that you aren't returning the Promise.reject
getUsers({active: true})
.then(users => {
if (users.length === 0) Promise.reject(new Error('No users found'))
return users
}) // ❌ Should warn that you aren't returning anything
// This might be perfectly OK functionality (in a CLI tool writing out requested data)
getUsers({active: true})
.then(users => {
console.log(users)
}) This may be the responsibility of a linter. Currently, eslint-plugin-promise struggles to 'see' actual runtime differences. |
@joesepi That's great, thank you for doing that! I'll try to take a closer look soon-ish, but I don't want to commit to something when my schedule is already very busy. One thing I'd like to do is ask @SMotaal about his experience designing the ESM survey. He presented that survey during the latest collaborators summit and it seemed like he had a lot of good insights into how to design a survey that would reach a large chunk of Node.js users. |
I am happy to help... since our efforts have paused at the drafting stage, I think I can only share some key insights on how we made Google Forms work for our kind of questions because it does come with a bit of learning curve to get things done:
|
Those are great insights, thank you @SMotaal! |
@benjamingr @misterdjules would you two be able to pull the questions together in a way that gets satisfactory survey results since you have more context around this issue than I do currently? I want to facilitate this happening and am happy to take the survey questions through the process but I dont want it to get held up by me trying to craft the questions adequately. Thanks! |
Following discussion in #76 and nodejs/promise-use-cases#26 we want to get some questions going for the Node.js promises usability and debuggability survey.
Going to try something - let me know if it's inappropriate :)
Post questions as comments - use 👍 and 👎 in order to indicate whether you think other questions should be included in the survey or not.
You are welcome to post question suggestions even if you are not Node.js project core. If you would like to consult me before posting a suggestion - feel free to contact me personally at benjamingr@gmail.com
The text was updated successfully, but these errors were encountered: