I sail the high seas of the Lemmyverse, posting snarky + Lefty comments

  • 0 Posts
  • 24 Comments
Joined 1 year ago
cake
Cake day: May 7th, 2023

help-circle




  • I’m a dev but not very good at mobile.

    I can promise you that a lot of engineering work went into making the tiktok scrolling experience so smooth. Part of the trick is having a good enough algorithm that the user wants to watch the majority of served videos.

    Another huge part of it is having lightning fast content distribution and aggressive “prefetching” of the next videos in the feed.

    I don’t want to discourage you but I also don’t want you to be caught off guard by the difficulty. Do you want to make this bad enough to give it your nights and weekends for a year?



  • ELI5: a database is the “memory” of a program.

    Every piece of data that any software uses almost certainly comes from and goes to multiple databases.

    Once the data is stored, you can execute “queries” to have powerful access to update many records at a time, read particular records based on their relationship to other records, and so much more.

    Your bank balances, your purchase history, your emails, every part of your digital life is almost certainly spread across a constellation of databases.

    Bonus Fediverse content:

    Lemmy itself uses the Postgres database extensively. Posts, users, comments, votes and more are all individually stored in the database.

    Mastodon also uses Postgres. If a post goes up on Lemmy, and a Mastodon server is federated with it, the Lemmy server will send out a HTTP request to the Mastodon server containing the contents of the post. The Mastodon server will use this information to write its own record of the post in its own database.

    Regarding your question about VMs: You can run a database inside a VM, or give the VM access to an outside database via queries, or both! You might run SQLlite (a small and excellent embedded database) on the VM to track its local state, while also running queries against a large postgres database to synchronize with other services in the cluster.











  • So…the US dollar is the world’s “reserve currency”. Most international trade is actually conducted in USD, and central banks have to hold billions of USD in reserve as part of their basic operations.

    This gives the US two massive geopolitical advantages:

    • Because central banks like to hold their reserves in US Treasury bonds (which are considered safe but also pay interest) it artificially lowers the interest rate on those bonds. It’s estimated this saves the US hundreds of billions of dollars annually in borrowing costs.

    • Unless you want to use literal truckloads of cash, the only way to obtain and hold USD is through the global dollar-denominated banking system, which itself MUST comply with US sanctions. In practice this means that the US can “sanction” individuals, companies and countries - and thus nearly freeze them out of global trade and finance.

    I think it’s best to see BRICS as a direct response to that reality. The more these countries trade with each other in their own currencies, the more they weaken “dollar supremacy”.

    Over time, (20 years?) I personally would predict that the effectiveness of the US sanctions will degrade to the point of irrelevance. You can already see this (IMO) in the “chip wars” and Huawei’s “escape”. I think the proportion of global trade denominated in dollars will steadily decline, and borrowing costs will start to normalize to the rest of the world, and possibly spike.