With AI assistants on our phones, it can be hard to tell the difference, and people often use it for completeness or clarity. Blind AI rephrasing has a cost though, sacrificing your personal voice, and often resulting in overly enthusiastic and repetitive sentences.
We've long passed the point where I can tell a good AI comment from a real one at a quick read through of a comments section. It's only the blatantly bad ones (blocks of listicles we delve into) which stick out like a sore thumb. That said, I think that says more about how good AI has become than it hints all the long established accounts in this thread using one just because they could.
Finding a business / product that actually is working is unique. When you find it, stick with it. Nothing is perfect, and shit is going to be hard, it’s just the next level of the company. Be optimistic — look for what’s working and do more of what’s working. Don’t let pessimism get routed in the way you think. All of that, and fight the urge to build first — sell first.
SELECT * FROM A, LATERAL (SELECT * FROM B ORDER BY a.embedding <-> b.embedding LIMIT 2) AS closest_in_b ORDER BY A.id;
It’s going to have so-so performance. So, don’t hose your production server. Create a vector index on b.embedding. HNSW will be nice for this use case.
Protip: in CRUD applications, most performance issues from the data layer have nothing to do with the database.
Typically, the performance issues are at the ActiveRecord level, when it's initialization 100s of instances of an object to render a table. With Rails, the #1 optimization technique is to use `ActiveRecord::Base.connection.exec_query ` to return a hash instead of initialization objects.
Another trap people fall into is doing joins in their application instead of in the database. I see this all the time where people will query some table with a condition, map the ids from the result and then query another table (which also joins the first table) and then filters by the id of the first query. Or just doing massive aggregates in ruby instead of having the database do it and just spitting out the result.
A little bit of knowledge about SQL and how a relational database works goes a long way.
It also wraps every query in an explicit transaction unnecessarily causing locks to be held while waiting for the commit from the server which got held up behind some cpu intensive block in separate thread (prob some other request deserializing and hydrating those 100s of entities you mentioned).
I see. Well you could have been more explicit in your original message, I don't think it was obvious at all that you were talking about updates.
Rails does the right thing here in my opinion. Anything that happens between calling `.save` and it returning should be in the safe envelop of a transaction. It can't know that you're only going to emit a single UPDATE query in that transaction, plus the framework user expects any exception between calling save and it returning to roll back. There are outs if you need them. I've worked on a few reasonably high traffic and complex rails applications and I don't recall a time when the time between the last query and the commit caused an issue. Yes times when the transaction itself had got too large and that commit was taking awhile. That said, there were more of these types of locking issues in the project I worked on 10 years ago with MySQL and repeatable read isolation level than with PG since then which defaults to read committed.
Tether is a fiat currency supported by the crypto oligarchs. It doesn't have to be backed. It just has to avoid taxes, avoid governments, and avoid sequestration.
You can't take a tether and redeem it for a dollar, so it doesn't really even have a price. Tether is just a placeholder for a dollar in the crypto-world.
Furthermore, Bitcoins aren't really priced in United States Dollars anymore, they are priced in Tether Dollars. The price reported on CNBC is tether dollars.
It's so synthetic, even that chart doesn't really matter. So, where can we find real dollars being exchanged for Bitcoin? We can find that in the GBTC trust. I would argue the actual price of a Tether is equal to the GBTC discount, which currently sits at 37%. So, a tether dollar is actually about 0.62 dollars.
Tether is definitely shady, but everything you stated is wrong.
You can redeem tether for a dollar anytime on their website [1].
Bitcoin has multiple markets on multiple exchanges. Some markets are between BTC and USD, some are between BTC and USDT, some are between BTC and BUSD (Binance's coin that is pegged to USD etc.). The reported price is a weighted average of these markets. It is never just USDT.
There are 7 exchanges on the first page of CoinMarketCap where you can buy Bitcoin with dollars directly [2]. Look for BTC/USD pair.
You cannot redeem a tether for a dollar. You can allegedly redeem $101,000USDT for $100,000, once you've paid the $150 initial club fee. https://tether.to/en/fees/
That's not so accurate. The real pegging is by exchanges which deposit real dollars back into your bank account. You know the real mayhem starts when the exchanges start stopping withdrawals.
Away from Tethers for second, given the enormous GBTC discount to quoted BTC price is there any reason to purchase BTC with USD rather than buying GBTC with USD?
Read the article. Retitled article should read “Not all nudges work”.
The interesting bit from the source article is that changes to the mean do not always reflect the value of the nudge. So, when judging a nudge, data should be spun various ways to determine impact on different segments of the population.
Hey, I'm the author this blog. It's intention is to connect technology decisions to financial decisions. Appreciate the feedback.
I totally agree with you on developer productivity. Said another way, to connect technology & finance: early on, when developer cost is much more significant to the company than infrastructure costs, emphasizing developers building the right product is more important than optimizing the infrastructure costs.
Secondly, I am a fan of ORMs. I exclusively use ORMs on CRUD-based actions. The typical first-fix for ORMs I see is to move dashboards, reports, and aggregations to native SQL. Just doing that get you a lot of performance improvements. Recently, for a friend, not associated with Crunchy & not using Crunchy, I helped them lower their cost of database operations from $2500 / month to $500 / month. All I did was find the slowest queries, determine the ORM was running a slow query, and doing an N+1 query , then point them in a direction to fix it. Because their cost of operations were looking at increasing so quickly, they were looking at migrating to a different database, NoSQL, or something else.
It is one step closer to shutting the doors on Bitcoin as an isolated financial ecosystem. Bitcoin-to-actual-USD is a trackable / taxable event. Whales avoid it like the plague.
By moving to a pseudo-dollar like Tether, market makers can hang out while they wait for a suspect better buy-in price in the future. Should pseudo-dollars go way, they actual-Dollar transactions get a taxable haircut. Additionally, the friction of going from actual-Dollar to Bitcoin increases.
Tether is effectively behaving as a crypto-clearing house with their pseudo-dollar.
These events ultimately lead to the creation of the Federal Reserve for banks to participate in a semi-cooperative system that didn't devolve into save-yourself during times of crises.
The story here is that "unless there is a massive run" is actually a fairly common event.
The big crypto exchanges are currently acting as a sort of unofficial federal reserve. None of the big players has an interest in seeing USDT collapse and will step in to bail it out at the first signs of trouble.
I'm not saying that Tether the company is not shady. They should definitely be more transparent about what assets they are holding and their collateralization, but I think the risks of total collapse are largely overblown.
> None of the big players has an interest in seeing USDT collapse and will step in to bail it out at the first signs of trouble.
As an exchange, if you keep some reserves in USDT and you think it might collapse soon, you might have an interest in dumping your positions before it completely loses value. Maybe exchanges would benefit from responding to such a situation collectively as you suggest, but I think it's likelier that they will just protect their own interests as individual entities.
Totally agree that it’s “unofficial”, which makes it a when-not-if scenario.
At some point, total collapse of Tether’s pseudo-dollar will happen when the revenue generating exchanges feel they are support bad-money with good. All it takes is one player signaling a lack of support, and others stop supporting as well.
It’s a human psychological problem that’s a old as time. Think crypto can win over human rational to preserve self-interest? (side note: manipulation of self-interest is the goal of “weak hands” / “diamond hands”)
A big issue with this type of support is that the risks are correlated. Sure there are multiple big supporters of Tether right now, but if the sky starts falling and one of them decides to rush for the exit the others will likely make the same decision around the same time.