Readit News logoReadit News
Knufferlbert commented on You'll regret using natural keys   blog.ploeh.dk/2024/06/03/... · Posted by u/thunderbong
garblegarble · a year ago
This approach will randomly generate profanity. If the ID is visible to users it can cause some to get upset (and best-case simply looks unprofessional). On a purely technical level if visible in URLs it can cause links to be blocked/altered by e-mail filters / filtering proxies.

It's generally a good idea to drop vowels for this reason.

Knufferlbert · a year ago
We once had a rather angry Irish customer calling our support complaining that we called him a pikey (slur for gypsy). After some back and forth it turns out we just gave him an apikey.

We never had a similar issue with our random numbers/letters/reset passwords or anything like that which don't have any kind of "dont return profanity" protections. Though I agree, someone getting a randomly generated customer portal url or something containing fuck or similar would look bad. Our cloudfront or something (or was it main public facing s3 bucket? can't remember) starts with "gay" and was never picked up on.

Knufferlbert commented on How I replaced deadly garage door torsion springs (2002)   truetex.com/garage.htm... · Posted by u/bronzekaiser
tmaly · a year ago
I have had to replace mine before.

I was sitting in the family room. Big slam sound. I go out and check the garage and one of the springs had broke.

It is really not a big deal to switch them out.

Knufferlbert · a year ago
That is a very weird take to me. That big slam presumably is the spring breaking, a lot of energy released at once in a rather uncontrolled fashion. The same energy will be released if you make a mistake installing it or the spring is faulty for whatever reason while you are standing right next to it.

My take away is that it's to dangerous to do.

Knufferlbert commented on The challenges of supporting foreign key constraints   planetscale.com/blog/chal... · Posted by u/drecoe
bob1029 · 2 years ago
Every time I turn on FK constraints I wind up regretting it and ripping them out of the schema. Not one time have I ever ran a non-query, received a constraint violation, and thought to myself "thank god, what a relief".

Any time I am doing something that could violate some logical constraint, I am probably trying to fix something that is already fucked. The safety nannies simply add insult to injury at this stage. I will delete broken rows in whatever order I please.

If constraint violations are adding value to your solution, you probably have a far more severe problem repeatedly slamming into the wall somewhere.

Knufferlbert · 2 years ago
Without knowing details, I can only assume you are misunderstanding something. I and everyone I worked with have bugs prevented by FK constraints. They prevent getting data to be in bad state, instead of it piling up and expensively fixing it afterwards. Not once have I thought "I wouldn't have had this problem without FKs" and every time I thought "oh yeah, I forgot this path, that would have been a problem".

Having to write code that can handle foreign key violations because the DB doesn't check it is a major pain. (we use Cassandra for example, so there is a "foreign key" usually from a PG row to a Cassandra row, obviously that can't be enforced on DB level so application code has to do the work)

As for deleting/updating data, FKs can be a bit annoying, but postgresql for example has two (possibly more) options.

1) The (possibly dangerous) cascade delete, which will traverse the FKs basically for you and deletes them 2) The check FKs (and other constraints) on commit. I.e. instead of checking every delete/update statement causes FKs violations, it'll check at the end, after having done all the delete/update statements if there are any FK violations. (or update statements). Called deferrable constraints.

Knufferlbert commented on Stripe laying off around 14% of workforce   stripe.com/en-au/newsroom... · Posted by u/infrawhispers
Knufferlbert · 3 years ago
I make mistakes all the time as a developer, I would hate to be fired for them and if I would, I would never claim responsibility.

And that's why I don't get how people expect directors/managers to be infallible.

Taking responsibility isn't about walking away from the job, but learning from it and making it right.

Whether that is done well in this case, I don't know, but that wasn't your point. As far as I can tell they got pretty decent severance packages.

Knufferlbert commented on Revamped German stellarator should run longer, hotter and compete with tokamaks   science.org/content/artic... · Posted by u/nabla9
credit_guy · 3 years ago
By the way, this type of reactor is technically a hybrid fusion-fission reactor. Because when the neutron hits a Lithium-6, what happens is a fission reaction. Lithium-6 absorbs the neutron, and then splits (in Tritium and Helium) and releases energy. We are taught that fission happens only for heavy nuclei, and this is mostly true, but Lithium-6 is an exception. The energy released in the fission of Lithium-6 is quite comparable to the energy releases in the fission of Uranium or Plutonium (4.8 MeV for the fission of one Li-6 nucleus vs about 200 MeV for Uranium-235 or Plutonium-239; that energy is nearly perfectly proportional to the atomic mass).
Knufferlbert · 3 years ago
Slightly related: https://en.wikipedia.org/wiki/Castle_Bravo

