-
-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of process.nextTick() at db/users.js #23
Comments
There is a comment. Perhaps it is not clear to you :) but to me it’s saying it’s “faking an async action to verify it works in all cases”. Hope that helps explain the use logic. |
@Xalior I was thinking maybe we could add some comment lines in code where it is used to make it clear to everyone including beginners like me. |
shrug is it the purpose of this repo to teach node generics? How verbose a comment should be is open to endless debate, and fundamentally the choice of the comment writer :-) |
I am sorry. I thought that the purpose of an example repo was to show
everyone recommended usage of Passport. Cheers.
…On Thu, Mar 19, 2020, 9:08 PM D. Rimron-Soutter ***@***.***> wrote:
*shrug* is it the purpose of this repo to teach node generics?
How verbose a comment should be is open to endless debate, and
fundamentally the choice of the comment writer :-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBI3AS55RVSRKRELHFGHWTRII36JANCNFSM4LPJE42Q>
.
|
@Xalior I understand that it's pretty much the basics of Node.js. The issue is that most developers(including me) are not aware of constructs like |
I can't agree more that some clarification would of saved me hours of dissecting that code months ago. One comment to suggest what was happening there would of been a great improvement to what is supposed to be an example repository. |
Really? Because googling “what does node next tick do” gives a pretty reasonable answer on the first page...
If you’re not able to google and look up one line of code you don’t understand maybe you should stop moaning at free tutorials and pay someone to teach you, because you certainly do not seem to be able to do it alone!
…Sent from my iPhone
On 14 Apr 2020, at 03:43, Vincent Shury ***@***.***> wrote:
I can't agree more that some clarification would of saved me hours of dissecting that code months ago.
One comment to suggest what was happening there would of been a great improvement to what is supposed to be an example repository.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@Xalior It seems the behavior of |
While all of that is technically true, none of it applies here. These operations are not timing critical.
And, to repeat myself, it is not the job of a feature, function, or framework specific tutorial to teach you different generic node code!
|
@Xalior I agree with you that its not the job of a feature, function or framework specific tutorial to teach anyone generic node code. It's just a harmless suggestion to document the code well so that even beginners may grasp the concepts easily and hence lead to better usage of the library itself rather than messing around in the dark. Moreover, there is prevalent unawareness about the event loop within the node.js community. Cheers. |
I personally think the code already does that, I am sorry you did not
understand the comment, which is why I responded to your ticket in the
first place, to explain the comment further.
…On Tue, 14 Apr 2020 at 09:57, Jilvin Jacob ***@***.***> wrote:
@Xalior <https://github.com/Xalior> I agree with you that its not the job
of a feature, function or framework specific tutorial to teach anyone
generic node code. It's just a harmless suggestion to document the code
well so that even beginners may grasp the concepts easily and hence lead to
better usage of the library itself rather than messing around in the dark.
Moreover, there is prevalent unawareness about the event loop within the
node.js community. Cheers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4CH7NMI3K7AKXQWJ3H3LRMQQQJANCNFSM4LPJE42Q>
.
|
Get off open source if you are going to tell new coders they need to pay to learn more over requesting a single line comment for clarification on an irrelevant piece of code in a module. |
@Vincent440 Hey. @Xalior shared their opinion on the matter. Don't take it personally. I am sure it was not intentional. And please retract your comment. Let's keep the discussion clean. It's up to the maintainers to decide what to do. |
Wow... personal insults... that’s a super mature attitude. No wonder people do not want to support you.
|
I apologize maybe there was a miscommunication sometime when you attacked me for adding my input, however I do not think your comment was at all appropriate as a response to my input on this issue. I appreciate the work everyone has done to make Passport and these examples available, I am sorry I tried to add some input honestly. |
IMO, |
@jaredhanson Is the use of
process.nextTick()
atdb/users.js
necessary?It seems you have clarified the addition of nextTick on a stack overflow question.
https://stackoverflow.com/questions/20743348/passport-js-and-process-nexttick-in-strategy
Maybe we should add a comment stating the reason of usage.
A lot has changed regarding the execution of nextTick since Node v12. Should we shift to the use of setImmediate()(since nextTick gets executed immediately in the current phase itself of the event loop)?
PS: I am a beginner. I am pondering around to improve my knowledge on the subject. Cheers.
The text was updated successfully, but these errors were encountered: