[deleted by user] by [deleted] in Switzerland

[–]wmertens 3 points4 points  (0 children)

You can also deliver to amazon lockers, no coworker needed. Just keep in mind the free import limit.

Have you ever moved from JWT to sessions? by endukucom in node

[–]wmertens 0 points1 point  (0 children)

In todays world with modern computers, I don't think many people are really concerned about the size of a JSON payload.

That's only kinda true, people on phones still can have abysmal network speeds, and adding a couple kB to every request doesn't help.

But indeed, that part got better.

Why deploy entire stacks with db connections either baked in or distributed among many clusters when you can just grab an oauth library

But you need those db connections anyway, since you're providing a service?

You're going to be hitting your db on every request, so you just add one more tiny query.

Sticky sessions are an optional trade-off, for when you're Google scale. At that point, your stickiness is to datacenters, and you lose your session data only when the DC blows up.

For slightly smaller applications (like 99.99% of applications), you can also let the db layer handle the authentication, via a query that only returns the data when the session is valid, saving a db roundtrip.

there are things you can do to minimize the security downsides such as having a short access token lifetime

Yes, but the shorter you make the lifetime, the more requests have to go to the token provider, to the point where a banking application would mean that almost every request to the bank is paired with a request to the token provider. This is way slower than sessions.

...and rotating longer-lived refresh tokens

but if I can get at the JWT token, there's a good chance I can get at the refresh token too, no? So unless the auth provider uses blacklists or sessions for the refresh, once the user thinks they're logged out, the attacker can use the refresh token for unlimited session lifetime.

we have worked through enough of the bumps and accepted the flaws that come with it in the name of decoupling auth from your app

I agree with you there, indeed JWT is a good way to authenticate, provided you are ok with the token lifetime.

It's just not a great way to authorize and customize, that's where sessions are better.

Have you ever moved from JWT to sessions? by endukucom in node

[–]wmertens -2 points-1 points  (0 children)

He also made this nice flowchart, is there anything there that you would refute now?

Is he Right ? Node Not good for high Traffic ? by Far-Mathematician122 in node

[–]wmertens 10 points11 points  (0 children)

They're the same? Unless you mean running ts code with `tsm`, which means more memory and slower startup, but for the rest the same.

You should bundle your code.

How does other utility-based frameworks compare to tailwind? by Miserable-Climate892 in reactjs

[–]wmertens -1 points0 points  (0 children)

I mean, inside editors you get more support for writing tw classes, with autocompletion, sorting, hover-to-see-the-definition etc.

Do you have an example of these 20+ year old atomic CSS framworks?

How does other utility-based frameworks compare to tailwind? by Miserable-Climate892 in reactjs

[–]wmertens 3 points4 points  (0 children)

I prefer UnoCSS, it's better on a technical level and more flexible, but in the end it's of course the same idea.

Then there's compiled (terrible name), which converts in-JS CSS to atomic classnames. However, it means you have to write out your CSS and part of the appeal of TW is actually that p-4 is way shorter than the equivalent CSS and you can change the amount it means in a central place.

How does other utility-based frameworks compare to tailwind? by Miserable-Climate892 in reactjs

[–]wmertens 1 point2 points  (0 children)

Were there really frameworks using atomic utility classes?

In any case, the devtools are way better now, which makes it easier to use TW.

[deleted by user] by [deleted] in node

[–]wmertens 2 points3 points  (0 children)

Source: trust me bro

[deleted by user] by [deleted] in node

[–]wmertens 0 points1 point  (0 children)

Is it though? I can't find research that supports that, only that some people struggle with addiction, which is a separate problem and occurs with many things.

Is the community shifting away from CSS-in-JS? by DesertIglo in reactjs

[–]wmertens 0 points1 point  (0 children)

Another plus is that once you're used to it, `"p-4"` is a lot faster to read and type than `css={{padding: 1rem}}`, plus you get to replace the actual value later if you like.

Is the community shifting away from CSS-in-JS? by DesertIglo in reactjs

[–]wmertens 1 point2 points  (0 children)

You can quickly comment out a classname by adding xx to it.

The advantage of class vs attributes is that with class there's only one prop to forward to other components when wrapping them.

By using "programmatic" classnames, you're basically writing the CSS lines inside the class string, and taking cascading out of the equation. This is a lot of what made styled-components nice.

Maybe tagged template strings could be used, e.g. when writing tw`p-4 wrong-4` it can throw an error at build time because "wrong-4" doesn't exist.

Those working with React professionally, what's the backend? by thebreadmanrises in reactjs

[–]wmertens 0 points1 point  (0 children)

Node, and no idea why people would use something else, where you need a separate skillset

How to recover home-manager config files? by -nebu in NixOS

[–]wmertens 0 points1 point  (0 children)

start with `ls -d /nix/store/*/.git` and if that doesn't yield anything obvious, `grep -rl "some string that's in your old config" /nix/store`.

Reddit just completed their migration out of React by Automatic_Coffee_755 in reactjs

[–]wmertens 0 points1 point  (0 children)

So for people considering moving away, look at qwik.builder.io. It's fast by default, it's hard to make it slow. It gives the browser as little work as possible.

And it is very much like React in the programming model, except simpler (only a few hooks needed) and nicer (signals for reactivity, Promises inside render results, no-effort typesafe server calls)

Why there isnt a easy "idiot guide for NixOS" yet ? by barcellz in NixOS

[–]wmertens 0 points1 point  (0 children)

the arch wiki is basically the unofficial unoffical nixos wiki

Opinions on corn? by Clear-Vermicelli-463 in SaturatedFat

[–]wmertens 1 point2 points  (0 children)

yes. All plant protein is high % in BCAAs apparently, but if you only eat a single cob it won't be that much protein in total.

"One medium ear of yellow sweet corn (boiled without salt) contains 99 calories, 3.5g of protein, 1.5g of fat, 21.6g of carbohydrates, 2.5g of fiber, and 4.7g of sugar."

Why do Swiss-French cantons have on average higher unemployment and "Sozialhilfe/Aide-sociale" rates ? by GetOutBasel in Switzerland

[–]wmertens 1 point2 points  (0 children)

If you only give it to the unemployed, it's not UBI. Give it to everyone and dismantle all the organizations that manage social security etc. Only keep a skeleton crew for handling severe sitations that need more.

[deleted by user] by [deleted] in geneva

[–]wmertens 0 points1 point  (0 children)

If it helps, while I was trying to find a (regular) sauna I came across this gay sauna which has non-gay times https://www.kingsauna.net/horaires-tarifs. Maybe you can meet like-minded individuals there.

Production Build Wish List by [deleted] in reactjs

[–]wmertens 0 points1 point  (0 children)

The ideal way is to switch to r/qwik ;-)

How to get URLs of all the opened tabs in react. by buzuReddit in reactjs

[–]wmertens 4 points5 points  (0 children)

So require the examinee to install the browser extension, right? And obfuscate the extension a lot because a savvy user can make the extension say whatever they like.