A thermonuclear test yielded much, much higher energy, due to unexpected lithium 7 reactions.

Knufferlbert commented on Planting trees not always an effective way of binding carbon dioxide   gu.se/en/news/planting-tr... · Posted by u/hhs
criddell · 3 years ago
I don't think this is a great explanation. I could build a machine that would get rid of 200 red balls (out of a million) in 30 minutes. It's a linearly parallelizable problem, so with enough machines, I could make it go as quickly as you'd like.
Knufferlbert · 3 years ago
Don't know, seems like a good explanation. We have a number of machines that can take CO2 out, the "enough machines" is the problem.

- they either require space (forests or whatever)

- are hard to produce in sufficient numbers (materials, production capabilities)

- are expensive to run (like energy input, maintenance), in particular don't generate new red balls while removing them.

- disposal cost (where the machine becomes the carbon, like trees, cutting them down and doing something with that)

Once we got it out, on a "pile of carbon", the problem becomes much easier.

Knufferlbert commented on All poverty is energy poverty   omnibudsman.substack.com/... · Posted by u/bedbot
telotortium · 3 years ago
Does Giving What We Can have a pledge to continue spending money on humans in extreme poverty? No animal welfare, no AI risk, etc.? Unfortunately the effective altruism branding has become toxic for me in the past few years due to the fact that they are deciding not to focus just on poverty.
Knufferlbert · 3 years ago
From what I can tell you can choose where your donations go, so you can focus on poverty and let skynet exterminate us humans if you'd want.

https://www.givingwhatwecan.org/donate/organizations

Knufferlbert commented on MIT, Autodesk develop AI that can figure out Lego instructions   theregister.com/2022/07/2... · Posted by u/samizdis
upupandup · 3 years ago
a bit off topic, but is there like a more affordable lego like alternative? it really disgusts me how expensive lego and litigous they are. so many Americans live in poverty who would love to get their kids to play with lego but can't because its ridiculously expensive.
Knufferlbert · 3 years ago
Stumbled over a (German speaking) youtuber, "Held der Steine" (Hero of the stones) https://www.youtube.com/watch?v=HVtbNWH_9So

Who reviews "Bricks" of all kinds including Lego. He consistently is annoyed by how expensive Lego is compared to everything else, with usual worse quality (in terms of design, fun to assemble, etc). If you can bear google translate or even speak German, he may be worth listening to.

Anyway, got sucked into that and got my first "brick" set since around 25 years ago and it felt like Lego (as far as I could remember). Instructions, presentation, the stones, everything.

I believe "Cobi" and "Bluebrixx" are often mentioned as good, affordable (seems about half price for similar set) and lego compatible. From what I understand the patent for the particular form factor of the bricks ran out, which is why there are a bunch of alternative now.

I got that one: https://cobitoys.de/small-army-ww2/panzer-und-fahrzeuge/panz...

I live in the UK, think I got it via amazon, so maybe more difficult for you Americans.

Knufferlbert commented on Italian watchdog bans use of Google Analytics   gpdp.it/web/guest/home/do... · Posted by u/giuliomagnifico
baq · 3 years ago
...in USA.
Knufferlbert · 3 years ago
Well, depends, fundamentally it's a paradox.

Either US company get's the data from the Italian one, making the Italian operation illegal in Italy

Or

The US company doesn't get the data from the Italian one (despite ownership), making the US company illegal in the US.

I don't think anyone is under the illusion that the latter option is chosen when push comes to shove.

Knufferlbert commented on Amino acids found in asteroid samples collected by Japan's Hayabusa2 probe   english.kyodonews.net/new... · Posted by u/jiocrag
TedDoesntTalk · 3 years ago
Can amino acids survive the intense heat on entry into the atmosphere?
Knufferlbert · 3 years ago
Apparently it's thought that meteorites hitting the ground freeze water around them after a bit. They get heated up, but it's pretty short, so the bulk of it is "space temperature" only the surface is heating. And a lot of the stuff that heats up is ablated. (depending on size)

Unless the stuff is on the surface of the meteorite it's probably fine.

u/Knufferlbert

KarmaCake day73January 28, 2021View Original