Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
codedokode
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
91.
▲
by
codedokode
1mo ago
No, using transactions won't change anything here. > do not use throwaway placeholder rows to imitate a single item The point of using multiple rows for one product is to distribute the locks.
92.
▲
by
codedokode
1mo ago
On a large scale "rare" events happen every day. That is why people use locks and transactions or other measures. In case with shopify, they want to decide whether the user may place order or not, at the moment when the user click
93.
▲
by
codedokode
1mo ago
I now thought that "updating a row" might be more expensive than simply deleting because UPDATE is implemented as "mark row deleted" + "insert new version of a row" in a table which support multiple versions of
94.
▲
by
codedokode
1mo ago
The fsync policy equivalent to SQL database would be "fsync on each change before reporting successful update to the app". Redis (as many NoSQL databases) also doesn't have SQL and is a pain to view the data, you need to writ
95.
▲
by
codedokode
1mo ago
I mentioned that Redis can write changelog (called AOF in the docs [1]). However, if you tell it to do fsync on every update (like SQL databases do), it stops being that fast and spends time waiting for the filesystem. Furthermore, the RDB
96.
▲
by
codedokode
1mo ago
The item is reserved when the user decides to place an order, but before paying for it. Not when a product is added to the cart because the user can keep it there for a month and end up not buying. You reserve the product by creating an &qu
97.
▲
by
codedokode
1mo ago
Redis doesn't have transactions and persistence. No persistence means the data gets lost if machine shuts down or process crashes. Furthermore, after restart you will need to regenerate the data which can take time. That's why Red
98.
▲
by
codedokode
1mo ago
The problem is that in this case you have to do splits/merges. And while there are products that are sold by 100 units at a time, I think in most cases people by 1-2 items so the hassle might be not worth it. Also you might not underst
99.
▲
by
codedokode
1mo ago
Could not they shard the inventory table by shop_id? As I understand, the order includes only items from one store, so there is no need to keep all the stores in a single table. Also, I wonder why they could not have a row status (available
100.
▲
by
codedokode
1mo ago
If you have an AI, you could make it analyze crystal photos?
101.
▲
by
codedokode
1mo ago
This shows that large companies making closed-source CPUs cannot be trusted. No doubt they would add whatever the government asks them to add. What can be done to mitigate this? One option would be to buy a large FPGA and flash it with an o
102.
▲
by
codedokode
1mo ago
Sounds like GDPR?
103.
▲
by
codedokode
1mo ago
But aren't you also "count-shaming" parent comment for preferring women with specific number of previous partners? Maybe they are not the only one frustrated. Also, in Muslim countries and regions it is typically expected for
104.
▲
by
codedokode
1mo ago
The article is too long. Judging about beauty standards by using sex dolls as an example is not very smart, first, because they are targeted to a small niche audience with specific tastes, second, they do not look especially attractive in t
105.
▲
by
codedokode
1mo ago
Unless they are very tall or very short, probably no.
106.
▲
by
codedokode
1mo ago
So for example, a 6 feet tall nerdy-looking geek is better than 5' 6" athlete or celebrity? Doesn't seem logical to me.
107.
▲
by
codedokode
1mo ago
Weight varies much more than height (there is 3x-4x ratio between extreme values) and is instantly noticeable unlike height, so I think this is a bad comparison.
108.
▲
by
codedokode
1mo ago
I am curious why is height important? Understandably, income affects the lifestyle and opportunities, but what does height affect? What changes if you are several inch taller or shorter? I cannot understand. Also, why those who care about h
109.
▲
by
codedokode
1mo ago
IMEI is like a MAC address. You are identified by the data in the SIM card and not by IMEI.
110.
▲
by
codedokode
1mo ago
IMEI allows tracking the phone if the user changes SIM card, so it is harmful. It is also available to any application to identify the phone. That is why it should be randomly changed. As for recovering stolen phones, nobody does this. Also
111.
▲
by
codedokode
1mo ago
In C/C++ just adding two integers can lead to undefined behaviour. Your expectations are too high.
112.
▲
by
codedokode
2mo ago
Is "defer" a good pattern? Aren't constructors/destructor pairs, like in C++/Rust, or "with" blocks in Python, better, because you cannot forget to call the destructor. I the first code example in the arti
113.
▲
by
codedokode
2mo ago
It has a "definition" for wheel in SVG inside <defs>, but did not use it in the picture.
114.
▲
by
codedokode
2mo ago
This is why you should use open-source firmware where there is no registration and customer IDs. Also, the software should allow overwrite IMEI to a random value daily. > Boardman believed the meeting would finally address both issues. &
115.
▲
by
codedokode
2mo ago
It just needs some minor cleaning and renovation.
116.
▲
by
codedokode
2mo ago
Don't you think that at the 1900s photo the city looks better? Look how wide were the sidewalks and how little cars were there. Also, I initially thought that large store building was not historical, but a modern one because its style
117.
▲
by
codedokode
2mo ago
Then non-Chinese labs can reopen, or they could offer lower prices right now not waiting for this event. But imagine if Chinese labs would lose. Then there will be no open models, and the prices for closed models would be raised to the maxi
118.
▲
by
codedokode
2mo ago
The problem that apps are not games. For example, a messaging app might not allow to add contacts or subscribe to channels (blogs) without parent permission in "child mode", and have no restrictions in "adult mode". And
119.
▲
by
codedokode
2mo ago
Probably parental control do not bring any profit (they actually add responsibilities, like restriction on ads, collection of data) so the large companies sabotage them by making them too complicated or broken?
120.
▲
by
codedokode
2mo ago
There is nothing wrong if a teenager wants to know more about taxes. Although exposure to tax rates might cause a slight emotional trauma.
More ›