HackerTrans
TopNewTrendsCommentsPastAskShowJobs

qPkk4Bi

no profile record

comments

qPkk4Bi
·قبل 3 سنوات·discuss
I assume your suggestion here is just to embrace a framework for data fetching and try not to think too hard about how they in turn implement it?

Can't really fault developers for falling into this useEffect trap when even the official docs show that data fetching is indeed handled via useEffect[1], while at the same trying to yell at the reader to "NOT TRY THIS AT HOME" and just go use a framework because it's such a complex problem... which naturally just creates more questions than answers for the poor developer trying to understand how it all works.

[1] https://react.dev/learn/you-might-not-need-an-effect#fetchin...
qPkk4Bi
·قبل 3 سنوات·discuss
> Sapolsky’s argument can be summed up like this: “We are beings caught in an unbroken chain of causes that dictate our choices. We lack free will and are wholly subject to circumstance. Therefore, we should choose to be better to each other.”

> This is a contradiction.

It's only a contradiction if you keep thinking in "free will" terms, i.e. thinking you have a choice in the matter.

The problem is that he has to use the language of persuasion and "choice" to explain why not believing in free will has benefits. But that's a weakness of our language around the subject, he's not expecting anyone to "choose" to change their position on the subject.

What he's actually doing is becoming part of your causal chain, and by voicing his opinion he's trying to change your future behavior. Ironically, in a world with no free will, we end up having more agency over others than ourselves.

Your behavior after reading the book was never a matter of choice. Either the past events in your life will lead you to modify your behavior upon adding the information in the book to your life or they won't. Sapolsky's entire point is exactly that, there is nowhere a choice _can_ be made. All we have is the illusion of a choice being made when we reflect on our behaviors and try to rationalize them post-hoc.
qPkk4Bi
·قبل 3 سنوات·discuss
How would I access anything locally created inside doSomeWork from my someCleanupFn in this example?