HN user

ishjoh

526 karma
Posts3
Comments239
View on HN

Great article and I had no idea what to call 'time of check, time of use' (TOCTOU) which is a great name instead of me having to describe the situation.

I'm building an app on top of django where I have to worry about this, if you're using django check out there support for select-for-update, and if you're database supports it nowait=True can be a great thing that will fail a read if a select for update is already run:

https://docs.djangoproject.com/en/4.2/ref/models/querysets/#...

Also worth mentioning optimistic locking if you're looking to solve the issue in a different way, there is more involved from the application side but it has some advantages as well. I tend to prefer select for update with nowait=True since it's simpler on the application side, but I have used optimistic locking in the past with great success and some systems support it OOTB. Here is a description from AWS for those curious:

https://docs.aws.amazon.com/amazondynamodb/latest/developerg...

Both men are trained in martial arts and have competed in fights in the past in those disciplines. It's hard to describe the draw to someone that hasn't trained seriously or participated in that type of physical contest but it lets you understand yourself and someone else very deeply. There is a reason so many fighters will hug after a match, it's because in that moment you understand things about the other person that very few other people ever will. It started as a joke, gained some steam, and fizzled out, but I fully understand why they would want to do it.

AWS us-east-1 down 3 years ago

certificate manager also down (I know because I tried to update an ssl cert for cloudfront which only allows US-East-1 ssl certs, maybe someone will eventually fix that to allow any region to have the ssl cert for cloudfront)

wanted to install a new ssl cert for cloudfront which can only be done on US-EAST-1, wish that would get fixed to allow SSL certs in different regions.

I live in a midsize city outside of California that has 3 shelters downtown. 1 shelter dropped the sober requirement trying to house those people. They had to reinstate the rules within 24h because 2 employees had been assaulted, and a serious fight had broken out that required hospital care for both people involved. It is sad state of affairs.

For me it was the YouTube algorithm. One day it recommended a video by agadmator chess about a classic Bobby Fischer game. I've been following it ever since and really had a lot of fun watching his breakdown of the classical world chess championship that just happened.

a worse teacher doesn't create 10x losses

I would argue this is exactly what a worse teacher does. They can discourage/mislead/destroy 100s or 1000s of students over their career which can have dramatic effects for a society.

big brother stepped in and saved you True. People should be very thankful the government did this to allow people to keep getting paid and to keep these businesses solvent.

But depositors didn't cause the initial problem, which was a large hole on the balance sheet of SVB. That was done by bad investments made by SVB. That was not the fault of tech companies but bankers.

Seems like tech is systemically risky and should be highly regulated. This goes beyond tech businesses because the risk is there are lots of small businesses with high cash deposits in bank accounts. If the same thing happened to a different sector would you also call for highly regulating their industry because they had high deposit amounts in their bank accounts?

I have used GraphQL and REST extensively.

I prefer REST. It is easier to cache server side which for certain types of data can be extremely useful. It works well with monitoring software. It is extremely easy to understand with just using curl.

Graphql works extremely well with React. The Graphql Apollo React client fits like a glove and is a pleasure to work with. I have not found a REST library that fits as well although there are likely some now.

I have 3 and I remember the process you're going through.

thinking of all the vacations and iPhones I would have to buy

You don't have to buy this stuff. I grew up lower middle class, the only vacation we took until I was 15 was driving 8h to stay with my grandma. I never had a gameboy or lots of other things. My childhood was still great. Looking back maybe I could have had those things if my brother didn't exist, but I'm much happier that my brother exists because 10/10 I had way more fun with him than having a gameboy or exotic vacations, even though we didn't always get along.

College education is expensive, but it's possible to not spend a fortune using community college and transferring. Hopefully there will be even more low cost options in the future.

If you can have a roof over their head, feed them, have a stable home life and bring a positive attitude to every day then the rest doesn't matter.

Having grown up in a country into adulthood that used metric and then moving to the US there are certain things that are nice about the US system.

In particular a foot is an extremely intuitive unit of measure. It covers a number of use cases better than meters or centimeters.

I also prefer Fahrenheit now that I'm used to it. Fahrenheit has a nicer range for the temperatures we live our lives at, whereas Celsius compresses that range so much.

Unintuitive US units: Miles - I still have a very hard time with how far this is, km was much nicer.

Apple Rankings 4 years ago

I love Golden Delicious apples. To me they are the standard of what a green apple should taste like. Crisp and tart, truly an amazing apple. Rating on this site was a 33. I suspect you're right that sweet was the highest priority.

I also really like HoneyCrisp but I would rate it in the 70s, not the 90s.

Of the high school and jr high kids I know, for most of them their life is on their phone. It doesn't cover that age group but I thought this graph was pretty interesting:

https://www.statista.com/statistics/1310218/time-spent-using...

Generally the younger you are the more likely you are to be a heavy user of your phone. There is no data for it but I would expect that high school and jr high kids are probably even higher users than 18 - 34.