- Podcasts
- Programming Throwdown
- Cryptocurrency
About this episodeToday we explain how cryptocurrency works and why it is possible to buy and sell electonic currency. Show notes…
Today we explain how cryptocurrency works and why it is possible to buy and sell electonic currency. Show notes: https://www.programmingthrowdown.com/episodes/67-cryptocurrency
★ Support this podcast on Patreon ★Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
Cryptocurrency
A not so fun topic. Well, I guess it's interesting, but I want to talk a little. I was mentioning to Jason sort of consumerism—this idea that, I mean, it means lots of things, but to me just the fact that you tend to want to buy things which don't last, and then you have to like kind of keep buying for various reasons. And being in the tech industry, I think this hits a lot. That we keep hearing about new phones that come out every month, every week, and it seems like all the time. And it's always, 'Oh, now my phone is outdated. I could buy this one that's a little bit better.' But if that's your criteria, you sort of always have to keep buying new phones and new phones, and you know, always upgrading your stuff. And of course, you know, like we use a lot of our technology to do our work, you know, having a laptop, having a computer sort of necessary to doing work. So some of that's understandable, but as sort of a just in general, I try to be somewhat frugally minded in order to conserve the money that I get for doing my work by not spending all of it. Yeah, I look at it.
Yeah, go ahead. The same way. I mean, I look at money as—as work. So it's like, you know, is this new phone going to be worth, you know, X amount of hours of work? And like if you think about it in that way, it's often, you know, not necessary to get the very latest phone if you have the second latest. Yeah.
So, so that's one way I've heard described, which actually there's several apps I know of where you can sort of calculate based on how much you expect to make this year, what your sort of hourly rate is. If you're, you know, if you're paid hourly, it's of course easy, but if you're not paid hourly, you can sort of figure out what your hourly rate is and actually see sort of how many hours of work this is. Yeah.
The other part of it is, and maybe this is—I don't know if this is good or bad—but I actually use the hourly rate of my first job, like my first real job, and I haven't really changed from that. So that way it's like, you know, as if I get any raises or anything, that hopefully I can save, or that tends to get eaten up by like family things that you can't really control.
Okay, okay. I want to say that's going to be pretty bad. Um, so another way of doing that, I've heard someone describe, which this is I guess a slightly nerdy way, is if you talked about putting how much money would you have to put aside as like a sort of—you could talk about like an annuity or an investment? Like if you say the stock market returns on average seven percent, as like a gross simplification of this guy's scheme. If you say the stock market average returns seven percent, if you wanted to put enough money away so that you didn't use the capital for a purchase but just the interest, how big would it need to be relative to how long you'll use the item? So if you say I'm going to buy a car and I expect to drive my car five years then, and a car costs ten thousand dollars, how much money would you have to put away so that you would earn ten thousand dollars over five years off of that investment? Oh.
Right. So if you put, you know, a hundred thousand dollars and earn five percent on—I'm simplifying the numbers just to make them easier—then you're saying that's five thousand dollars a year. So if I put a hundred thousand dollars in an account that earned five percent, then I could buy use that money to buy something that costs five thousand dollars once a year. That makes
Oh yeah, yeah, sorry. Like—it means you actively went out and you did a job and you got a salary, and your boss or somebody paid you for that work, right? Passive income is is is I mean it's really it's investing, but it's more than that. Basically any way where you can put in money and take out more money without doing any work beyond just—well, it's something
that doesn't take your active attention. So like if you made a website that earned advertising revenue, you put in it isn't really earning active income because you worked on it, but the amount you make isn't really per se related to how much work you put into it. It's sort of earning it passively. Yeah, that's
There's a lot of ways to sort of think about that. You so you earn for—you could earn for many many years off of some website article that you wrote, even though you only spent, you know, a couple hours working on it. And if that ratio is pretty good, like if you spent, you know, a thousand hours working on it and earned only a few pennies over the lifetime, obviously that's still passive income, but it was not a very good return on your investment, right?
Okay, so that's the second way of looking at sort of this passive income sort of like investment strategy, so that you get all your expenses covered. So, like Jason said, you don't have to actively work anymore. That would be awesome, but that's also pretty scary because for expensive things, you pretty quickly figure out you need sort of a large amount of money saved up to afford it. Yeah. Um then the other sort of way that I was just talking to Jason about this before the show is I ran across an article many years ago. Unfortunately, the original article hasn't actually been updated because it's become even worse, but it says it had a list of all of the Apple products up until that date, their initial price, and then what would you have in value of Apple stock if you had bought that many dollars of Apple stock instead of that item. So, you know, the example here I found that's updated is if you bought the first iPod which came out in 2001. So, for some of you, you'd be like, 'Oh, that was forever ago.' But some of us remember that in 2001, if you bought the first iPod, it cost $400 at the time. Um but now if you had bought $400 of Apple stock at that time instead of the iPod, you would have had basically 39,000—almost 40,000.
The one I use is—I used to have this, I think I don't even know if the brand's around, Rio Rio MP3 player. Oh yeah, I remember that. I bought like this. There used to be pretty popular these Rio MP3 players. We bought Rio stock, it'd be worthless, but at least you would have had an MP3 player instead. It's absolutely survivorship bias, totally. But yeah, just kind of an interesting, but yeah.
By now, depends on when in 2001 for that specific instance. That's a really good point, but in general, I mean this is just saying if you buy the consumerism topic—you know, you buy an iPod, you buy an iPhone, you buy an iPad, you buy an Android phone, and you use them for only a couple three years, and then they're—you might sell them to somebody else and you get a little bit back. But I mean, they're mostly worthless after that versus if you sort of, you know, save up that money or invest it, you know, it's sort of it's continuing to earn and becomes worth more and more. Interesting ways of sort of—I tried to limit because I think I think our culture, well some people say sort of it's important for our culture to have people spend a lot of money that's how the economy grows. But as an individual, it's also very dangerous because this isn't this is like some PSA or something, but you know, it's also very dangerous to spend a lot of money, right? Spending money you don't have—you know, being forced to have to continue to work for more years than you would like to because you spent instead of saved and those things didn't last. I don't.
Yeah, and why did the stock keep going up? Because people kept buying iPhones. Like like the stock wouldn't have kept going up after 2007 or 2008 if everyone had just stuck with the first iPhone for three or four years, right? So it's sort of like—you know, you need you need people to keep buying things so that you can profit on your investments. But as an individual, like you don't want to get caught up in it yourself, so to speak. One thing I found kind of interesting is the cost of living across countries, and even for just bare essentials, the cost varies just enormously. And I found this thing called the Purchasing Power Parity Index, the PPP, and it'll show you, you know, for basic, you know, milk and all sorts of other things how much those things cost in other countries, right? And it just kind of boggles my mind like why there's such an enormous difference. Like why should, you know, milk or water or just simple like like rice cost just like 10 times as much in one country than another? I mean, I talked to someone at work about this and they were saying things like, 'Oh, you have to ship it,' or 'you have to grow it and the land is more expensive and the labor is more expensive.' And I can.
I don't know either. I know in the U.S., you don't, but but either way it's like, you know, ten times as much. It just doesn't really make any sense. Um, and uh yeah, I just it's one of these things that kind of always boggles my mind because you know, you hear a lot about people saying, like outsourcing, right? Like people are gonna do work in this other country because it's cheaper, right? And I mean, obviously some of that is—is maybe there's like certain luxuries that people have in one country not another. But even just the basic staples of of uh like just the basic food and things like that are just massively different across countries. So somebody could potentially have like a more luxurious life with far less income in another country than they can in one country, than they can in another, and it just—that part doesn't really make sense to me. It seems like there need—there would be some kind of arbitrage there.
Well, but for some stuff like food, there's probably also regulation about testing and quality control and stuff, right? So like you brought well, milk has like perishable problems. But if you took something like rice, like it might be that the rice you find in one of these things that's one tenth of what it is in another place. The quality control—now you may argue that it doesn't matter, like you don't actually end up with a better product, but it might be that there's certain certificates required and testing to be done, and all of that things adds cost and that prevents someone from easily sort of taking the cheap rice in Country A and just bringing it to Country B because Country B has essentially deliberately made that not possible in some way. Or else somebody would arbitrage it, right? Somebody would—if the transport costs and all of that stuff lined up, would take stuff from place A and sell it in place B.
Yeah, that makes sense. Yeah, it must be like regulation also. There are things that I don't know if they even can be. So for example, um, I have a lot of family in Europe and they'll go to different countries for medical procedures, right? But in America that—that doesn't happen. Like if you need, you know, some kind of surgery, you're not going to go shopping around in different countries. And the reason why is because it's like so heavily regulated. Like you basically need to have, you know, your insurance subsidize your health care, and they're not going to subsidize a procedure in another country. And so—so in this way it's kind of regulated. I mean, the legal system is also in the same way regulated, right? Like there's—and it's not it's not a malicious thing. It's just the nature of it. Like there's a set of U.S. laws that's different, and so you can't just go to another country. You can't outsource your like legal department. Um, and so maybe these things just add like cause like the fact that you can't really outsource legal and medical stuff—that cost percolates into everything else. Like even if you run a rice farm or even if you're a rice importer, if someone in your ship gets sick or something, you have to pay like an extraordinary fee or something.
Any good answers. My news is is way less high concept. It's um basically I won't go into a whole bunch of detail. There's this thing called the Mandelbrot Set. It's a recursive equation, and um because it's a recursive equation, you can plot this equation, and and it's a generative equation, which means it's like the Fibonacci sequence, right? It builds on itself. And somebody just kept building it and building it and calling it and calling it many times, and uh they zoomed into the Mandelbrot Set by a factor of two to the 760th power. That is—that is a lot of zoom. And you can literally watch for I think it's ten minutes of just this like just you entering this Mandelbrot Set and just this vortex of different patterns. I think it's kind of cool. Yeah.
Can't do here because it's all mathematically defined. So you just keep running the equation for sort of arbitrary levels of, I guess, precision, and then you can just keep going further and further and further, smaller and smaller things. If you sort of try to do one of these naively, you run into a lot of problems with arithmetic, problem like stability because you start getting into really tiny numbers, so you have to be very careful in how you represent them.
Yeah, exactly. Yeah, you have to do this sort of shift where all your numbers are like, you know, e to the negative 200, but you're not even storing that anymore. You're just kind of storing all the numbers relative to each other, and yeah, I can only guess at how to do that, but it's super interesting. It's kind of fun to watch.
It around, but in this one they're not even moving it around. They're zooming in on exactly the same. Like there's no translation. It's just straight zoom. Yeah, it's wild. Oh, interesting. Okay, I'm gonna stop this. All right, 10 minutes later, I'm gonna be here for 13 minutes. So we did a previous episode just recently on code reviews, and there was a post recently on Google's testing blog which says it came from their 'Testing on the Toilet' episode that they had to sum up code health and talking about steps that you can do before you send out a code review. So we talked about a lot of how code reviews should be done, why it should be done, and only part of it is actually to kind of—I saw some other sort of discussions where online after that episode where people were talking about, 'Does code review really improve your code?' But I think actually improving your code is only one small aspect of what a code review is for. You know, yes, it's good to try to catch bugs, but that's not really—I don't want to say it's not the main purpose, but it is really not the only purpose, almost. I would say I'd have to think about it for a while, but close in importance is also the fact that you're getting someone else familiar with what you're doing. You know, having a second opinion, just engaging with other people on your team, right? And sharing what everyone's up to and what they're working on. And also allowing for easy sort of learning and mentorship between between people. All of those are useful purposes. But here, you know, the Google blog was talking about that the best reviews are probably the ones where you don't get a lot of feedback or you don't have to, you know, iterate through many times. And so I had a bunch of tips about things to do before you start and then things to do when you're sort of addressing comments to prevent things from spiraling out of control, and I thought it was pretty—I'm not going to read all of them because that'd be kind of boring. You can just go read the blog post yourself. But a couple of them don't make it great. Yeah, don't make them too... Big, and then the ones that you know everyone probably says they should do but doesn't always do, which is I try to do sort of upload, if your tool supports it, upload the review and go through it yourself first and make sure you didn't miss any obvious things like leaving in test code or yeah, um, you know having a file where you were changing some stuff and and decided to do something different and you forgot to revert it. You know that kind of stuff. Yeah, for...
People who don't know 'Testing on the Toilet'? Is this thing that—I think I mean, I'm sure other companies do it, but I first heard about it at Google, and from Google. And basically, apparently in their bathrooms they have instructions on, you know, how to be a better software engineer so while you're, you know, sitting in the restroom, you can look, look.
Okay, so my news is—second news is 3D bin packing for 3D printer mass production. So the idea is, let's say you have a 3D printer. You want to make a bunch of little trinkets. Maybe you want to make a bunch of cool toys for all of your cousins, but you want to do it in one print job. Like you want to set it, you want to, you know, do something else, come back, you know, in 12 hours and have it be done with, you know, 10 of them instead of having to print one, take it off the machine, print another one. So this person did 3D bin packing and kind of explored that and ways to do that efficiently, right? And so for people who don't know, bin packing is where you have a certain space. So imagine like 2D bin packing, so you have a square and then you have a bunch of things that are a bunch of polygons, and you need to fit as many of these polygons as possible into the square, right? And there's different goals. Some might be the number of polygons; it might be you want the total area to be consumed as much as possible. And so that's—that's the bin packing problem. And there's no like it's an NP-complete problem. NP-complete problem, which means that there isn't a way to just do this fast, right? Like like the only way to do it to make sure you got the best answer guaranteed is to literally try like every possible arrangement, right? You know, that is pretty extreme. It's gonna take a long time. It's never gonna finish. So there's all sorts of bin packing algorithms that give you, you know, approximately the best solution as long as it's not some degenerate case, but there's no guarantee, but they run very fast. So one is simulated annealing. Simulated annealing is very simple. You start off by just... Randomly putting things in the box and then you start swapping. You say, 'Okay, take this piece out and see what I can put in its place.' And if it's better, then do it. Like if you could take a piece out and put two in, then just do it. Right? But if you could take a piece out and you can't put anything in its place, then sometimes do that anyways. Like some—then they call this the temperature term. So sometimes you, you change the solution and you make it worse, and with some probability you're going to take that worse solution. And the idea there is maybe it'll lead to anything better solution. And so over time you're constantly taking things out, putting things back in, and as you do this, you're lowering the temperature to the point where the temperature is zero, and you're only making a swap if it's better. That's called simulated annealing, and this person implemented it in 3D, and it's kind of cool. You can actually see it figure out different ways to arrange objects so that he can print, you know, eight of them on a one 3D print. So yeah, check it out. It's pretty cool.
So I think you're okay. So, um, my second article is a series of programming observations. I don't know, it's not great, but the one I saw was pretty good because specifically about the nature of our podcast, I thought was applicable. And apparently, I'm in a very advice-giving mode today. First, I talked about testing tips and about consumerism, and anyways, whatever. It's a thing today. Uh, and this was a quote from this web page that every five minutes you spend writing code in a new language is more useful than five hours of reading blog posts about how great that language is. Okay, that's
saw this on Reddit. Someone had posted this, and I went to this page that also lists a bunch of these other things, like the likelihood of Perl being involved in a system is directly proportional to the length of time the system has been in maintenance. Nice. Anyways, they just have, you know, like probably like 10 of these things. I guess this is a little—probably from a little while ago, but I hear a saying linked to the Wayback Machine, 2007, but most of these are still applicable: Think twice before presuming that CSV is a nice little easy file format to use.
I was gonna say if you have a quote inside of a quote, so you know, you use quotes in a CSV when you have, let's say, commas in the field and so you want to quote the whole field that way the commas don't mess up the rest of the file, right? But what happens if you have a quote inside of the quoted string? It turns out you have to actually—I think it's double-quoted. And so if the CSV, you know, parser sees two quotes, it interprets as a literal quote, and that is just a very bad design decision. It turns into a total nightmare. Yeah.
Book of the Show. My book of the show is—the first book I bought on Audible. Now that I've been using Audible on my on my shuttle ride, so it's—it's called The Circle. It was pretty good. So it's—I felt as if I have kind of a mixed review. On one hand, it started out amazing. The basic premise of the book, without spoiling anything, is this lady joins this company, and the company is very progressive, and they have all sorts of cool perks. There's like a strong company culture, there's like a you know badminton team, a basketball team, there's all these different organizations, and it feels kind of like joining a college campus or something. There's just so much to do. There's a lot of friendly people. There's all sorts of different activities, free food, all this stuff. And basically what she finds is that it's sort of taking over her life. And when she tries to pull back a bit, things kind of go south. And basically, it's an interesting book. The thing is, I feel as if the writer kind of ran out of steam. This is—I think Dave Eggers, and I think he ran out of steam kind of halfway through the book because it actually like I was really surprised because I had gone halfway through the book, and then all of a sudden there was like a sex scene described in the book, and it was just really like it didn't really fit at all. And then it just seemed like—I don't know if that just put a bad taste in that, but it seemed like after that the book just turned into like a romance novel. Like it's just everything was about boyfriends and stuff like that. And the whole thing about this company taking over this person's life was just kind of like it was still there, but it's almost like there's all this extra filler. So, you know. It's a little bit of slog to get through to get to the ending, but it's a great story. The overall plot is great, and I skipped like a couple of sections, and with that, I would definitely read it again or I would you know advertise other people to read it, but get ready for you know a little bit of you know a little bit of mud to have to have to slog through. But overall, it was it was a good book. Yeah.
Or four stars. Yeah, that's fair. It's fair. So mine is a book that I had actually tried to listen to before, read before, and didn't make it through. Like started it, just kind of gave up. So I went back because I've had so many people sort of like online recommend this to me. Then at work, actually somebody was telling me that they just think this thing's amazing. This book was amazing. And then actually someone else who I didn't even know was into sort of science fiction was chipping in that, 'Oh yeah, this is a really good book.' Um and it's always interesting with co-workers, you know? Like, you know how people are, but you don't necessarily know what their tastes in books are or whether like sort of compatible with you. Like you have to sort of calibrate against people, um which sounds really weird. I don't mean that anything like weird. I just mean that.
Yeah, and some books are like very popular, and it's actually really hard. And I know that Netflix talked about this in one of a blog post I read from theirs, whoever knows how long ago, but that like if you watch a popular movie like The Lord of the Rings, um that doesn't mean they can start recommending to you like another fantasy movie because The Lord of the Rings was sort of like almost like a pop culture phenomenon. Yeah, it was like had mass appeal, but that doesn't mean that you were likely—like what do they recommend to you? They could recommend to other blockbusters, but they and they will probably recommend to you some probability of other fantasy movies, but it's probably not a strong recommendation.
Oh, okay. Okay. Yeah, you can't learn much anyways, right? So I don't think this is a super super popular book, but it did win the Hugo Award. All right, cut to the chase: this is The Three-Body Problem by a Chinese author who I won't—I won't attempt to pronounce the name because I'm terrible at such things. Um but apparently this is like the best-selling or at least one of the best-selling authors in China. That it's a very, very popular person there. And this is not in Chinese; it's been translated. Um and the translation was really good other than the fact that um you know the sort of names are preserved as best I can tell and in sort of the English version of the Chinese name. Um Okay, what I mean there is that it isn't that they gave them like Alan and Bob; like they use the original Chinese name. Oh, got it. And it's—and it's large but it's written in English letters. Was that called transcription? Transliteration? That's something like that, something.
That's what you're saying. Um and it did. It was a good read because I felt like it was sort of inherently different than most of the other science fiction I read, which takes a sort of Western view of things. And so you sort of fall into even if it's different authors with their own unique ideas, you sort of fall into these common tropes and common ways of acting and interacting with people. Um and so it was very nice to see something presented from a sort of different—it felt almost kind of, uh, it sounds bad, like a foreign view, something that isn't what I'm used to reading or what I'm used to experiencing. And it was nice to read a book that way, but it was still science fiction. It still had some of those same themes, but they were presented in in sort of a fresh way. Um and so I thought that was an interesting read, but I won't say that it was my like most favorite read ever. Um But it was definitely—and apparently there's—I didn't. So some people who I talked to didn't actually know there were more books to this, but apparently it's a trilogy. And this is the first book of a trilogy. Um and so I sort of expressed to to one of my co-workers who had read all of the trilogy like, 'Yeah, you know, I wasn't super enthused overall about it.' Uh and he sort of said, 'But this is kind of only the opening gambit that like the real meat of the story takes place in second and third books,' which I always find to be interesting for things which are trilogies, which is they really do need to hook you in or you're not going to read the second book. And so like what do you do after you read the first book? Do you say, 'Well, I'm going to give it a fair shake and read the second and third books?' Am I going to give it a fair shake and only read the second book because then it's sort of unfortunate not to read the third, you know? Like what do you do? Like I probably wouldn't have actually—I wouldn't have gone ahead and tried again reading it if I had known it was going to be a trilogy. That sounds horrible because now I'm in this awkward position.' Yeah.
Know, but they really recommended the first book. But they recommended it in light of the whole trilogy, but I didn't know I was signing up for a full trilogy commitment. But they didn't tell me that. It was only because, you know, your memory is sort of skewed, like you remember the first book in light of what you learned in the second and third books. Yeah, you know, it's like when you re-watch The Matrix movie. Oh, this is a dated reference; it's not the same as the first time you watch it. Yeah, because yeah, you
Yeah, so okay, that was a sort of a side tangent, but The Three-Body Problem. It, you know, it was definitely a fresh read. It was something that was different for me. And I enjoyed the experience of, you know, trying something a little different and new. I don't give it my highest marks, but I do think it was.
A good book? Cool. That makes sense. And you can read both these mediocre books? Oh! Man, well, you know the thing is, we—uh, you know, we always report the books that we actually read. I mean, I actually saw recently a book that I thought was pretty cool, but I felt like I'm not going to mention it because I haven't read it yet. And, um, you know one thing that we try and do is—is we try to read every single book that we recommend. Um, and we were sort of doing that on Audible. So if you want to check out Audible, you can go to audibletrial.com/programmingthrowdown. If you don't want to go on Audible, you can still support the show by going to patreon.com/programmingthrowdown, and we have links in the show notes. And we definitely appreciate all of you for checking out Audible and supporting us on Patreon and you
So my tool of the show is—um, as everyone knows, I got a 3D printer, and I've been super excited about that. I've been printing just unbelievable amounts of stuff. A lot of it is just cluttering, you know, our whole house, but some of it, the things that really went over the best were these screw puzzles. So for people who don't know, a screw puzzle is basically—um, if you remember, these were really popular back in the day. I don't know if they're still popular, but remember that puzzle where there are the horseshoes and the horseshoes have chain links?
Each other. Yeah, and there's a ring in like going around the chain, like a metal ring, and the ring, you know, can't fit over each of either of the horseshoes to get out. But if you bend the horseshoes and the chain link in a certain way, then you can actually, you know, create a surface that's narrow enough for the—for the—um, for the ring to escape. And so screw puzzles are basically that there are ways for you to sort of turn objects in a way where you can either separate them or put them together. I mean, they're both effectively the inverse of each other, so they're both interesting. Um, and so there's—there's actually a thing of ours blueprint for printing, I think five screw puzzles, and they have different levels of difficulty. Um, so the easiest is it's basically looks like a bagel, but it's been cut in a certain way where you have to just screw the two pieces together to get these two pieces that are just very oddly shaped, and if you just kind of try to put them together like two halves of a bagel, like it's just not going to look right. But if you kind of screw them into each other, you can actually create a bagel, like it looks like a torus, right? Um, and they have a bunch like that. They're super fun. The only thing—uh, um, uh, you know, you have to sand it down. I actually cut my finger on one of them.
Super super entertaining. Especially after I sanded them down, I was able to like, you know, give them to my family and let them try it out and stuff. Um, so yeah, if you have a if you have a 3D printer or I think on Thingiverse, you can actually outsource it um to someone with a lower purchasing parity index or whatever you can. Yeah, you can through Thingiverse, you can pay, you know, a certain fee, and they'll actually print it for you, or they'll figure out a way to print it for you and send it to you. Um, so either way, if you have your own printer or if you want to just go on there and pay someone to print it, um I found them super fun, and I'm gonna definitely get more of them.
My tool to show as usual is is although you did just present a like printed object. Um, but mine is weird. So mine is Inbox from Gmail, and I I, you know, I know everybody knows about this, but I just wanted to, I guess maybe rant a little bit for a second, but I still feel spoiled by how nice. I really resonate with the Inbox way of doing things. I don't know what it is; it works for me. It makes sense to me. I've also used Gmail with tabs, and and I you
Yeah, I don't know my mail.google.com. I think it redirects to Inbox now, but oh okay. Um, you know, I really do like Inbox. I like the fact that I can sort of do the there used to be a another project called Boomerang that you could use to do this in Gmail, but now Inbox does it directly where you can sort of send an email message to go sort of archive itself and then come back to you in a certain amount of time. Um, I use that all the time for like, you know, hey, I need this to come back, but not right now. So like, you know, I'll get an email from ThisIsNotTrue, but like oh, my credit card is due at the end of the month. Well, I don't want to know about it at the beginning of the month. So, you know, it's come back to me, you know, a two days before you're due. Um, and then I can go online and pay this bill or whatever. But I, you know, a couple things. One is like people who are still using the old school Gmail. It's just like, oh man, no. I feel like the Inbox is so much nicer. And the other thing is well, I I know people like the way things are because they're the way things are, but it's really frustrating for me to use other. Like my work mail is just like, ah, I so much wish this would be more like Inbox or you know whatever. Like it just feels so stuck in a dated way of doing things. Um, yeah, my
But I do like the fact that it's it's like it's not like API compatible isn't the right word, but the paradigm in Inbox is perfectly compatible with regular Gmail. Like you can send messages to be snoozed in Inbox and then switch over to normal Gmail, and it'll still work fine. Then in Gmail you can set up all your filters, switch over to Inbox, and it'll work fine. Yeah, it's amazing.
Yeah, I think it's I think it's amazing. It's like it's so powerful that everything else just feels like it's in the Stone Age. Like if you're using Outlook, if you're using YesMail, if you're using any any of these even Thunderbird, any of these things, it feels like you're living in the Stone Age because
It's more than just the mail client. And I know like, you know, there's a lot of concerns about Google. I'm not dismissing those; those concerns are very legitimate about, you know, sort of honoring privacy and sure what data they have. Yeah, I I I'm sensitive to those as well, but, you know, I guess in this thing it's just so good. It's compelling. Um yeah, and that's sort of scary, I know, I got it, but um the fact that when I, you know, my wife and I are looking at booking a trip and, you know, so we made some reservations for, you know, an airline, and it sort of bundles those up together and creates oh, you have a trip to this location. And then when we book our hotel, I know it'll bundle it into the same thing. And so then when I go, oh, I don't have to keep those things sort of in my active inbox. Oh gosh, like in the active display, I can send them away because I know I can go back to my Trips and sorted by location and by date. I can just sort of click, and it just has everything automatically organized without me having to do any.
whole, but anyways that's true. If you're not—this is just like sort of my opportunity to like gush a little bit about how much I've realized I really do enjoy Inbox. Like there's a lot of weird stuff initially, but it's really just kept getting better and better, and everything else just feels so bad to me in comparison. Yeah, I agree. I
So all right, time for cryptocurrency. All right, let's do it. So I guess cryptocurrency is just the catch-all term for the kind of new digital online currency that's backed by sort of cryptographic notions, but I guess it's not a completely accurate description, but we'll go with it. I think it's a pretty commonly used.
And so the most common one, the grandfather of them all, the father of them all, the root of the family tree was Bitcoin. There were previous digital currencies before that. You know, some famous, some infamous, but using this sort of the important thing here and what we're going to talk about with all these cryptocurrencies is the distributed notion—the notion that it isn't held by a central source. So if you took things like
But even like PayPal, and previously there was this like E-Gold or whatever. Like you know, I think on all of those cases—I mean, I'm not that familiar with E-Gold—but like you know they were held by a sort of central authority who, like Jason's saying, you pay dollars and they give you a quote-unquote gift card, um which is some ledger that they keep that says, 'You know this thing, this dollar value was converted to this IOU.' But if Macy's sort of goes away, the IOU is worthless. That's right. Um and so that's not true for cryptocurrency. They try to handle that in a different way, and you'll hear that the distributed ledger—we'll talk more about in a few minutes—but Bitcoin was sort of the I guess first one to get a lot of mainstream adoption. We've talked about it over the years. That sounds weird to say, but over the years we've talked about it on Programming Throwdown several times and in several different contexts, and um yeah.
I have I have 0.05 of a Bitcoin that someone gave me that's right six years ago when I was like I created a wallet. I was like I'm gonna try to mine a Bitcoin on my laptop CPU. Yeah, and even at that time, I don't know if it was even possible, but there was somebody who had a website where if you gave them your ID they would send you, you know what at the time was—I think I'd have to go look up, I think it was like a penny or a few cents. Well, today that's worth like $136. So somewhat internet stranger, thank you. I don't know who you were, but you gave me what is now worth $136, which is amazing.
Haven't even—not an even, but I have a maybe opposing sad story, which is on my lab PC at university. I set it to mine a Bitcoin and I left it running for I think like almost the whole winter break, but then by the time I came back, I'd already forgotten about it. And I don't know if I even mined a Bitcoin or not. Maybe I mined 10, and I just exited the process, and I have no idea what I did.
Oh, I know. Right. So Bitcoin was, you know, actually solves a sort of well-known set of problems that didn't have good solutions about how to do this consensus, this distributed ledger stuff. And it was written by a guy who's not his real name and no one actually to this day, even as far as I know, the public doesn't know who this person is—Satoshi. I don't know that's how you say it, but and this person created they published a paper, they started doing this. They actually mined, you know, a bunch of the first Bitcoin, and they sort of for a while were stewarding the kind of rollout of Bitcoin and how things working. And then they sort of kind of went off the radar, like they stopped doing anything. Now maybe they just changed their their handle, their username, and they still are active in the community but not under the you know, not acting as the founder and creator of Bitcoin. But interestingly, like with Bitcoin's recent run-up, which we'll talk about—you know why these have dollar values make sense or not later—with the current value, I mean the amount of Bitcoin which is associated with Satoshi is very—I haven't looked at it recently, but I mean it's an astronomical sum of money that he has under his possession. But as far as people know, they've never he's never actually exchanged any of those in for anything. He's never transacted acted on the Bitcoins that he has.
So someone's saying that they've estimated it like that because it's not for certain, for certain, but about a million Bitcoin. Wow, which at today's prices would be is two billion dollars. Yeah, that's crazy, assuming assuming that he could actually liquidate all of it without causing the market to go down.
Briefly, I want to talk about. So we're going to talk at a high level about—you know, a lot of this sort of interchangeably but quickly. I just want to talk about also so another one the other big one besides Bitcoin as far as market cap goes, there's other things like Dogecoin and Litecoin and all that, but the other big one by market cap is Ethereum. And we won't talk a lot about it here, but Ethereum has some interesting properties that are slightly different than Bitcoin, and that you can sort of run automated scripts as part of the system, as part of the blockchain that it uses. And one of the most interesting experiments to me is this creation of the DAO, the Decentralized Autonomous Organization, which was a series of scripts that allowed investors to sort of vote on taking on investments and other people who had ideas. And then famously got the script had a bug in it, and people were able—a hacker was able to exploit that bug and sort of steal a ton of money from this DAO, this Autonomous Organization that people were voting in. That was this corporation stole many millions of dollars and hold the Bitcoin or hold the Ethereum sort of not hostage but hold it until they were going to presumably spend it. And instead, they act the whole Ethereum community basically decided to make a fork of the software to reach a consensus that basically those transactions were as if they never happened. So the DAO was never created, the guy never stole it. Everyone just got their money back as if nothing happened, which is
It is unbelievable. Yeah, so mining Bitcoin or just, you know, sort of mining cryptocurrency is the notion of sort of doing some work on your computer. Some people talk about it's like searching for a prime number where you don't really know where a prime number is going to occur next. They are—oh, I'm gonna mess this up because it has strong statements in number theory, but I always forget exactly what it is. But the just the distribution of primes is sort of statistically known, but you it's ran to the interspacing is random. You never know how close or far you are to the next.
Right. Oh, good. I did it! Yay. And so to sort of find a prime, there's no good pattern. You should obviously sort of skip the even numbers, but aside from that, there's no real pattern. You kind of have to check every number along the way and see if it factors or not. And similarly when you're mining Bitcoin—the what's happening is a new Bitcoin is, and we'll just use Bitcoin in this example—a new Bitcoin is being created, and the person who successfully mines it gets to own that Bitcoin. And the Bitcoin itself is equivalent to trying to find a number which combined with a bunch of transactions that have happened in Bitcoin—that and some hashing and cryptographic signing—but basically finding an input that you modify, finding a value that makes the results match a certain pattern. And when it matches that pattern, that you reach a hash of a certain, you know, description, then you've sort of mined the Bitcoin. And so everybody is sort of working to try to mine the next Bitcoin block, and whoever finds it first because it's sort of ran—you're just randomly trying numbers, and whoever finds it first sort of gets that Bitcoin. And so it's as it's like this big race to find it out. And this all gets really confusing, so we'll have a link to a little tutorial-like video and description interactive not of the full Bitcoin protocol, which is quite in depth, but of notionally how all of this works at sort of a simple level. Right? And you can check that at anders.com/blockchain. This was really helpful to me, and the first time I kind of really understood a lot of this was sort of going through this and understanding, 'Ah, this is how this works.'
Yeah, I mean a lot of it comes down to what we talked about in our cryptography episode, which is like these non-reversible mathematical operators. Right? Like for example, let's say I told you, 'You know what's two plus two?' Or let's say let's see what's one plus three. You'd say four. It's very easy, right? Let's assume for a moment that there wasn't subtraction—like addition was somehow not reversible—and I just gave you four and you had to give me the one and the three. That's hard, right? Because it could be zero plus four. It could be four plus zero. It could be two plus two. Three plus one. It could be one plus three. Or, you know, if you get negative numbers—let's forget about negative numbers for now—but there's all these different possibilities and there's no way to know like if I'm holding the one and the three and I'm asking you, 'You know, hey, I have two numbers added up to four. What are they?' Or even if I give you one, if I say, 'Here's a one, give me the number that, you know, that plus one is equal to four.' And again, let's assume there's no subtraction—like we're in a universe without subtraction—there's nothing. You really do, you just have to try all the numbers. You're like, 'Is one plus one four? Is one plus two four? Is one plus three four?' Okay. Now obviously there's subtraction; you just invert the addition, right? But but there are some operators you cannot invert. And so that's basically somebody gives you, you know, one—they give you two of the three parts. They say like 'X' and this operator and then 'Y' is equal to this new number 'Z,' but you don't know what Y is, and you have to kind of figure it out, and there's no way good way to do it other than just trying a bunch of numbers. There's just heuristics and things like that, but there's nothing like guaranteed. So yeah, you have to do a lot of work to get a Bitcoin, right? So you have to solve this mathematical problem that's again it's easy to create, but if you're not the creator, it's hard to solve. And so that's a cost—like your computer's gonna have to spend some energy to do that, and you're gonna have to spend some time. The maintainer of that computer is gonna have to spend at least a little bit of time to do that. And that means that that has value. So if you talk about, you know what like what gives something value, it's basically three things. The first is the amount of labor. Like for example, you know diamonds are very hard to get. Like I can't just, you know, go outside in the backyard and scoop up some diamonds. And so because of that there's going to be an intrinsic value there. Like even if diamonds were like smelly and looked ugly, you know, as long as somebody needed a diamond for something and it's very hard to get, then that person's going to spend a lot of money on it. Think of like a moon rock. Like a moon rock is so hard to get, and so even though it pretty much just looks like a regular rock, it's very valuable, right? The next is sort of psychological value. Like a diamond's going to be worth more than say an emerald, and it's really just because of, you know, humanity—like we've sort of decided on that, right? Um there are some things like an iPhone has a very large profit margin, which means they could make it cheaper and still make money, but they don't because they figure out that enough people are going to buy it at the high price. And that's—that's psychological, right? Another one is is the historical trend. So you know if an iPhone is going for sale for let's say 500, even if something kind of drastic happens, unless there is kind of like a widespread panic, something that's that's public that really gets out there, things tend to just be worth what they're worth. Like like there are things that that kind of tend to just hold their value. To some degree, or they depreciate, but it's kind of a known quantity, and the depreciation factor—there's some inertia there. And so those three things pretty much describe why anything costs what it does. It's it's one of its some composition of those three factors, right? And so Bitcoin has, you know, all three of them. There is a certain amount of labor to get a Bitcoin. Um the psychological value is—is, you know, it's been around for a long enough time and enough people have kind of agreed and enough people have turned it into money and back into Bitcoin that that people are sort of mentally they're uncomfortable with it, and it has a trend. Like it has some upward trajectory. It didn't just, you know, become super valuable overnight. And if Bitcoin all of a sudden was worth, you know, a cent and then it jumped back to its original price, that would have a big impact. Like it would probably never recover because because the trend is very important. Well, so the—oh, go ahead. Yeah.
Yeah, well that's true. I guess. I guess—yeah, by the historical trend, I mean, like over the course of let's say a day or an hour or something like that. Okay? Like if you knew if you knew that you could get a Bitcoin for half the price tomorrow, or even if you knew that there was just enormous volatility, then you probably wouldn't buy one. Unless you were like just at that point—it's basically gambling, and gambling is kind of like a different sort of system, right? Yeah.
And you didn't sort of mention, but I mean there's also the notion here of the like use of a thing. So like some stuff is valuable because it has—I guess you sort of said intrinsic value is is the way that captures, but like this thing is valuable to me because it gives me something. It either helps me do something. Yeah.
So like I mean you said intrinsic value, which is part of that. It's, you know, it's like, you know gold is used in some industrial processes and it's useful. I mean it's more expensive than it's only its industrial uses, but even if they went away, it would still be useful to be able to—like gold is not it doesn't tarnish and corrode very easily, so it's really great for, you know, contacts on like that's why like the ends of headphone plugs are sometimes gold-plated because they don't corrode and get worse over time, right? It has use. Um and in that way, you know, you kind of do have use of Bitcoin, which we, you know, talk about in a minute, but the distributed nature, the way it works—it has a value in that I can exchange money in a very low fee kind of way, and that has use, and that does give it value.
Yeah, that makes sense. Yeah, it has some amount of utility—especially, yeah. Patrick will talk about it later, but there's sometimes where Bitcoin is the only thing you can convert to, and so that gives it even more utility. So one thing you people might ask is like how is the price figured out? Right? You know, there's some of these like psychological value. Like how do you measure that? Right? It turns out you don't. So this is something that you cannot—sort of there's no closed-form equation. You can't just plug in a bunch of things and get the value out. Instead, what happens is it's a dynamical system. So, in other words, you might not know the equation for gravity, but you know that if you throw a rock up, it's going to come back down, and you might even be able to estimate like how many seconds it's going to take to come down. You don't have to be like a physicist or even know the equations or anything; you're just kind of observing and you have sort of a mental model, right? So this is the same way. So, the Bitcoin is traded on an exchange similar to a stock or anything else. And in the case of stock, it's on the New York Stock Exchange or the London Stock Exchange, or I think Shanghai or what have you. In the case of cryptocurrency, there's a variety of exchanges—there's Coinbase and Gemini here in America. Actually, Coinbase probably both of those are probably international, but there are some countries that can't use Coinbase. There's a list of different exchanges you can find online. And the way all of these exchanges work is the same; it's basically a double auction. So what that means is every let's say millisecond the system looks at its orders—like who wants to buy and at what price—and it looks at its sell orders, who wants to sell and at what price, and it matches those people up. And there's a variety of strategies, but basically, you know, I think the person who wants to buy at the highest price right there at that millisecond gets matched up with the person who wants to sell at the—I think at the highest price. If I remember correctly, yeah, that's right. So the person who wants to buy at the highest price gets matched up with the person who wants to sell at the highest price, and then that transaction happens. Those people, assuming that the person who wants to buy wants to buy at a higher price, the person wants to sell—that transaction happens, and I think it happens at the seller's price. And then those two people walk away happy with our transaction. Then we take them out and we look at what's left. And we just keep doing this until the person, the people who want to buy, all want to buy for less than the most expensive seller, right? So if I want to sell for a dollar...
Yeah. So if I want to sell for a dollar and there's someone else who wants to sell for $2 and there's someone who's willing to buy for $1.50, yeah, you're right. Yeah. So eventually it's going to get to the point where there's a bunch of people who want to buy, but they all want to buy for, let's say, a dollar. And all the people who want to sell want to sell for $2. So now nobody can make a transaction. So then the system sort of ticks. It takes new orders and it starts a new millisecond and it starts this whole process over again. And so what happens is people put in orders, and those orders can't be fulfilled. And their reaction is to put in a higher order if they really want whatever the person's selling. And so in this way, the double auction kind of self-heals. It self-regulates. Nobody really knows what the price should be, but it's this dynamical system that's constantly adapting. But
Right. Exactly. And there are all sorts of different inertia functions. For example, I could crash the market by having two entities that I both own and having one sell to another one for a penny. Let's say something's worth $1,000, and I make a bunch of fake agents and I keep having them sell this product to each other for a penny. If I own all the agents, it looks like something's worth a penny, but it's really not. It's really me sort of gaming the system. And there are all sorts of like inertia terms and things like that to compensate for that. And that's where the historical part comes in—is that would have to happen at a very high volume for a long time before they would say, 'Oh, I guess this really is worth a penny.' The other thing, too, is there's always an opportunity for someone else to be buying. I can't guarantee that I'm going to buy my own thing. So, but so,
yeah. But yeah, in this case, I mean, this is the exchange being fair, right? It has actually nothing to do with Bitcoin. So Bitcoin itself doesn't facilitate exchanging into dollars. What you sort of need is if Jason and via some facility, Jason and I could agree in person that Jason's going to give me $20 and I'm going to give him $20. I'm going to send his wallet $20 worth of Bitcoin. We could do that in person. That's an exchange. But there's a lot of risks there, like one of us has to go first. Either Jason has to give me the $20 or I have to send the Bitcoin. And that causes a problem, which is why you have these exchanges—is because they act as a third party to sort of facilitate that transaction. And so I don't—I mean, I assume I don't actually have not checked on Coinbase, but I mean, I assume the way it works is basically I send money. I send my dollars to Coinbase when I—when they—when I agree to something, I sort of hold dollars in my account and I agree to let Coinbase take some of those and give them to someone else once that person has given the coins to Coinbase that they can give to me. And so they act as a broker.
Right. So when they are doing this double auction at that moment, they have power over both sides. I mean, they could theoretically take my money and take the other person's Bitcoin. But, you know, we trust them. There's a variety of sort of social systems in place to keep that from happening. That's right.
And so why are people wanting to convert their hard-earned cash? We talked about before the Jason working his job selling popcorn. Why is he turning that into Bitcoin? And there's a couple of reasons. We talked about that this being distributed. There's no big bank. Right. So Jason talked about like, oh, the exchange should just take all your money and run. It turns out that like banks could do that. And in the US, we have lots of different kinds of protections that try to prevent a bank from sort of going bankrupt or taking all of your money. But, you know, it has happened in the past. That's why those regulations are there. Right. But there's also lots of fees associated with lots of things that you do when you work with a bank. And the bank gets to control and set a lot of that stuff because you're sort of forced to in some ways, in order to operate in society, to kind of use that. It's very hard to go around spending actual dollars, like storing dollars under your mattress and then using them everywhere. And even if you were to do that, that's actually sort of dangerous because if you get robbed and someone looks under your mattress, all your money's gone. Yeah. And so all of these things come into play. And so Bitcoin is nice because it's distributed. There isn't a central bank. And so it's very, very easy if sort of one person, one Bitcoin was trying to charge. There is a little bit of a—we won't go into it because it's complicated on how transaction fees work in the system. But they're much lower than paying with a credit card, for instance. And so if Jason were to try to get greedy and charge a higher transaction fee for me to use his services to transact Bitcoin, then other people would just sort of undercut him because it's this very competitive, decentralized thing. There's no reason to use Jason versus just random other people. And so that makes it really resistant to one person acting in bad faith, like one person doing bad. You need a consensus of people. You need very large numbers of—in this case, we say people, but it's actually computers agents. You need a large number of them to be essentially agreeing to collude and commit bad things. And we're sort of trusting that because we think that lots and lots of different people with all different desires aren't going to want to collude to cheat me—that this is a safe thing. The other thing is that people say, 'Oh, Bitcoin is anonymous.' And that's why it's useful, because it's really good for buying drugs or whatever, you know, that you want to be anonymous. But it's actually being very careful. It is not anonymous. So it is pseudonymous, which is that no one sees my Social Security number or my name. It's just my wallet, my address, you know, my special series of numbers that's unique to me. But no one knows that that is me. And so I can go online. I can have people send money to that address. I can send money from that address. And no one knows it's me. But they do know it's that address. Like, yeah, that's different than anonymous, because anonymous, you wouldn't know who it was. This—you don't know who it is, but you know that it's the same person between any two given transactions.
And the reason why that's really important. So, for instance, like we said at the beginning, Satoshi, if he were to get rid of all his Bitcoin and the price didn't go down, they'd be worth billions of dollars. Right. The reason we know that Satoshi owns those is because they're the very first—we know whose unique fingerprint created those first Bitcoins. And we can see that fingerprint doesn't occur in subsequent transactions. So those Bitcoins, most of them weren't moved around. And so we assume that must be him. And now we can monitor and say if any of those, any Bitcoins come out of that address, then he must be selling his Bitcoin. And in that way, it's not anonymous, but it is traceable.
And, you know, if the—if let's say hypothetically there's a certain Bitcoin address that's being used in all sorts of drug deals and stuff like that. And the police catch a drug dealer. And when they catch him, they get his Bitcoin wallet ID and they can look in the history and see all the transactions he's done.
Well, I mean, it gets worse. Right. So if someone were to—you know, these hackers like, 'Oh, send money to my Bitcoin.' As long as they continue to move Bitcoin around for purely digital, other pseudonymous or anonymous systems, there's no problem. But fundamentally, ultimately, Jason wants to buy an iPhone or an Android phone, maybe one of those cool, slick S8s or whatever. He wants to buy a phone. And so he needs hard, cold Benjamins—dollars. And so at some point, Jason wants to after doing this massive hacking scheme, he wants to convert his Bitcoin to dollars. Now, it turns out this is becomes a dilemma because someone now has to give him U. S. dollars, U.S. currency. And once you do that, you tend to be something that's more regulated by the government. And so they probably have some sort of log. So as soon as he tries to do business with a business—oh, that was confusing. As soon as he tries to exchange his Bitcoins with a business that either needs to mail him something, send him U.S. currency or foreign currency (most foreign currencies have the same rules). As soon as he needs to touch physical goods, then there if the police go to that business and basically say, 'You have to give us your records,' they have to comply. And now people will figure out they'll be able to match Jason's account with his person. Yeah, exactly. So, yeah. So pseudonymous, useful in a lot of circumstances, but not a great idea if you really want to commit crime.
Yeah. Exactly. Yeah. So how does it work? So basically, what's to stop me from just saying, 'Oh, Patrick gave me a million dollars,' everybody? So basically, it's similar to cryptography. It's similar to the public-private key stuff that we talked about in that episode. So definitely go and check that episode out. But just to kind of rehash it, everyone has a private key. If someone gets your private key, they can take all your money. Right. So assuming that doesn't happen. So I with my private key, I sign some package. It's a blockchain or
So I want to give Patrick a bunch of money and I sign it with my private key. So one thing about this whole blockchain is that everyone has the entire state. So imagine if you went to Facebook.com or you went to, let's say, Yahoo.com. And, you know, right? The first time you went to Yahoo.com, they gave you the entire database, like with everything. And they're like, 'Hang on, hang on, buddy. We need to give you the entire database.' It's like everyone's records, everyone's name, everything. And then you would get all of that. And then they would say, 'OK, now what do you want to do at Yahoo?' And you wouldn't even have to contact them anymore other than just to get updates because you have literally the entire back.
And I know this to be true because my point oh five Bitcoin that I had on an old laptop that I recently got back out. I downloaded the client, migrated my wallet, and then had to wait for, you know, many—I think it was like a day or two—while my computer basically downloaded the entire state of the blockchain and fast-forwarded to make sure that there was no transaction from anonymous kind Internet stranger to me five years, six years ago, and that there was no transaction anywhere in the blockchain after that. So sort of my point oh five Bitcoin were sent somewhere else. Right?
Exactly. So imagine like, you know, you have, let's say, an SQL database or any type of database, right? You're going to put commands on that database. You can say like 'insert a row,' you know, 'alter this column,' you know, 'insert this new row,' you know, 'delete this row.' And just think of all these like SQL commands, right? Now imagine if you kept a history of all the commands you gave this database ever. Well, then you could recreate the database, right? It's probably not the most efficient way, but it works, right? If you took all the commands you ever sent to your database and you ran all those same commands on another database, you would end up with the same data on both, right? Hopefully. Unless there's like a RAND or something. But so that's basically what's happening is everyone's getting all the commands such that when they finished, they all have exactly the same database. And that database has everything. Like it has how much money everybody has at any given time. That's right. It has everything.
It's a ledger, right? I mean, maybe 'ledger' isn't a commonly known term anymore. So when I say that someone sent me some Bitcoin, unlike actual, you know, dollars, where if I say Jason gave me a dollar, then I typically mean he took a printed physical piece of paper with a unique serial number and gave it to me. When I say someone gave—if I were to give, you know, 0.1 Bitcoin to Jason, I don't actually give him a cryptographic hash or anything. I'm not transacting with him a unique something. What I'm doing is sending a message into the globally replicated ledger, this running account, this log, as Jason was describing. I'm saying there, 'Hey, at some point, my account has been tabulated to have one whole Bitcoin, maybe because of mining, maybe because somebody sent me something, because I did something, a service for them, or whatever.' And I want to send, you know, whatever I said previously—I've forgotten my example. I want to send however many worth of my Bitcoin I want to now send to Jason's address. But I don't actually—nothing goes to him. Just now the ledger reflects that now he has some of the money that I had previously. So my account sort of says minus 0.1 Bitcoin and Jason's account says plus one Bitcoin. And that's recorded in the ledger globally in this replicated state. Right?
Right. And so when Patrick does that, because everyone has everything, the only thing everyone doesn't have is all the private keys, of course. But everyone has everything else. So Patrick signs it with his private key. He encrypts it and he encrypts the message and then also some way to verify that it's been some way that when you decrypt it, you know that you've decrypted it correctly. I forgot what that's called, but some set of bits there. Some magic bits. Then that message goes out to everybody and it spreads like virally, like everyone just starts sending it to each other. And then everyone starts using their Patrick's public key to decrypt his message and read it. And so the decrypted message will say something like 'Give Jason a dollar' or 'give Jason a Bitcoin.' But it'll also have some way to verify that it was decrypted correctly. Because what you wouldn't want is someone to encrypt it incorrectly, and when you decrypt it, it says 'Give someone a million dollars,' and you just do it. So there's some secret key, some secret set of bits that have to be encrypted a certain way. So if people get it, they decrypt it and it seems legit. They apply it. If they decrypt it and it's just total garbage, then they reject. They say, like, 'We're not accepting this,' 'this,' 'this like transaction.' 'We're not accepting this message.' And then at that point, it's kind of like a democracy. So you know, it happens extremely quickly. And if you've signed it correctly, a ton of people are accepting it. And in the opposite case, a ton of people are rejecting it. And so in that way, it sort of heals itself. Oh, go ahead. I'm sorry.
I was going to say just a sort of side topic. You were talking about databases working that way. Actually, a whole class of modern databases do work that way. They're called log-replicated storage. And so they actually do work by essentially recording and it's a way to distribute to other people for exactly those reasons that what the current state of the database is. So you sort of send out a proposed change as a log, and then once other people confirm they've received that, then you actually reflect that in your current state. And there are ways of compacting the log. So you don't have to keep the whole transactional history. But anyways, it's a side topic. But if you're interested, you can look it up.
Yeah. Log-replicated databases. So, yeah, there's this question of like, what happens if I try to be really clever? And I say, I go to two different machines and I say, you know, give this other account that I also own a dollar from this other account. Like I have Account A and Account B. And I go on two different machines and I say, 'Hey, A gave B a dollar.' And I do it both at the same time. Right? Well, that's not going to happen. What's going to happen is, and Patrick, if you could correct me on this, but basically, there's going to be some type of master election process. So a bunch of computers are going to get the first command. A bunch of you get the second command—it's going to be some kind of banter back and forth. But at the end of the day, there's some kind of Byzantine resolution system that's going to eventually—it's like an unstable equilibrium that's going to eventually cause one of those two transactions to fail. And that's basically the gist of how that works. So there's a lot of good things. There's also a lot of kind of bad and ugly parts of Bitcoin.
So, I mean, yeah, everyone hears this like the Silk Road was famous. Is that what it's called? Yeah, the Silk Road. And, you know, just ways of sort of extorting people for money, moving the money around. And then if you can find, you know, like I said, it's once you try to convert to something physical, there's sort of an endpoint. But this is a common criminal thing. Like, this is always true. If you steal money, you need some way of sort of spending the money without being noticed and being able to move the money around without being tracked. Or else people can figure out that you committed some crime. You know, they can put two and two together. And Bitcoin, it's not my opinion that it really—the pseudonymous thing is sort of useful there. But it isn't like this is fundamentally going to ruin the FBI or whatever investigative agency you have in your country. Like, it's not going to ruin their ability to find criminals. It does facilitate, along with some other technologies, it can make it harder. But it doesn't seem to me, as long as if people end up—if they can't live their whole life solely on digital goods and services, then eventually they'll try to spend the money, and you can catch them at that point.
And so, and I think it's just that the—I think what will happen is that more businesses that do goods and services in Bitcoin will probably get more regulation that they already have on dollars. And I don't, but I don't think that's a bad thing for Bitcoin. That's just a sign that Bitcoin is growing up or Ethereum is growing up. Like all of these will begin to be regulated. Yeah. And right now it's just a sort of temporary loophole, I guess, what I see. Long term, you know, it's no big deal.
The same thing like, you know, in the U.S., gambling is illegal. And so there's a threat. If I send dollars to—I don't know where the online gambling sites are, but some other country—then somehow when I get dollars back, that gets recorded and I have to sort of explain where it came from. But if I sort of send it in Bitcoin, do some transactions and get the Bitcoin back, like no one has to know that those Bitcoins that I got back were from gambling winnings. And so it's actually, you know, in some ways it's easier to convert it back to U.S. currency. But again, same thing as I said before, I think eventually the regulations will sort of catch up on this more. It just seems like a continuous thing on the internet, that cat-and-mouse game. So yeah, it'll probably make things harder, but don't do bad things. You'll get caught.
Yeah, exactly. So this technology in and of itself is really amazing. And one thing that's kind of amazing is Ethereum in particular created this thing called the Ethereum Virtual Machine. And basically you can use the Ethereum messaging platform and all of that to do other things. Like for example, you could make your own set of currency. Like, let's say for example, I want what I'm trying to do like a good example for this. Let's say I want to do some type of votes. So, I want people can do a certain amount of work. They can get one of these tokens and they can use that token to give it to different accounts, and each account represents voting for a different person. So you can kind of do pseudonymous voting. You could do all sorts of donations and fundraising and all of that. That's a little bit more direct application. In other words, you could set up little credits and people can exchange Bitcoin or let's say Ether for these credits. And then in exchange, you're going to look at whoever has those credits and give them like some part of your company or some, some like, yeah, this
This is how the DAO. I don't a DAO. I don't, and that's how you're supposed to say, cause that sounds like Dow Jones, but the DAO and Ethereum was supposed to work. You sent money to the DAO and they gave you a DAO token, which was different than the Ethereum you sent, but it allowed you to cast votes. Like you got a unique token based on how much you contributed. And then they would put up measures for voting and the system would count how many unique tokens it saw for any given measure to decide if it passed or failed.
it is. Okay. Yeah. So you could like, especially if you run a company, like if you're doing this in enterprise, you could install your own fork of Ethereum on all your machines and then you could use it for like an anonymous message board, like complain about your boss and you can't know it's you or something. I don't know. But you could set up a blockchain and have sort of pseudonymous voting and messaging and things like that, which is kind of cool. So I expect a lot of cool things to come out of this technology, and that's probably a good point to sort of wrap it up.
Yeah. Have a good one. This is a bit of a long episode, but we had a lot of cool stuff to talk about with this. It's super interesting. It's hard to wrap your head around, but I think it's amazing. And hopefully you guys could bear with our 90 minute show or however long it's going to end up being. Thanks a lot for all of your support. Thanks for liking our posts on all the different social media, and thanks for your emails. We've gotten some really good suggestions. We'll definitely take advantage of that and cover them in future episodes. So, have a good one.
