It's now possible to carry a spare battery or two, instead of lugging a portable power bank and slowly charging your phone. This is great news for outdoorsy types, travel, long bicycle rides, hiking, and so on.
but they require you to have a special charger, or typically you have to charge them one by one from your phone. Swapping batteries also requires downtime (not easy mid-flight, cycle, or whatever you're doing). A portable battery charger is much better imo. Plugging in a cord is always going to be easier and require less hands and focus than replacing a battery and keeping any kind of dust-and waterproofness.
Some people are just too stubborn, especially if they come from a place of authority and seniority. I'm doing house repair work right now with an older relative. He learned how to do repairs and renovations by himself, things like working laminate floors, mortar, laying tiles etc. The things is, he has his own reasoning and rhythym of doing things and doesn't like to be challenged, but I feel his ways don't always make sense, esp when I feel he is rushing and improvising (a programmer can tell). I haven't done much handy work myself in the past, but I'm a millennial, so I google things, watch youtube videos, and I read instructions. I also know that it isn't rocket science, my parents built our own home brick by brick. And now, every step of the way I have to be pushy to get my way, and make it sound like I'm not imposing or too nitpicky or challenging his "expertise", it's very taxing, I made a big scene once already and the whole relationship is now strained.
That's kind of it though, isn't it? If you're going to convince him there has to be a reasonable chance that the opposite will happen and that he'll convince you that he's too old to learn new tricks or whatever and he's going to have to do it his way because he isn't up to the challenge of doing a better job.
If your range of outcomes is [He'll do things my way, There'll be a scene and a strained relationship] then sometimes there'll be a scene and a strained relationship. If the range of outcomes is [we do things my way and he hates it, we do things his way and I hate it] then that's at least softer on the relationship. If you're lucky maybe you don't even care and you can just live with some parts of the work being bad.
One of those awkward things is that being good at negotiating means that other people are more likely to get what they want. It is actually a bit counter-intuitive.
I was the yielding type, not speaking up, letting others take charge. In my experience, it's not always worth it, especially if you care about the thing you are working on. I went so far as to just dissociate from everything and distance myself from others. The problem is that people deserve your honest opinion if you care about them, even if it's not what they want to hear. But it's so hard to spend mental energy to listen, correct, try to prove your point... even if you succeed, they will resent you for it.
They'll resent you insofar as it was confrontational vs. collaborative. If you can incept your conclusion into others they will not resent you. It's the whole raison d'etre of the Socratic method.
I had someone tell me, earnestly, that they hated me because it turned out that I was alright right. Not in the stubborn sense either.
It's not just react query, you can make a quick useFetch and useMutation hooks (or claude can), it's not that complex. If you don't need more advanced features (eg caching), you can easily cut down on 3rd party dependencies.
Sorry for being pedantic, but the first example could be rewritten to extract the pattern into a higher level hook, eg useNotifications. One way to simplify components before reaching for store libraries. The reusable hook now contains all the state and effects and logic, and the component is more tidy.
function Dashboard() {
const { user } = useAuth();
const {loading, error, notifications, undreadCount, markAsRead} = useNotifications(user);
if (loading) return <Skeleton />;
if (error) return <p>Failed to load: {error}</p>;
return (
<div>
<h1>Dashboard ({unreadCount} unread)</h1>
<StatsCards stats={stats} />
<NotificationList items={notifications} onRead={markAsRead} />
</div>
);
}
Working with multiple teams in a large project, hooks can be a nightmare to maintain.
I see 7x layers deep of hooks, with no test cases to support them. Some of the side effects are not properly tested, and mocks that abstract away the whole implementation means the test case only works for certain scenarios.
FWIW this scenario might be an outlier in large projects, considering how some developers prefer to "just wrap the hook in another hook, and not worry about its internals".
That's a valid concern. I've seen some hard to grok hooks with polling, async stuff, hard to follow logic, etc. Like with anything, need to have taste, it's easy to dump too much into one hook and like you mention, it gets hard to follow what gets triggered when.
I was wondering if I was crazy for thinking "how is what he's suggesting different than just putting that 'class' into a hook function?" I'm glad to see someone already wrote it up, kudos.
It's not just that you need to get used to gestures, it's that they are not discoverable at all, and that they can be awkward to perform with mobility issues, old hands, short fingers, etc. It's easy to make the wrong gesture, eg. the phone detects a swipe down instead of left to right, more so if you are holding it in one hand, so it's finicky and frustrating to have to rely on it as the only way of doing a common action. Why is it so wrong to have a simple navigation bar, it doesn't take up any more space than the hideous notch at the top?
> Surely our camera gear is exponentially better now
They are better, but not exponentially. You can't beat physics, film cameras can still compete in terms of dynamic range and resolution, the optical elements haven't changed that much. The 1972 photo was taken on medium format film, which is twice the size of the sensor area in the modern one, which means more photons and less noise. The recent image was take at a really high ISO, which adds to the noisiness.
I use a Peterson strobe tuner on my smartphone, it's really good.
I've also coded my own strobe tuner to learn more, unfortunately no mobile version yet.
Sometimes I want to strike up a conversation but get no reaction or even a dismissive glance and get ignored. It feels like the universe has a script and I went off track.
reply