394 karma · joined January 19, 2017
In many cases, authors would probably need to run the toolchain locally so they can preview their changes. But publishing would basically be the same as committing code and having a CI pipeline take it from there
Your first example is enough to conclude that the locally scoped `event` is the same as the one on the window object, due to the pass-by-reference nature of JS objects. The fact that comparing the two returns true means they must be the same object.
element.addEventListener('submit', submit)
The second argument to `addEventListener` is a callback that takes the event as its argument. (`element` should be the form and the event should be `submit` for accessibility reasons.)Also, the author's example comparing `x === window.x` as evidence that it's insufficient to know if the in-scope variable is the same as the one on the window is wrong. The example uses a primitive value (`1`) which in JS are passed by value, so of course whenever you compare 1 with 1 it'll return true regardless of which variable the 1 is stored in. Objects, (that `event`s are an example of) are passed by reference. So you get
const x1 = {foo: 1}
const x2 = {foo: 1}
x1 == x1 // true
x1 == x2 // false
x1 == {foo: 1} // false
So a simple comparison between objects is enough to determine if they are the same instance. But it won't work to see if 2 different objects contain consist of the same property-values as each other.Highways create urban sprawl, they don't prevent it.
> the cognitive dissonance it takes to argue that raised highways and highway pits cut through neighborhoods but not let out a peep when it's subway and tram lines doing the same should disqualify one from voting.
But a subway/tram line is completely different from a highway. Trains can move an order of magnitude more people/stuff, don't result in local air pollution, don't create a lot of noise, don't result in road accidents that kill people and destroy property. And that's even before you realise that a subway is underground so you don't need to tear apart neighborhoods to build them and you basically wouldn't know it's there.
E.g. Stripe has a publishable key and a secret key. The publishable key links the checkout session to a particular Stripe account, but you can't actually initiate a checkout session without setting a session ID from the server (which requires the secret key). If the 2 keys don't belong to the same account then the checkout session will fail.
Yes, with some services you can proxy requests via your own service. But how is this more secure? If anything you've just increased the potential attack surface.
But yes, it is expensive, but it's only at the R&D stage. I'm sure could be made cheaper, and the article mentions reducing the cost to $6/kWh.
You could just talk directly to the DB using the basic Node SQLite packages/libraries but I found using an ORM like Prisma greatly reduces boilerplate and makes things more robust.
3 in 1 is fine, but the main advantage of a proper chain lube is that they don’t attract grime and dirt as quickly
A closer analogy to dressing up for the opera would be artisanal hand-carved decorative (but functional) shutters basic plain shutters. They both have the same utility but one has nicer aesthetic.
I've heard the DACs on the Chromecast audios are pretty good, so should be plenty hi-fidelity for most people's needs.
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/s...
Maybe a nitpick but it's interesting how often people confuse power with energy/storage. "gigawatt hours" is a measure of energy, not power.
From my understanding Northvolt is manufacturing batteries, so the "60 gigawatt hours" figure is referring to amount of battery storage they're making. If they were generating power it could refer to how much energy they'll generate over a year, but I don't think that's what it is.
I think it's important to get these details right as it can change the meaning significantly
Also
> building a battery factory so large it would fill 100 football pitches and produce enough power to light 6bn light bulbs a year.
Is the factory generating power? How does the factory produce this much power? Or is it referring to the energy stored by batteries it's producing?
All these things take time to happen and hopefully things will change for the better; cleaner electricity, battery tech cleaner, more sustainable. The alternative is new ICE cars which cannot be better.
Where this might have an issue is with persisted queries. But then you'd need some sort of client/server build tooling to keep them in sync.
dotless domains are going to be so rare in practice (unless your project has some niche use-case) that you can probably ignore them and call them invalid for the sake of simplicity.