Readit News logoReadit News
cheez commented on Testing Database Transactions in Go   marvinblum.de/blog/testin... · Posted by u/marvinblum
theptip · 6 years ago
This covers one possible deadlock, but there are so many more ways to do this. More common (IME) is a true logic deadlock, particularly if you are using strict serialization (say, your DB stores a ledger of financial transactions).

It’s actually really hard to test that your DB is using transactions correctly, since the error cases tend to be races which don’t show up under low load.

We built a prototype tool in Python where you can monkeypatch the transaction context manager, and pause the primary thread’s execution just before committing, so that you can then do evil stuff like running a competing thread of the same or other DB operations to try to break invariants. But even this won’t catch everything; there is a combinatorial explosion of test points and you can’t compare them all in a large app.

I haven’t seen any folks writing about this, another approach would be to wire up some him thing smarter like Jepsen to direct the anomaly search, Kyle said some folks have reported doing this but nobody has published. I’m interested to know if anyone has had success with this sort of transaction/correctness testing.

cheez · 6 years ago
Most people use queues to do this. At least I do.
cheez commented on Wind and solar are cheaper than thought, admits UK government   carbonbrief.org/wind-and-... · Posted by u/open-source-ux
mayama · 6 years ago
One option I don't see brought up often, in addition to battery, is HVDC. Transmission loss for 1000km on HVDC is 4% according to wiki.

Continent wide grids could be created connected Europe, Asia and Africa. Storage requirements could be lowered with HVDC grid interconnect. India's One Sun One grid plan is to build a Asia Africa hvdc grid.

cheez · 6 years ago
Yep.

If the people who run wild wonderful off grid (great channel) have taught me anything, it's that battery backup is essential.

cheez commented on Gallup: 81% of Black Americans Want Police to Retain Local Presence   news.gallup.com/poll/3165... · Posted by u/apsec112
chmod600 · 6 years ago
There is a spike in violent crime in many cities.
cheez · 6 years ago
Protests are a temporary thing. Our area has none.
cheez commented on Gallup: 81% of Black Americans Want Police to Retain Local Presence   news.gallup.com/poll/3165... · Posted by u/apsec112
dragonwriter · 6 years ago
Sure, no one has suggested police departments as currently constituted should both exist and withdraw from Black neighborhoods, except for police unions applying terrorist negotiating tactics.

More relevant questions

(With regard to “defund the police”): should significant funding and responsibility be redirected from the police to preventive and specialized responsive social services?

(With regard to “dismantle/abolish the police”:) Should centralized all-purpose paramilitary local law enforcement agencies be disbanded, with law enforcement responsibilities distributed within specialized agencies whose agents (both armed law enforcement and other) would be domain specialists as well (for law enforcement officers) trained in law enforcement (which also involves transferring non-law enforcement responsibilities and funding more to non-law-enforcememt units.)

cheez · 6 years ago
I walk with the dog and sometimes the kids every day, so I see police patrolling around. Had an interesting conversation the other day with the police officer:

  - So officer, how have things changed since covid?
  - Sir, you won't believe the stuff I get called for. Getting teenagers off their cell phones, wife angry that husband didn't do his share of the chores
  - What about what people associate with "crime"?
  - Down.
As crime declines overall (it has been for many years now), I believe we really need to rethink the jobs we ask police officers to do. They are hammers and they go into situations that don't require hammering and bad things happen.

cheez commented on Palantir S-1   sec.gov/Archives/edgar/da... · Posted by u/tempsy
taurath · 6 years ago
Looks like they’re trying to capitalize on the COVID bump. Only 250 customers? They’re at the mercy of probably 5 of them.
cheez · 6 years ago
Palantir is basically a private arm of multiple levels of governments.
cheez commented on Show HN: HyScale – An abstraction framework over Kubernetes   github.com/hyscale/hyscal... · Posted by u/hyscale
cheez · 6 years ago
Not an expert. Comparison to terraform?
cheez commented on Warming Greenland ice sheet passes point of no return   sciencedaily.com/releases... · Posted by u/Bender
0xB31B1B · 6 years ago
It’s a generational thing. The younger generation has demonstrated they are way more likely to make personal sacrifices to save the planet (look at how they drive less, are vegan more often, and also they say this in surveys)
cheez · 6 years ago
I'm sure if you break it out by whether they have any responsibilities or not, it would be different. Not generational. My generation was the same.
cheez commented on Emacs xwidget-webkit enhancement suite   github.com/BlueFlo0d/xwwp... · Posted by u/signa11
nextos · 6 years ago
This is very nice. I use Emacs extensively, even for reading email, but I do not allow Emacs to connect to the Internet directly.

Lots of design decisions in Emacs make a lot of sense for a text editor, or for a Lisp VM in the 80s, but are quite insecure if you plan to browse a potentially hostile environment.

cheez · 6 years ago
can you elaborate? My understanding is this is a separate process.
cheez commented on Warming Greenland ice sheet passes point of no return   sciencedaily.com/releases... · Posted by u/Bender
surfsvammel · 6 years ago
If the media communicated this like “There won’t be any more BBC Planet Earth featuring polar bears, because there won’t be any polar bears anymore”, I believe more people would act. I know, it’s a ridiculous example, but I don’t think people understand the severity of news like this. I believe that the consequences just seem too far away, both geographically and in time, for people to care.

Makes me sad.

cheez · 6 years ago
No they wouldn't.

Every single plebeian on earth wants the polar bears to survive. But their own economic, day-to-day survival is first. These thoughts you have are only for those with the luxury of time.

Edit: so if you TRULY want to help the earth, help your own kind first.

Deleted Comment

u/cheez

KarmaCake day3766February 24, 2011View Original