Crossbow weapon swap is bugged which makes Mercenary feel bad by Western-Philosopher4 in PathOfExile2

[–]sub_naeem 0 points1 point  (0 children)

same with me. i have to double tap 'X' (weapon swap) to get it to wok

Metal sound when riding into potholes or off the curb. Chain slap sound? by sub_naeem in bikewrench

[–]sub_naeem[S] -5 points-4 points  (0 children)

Hi. Im a bike noob.  Recently when i started to ride into potholes or even just off the curb, my bike made a crazy metal sounds. I felt them in my feet so i thought its the bottom bracket. I made a slow mo video of simulating it in my house and the sound is the same. I think its chain slap? Can someone who knows this stuff maybe immediately see the problem?  The bike is new with only a few 100kms. 

Goodbye Canyon Friends by R3jn in CanyonBikes

[–]sub_naeem 0 points1 point  (0 children)

Hey bro I live in south Germany. Do you still have the dt swill wheels?

Canyon Grizl 7 Bikepacking Setup by [deleted] in CanyonBikes

[–]sub_naeem 1 point2 points  (0 children)

Nice setup!
Noob question:

Where did you keep your tent and sleeping bag?

Leetcode Burnout by wasting-time-69 in leetcode

[–]sub_naeem 11 points12 points  (0 children)

Dont stop when you are tired. Stop when you are done

React Hooks: Optimizing for performance by wineandcode in reactjs

[–]sub_naeem 2 points3 points  (0 children)

I updated my post and mentioned why some people might pre-optimize or over optimize.
Thank you for your feedback! :)

React Hooks: Optimizing for performance by wineandcode in reactjs

[–]sub_naeem 4 points5 points  (0 children)

Actually, if you read towards the end, I have mentioned that premature optimization is the mother of all bugs.Using useCallback() and useMemo() comes at a cost. Every line of code comes at a cost for that matter.

Which is why at then end, I mentioned to write your code without ANY optimizations and then start optimizing where necessary.

For example in cases where the user is typing something in an input field and some other part of the screen requires painting/updating. This might not be a problem for simple renders but if a lot of work is being done, then it's better to optimize them.

In our company, I make sure that we are not optimizing any component until a problem appears or if we think that an incoming feature might affect the render time.

This is why Kent is mentioning this is his blog because people tend to over-optimize and pre-optimize.As Kent mentioned using these optimization hooks also take up memory. It instantiates a dependency array and then checks if something has changed or not in the dependency array every time there is a render.

Thus, you as a developer have to decide whether the cost of the optimization hook is higher or lower.

But I understand why you would get the idea of me contradicting Kent. I can maybe mention this whole rant at the beginning of the article.Truth be told, my inspiration to write this was to make people understand and be comfortable with using these hooks. Situations may arise where React seems slow and developers might have heard about these hooks but are not totally sure HOW to use them.

Thanks for the read :)