Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ojkelly
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
ojkelly
4y ago
What you’re missing here is that the hooks form part of the input to the hook/render function. There’s a reason they can’t be conditional (though with a compiler theoretically they could be). The whole idea of the useState hook, is tha
62.
▲
by
ojkelly
4y ago
The purest form of function programming cannot have side effects. But to do anything useful you need them. So like many other functional programming langs/libs/frameworks react had a controlled means to run side effects. That’s th
63.
▲
by
ojkelly
4y ago
Yep, and escape hatch is actually a great descriptor. useEffect let’s you safely communicate with the world outside react (ie cause side effects). It’s the only reliable way to …escape.
64.
▲
by
ojkelly
4y ago
That’s part of WebAuthN[0]. Some services like AWS will not allow virtual U2F keys to be registered, but most places do. [0] https://developer.mozilla.org/en-US/docs/Web/API/Web_Authent...
65.
▲
by
ojkelly
4y ago
They’re not the same statement. Both are correct. But as always, the nuance is critical. All declarative code eventually runs something imperative. And anything non-theoretical is going to have side effects somewhere. Painting to a screen i
66.
▲
by
ojkelly
4y ago
Yep that’s what I was alluding to as well. I’m pretty sure they noticed it wasn’t using react. The comment was a reference to the fact that if you don’t use a framework, you’ll end up a building one anyway.
67.
▲
by
ojkelly
4y ago
JavaScript brings together so many paradigms, I can see strong cases for multiple different expressions of the language. We didn’t have classes until ES6. And they’re not real classes, they still use prototypical inheritance under the hood.
68.
▲
by
ojkelly
4y ago
I think they’re referring to how Reacts mental model is to wipe the page and rerender. The earliest versions basically did that, and then they started diffing and applying the diff.
69.
▲
by
ojkelly
4y ago
We’re coming at this from different mental models. The code you linked is what React helped me get away from. There’s multiple files in different folders for one screen. It’s hard to see how it composes, which is a useful boundary as it let
70.
▲
by
ojkelly
4y ago
How far down the rabbit hole do we need to go? Because at some point your function call is manipulating registers on the CPU. If we go even further, the CPU needs to load its next instructions and then the data required. Point being, we abs
71.
▲
by
ojkelly
4y ago
This post follows the current trend hyping up signals, but glosses over the complexity they bring. We can agree that state management is complex, no matter how it’s done. If you disagree, cool go build a database. Of all the complexities ar
72.
▲
by
ojkelly
4y ago
You can build serious UI’s without useEffect. But it’s a powerful escape hatch like rust’s `unsafe` block. Rust can do amazing things to ensure safety of your program, but there’s still times where a human can do it better. By signposting t
73.
▲
by
ojkelly
4y ago
But you can do that with algebraic effects. That’s kind of the point. You keep the clarity of declaring what you want to happen, and abstract the how to the effect handler.
74.
▲
by
ojkelly
4y ago
Most of the ideas at play here come from the functional programming world, which is why it’s often viewed from that lense. React builds on functional reactive programming, something the FP world is known for[0]. I’m not saying it’s pure FP
75.
▲
by
ojkelly
4y ago
The linked article doesn’t convince me, instead it shows a misunderstanding of react and hooks. > But then they added hooks and useState and useEffect and so on, which made the functions impure. The problem with hooks is that they “hook
76.
▲
by
ojkelly
4y ago
This is one of the foundational concepts behind microservices. A service small enough that a team or engineer can rewrite it in a cycle/sprint. When it’s bigger than that, you have the compounding effects of other systems that interact
77.
▲
by
ojkelly
4y ago
The US is often 1.5-4x the engineering salaries we see over here, but the point was we're on the other side of the world. My point was that remote teams across countries, and in some cases timezones, can work. But replacing a team just
78.
▲
by
ojkelly
4y ago
It absolutely can be! Good talent is global (eg. I'm Australian). But you suggested getting rid of the existing team in favour of a remote team in another country, because remote is more efficient. You lose more than you'll gain i
79.
▲
by
ojkelly
4y ago
You're confusing the means of communication and collaboration (remote vs office), with the fungibility of engineers. They are distinct things, and knowledge workers aren't the most fungible things. A good team is a good team, rega
80.
▲
by
ojkelly
4y ago
Two 30m standups in a day aren’t really standups. That’s starting your day with an hour of meetings. Which is probably partly responsible for killing the momentum you need to get through your work. You’re anxiety is likely because you don’t
81.
▲
by
ojkelly
4y ago
How did you sleep is a great question to understand how someone is, it’s one of the first things I ask myself when I wake up. I then get a more quantitive answer from my Oura ring. That then helps me plan what is achievable that day. BUT, “
82.
▲
by
ojkelly
4y ago
AWS Systems Manager Payment Manager
83.
▲
by
ojkelly
4y ago
Lambdas are awesome because they enable event driven computing without needing to worry about scaling. There’s other ways to get that model, but lambda makes it pretty easy.
84.
▲
by
ojkelly
4y ago
I’m gonna second the streamdeck. Contrary to (seemingly) everyone I liked the Touch Bar MacBooks. I barely ever used the function row, but the software that came by default wasn’t the best. But pock.app was perfect. It put alt-tab visually
85.
▲
by
ojkelly
4y ago
You do need to trust someone else’s computer if they’re going to build and run your code. I think Google is doing some good work here in helping champion things like Supply-chain Levels for Software Artifacts (SLSA) [0][1]. I’d argue your
86.
▲
by
ojkelly
4y ago
I got this as a means to held build a better intuition for how electronics works. It’s one thing to read a theory, or watch an animation. But to be able to play with such a high fidelity analog is by far the best. It’s like going from print
87.
▲
by
ojkelly
4y ago
This is where I think Australia’s compulsory voting shows its strength. Every citizen has a responsibility to submit a ballot (either valid, invalid, or covered in dicks). And the state (or in our case an independent electoral commission) h
88.
▲
by
ojkelly
4y ago
I wouldn’t proclaim its perfect. But I think it’s a system we are all generally pretty proud of. It may have something to do with the fact that everyone has to vote, so you either learn how it works or try to dodge it. As in, it’s your resp
89.
▲
by
ojkelly
4y ago
I linked this elsewhere in the thread, but given it’s an up to date survey on this very question I’ll post it here too. Top line is, the drift to conservatism as we age no longer holds. The thread goes into more detail as it’s a bit nuanced
90.
▲
by
ojkelly
4y ago
It is though. Because we frame it as a civil responsibility, not a privilege. There’s only a few situations where it’s taken away [0] (convicted of treason or treachery, imprisoned for a sentence greater than 3 years, of an unsound mind). &
More ›