TRANSCRIÇÃO 🔗
WEBVTT
00:00:00.000 --> 00:00:09.000
Hey, everybody! It is another episode of Runtime Arguments. This is episode number 39.
00:00:09.000 --> 00:00:22.000
Sometimes, a complete rewrite IS the right choice. Um, there's a lot for me to disagree with in this episode, and it… you've already heard the first thing. So, I'm Wolf.
00:00:22.000 --> 00:00:29.000
And I'm working with my best friend, as always, Jim. And here's Jim.
00:00:29.000 --> 00:00:32.000
Hey guys, how you doing?
00:00:31.000 --> 00:00:46.000
Uh, this is episode number 39, our 40th episode. Uh, I gotta tell ya, uh, everywhere I go, every day, I have to explain my name to someone.
00:00:46.000 --> 00:00:53.000
Uh, it's always a different person, and it's always roughly the same conversation. I'm not gonna give you the stupid details.
00:00:53.000 --> 00:01:06.000
Um, and of course, we have a podcast where there's a thing we have to explain every day. Yes, it's episode number 39, our 40th episode.
00:01:06.000 --> 00:01:10.000
Because we started at zero. Um…
00:01:09.000 --> 00:01:14.000
Yes. Can you, can you believe, uh, can you believe this is our 40th, though? That's crazy.
00:01:10.000 --> 00:01:12.000
Today.
00:01:14.000 --> 00:01:24.000
That's a lot, especially… and we do them every two weeks, so we're, um… we are over a year, and now people are actually starting to listen. I think we might be up to five.
00:01:16.000 --> 00:01:19.000
We're still doing it.
00:01:24.000 --> 00:01:28.000
Five, six, eight.
00:01:25.000 --> 00:01:33.000
No, we actually… we actually have a lot of… a lot of downloads. I think we are getting close to 5,000 downloads total.
00:01:32.000 --> 00:01:38.000
Yeah, yeah, yeah, which is, it's nice.
00:01:38.000 --> 00:01:42.000
Everything takes longer than you think it's going to take.
00:01:42.000 --> 00:01:44.000
Uh, it does.
00:01:42.000 --> 00:01:57.000
That is the rule. But the nice side of… the other side of that coin is, um, you're gonna be surprised every time by how little you can do in a day or a week.
00:01:44.000 --> 00:01:46.000
It does.
00:01:57.000 --> 00:02:03.000
And you're going to be surprised every time by how much you can do in a year.
00:02:03.000 --> 00:02:12.000
Um, anyway, let's start with some feedback. I've got some things, you've got some things. Um, you want me to go first?
00:02:03.000 --> 00:02:05.000
Yes.
00:02:11.000 --> 00:02:18.000
Yeah, I have a hunch there's some overlap here, so you go first. If there's anything left, then I'll say.
00:02:18.000 --> 00:02:30.000
Um, I'm gonna do mine kind of out of order. This is important. Jim and I are investigating on the advice and some insights from friend of the show, Marlon.
00:02:30.000 --> 00:02:45.000
There might be a way for us to quit being, um, what in my sport we call FUDs, as in Elmer FUD, like people who are antique and doing the wrong thing. Our, uh, website starts with HTTP.
00:02:45.000 --> 00:02:58.000
And every time we say it, I'm overwhelmed with shame. Uh, and Marlon has
Load full transcript
explained to us there might be a path to our redemption, so that's a thing we're investigating. Second.
00:02:58.000 --> 00:03:03.000
Uh, people are asking for this, and I see value.
00:03:03.000 --> 00:03:09.000
But, um, what I want to know is, would any of you out there.
00:03:09.000 --> 00:03:15.000
Find value yourselves in us supplying.
00:03:15.000 --> 00:03:22.000
a version of the podcast alongside the audio that is audio and video.
00:03:22.000 --> 00:03:36.000
up front, I'm gonna tell you, there are obstacles. It would be new for us, process, it would be more work, it would cost more money, stuff would have to stay… like, we'd have to go to extremes to make the right thing happen.
00:03:36.000 --> 00:03:44.000
But what I care about is, is this a thing you value? Would it benefit you?
00:03:44.000 --> 00:03:52.000
If it would, then it's worth me and Jim, like, investigating further and figuring out what goes on. So, this is absolutely, absolutely I want to hear about it.
00:03:49.000 --> 00:03:51.000
Yeah, yeah.
00:03:52.000 --> 00:04:08.000
Yeah, one of the benefits, to me, the big benefit, other than you get to see what we look like, I'm not sure that's a benefit, but the big benefit is this is audio only right now, and sometimes we would like to show visuals.
00:03:59.000 --> 00:04:02.000
It is not a benefit.
00:04:08.000 --> 00:04:15.000
There's things we need to show you that we just can't describe in audio.
00:04:14.000 --> 00:04:21.000
A picture is worth a thousand words, which means one picture for each time I talk.
00:04:15.000 --> 00:04:16.000
Um, yeah.
00:04:16.000 --> 00:04:19.000
Yeah.
00:04:22.000 --> 00:04:26.000
That's a… that's… that's a lot of words.
00:04:26.000 --> 00:04:42.000
or a lot of pictures. Anyway, um, so that's the benefit, but yeah, as Wolf said, there's some challenges we need to overcome to make that happen. Uh, it certainly would change the workflow, how we put these things together. Uh, but hey, we're not afraid to try new things, are we, Wolf?
00:04:44.000 --> 00:04:52.000
Um… I'm not!
00:04:45.000 --> 00:04:55.000
Long pause. He's pausing. He's pausing because he's the guy that always tries new things and I'm not that guy.
00:04:55.000 --> 00:04:58.000
But I'd be willing to try this.
00:04:55.000 --> 00:05:11.000
Which is not to say you don't do new things, you do. And so it would be unfair to say that you don't. I've seen you do new things. Like, you switched to Zshell on your personal computer. You are using…
00:04:59.000 --> 00:05:01.000
Yeah, yeah.
00:05:05.000 --> 00:05:11.000
I… Yes.
00:05:12.000 --> 00:05:22.000
uh… a ton of things that I suggest… you know, like, he switched to Git! Uh, that was a… this was a while ago, but it was a…
00:05:16.000 --> 00:05:17.000
Oh, yeah.
00:05:20.000 --> 00:05:23.000
Yeah, like 14 years ago, but yeah.
00:05:23.000 --> 00:05:27.000
The move to get is a big deal, there's no question about that.
00:05:26.000 --> 00:05:28.000
Yeah.
00:05:27.000 --> 00:05:43.000
Okay, next feedback item is basically just happiness in me because yeah, people are asking questions about the show and where feedback on the show is appropriate.
00:05:44.000 --> 00:06:13.000
But also, we're getting into more and more conversations with people who just are listening to the show and want to say things. So not necessarily, or ask things, not necessarily stuff that… requires us to mention it on the show, but conversations. Our show is putting questions in people's minds about how, in a lot of these cases, how can they do better?
00:06:13.000 --> 00:06:22.000
And where we have some answers about stuff we've seen that might lead them in a direction that could be beneficial to them.
00:06:22.000 --> 00:06:30.000
I want these conversations, and that they're asking, uh, makes me feel like we're starting to make a difference, and I love that.
00:06:30.000 --> 00:06:33.000
It's great.
00:06:33.000 --> 00:06:46.000
Yeah. Um, one of the episodes, uh, that I, uh, led a little while ago, episode 36, uh, Leaning the Ladder.
00:06:46.000 --> 00:07:03.000
values and goals. Values are forever and goals are like a place that you're going to and then when you get there you're going to go someplace beyond that.
00:07:03.000 --> 00:07:16.000
Uh, like, for instance, a value for me is, I believe human beings all have a right to be alive. Even the ones you don't like. Even… well, I'm not gonna go into details. But that's a value.
00:07:16.000 --> 00:07:19.000
I'll never be done with that.
00:07:19.000 --> 00:07:24.000
I want to, for instance.
00:07:24.000 --> 00:07:27.000
lose a certain amount of weight.
00:07:27.000 --> 00:07:40.000
That is mostly a goal. I want to weigh somewhere around 175, somewhere around there. I am going to get to that weight.
00:07:37.000 --> 00:07:41.000
Yeah, you're not too far. You're not too far from that.
00:07:40.000 --> 00:07:51.000
I'm feeling pretty good about that. I actually had to go into the Secretary of State today to renew my driver's license, not because I had to go in.
00:07:42.000 --> 00:07:43.000
Yeah.
00:07:51.000 --> 00:07:56.000
but because I wanted a new picture that matches what I look like.
00:07:56.000 --> 00:08:00.000
And I'm so happy with these with these teeth.
00:07:57.000 --> 00:07:59.000
Good for you.
00:08:00.000 --> 00:08:08.000
I got them to take a second picture where I'm actually smiling. It's a weird picture, but… but I like it. Anyway…
00:08:05.000 --> 00:08:07.000
Yes.
00:08:09.000 --> 00:08:17.000
I think I left out a thing, um, that turns out to be super important. It's not just values and goals.
00:08:17.000 --> 00:08:23.000
There's a slightly smaller thing that we call rules.
00:08:23.000 --> 00:08:25.000
And.
00:08:25.000 --> 00:08:47.000
Rules are like a tiny recipe that is aimed at a specific goal. For instance, on the road, the goal is… The cars don't touch. They have different ways of saying it, probably. But, like, for instance, they want all human beings to be safe, unharmed,
and alive at the end.
00:08:47.000 --> 00:08:57.000
So, our rule is, don't go faster than X, the speed limit for that piece of road, 70, where we live in Michigan, for these, uh, highways and stuff.
00:08:57.000 --> 00:08:59.000
Umm.
00:08:59.000 --> 00:09:11.000
But the rule is not the value. The value is human life here, the goal is everybody is safe, and the rule is don't go faster than 70.
00:09:12.000 --> 00:09:19.000
The rules are to help you get to an answer without re-deriving everything from scratch.
00:09:19.000 --> 00:09:21.000
Umm.
00:09:21.000 --> 00:09:30.000
Something that, in a lot of cases, you just can't do, or it's a waste of time, or whatever. They're a recipe. But because they're just a recipe.
00:09:30.000 --> 00:09:46.000
They only usually get you to the goal or value. Not always. And sometimes they're in conflict. Like, there's a rule that says 70, and the full rule is, no faster than 70.
00:09:46.000 --> 00:09:49.000
No slower than 60.
00:09:49.000 --> 00:10:05.000
Most people don't know that rule because it's not posted, but where there is a maximum speed limit posted on a highway, the minimum speed limit is 10 miles per hour slower than that. If you are exceeding 70, or going slower than 60.
00:10:05.000 --> 00:10:10.000
And it's not like an exit ramp or a whatever.
00:10:10.000 --> 00:10:13.000
You're breaking the law.
00:10:13.000 --> 00:10:16.000
But what if everybody's going 80?
00:10:16.000 --> 00:10:22.000
If you went 70 now, you would be a danger.
00:10:22.000 --> 00:10:29.000
You'd be obeying the law, but you would not be hitting the goal or the value. You would be a hazard.
00:10:29.000 --> 00:10:44.000
So, almost every state has a law, which is usually called the Law of Competing Harms. And in some states, they just go right out and say it, the Law of Competing Evils.
00:10:44.000 --> 00:11:03.000
Um… And the problem is, you only have two choices here. I mean, I guess you could get off the highway. But the two choices are, you can break the law and go faster, but now you're traveling the safe speed, the same speed as everybody else, assuming weather, blah blah blah.
00:11:03.000 --> 00:11:09.000
Or, you could present a hazard, but obey the law. Either way, it's a bad choice.
00:11:10.000 --> 00:11:23.000
Um, and the thing I wanted to say, the thing I didn't mention in the Leaning the Ladder episode is… When there are values and/or goals.
00:11:24.000 --> 00:11:26.000
They win.
00:11:26.000 --> 00:11:41.000
That's how you know what the right thing is when you are facing competing harms. Laws, or rules, or guidelines, or a rule of thumb, or whatever, is just a recipe so you didn't have to think about it.
00:11:41.000 --> 00:11:48.000
That's kind of bad on its face, because you should never abdicate the role of thinking.
00:11:48.000 --> 00:11:54.000
You only have limited attention. That was the point of episode 36.
00:11:54.000 --> 00:11:58.000
Rules super help. You want them.
00:11:58.000 --> 00:12:01.000
But you gotta know when not to do them.
00:11:58.000 --> 00:12:07.000
Okay, let's… Let's back up just a second. You said when there are values and there are goals.
00:12:07.000 --> 00:12:10.000
They win over rules.
00:12:08.000 --> 00:12:09.000
Rules.
00:12:10.000 --> 00:12:11.000
Right?
00:12:11.000 --> 00:12:14.000
When they conflict.
00:12:12.000 --> 00:12:19.000
There are tons of people out there with bad goals and bad values.
00:12:19.000 --> 00:12:23.000
That doesn't win over the law, over the rule.
00:12:24.000 --> 00:12:25.000
Right?
00:12:24.000 --> 00:12:41.000
That's true, and also, that's not how you will be judged in a court of law. In a court of law, if you broke a law, and the goal that you are breaking the law to follow, instead of what the law follows.
00:12:29.000 --> 00:12:32.000
Right, right, so.
00:12:41.000 --> 00:12:49.000
If that's not the goal of society as we have encoded in the law, nobody is going to back you up.
00:12:49.000 --> 00:12:50.000
Right.
00:12:49.000 --> 00:13:00.000
But if you are not following the no trespassing law, because a park ranger collapsed a hundred feet into.
00:13:00.000 --> 00:13:04.000
private property? And you jump over the fence to rescue that person?
00:13:04.000 --> 00:13:22.000
you are following a goal or value that is respected by society. But if you're actually jumping the fence because you've got a knife and you're gonna stab him to death, and your goal is all park rangers must die.
00:13:13.000 --> 00:13:14.000
Yeah.
00:13:22.000 --> 00:13:24.000
Guess who's not on your side?
00:13:24.000 --> 00:13:26.000
Right, right.
00:13:24.000 --> 00:13:26.000
Anyone.
00:13:26.000 --> 00:13:27.000
Right.
00:13:27.000 --> 00:13:29.000
Well, probably.
00:13:29.000 --> 00:13:34.000
Nobody who has a vote, I'll tell you that.
00:13:32.000 --> 00:13:34.000
Yes.
00:13:35.000 --> 00:13:51.000
So this is a thing that came up in episode number 36. I wanted to mention it in the feedback segment of episode 37 and it sort of fell by the wayside and I just wanted to make sure I got to it.
00:13:35.000 --> 00:13:38.000
Yeah, yeah, okay.
00:13:50.000 --> 00:13:59.000
Yeah, so the real story is, if you're speeding and you get pulled over, just tell the officer he needs to listen to episode 36.
00:13:51.000 --> 00:13:52.000
And.
00:14:00.000 --> 00:14:04.000
Okay, now I want to say a rule.
00:14:04.000 --> 00:14:07.000
This is not a law, but it's a guideline.
00:14:06.000 --> 00:14:08.000
Yeah.
00:14:07.000 --> 00:14:18.000
Um, I come from a family of law enforcement, and I am interested and do a lot of study on certain kinds of topics, and there's one thing I know for an absolute fact.
00:14:17.000 --> 00:14:19.000
Yep.
00:14:18.000 --> 00:14:21.000
On the side of the road.
00:14:21.000 --> 00:14:28.000
When you are in the driver's seat, and there is an officer of the law at your window.
00:14:28.000 --> 00:14:35.000
There is ZERO chance that an argument between the two of you.
00:14:35.000 --> 00:14:38.000
It's
something you win.
00:14:38.000 --> 00:14:42.000
What you do is you be safe.
00:14:42.000 --> 00:14:49.000
You follow instructions, and if you have anything to challenge this situation, you say it in court.
00:14:48.000 --> 00:14:50.000
Yeah.
00:14:49.000 --> 00:14:55.000
He has a hard job, and you don't want part of his hard job to be shooting you.
00:14:55.000 --> 00:15:00.000
Yeah, you definitely don't, because that goes against your goal.
00:15:00.000 --> 00:15:17.000
Yeah, like, if I ever get pulled over, and I don't think I've been pulled over in decades, but if I ever get pulled over, the thing I'm gonna say to the police officer, second, is, I have three things I'm thinking about right now. Number one is you and me.
00:15:17.000 --> 00:15:23.000
Walking away from this at the end, in as good a shape as we are right now. No extra holes.
00:15:23.000 --> 00:15:39.000
Number two is, I want to obey the law at all times, unless it puts holes in either one of us. And number three is, I want to do everything you ask me to do, unless it puts holes in us or breaks the law.
00:15:41.000 --> 00:15:43.000
Those are the things I'm going to say.
00:15:43.000 --> 00:15:47.000
He's gonna laugh and say, "Have a good day.
00:15:46.000 --> 00:15:49.000
He will. I hope.
00:15:49.000 --> 00:15:52.000
Yeah.
00:15:49.000 --> 00:15:51.000
I sure hope.
00:15:51.000 --> 00:15:57.000
Um… And you have some feedback. What feedback do you have? Tell me all about it.
00:15:55.000 --> 00:16:11.000
Well, we received a couple of items of feedback from listeners. Let's see if I say this name right, Ehsan, E-H-S-A-N. He just sent us a real nice email letting us know that he's just really enjoying the podcast.
00:16:11.000 --> 00:16:27.000
We like that kind of feedback, but we'll take anything. And then somebody from Black Coin Dev, he didn't tell us his name, but he and Wolf carried on a nice little conversation about…
00:16:24.000 --> 00:16:41.000
They're, they're… Yeah, because they're doing the thing we said. They're writing tests. They're trying to validate what I call invariants in their code. And they want to make progress on the thing they're doing.
00:16:27.000 --> 00:16:28.000
Testing.
00:16:29.000 --> 00:16:30.000
Yeah.
00:16:41.000 --> 00:16:58.000
in the fastest and most reliable way, and when they… and they have questions, and that means they're doing the right thing. I don't know what they're working on. I don't know who they are or where… I don't know anything.
00:16:44.000 --> 00:16:46.000
Yep.
00:16:50.000 --> 00:16:51.000
Yep.
00:16:58.000 --> 00:17:04.000
But I know that they are trying to do better, and that is a thing I can admire.
00:17:03.000 --> 00:17:13.000
Yeah, Wolf is all about that. I mean, I am too, but Wolf, uh, Wolf engaged with this person, and it's, it's an interesting conversation. I've been watching it.
00:17:13.000 --> 00:17:14.000
It's a lot of fun.
00:17:14.000 --> 00:17:15.000
So, yeah.
00:17:16.000 --> 00:17:18.000
Did you have?
00:17:18.000 --> 00:17:20.000
Other feedback?
00:17:20.000 --> 00:17:23.000
No, I don't think so. Did I?
00:17:21.000 --> 00:17:26.000
In that case, why don't you tell me how was your week?
00:17:26.000 --> 00:17:42.000
Oh, my last couple of weeks was busy. I traveled to Rochester, New York. That's where my big customer is that I do an awful lot of work for. And that's really kind of the subject of today's conversation. We'll get into it more later.
00:17:42.000 --> 00:17:59.000
But I've sort of hinted at this project that I've been working on for a few months using TypeScript and Node and stuff. And we're gonna talk all about that in a couple of minutes. The other thing is, while I was gone, Apple sent me a, I ordered a computer.
00:17:59.000 --> 00:18:09.000
ordered a new, uh, Studio M5 Max. Um, for, like, 4 or 5 years, or 6 years, I've had a Studio M1.
00:18:09.000 --> 00:18:13.000
Which is still an amazing computer.
00:18:09.000 --> 00:18:11.000
And I've been very happy with it.
00:18:11.000 --> 00:18:27.000
Yeah, it really is. It really is. But I upgraded, and so I picked that up last week, and I spent a good part of Saturday and Sunday, and even into Monday, basically moving into that computer.
00:18:27.000 --> 00:18:40.000
you know, it's always a lot of work when you move into a new computer. I could have taken the time machine back up and just restored it, but, you know, every 5 years or so, it's good to just start fresh.
00:18:40.000 --> 00:18:44.000
So that's what I did. And it was a…
00:18:41.000 --> 00:18:45.000
I feel the same way about marriage.
00:18:44.000 --> 00:18:50.000
Every five years, start fresh. No, you don't.
00:18:45.000 --> 00:18:56.000
No, I don't. I've actually been married 36 years, and she is my person I'm absolutely not changing.
00:18:51.000 --> 00:18:53.000
Yeah, yeah.
00:18:54.000 --> 00:18:59.000
I thought you were going to say it 36 times.
00:18:59.000 --> 00:19:17.000
But I know you. Anyway, so I spent several days getting moved in, and I think by about Wednesday, I shut off the old machine, put it off to the side, and I'm strictly using the new one, and I'm loving it. And a neat thing, I guess other computers can do this too, other operating systems. You know, I was a long-time Linux.
00:19:17.000 --> 00:19:29.000
user. In fact, all of my server stuff is still Linux, but my, uh, I don't know, 8 years ago or 9 years ago, I moved over to Mac on the desktop. And one of the neat things about Mac is you can take two Macs.
00:19:29.000 --> 00:19:33.000
Plug them together with a Thunderbolt 4 cable.
00:19:33.000 --> 00:20:03.000
And it just automatically creates a network between the two. Gives an IP address to each one in the 169 range, and it's… you know, it does the MDNS thing where they each get a hostname.local, and… And, uh, and then you can SCP, or, uh, uh, Rsync, or whatever, you can SSH over to it. And it's really quite nice, and it's, you know, Thunderbolt 4… is 40 gigabits per second.
00:20:03.000 -->
00:20:19.000
So that beats the snot out of my gigabit network. And it's way better than Wi-Fi. So I connected my two computers together, I had a Thunderbolt 4 cable, and apparently if I'd had a Thunderbolt 5 cable.
00:20:19.000 --> 00:20:23.000
These two machines would have talked that.
00:20:22.000 --> 00:20:29.000
Let me see if I've got this right. Um, Thunderbolt 4 is 40 gigabits per second.
00:20:24.000 --> 00:20:26.000
Yes.
00:20:28.000 --> 00:20:29.000
Yeah. Okay.
00:20:29.000 --> 00:20:39.000
in each direction. And then Thunderbolt 5… Thunderbolt 5 is like the Golden Gate Bridge during rush hour. You can use…
00:20:30.000 --> 00:20:33.000
Yeah, bidirectional.
00:20:39.000 --> 00:20:54.000
uh, both directions together as one direction. So you can get 80 gigabits per second out of it by consuming the entire thing. I mean, that's not actually how the Golden Gate Bridge works, but…
00:20:44.000 --> 00:20:45.000
Okay.
00:20:50.000 --> 00:20:57.000
Yeah, and, and, yeah, and when you're just trying to push data from one machine to another.
00:20:57.000 --> 00:21:12.000
it's almost all in one direction, right? You get the axe back, sure, but it's almost all in one direction, so that makes sense. But it turns out that the bottleneck, in this case, was not the.
00:21:12.000 --> 00:21:21.000
network, I end up getting a throughput of about 350 gigabytes per second.
00:21:21.000 --> 00:21:23.000
Small files.
00:21:21.000 --> 00:21:23.000
Is that Lewis?
00:21:23.000 --> 00:21:30.000
300… I don't know. Um, well, small file… gigabyte files, you know, they're… they're…
00:21:25.000 --> 00:21:27.000
It's always small files.
00:21:30.000 --> 00:21:40.000
or… or, like, a lot of Postgres stuff, and those things, I think, are 16 megabytes, so… is that small? Uh, in this day, I guess… I guess it is. But I was… I… I was doing…
00:21:35.000 --> 00:21:37.000
It is.
00:21:40.000 --> 00:22:09.000
Got it, let me see. 350 megabytes per minute, or per second. 350 megabytes per second, so that's 3.5 giga… bits per second, which is way below the 40 gigabits per second. It turns out it's not the network that's the bottleneck, it's, uh, rsync chews up some CPU, uh, it's SSH because it encrypts, uh, and rsync compresses, and so all those things added up.
00:22:09.000 --> 00:22:17.000
They make it not hit the full bandwidth of the connection, but there are some tricks you can play.
00:22:13.000 --> 00:22:41.000
I wonder if… I wonder if the ROI for this specific problem, where it's short distance, like 3 feet, and, um… there's no intervening switch, and you just want the highest throughput. Does the speed you get from sending less bytes overall, because of compression.
00:22:41.000 --> 00:22:49.000
Um… Does that? Is that a win? Did you get that back from the cost of…
00:22:46.000 --> 00:22:56.000
No, you want to turn off compression. It turns out, I started this process a couple of times, uh, to more or less.
00:22:51.000 --> 00:22:53.000
Yeah, I thought you might.
00:22:56.000 --> 00:23:05.000
play with it to see how I could get the best speed. And several searches and help from Claude, and it turns out you want to.
00:23:05.000 --> 00:23:07.000
Turn off compression.
00:23:07.000 --> 00:23:25.000
which makes sense. Um, and you want to use an… you want to use an SSH cipher that is, um, uh, as lightweight as possible. So there's an option you can pass to rsync to tell it to use SSH with, uh, I don't even remember what compression algorithm I used.
00:23:09.000 --> 00:23:12.000
Probably encryption.
00:23:25.000 --> 00:23:31.000
But that's how I ended up at 3.5 gigabits per second.
00:23:31.000 --> 00:23:35.000
Um, and we got, like, 2 terabytes to send.
00:23:35.000 --> 00:23:50.000
It still takes a little while, but it was way faster. Before I tweaked, before I tuned all those performance things, it would've taken me like 18 hours to push that data across.
00:23:50.000 --> 00:23:53.000
It is remarkable.
00:23:50.000 --> 00:23:54.000
And instead, I did it in 20 minutes.
00:23:53.000 --> 00:24:04.000
It is remarkable how much the scaffolding costs. This was a big discussion you and I had, and I had to perform experiments to.
00:23:54.000 --> 00:23:55.000
Yeah.
00:23:58.000 --> 00:24:01.000
Yeah.
00:24:04.000 --> 00:24:16.000
prove that I was actually saving time, uh, by reducing the number of total, um, round trips across the wire to my Postgres server.
00:24:15.000 --> 00:24:20.000
Oh, with your Postgres. Yeah, yeah, with your database stuff you were doing, right?
00:24:18.000 --> 00:24:38.000
Yeah, collapsing into single statements, and reducing the number of round trips, and blah blah blah. Uh, it was not immediately obvious to a person who deals in data 1 tenth or 1 hundredth of the size that I was working with, that these could possibly help in any way.
00:24:33.000 --> 00:24:34.000
Sure.
00:24:38.000 --> 00:24:39.000
Sure.
00:24:38.000 --> 00:24:44.000
And it turns out, scaffolding is always an obstacle.
00:24:41.000 --> 00:24:56.000
Sure. Well, there's a lot of layers between the bare metal and what you're trying to do. And in your case, those tweaks you made, collapsing all your statements into one big one.
00:24:56.000 --> 00:25:02.000
It doesn't come for free. It increases your memory, your memory requirements.
00:25:01.000 --> 00:25:22.000
It does. And also, it turns out there's limits because Postgres has a built-in maximum number of terms in a standalone SQL statement. I can't remember if it's a million or 100,000, but if you're supplying individual values.
00:25:02.000 --> 00:25:04.000
But when you have a lot of memory.
00:25:22.000 --> 00:25:27.000
for cell and column, like, you gotta stop.
00:25:22.000 --> 00:25:23.000
Yeah. Okay.
00:25:24.000 --> 00:25:41.000
Yeah, yeah. At some point you exceeded that. But anyway, so I got all my data moved over. I was really happy with that Thunderbolt thing 'cause I didn't want it to take 19 hours to move over. But the other thing I did, I started fresh.
00:25:28.000 --> 00:25:30.000
I did.
00:25:41.000 --> 00:25:51.000
Certainly, I have a bunch of apps that I had to move over. I use Homebrew for a whole bunch of pieces of software, and there's a nice way to migrate those over. You can export a list.
00:25:50.000 --> 00:25:51.000
Bundle.
00:25:51.000 --> 00:26:04.000
a bundle, right, and import it on the other machine, and that all works really nice. But I also cleaned up my environment a little bit, and you know what? I moved to Starship for my command prompt.
00:26:04.000 --> 00:26:15.000
That is a delight. You've been telling me about this for an awful long time, and I finally switched to it, and it is a real delight.
00:26:04.000 --> 00:26:08.000
Who says you don't try new things?
00:26:15.000 --> 00:26:26.000
but it did take me some getting used to, because, you know, I'm… for those that don't know what Starship does, it gives you a different prompt on your command line. I spend an awful lot of time in a shell.
00:26:24.000 --> 00:26:27.000
And customizable.
00:26:26.000 --> 00:26:44.000
It's very customizable, uh, and what threw me off at first was, uh, it's not just text. It shows little graphic symbols and stuff, and I'll tell you, I'm used to things not being so colorful and not being so graphic. You know, I'm old school. I just like a good old text terminal.
00:26:34.000 --> 00:26:36.000
If you want.
00:26:44.000 --> 00:27:04.000
And this changes it a little bit, and it took me some getting used to. I'm still kind of getting used to it, but I really like it. It shows little symbols. If you're in a directory that's a Git repo, it gives you symbols to tell you if, you know, if your branch is clean, or if you've made changes, or if you have things that you've added.
00:27:02.000 --> 00:27:05.000
And what branch you're on?
00:27:04.000 --> 00:27:12.000
Yeah, yeah, and it tells you what version of, uh, you know, if I'm in my Node project, it's telling me what version of Node I'm running.
00:27:12.000 --> 00:27:21.000
Uh, if I'm in a directory that's full of Perl code, it'll show me what version of Perl I'm in. Some of these things aren't so important. Yeah, Python, or…
00:27:17.000 --> 00:27:22.000
In Python, it'll tell you the active virtual environment.
00:27:21.000 --> 00:27:26.000
A ruby here, yeah, and you know, version.
00:27:22.000 --> 00:27:29.000
Um, and I want to tell you, you use ZShell for interactive stuff.
00:27:26.000 --> 00:27:27.000
Yes.
00:27:28.000 --> 00:27:30.000
I do, yeah.
00:27:29.000 --> 00:27:40.000
It turns out that a Starship, when used with Zshell, can do a really neat thing. Zshell can do this by itself, but it's annoying to set up.
00:27:40.000 --> 00:27:50.000
Your prompt on ZShell is like the status line in Vim, where it can have a part.
00:27:50.000 --> 00:27:55.000
on the right. You can say, here's some stuff to put on the right side.
00:27:51.000 --> 00:27:54.000
Yeah, yeah, yeah, yeah.
00:27:54.000 --> 00:27:57.000
Yeah, I'm not ready for that.
00:27:57.000 --> 00:28:13.000
I saw that I could do that. I saw some examples of that. But I am using Zshell on my desktop on my computer here on my desk, but I spend a lot of time logged into remote systems and those systems run on Bash and I set up Starship there.
00:28:13.000 --> 00:28:31.000
And it's equally as nice. And I installed, I use iTerm2 as my terminal emulator. I installed the nerd fonts. I forget which one I use, but you gotta install the nerd fonts to get all the symbols. Otherwise you end up with question marks in some places.
00:28:31.000 --> 00:28:37.000
Um, but I installed that, and I'm really quite happy. It's a real delight. It's kind of neat.
00:28:37.000 --> 00:28:49.000
And, uh, so yeah, so I've been busy playing with my new, new machine, and, uh, it's, it's much faster. It's, my old one was an M1 Studio, this is an M5.
00:28:49.000 --> 00:29:02.000
studio, and uh… for instance, I do some Xcode stuff, and Xcode gets really, really pokey, especially if you open up the storyboard editor on a very large application.
00:29:02.000 --> 00:29:14.000
Um, uh, there's times where the storyboard editor would take me 2 minutes to load, and… and now, um, it's… it's, like, worst case was, like, 11 seconds, and I'm quite happy.
00:29:12.000 --> 00:29:14.000
I have to tell you.
00:29:14.000 --> 00:29:28.000
there was a day when, you know, we were working on Netscape, and that's compiled code, not like the Perl you're using, or the JavaScript, or the Python I'm using. We had to actually compile it, it was C++.
00:29:20.000 --> 00:29:21.000
Yeah.
00:29:22.000 --> 00:29:24.000
Right, right.
00:29:28.000 --> 00:29:37.000
And compiling for one machine on a desktop-class computer, which meant the best that they could get me.
00:29:34.000 --> 00:29:35.000
Yeah.
00:29:37.000 --> 00:29:38.000
Yep.
00:29:37.000 --> 00:29:46.000
Um… was long enough for me to lay down under my desk and take a nice nap. I mean, it was… it was minimum 3 or 4 hours.
00:29:43.000 --> 00:29:44.000
Yes.
00:29:45.000 --> 00:29:57.000
Oh, yeah. I've worked in situations like that. And when you can only get two compiles in a day, it forces you to rethink how you do your work.
00:29:57.000 --> 00:30:00.000
Right? Yeah.
00:29:57.000 --> 00:30:12.000
It really does. So when you say two minutes, um, I feel like a friend of the show, Dave, who addresses any first-world problem, like, oh, and I didn't have a, um…
00:30:06.000 --> 00:30:07.000
Yep.
00:30:13.000 --> 00:30:18.000
you know, I didn't have a USB-C cable or whatever, right? He will say to you.
00:30:16.000 --> 00:30:17.000
Yeah, yeah.
00:30:18.000 --> 00:30:28.000
Um, you, you think about that, and then think about the kids who haven't had food or left their bomb shelter in 10 days.
00:30:27.000 --> 00:30:40.000
Yeah, yeah. First world problems. I get it. But when you're working all day in a program like Xcode, and you're in and out of the storyboard editor, and you're changing files and switching back and forth.
00:30:40.000 --> 00:30:44.000
Oh, it's a it's a delight when you when you have a fast machine.
00:30:40.000 --> 00:30:45.000
Yeah, you're… the 10 on your pain meter?
00:30:45.000 --> 00:31:02.000
is the… is 10 for you. And it… sure, there's people who've been paralyzed or robbed or whatever, their 10 is a lot more, uh, carries a lot more weight than yours, but your 10 is still your 10.
00:30:47.000 --> 00:30:50.000
Yeah, yeah, yeah.
00:30:56.000 --> 00:31:00.000
Yeah, so, so, yeah.
00:31:01.000 --> 00:31:16.000
Yeah, certainly I have a lot to be grateful for, but it's just been nice the last couple of days. I've been doing a lot of Xcode the last few days, and it's just nice working on a fast machine, so I'm happy. And I'm wondering how long it's going to take before this feels slow.
00:31:16.000 --> 00:31:20.000
I'm going to have to upgrade again.
00:31:19.000 --> 00:31:24.000
There's a word for that in medicine, which is called, um, acclimation.
00:31:22.000 --> 00:31:23.000
Yes.
00:31:24.000 --> 00:31:42.000
Acclimation, yeah. Yeah, well, I didn't go, you know, this is an M5 Max, I didn't go with the Ultra because that added, I could have doubled the memory then, but that adds like at least $4,000 to the price tag, and I just couldn't justify that. I'm happy with the Max.
00:31:40.000 --> 00:31:45.000
Like you want to go faster, but your want has bounds.
00:31:45.000 --> 00:31:55.000
Yes, I have limits. There's my speed limit right there. My goals and my values don't overcome the fact that I don't want to spend $4,000.
00:31:55.000 --> 00:31:57.000
So…
00:31:56.000 --> 00:32:02.000
Um, I have some things like that. I am not getting an iPhone Duo at this moment.
00:32:01.000 --> 00:32:10.000
Yeah, right, right. I figured version 2 or 3 of that thing, and I might be interested. I got enough other stuff going on right now.
00:32:07.000 --> 00:32:09.000
It's reasonable.
00:32:10.000 --> 00:32:11.000
Here.
00:32:10.000 --> 00:32:15.000
But anyway, hey, we've been talking for, like, 30 minutes, and we haven't even gotten to the meat.
00:32:15.000 --> 00:32:17.000
Or my week.
00:32:15.000 --> 00:32:22.000
Should we? Yeah. Sorry, Wolf, there's no time for your week.
00:32:22.000 --> 00:32:26.000
All right. All right. How's your week, Wolf?
00:32:26.000 --> 00:32:41.000
It was a lot of stuff since our last recording. I have had two open source PRs accepted by two different projects, both of which are very important to me.
00:32:41.000 --> 00:32:50.000
Um, one is, I use DIRENV. Um, I'm not going to go into detail about what DIRENV is, but if you're not using it.
00:32:48.000 --> 00:32:54.000
It's a D… It's D I R E N V.
00:32:54.000 --> 00:33:14.000
That's right. If you're not using it, go look it up, because you want to use it. And I… it's cross-shell, and it's cross-language, it's cross a whole bunch of stuff. It definitely applies to you, and it can definitely solve some of your problems, especially with credentials and whatnot.
00:32:55.000 --> 00:32:56.000
Yep.
00:33:14.000 --> 00:33:21.000
Um, and one thing that DirEnv knows is whatever language you might be working with.
00:33:21.000 --> 00:33:39.000
it knows what your projects look like, and so, like, what kinds of things it needs to activate, or put on the path, or stuff. Like, in Python, there's a thing called a virtual environment, and it has tools in it, and libraries, and they need to be in certain paths for you to reach them.
00:33:39.000 --> 00:33:46.000
So normally, whatever kind of project it is, you CD into that directory, and then you activate that thing, by hand.
00:33:46.000 --> 00:33:49.000
Durand will do that for you.
00:33:50.000 --> 00:33:58.000
The problem is, I use a tool in Python called UV, uh, made by Astral, it's super, super fast, written in Rust.
00:33:58.000 --> 00:34:15.000
And DirEnv doesn't know the shape of a UV project. That doesn't stop you. You can just write a piece of configuration that will make it do the right thing. But so many people use this. A while ago, I put together a PR that teaches DirEnv.
00:34:15.000 --> 00:34:29.000
How to do layout UV. And I submitted it, and there was feedback, and I collected stuff, and I made changes, blah blah blah. Months and months and months and months went by. Not quite a year, but a really long time.
00:34:29.000 --> 00:34:43.000
And I assumed it was dead, and that was gonna be it. And then, um, one of the maintainers… looked at it, did a further evaluation, said, yeah, this is going to help people, and it's written well enough, let's make a PR.
00:34:43.000 --> 00:34:46.000
It was accepted?
00:34:46.000 --> 00:35:03.000
merged, and he said it was important enough that it was worth doing a release right that minute, so that everybody could have it. By the time I read this email, the release that provides it, which is version 2.38.1.
00:35:03.000 --> 00:35:08.000
He did that on October 6th. I could already get from Homebrew.
00:35:08.000 --> 00:35:26.000
So if I'd install… if I were to install that right now, I would get it with your fix. That's pretty nice. And, uh, back up just a second. Uh, you mentioned DirEnv and what it does, and, like, activating a virtual environment, and all activating a virtual environment really is is setting some environment variables, right?
00:35:13.000 --> 00:35:28.000
You would. Uh, uh… That's right.
00:35:27.000 --> 00:35:46.000
Yeah, and DurEnd basically does that. You switch into a directory, and those variables automatically get set. So, like, your credentials for AWS or whatever, they get set, your environments you need for your virtual environment get set. It's really a slick little.
00:35:46.000 --> 00:35:48.000
piece of code that does that.
00:35:47.000 --> 00:36:03.000
And even better, it does it by starting a subshell. So when you leave that directory, and by the way, this works at any depth, like you can go five down and it sees that you set stuff at the top of the project you're working on.
00:36:03.000 -->
00:36:19.000
5 up. And it does those things. And once you leave that area, the place that is where the… where the sub-shell exits, and all those things go away. Even if they were weird, custom things that you made happen by hand.
00:36:04.000 --> 00:36:06.000
Right.
00:36:09.000 --> 00:36:12.000
The subshell exits.
00:36:13.000 --> 00:36:14.000
Right.
00:36:19.000 --> 00:36:24.000
Specifically as part of your end startup.
00:36:24.000 --> 00:36:30.000
Durham doesn't need to know how to undo them, because all it does is make the subshell go away, and they're gone.
00:36:30.000 --> 00:36:45.000
Right, right, and environment variables are only for that shell and any of its children, not for its parent. But that's interesting 'cause you could set an environment variable while you're in that directory, and when you back out of that directory, it's gone.
00:36:45.000 --> 00:36:47.000
That's right.
00:36:46.000 --> 00:36:48.000
Yeah, interesting.
00:36:48.000 --> 00:36:54.000
Yeah, okay. Second PR. Um, I use, uh…
00:36:52.000 --> 00:36:57.000
PR is a pull request in Git speak. Yes.
00:36:55.000 --> 00:37:13.000
That's right. Uh, and a pull request is what they call it on GitHub, because this thing where you say, I have changes, let's get them in, that's not a feature of Git. That's a feature of a service that is hosting Git repos.
00:37:06.000 --> 00:37:07.000
Mmhm.
00:37:12.000 --> 00:37:14.000
Sure.
00:37:13.000 --> 00:37:26.000
So, GitHub is one such thing, and it calls this feature a pull request, and then Bitbucket calls it a merge request. I might have those backwards, it doesn't matter. What matters is it's a request.
00:37:26.000 --> 00:37:39.000
Um, the other thing is, in my Python projects, I use a tool called GreatDocs. Um, and GreatDocs assembles all of your, um.
00:37:39.000 --> 00:37:56.000
docstrings, the place where you say, this function or method does this, this module does that, these tests, blah blah blah. It finds all those in your code, and builds documentation from them, as well as finding the API itself, all the function names.
00:37:57.000 --> 00:38:13.000
It builds automated documentation from that machinery. So not the stuff that you write yourself by hand, like the README or the ROADMAP or any of that stuff. All the automated stuff. Underneath, it's built on a separate project called.
00:38:13.000 --> 00:38:14.000
Quarto.
00:38:14.000 --> 00:38:27.000
And one thing that Quarto does is it generates a sidebar, um, that is… I think it's a table of contents, or links, or, you know, relate… it's stuff.
00:38:27.000 --> 00:38:41.000
like, Quarto has a bug, or had a bug. Um, I could see immedi- I mean, this is what I do, so I saw it immediately, uh, when I started timing stuff. As I was using brake docks, it was taking, like.
00:38:41.000 --> 00:38:57.000
11 minutes or something to run, right? And so, I did a little… I did a little analysis, and I saw from my analysis that it was spending a lot of time in that sidebar, so I looked at the code, and.
00:38:46.000 --> 00:38:48.000
That's forever.
00:38:57.000 --> 00:38:59.000
Oh, it's easy there.
00:38:59.000 --> 00:39:30.000
they're doing the wrong thing, it's M squared. They're looking at every link for every other link, um, which is… I guess there's nice words for it, but none of them come to mind. Anyway, um… Almost all n-squared problems have reasonable solutions, many of them do anyway, and so this one did, and I made a PR. I don't think I gave them exact code, but I said, look, here's what you're doing. I can see why you're doing it, obviously.
00:39:30.000 --> 00:39:45.000
It's suboptimal. In my personal copy, I did put in a real fix that was not n squared, and I went from, uh, 11 minutes down to 6 seconds, or something really good. It was… it was performant, and.
00:39:45.000 --> 00:40:01.000
And so I told them what to expect and how to do it. And time went by and I assumed it was never going to have an impact. And then I got an email saying, hey, we saw your fix. You're right. We took your suggestion. The very first thing you said works 100%. We put it in.
00:40:01.000 --> 00:40:03.000
It's solved. Thank you.
00:40:04.000 --> 00:40:08.000
That's how it's supposed to work. That's pretty good.
00:40:04.000 --> 00:40:06.000
Bye-bye.
00:40:06.000 --> 00:40:08.000
Yeah.
00:40:08.000 --> 00:40:14.000
So, those two things, Python 3.15.
00:40:14.000 --> 00:40:29.000
was released. That's awesome! Python 3.15 fits into the discussion we were just having, because it comes with a brand new sampling profiler, which has an official name, but all the cool kids call it.
00:40:29.000 --> 00:40:33.000
Tachyon. So… Call it tachyon.
00:40:33.000 --> 00:40:38.000
Um… I had to have.
00:40:38.000 --> 00:40:54.000
surgery on my left wrist, and I'm wearing a cast. I am officially incapacitated in this way for a month. It's very inconvenient. The pain's not too bad, but I can't type. Um, it makes.
00:40:54.000 --> 00:41:07.000
uh, certain kinds of things about driving hard. I have been relying greatly on dictation to get stuff done, um, and dictation in combination with AI, um.
00:41:07.000 --> 00:41:25.000
and at the risk of being polarizing, uh, in competition, where I'm doing shooting stuff, I'm shooting strong hand only, in every way, not just holding the gun, but also all of the administrative details. Loading, clearing malfunctions, chambering around, racking, all that crap.
00:41:25.000 --> 00:41:29.000
And even with that.
00:41:29.000 --> 00:41:46.000
Last session, there's four sessions in the in the competition for us. I did a clean eight for eight run in 9.33 seconds, which sounds great, but I am a D class shooter. I want to fess up to that. I'm not great.
00:41:46.000 --> 00:41:49.000
I'm okay.
00:41:49.000 --> 00:42:04.000
And I am 11th out of 14. Of course, I'm the only one who's shooting one-handed, so… Umm… I… have some things I have promised.
00:42:05.000 --> 00:42:22.000
And I haven't finished them, as promised, so I am
gonna fess up. One is, I told you I was working on automation for announcing new episodes of Runtime Arguments, which, of course, everybody is like, why would you need automation? Just make a.
00:42:22.000 --> 00:42:33.000
freaking post. But for me, I need some automation, and I, uh, haven't finished that yet. I promised that I am switching from, um.
00:42:34.000 --> 00:42:44.000
1Password, long time, most favored software status for me, but I can't agree with their values, so I'm switching to Bitwarden.
00:42:44.000 --> 00:43:00.000
I have not completed that. I think I'm going to finish that up tonight. And for 30 years, I have been working on what is to me a kind of an obsession, a super fast text search algorithm for use on DNA.
00:43:03.000 --> 00:43:08.000
We don't really search things that aren't indexed.
00:43:08.000 --> 00:43:28.000
in the real world. So is this applicable? I don't know. There is a best search algorithm in the world right now, which is an incredibly complicated name, that is an acronym where one word in the acronym is itself another acronym.
00:43:28.000 --> 00:43:57.000
Uh, the name of this search algorithm is BNDM, um, and that D is itself the acronym DAWG, D-A-W-G, which stands for… um… directed a cyclic word graph. Anyway, it's really fast. I had promised a couple people, Jim, one of them, that I would already have it published by the release time of this episode, and I haven't.
00:43:46.000 --> 00:43:47.000
Huh.
00:43:57.000 --> 00:44:02.000
But I'm getting really, really close, so I'm going to do that.
00:44:02.000 --> 00:44:28.000
Last… we would have recorded this yesterday on Thursday, we were recording on Friday, but we didn't. And the reason we didn't is because I drove an hour to get to Jackson, Michigan. Um… And my friend, friend of the show, Ron Kolcernian, and his wife, Lynn, met me at a first aid class called Stop the Bleed. Now, Stop the Bleed.
00:44:28.000 --> 00:44:43.000
It's only an hour long, and it doesn't teach you everything about first aid, but it tells you what you need to know to keep somebody alive for the 7 to 15 minutes it's gonna take for people with stuff to get there. People who can.
00:44:43.000 --> 00:44:50.000
Keep them out of shock and put them on a monitor, get them into the ambulance and to the hospital.
00:44:50.000 --> 00:44:54.000
All you have to do is make sure they don't bleed out.
00:44:54.000 --> 00:45:10.000
And this was taught by a terrific registered nurse by the name of Katie Watson. I'm super grateful we went. I'm very happy. I learned stuff. I can now, I believe I can apply a tourniquet if it's the right kind.
00:45:10.000 --> 00:45:19.000
And, since I'm one-handed, I am absolutely sure I can do it one-handed! So I feel good about that, too! Um…
00:45:17.000 --> 00:45:21.000
You won't be able to do it two-handed now.
00:45:20.000 --> 00:45:28.000
That is also probably true. Um, and I think that is about how my week was, and…
00:45:26.000 --> 00:45:32.000
So, so, so let me get this straight. So, in less than an hour.
00:45:32.000 --> 00:45:41.000
About the time it takes to listen to the intro to this episode, you could learn how to stop the bleed.
00:45:41.000 --> 00:45:56.000
Yeah, I thought it was nice that she asked a couple of questions that I was able to answer. Like, she started off with, you know, you see someone, and they've been damaged, they're starting to bleed. Um, do you know how long they have?
00:45:56.000 --> 00:46:12.000
And I said, well, it depends on exactly the nature of the wound, right? But if they've got a laceration across their femoral artery, if somebody cut their thigh and they're bleeding out of the big artery in their thigh, they've got about three minutes.
00:46:12.000 --> 00:46:15.000
You are the responder.
00:46:13.000 --> 00:46:18.000
I'm surprised it's… I'm surprised it's that long.
00:46:17.000 --> 00:46:32.000
And she said, "Yeah, that's right." And then she talked about different scenarios. And it turns out ambulances are faster than I realized. An ambulance, if you live in town, can get to you in seven to 10 minutes, 15 if it's bad.
00:46:31.000 --> 00:46:33.000
It's a lot more than 3.
00:46:32.000 --> 00:46:36.000
Yeah, if you can keep somebody alive.
00:46:36.000 --> 00:46:37.000
for.
00:46:37.000 --> 00:46:52.000
You know, maybe as long as 15 minutes. It could be that you've saved a life. And to me, that's important. Yeah. Man, have we spent a long time… I think we've done episodes shorter than this.
00:46:42.000 --> 00:46:46.000
Yeah, that's worth something right there.
00:46:46.000 --> 00:46:47.000
That's good.
00:46:51.000 --> 00:46:57.000
Yeah, in fact, we have. But that's all right. We're having fun.
00:46:54.000 --> 00:47:01.000
Um… But, here we are, let's do the meat. Let's hand it over to you, and then I'll fight.
00:47:02.000 --> 00:47:13.000
You got your… got your dukes up. Alright, so a little bit of background. A little bit of background. I… I own and run a company. Uh, we write software for doctors.
00:47:04.000 --> 00:47:06.000
I kinda do.
00:47:13.000 --> 00:47:21.000
And my biggest customer is a mammography clinic. They do mammograms detecting breast cancer for women.
00:47:21.000 --> 00:47:36.000
Mostly women, there's actually male patients as well. I've had them as a customer since 1985. So I've known these people a long, long, long time. And in 2006, they asked me to.
00:47:36.000 --> 00:47:52.000
come up with a solution to help with their patient workflow. This is a clinic, they're the largest freestanding mammography clinic in the United States. They see between 500 and 600 patients a day, between 6 or 7 offices.
00:47:52.000 --> 00:47:58.000
spread around western New York. So they needed help.
00:47:58.000 --> 00:48:13.000
to do things like make sure they don't lose a patient, right? It's awful when a patient shows up, they check in, they're told to go sit over there, and somebody will call you, and 2 hours later, nobody has called you. Um, or
you're…
00:48:11.000 --> 00:48:16.000
Like when you're sitting in hell in, uh, Beetlejuice.
00:48:14.000 --> 00:48:29.000
Yes, or worse, you know, you think you have breast cancer and they do the x-ray and then they tell you, sit over there, we'll get back to you in a few minutes with the results and a couple hours goes by. I'm not saying this happened there.
00:48:29.000 --> 00:48:59.000
But, uh, they, they could see that it could be a potential problem. So they asked me to help them create a system, uh, to track the patients. So that involved, uh, a couple of things. First off, uh, uh… tracking events. Every time something happens with a patient, an x-ray is done, they checked in, they checked out, all these things. There's thousands of metrics, well, hundreds of metrics that we track, and we write an event for every one of these.
00:48:59.000 --> 00:49:10.000
So that was so that they could measure the problem. How long did a patient sit there in the waiting room before coming back into the exam room?
00:49:07.000 --> 00:49:10.000
And you know I'm totally in favor of this!
00:49:10.000 --> 00:49:21.000
Yeah, so lots of metrics, so that was a part of it, and that turned out really nice. Then they asked to create a user interface so that they could.
00:49:21.000 --> 00:49:34.000
track patients and direct the flow of patients. This is back before digital x-rays, before they had digital mammograms. They were just using film screen mammography, which is just, you know, you've seen the x-rays, right? It's a.
00:49:34.000 --> 00:49:52.000
film, you know, they snap it like a photograph, they develop it, they put it up on a film reader, which is just a light board hanging on the wall, and they read the x-ray. Well, not… back then, it was all… it was all, uh, that type of mammogram. And then, uh, around 2006, 2007 or so, they were moving to digital.
00:49:52.000 --> 00:49:54.000
And they…
00:49:52.000 --> 00:49:54.000
And packs!
00:49:54.000 --> 00:50:36.000
and a PAC system, a picture archive storage system, uh, that's what you need when you go digital on, on, uh, on, on x-rays. Um… Uh, so, they wanted me to develop a system where they could, um, see at a glance on the screen, um, which rooms, uh, uh, you know, the waiting room, uh, the changing room, the exam rooms, the… inside waiting room, where they wait for the results, and several other things. They wanted to see that on a screen, and how many patients are in each one, and be able to see who are the patients in each one, and if a patient has been someplace too long, pop up a red flag, or, you know, some kind of indicator, so that.
00:50:36.000 --> 00:50:52.000
They had a worker there named a patient advocate. It was that person's job to make sure the patient knew what was going on and was taken care of in a timely fashion. So this tool was for them to help do that.
00:50:52.000 --> 00:51:08.000
And I created something using JavaScript on the front end, Perl on the back end, Postgres as the database, and 2006, we gave them the first version, and until last week, that's all they had.
00:51:08.000 --> 00:51:13.000
It was a prototype. It was a… Oh!
00:51:08.000 --> 00:51:13.000
And it was a huge leap. It was from zero to one.
00:51:13.000 --> 00:51:16.000
Yeah, it was a prototype.
00:51:16.000 --> 00:51:18.000
that stuck.
00:51:18.000 --> 00:51:23.000
Which they do. That's what they do. That's how they get you.
00:51:18.000 --> 00:51:34.000
And yeah, that's what happened. I created a project, I showed them and they wanted to start using it and they did. And they have the ability to create what we call views. And you go into this, the program is called Dashboard. It's not a name I chose, it's not quite the right name for it.
00:51:34.000 --> 00:51:58.000
but it's called dashboard, and they can create dashboard views, and each view has a bunch of resources on it, there are boxes on the screen. This being an audio podcast, I can't show you what it looks like, I can't take you through a demo, but I can try to describe it. So on the screen, for each view, they call up the dashboard program, they select a view, and they run it, and there's boxes on the screen, and each one of those boxes initially meant.
00:51:58.000 --> 00:52:03.000
An exam room, or a changing room, or outside waiting room, that kind of thing.
00:52:02.000 --> 00:52:05.000
So just to make sure this is clear.
00:52:04.000 --> 00:52:05.000
Mmhm.
00:52:05.000 --> 00:52:15.000
You are showing them numbers and data. You don't have a floor plan. They don't see a thing that is Room 3.
00:52:12.000 --> 00:52:17.000
I wanted… I wanted to do the floor plan.
00:52:17.000 --> 00:52:35.000
They didn't want that. I laid out a view that looked like a floor plan. They weren't interested. Yeah, they just… they could think in terms of, you know, exam room 1. They have 12 exam rooms. They could think in terms of those exam rooms. Then they knew what it all meant.
00:52:21.000 --> 00:52:23.000
Interesting.
00:52:35.000 --> 00:52:51.000
So within this box on the screen that represents one of the rooms, there's a list of patients in that box. Now, in an exam room, there's only one patient. In the waiting room, there might be 20 patients. In the changing room, there might be 10 patients.
00:52:52.000 --> 00:52:58.000
Anyway, these are patients in this box.
00:52:58.000 --> 00:53:13.000
And so that was kind of nice. So as patients move around the office, the view would update automatically. And the way that we did that was every 10 seconds, the view would refresh, it would hit the server.
00:53:13.000 --> 00:53:30.000
Hit the Postgres database and select all of the patients, select all of the patients that were in the office that day. And then there was some filter logic that would run to figure out, okay, this patient's in the waiting room, this patient's in exam room.
00:53:14.000 --> 00:53:20.000
It's a cron job!
00:53:30.000 --> 00:53:46.000
13 or 12, I said they only have 12 exam rooms. So
they're in exam room nine, right? Or this person has checked out. So it would automatically filter and figure out what box to put those patients into. And that worked for a while. And it was nice.
00:53:45.000 --> 00:53:58.000
Did it… so, like, it obviously has to do this query at least once, but did it do it for each workstation, or did it do it once and then the workstation fetched a file?
00:53:52.000 --> 00:53:53.000
Yes.
00:53:55.000 --> 00:54:02.000
It did it for… it did it for… it did it every 10 seconds for every session that was running.
00:54:02.000 --> 00:54:06.000
So there could be five on a workstation.
00:54:02.000 --> 00:54:14.000
And a workstation could run multiple sessions. On a single workstation, yeah. So it was not uncommon to see 140 sessions hitting the database every 10 seconds. And…
00:54:12.000 --> 00:54:24.000
So, absolutely the right decision if the thing you're writing is a prototype. Absolutely the wrong mechanism if what you're writing is, here's what we're using.
00:54:18.000 --> 00:54:20.000
Yeah. Yeah.
00:54:21.000 --> 00:54:38.000
Oh, yeah, yeah, yeah, but it worked. It worked in their eyes. It worked so well. They didn't want to. They didn't want to pay me to make it better. It was good enough, and it worked and fine. Okay, well, the practice grew. They got more remote offices, more doctors, more patients.
00:54:31.000 --> 00:54:32.000
Yep.
00:54:38.000 --> 00:54:55.000
So, uh, and then… and then they wanted something added where now, not only does… does a box represent a room, it could represent some state. Um, the… the patient, um, uh… What's a good one?
00:54:54.000 --> 00:54:56.000
Has insurance.
00:54:55.000 --> 00:55:11.000
The patient, oh yeah, the patient has insurance. The patient hasn't gotten the results yet. The results aren't available yet. Right, right, right. The patient hasn't filled out their health history form yet.
00:55:01.000 --> 00:55:03.000
And they overlap.
00:55:03.000 --> 00:55:08.000
Like they're in a room and they're in a state.
00:55:11.000 --> 00:55:34.000
The patient hasn't signed their consent agreement yet. So they ended up with 252 views that a user could choose from with all kinds of different things. And every time they came up with a new view, they came up with new things that needed to be in the query and the query grew quite large. And there were some times the query could take 18 seconds to run.
00:55:35.000 --> 00:55:41.000
Wait, wait, wait, wait. Are you saying a query you wrote?
00:55:35.000 --> 00:55:42.000
So… Uh…
00:55:41.000 --> 00:55:45.000
Took 18 seconds? Or is this like they wrote both?
00:55:42.000 --> 00:55:54.000
Well, here's what I did. I gave them the ability to write queries, to write not the full query, but the where clause.
00:55:51.000 --> 00:56:02.000
Or, as I would say it, you gave them the ability to take 18 seconds, as opposed to the ability for you to write it and have it take 1 tenth of a second.
00:55:56.000 --> 00:56:01.000
Yes. Yes. Yes. Yes.
00:56:01.000 --> 00:56:14.000
Yeah, and I spent a lot of time analyzing their queries, and I… one of the things I get great satisfaction from is analyzing queries and making them faster. I…
00:56:12.000 --> 00:56:15.000
Well-deserved satisfaction.
00:56:14.000 --> 00:56:34.000
I love doing that. I love running the explain analyze and figuring out why a query is slow. And a lot of times it's because there's not an index on a column that there should be. But sometimes they're just doing stupid things in a sub query that could maybe be better done as a join or something. I get great satisfaction of taking a query.
00:56:34.000 --> 00:56:50.000
that runs for 18 seconds and getting it down to like 20 milliseconds. That's a lot of fun. But some of these queries, you know, I used all of my tools, all of my skills, and some of these queries, I just could not get to be fast enough.
00:56:52.000 --> 00:57:02.000
So, for, like, 15 years now, I've had it in my mind that I have to rewrite this. I have to do something different. I have to make it better.
00:57:01.000 --> 00:57:04.000
But not just because of the queries, right?
00:57:04.000 --> 00:57:09.000
Uh, why else? Oh, because it's a bad idea?
00:57:08.000 --> 00:57:25.000
Well, no, I'm actually curious, like… you know, my… that search algorithm that I've been working on for 30 years is… is an obsession. Am I able to explain it? Um, I do… I do have an elevator pitch on one sentence. Here's why I'm… why I'm doing it.
00:57:15.000 --> 00:57:17.000
Right, right.
00:57:19.000 --> 00:57:21.000
Oh, yeah.
00:57:23.000 --> 00:57:24.000
Yeah, yeah.
00:57:24.000 --> 00:57:26.000
Right, right.
00:57:25.000 --> 00:57:29.000
Is it Bad Queries? Is that your elevator pitch?
00:57:29.000 --> 00:57:34.000
Yeah, that's the big thing. That's the biggest reason. Bad queries are the wrong way to do it.
00:57:34.000 --> 00:57:43.000
All right, you talk a lot about how to optimize things, and one of the things you… the first thing you go and look at is, are they doing it the right way, or are they doing it wrong?
00:57:41.000 --> 00:57:46.000
Or are they even doing the right thing?
00:57:45.000 --> 00:57:48.000
Yeah, right. Right.
00:57:46.000 --> 00:58:00.000
Like, for instance, uh, you know, what's the best path to drive to Los Altos? Um, or Los Altos, whatever, right? And it turns out, you could pick a really good path, but the right thing was to fly.
00:57:55.000 --> 00:57:56.000
Yes.
00:58:00.000 --> 00:58:01.000
Yes.
00:58:01.000 --> 00:58:17.000
How do they do it? And they're using the right algorithm, right? So in 15 years, at least 15 years, I've had it in my mind that I needed to do better. I wanted to do better. And I finally convinced them that they needed me to do this.
00:58:17.000 --> 00:58:31.000
They needed to pay me to spend some time. This is a business for me. You know, sure, I do a lot of work for free, but this was something that was going to take more than a few hours to do. And I…
00:58:29.000 --> 00:58:43.000
Do you have an idea? If you give them the new thing, which I assume you have, and that's what we're hearing about, how much money are they going to save?
00:58:34.000 --> 00:58:36.000
Mm-hmm.
00:58:37.000 --> 00:58:38.000
I have.
00:58:44.000 --> 00:58:51.000
Oh, I can't even begin to… to, uh, put a number on that. Um…
00:58:50.000 --> 00:58:54.000
Bigger than a bread box, does it pay for itself?
00:58:52.000 --> 00:58:57.000
Yeah, yeah, yeah, yeah. Well, yeah.
00:58:56.000 --> 00:59:07.000
Does it do the thing the M5 just did for you? Does it turn an experience that has become painful into something they can now smile about?
00:58:57.000 --> 00:58:58.000
Yeah, okay.
00:59:01.000 --> 00:59:04.000
Oh, yeah. Oh, yeah. Oh, yeah.
00:59:07.000 --> 00:59:24.000
Yes, it not only does that, it opens up the world to what they can do. Because the old system was strictly about appointments. It was about, you know, there's 550 people coming in today, those 550 appointments. It was about managing those appointments.
00:59:24.000 --> 00:59:35.000
The new system is about anything in the database. They can write a view that tracks anything in the database that they want. You want to track patient AR?
00:59:32.000 --> 00:59:36.000
For me, that's the elevator pitch.
00:59:35.000 --> 00:59:48.000
Yeah, you want to track patient AR, you want to look at, you know, which patients are 30 days past due on their payment, which patients are 180 days past due.
00:59:46.000 --> 00:59:54.000
I had to actually deduce from first principles that when you said AR, you meant accounts receivable.
00:59:48.000 --> 00:59:50.000
You can do things like that.
00:59:53.000 --> 00:59:55.000
Accounts receivable, yes.
00:59:55.000 --> 01:00:11.000
Also, I don't want to forget this, but you were telling me about horrible nested queries and stuff. I happen… I happen to have been going through existing Postgres code, and I learned about something.
00:59:55.000 --> 01:00:04.000
Yeah, that's… Some queries, sure.
01:00:11.000 --> 01:00:20.000
awful. I don't even understand why this is allowed. Um, there's a thing that you CAN do.
01:00:12.000 --> 01:00:13.000
Yeah?
01:00:14.000 --> 01:00:16.000
Yeah?
01:00:20.000 --> 01:00:32.000
to solve certain kinds of problems, and I saw it. It was a thing I would never want to use, and I wish I could forget it. It's called a recursive query.
01:00:27.000 --> 01:00:28.000
Yeah?
01:00:32.000 --> 01:00:33.000
Oh, yeah!
01:00:32.000 --> 01:00:39.000
If you have to use a recursive query, you need to rethink some life choices.
01:00:38.000 --> 01:00:44.000
Well, I have some recursive queries.
01:00:45.000 --> 01:00:48.000
And they're, they're…
01:00:45.000 --> 01:00:50.000
Did you mean to buy an airline ticket?
01:00:48.000 --> 01:01:03.000
No, no, they are the reason that something works now. This has nothing to do with this system. Same customer, but a whole different problem. If you ever play with SNOMED codes.
01:01:03.000 --> 01:01:23.000
yeah,
you're gonna need a… you're gonna get into directed acyclic graphs and recursive queries before you know it. Anyway, so I've sort of described the old system and some of the problems with it, and I started to touch on what the new system is. Now, the old system was.
01:01:23.000 --> 01:01:35.000
Perl, and a long time ago, after the prototype was working, and there was some performance issues, I changed it to ModPerl, so that was a big performance boost, but a pain in the butt.
01:01:32.000 --> 01:01:35.000
Because it ran in process.
01:01:35.000 --> 01:01:47.000
It ran in process. Yeah. And it, and it's more like a service than a, than a CGI script. And that, that helped.
01:01:47.000 --> 01:01:48.000
Um, okay.
01:01:48.000 --> 01:02:23.000
But still, you know, you're hitting the database, uh, 140 sessions every 10 seconds, and some of these queries take 18 seconds. It's kind of ridiculous. So, I wanted to do something different. So… Instead of the… client pulling the server every 10 seconds to see if anything changed. And think about it, there's an awful lot of times where nothing changed, but we're still hitting the server to see if anything changed. I flipped it upside down. Now, the database monitors data, that's what a database does, right?
01:02:23.000 --> 01:02:34.000
It stores data, and you can set up triggers, and you can monitor the data, and when the data changes, push that change out to the client.
01:02:35.000 --> 01:02:40.000
Way better idea, especially if you implement it correctly.
01:02:40.000 --> 01:02:42.000
So I started.
01:02:42.000 --> 01:02:50.000
like I said, I've been talking about this or thinking about this for 15 years. June 1st of this year, I finally sat down and said, this is it, I'm starting.
01:02:51.000 --> 01:02:55.000
And I started June 1st and.
01:02:56.000 --> 01:03:02.000
what I ended up writing was, uh, instead of using Pearl, and I know you like.
01:03:02.000 --> 01:03:05.000
Wolf when when I don't use Pearl.
01:03:05.000 --> 01:03:21.000
I'm using, you do, 'cause I can tell, 'cause you give me the side eye whenever I talk about Perl. I am using, I chose the language TypeScript to write this in, the server component of it.
01:03:06.000 --> 01:03:08.000
Yeah, I kind of do.
01:03:19.000 --> 01:03:23.000
Which is a good choice, I approve of TypeScript.
01:03:21.000 --> 01:03:38.000
It's, yeah, I wanted something that the compiler would find errors for me before the user finds them. And Pro was not the answer for that. And I didn't really want a compiled language, like, first off, I don't know Rust, and I didn't want the learning.
01:03:38.000 --> 01:03:56.000
curve to learning Rust. So I chose TypeScript, and there was still a big learning curve for me, but I was very, very confident in JavaScript. So this is a layer on top, a fairly complex layer, and I've been using Node.js for years and years. I've been using Node.js for, like.
01:03:56.000 --> 01:03:59.000
18 years. When it was…
01:03:57.000 --> 01:04:02.000
Now, Node.js runs on top of V8.
01:03:59.000 --> 01:04:01.000
Version 4.
01:04:02.000 --> 01:04:08.000
Uh, yeah. Yeah, it's… Node.js basically is server-side JavaScript.
01:04:03.000 --> 01:04:05.000
V8.
01:04:07.000 --> 01:04:12.000
I am not the hugest Google fan in the world.
01:04:08.000 --> 01:04:09.000
It's a way to run JavaScript.
01:04:12.000 --> 01:04:30.000
But V8 gets props. V8 is good engineering, it does a good thing, and TypeScript takes everything that's good about JavaScript and adds types, which helps you make promises, and we all know how I feel about promises.
01:04:15.000 --> 01:04:19.000
It kind of rocks. Yeah, yeah, yeah.
01:04:24.000 --> 01:04:26.000
Yeah.
01:04:26.000 --> 01:04:28.000
Yep.
01:04:30.000 --> 01:04:31.000
Yeah.
01:04:30.000 --> 01:04:35.000
I'm 100% behind every decision you just said.
01:04:34.000 --> 01:04:41.000
Yeah, so I wrote a service in TypeScript running under Node.js.
01:04:41.000 --> 01:04:47.000
That connects to the database, and of course, the clients connect to it.
01:04:47.000 --> 01:04:52.000
And, uh… a user opens up a view.
01:04:52.000 --> 01:05:00.000
uh, it's just our normal system stuff here. They, they, they open, they run the, the program, they open up a view, and then.
01:05:00.000 --> 01:05:03.000
The client hits the node service.
01:05:03.000 --> 01:05:14.000
and pulls the data for the view. There's a lot of metadata. There's things about the view. What are the resources? What are the labels that appear on the screen? What is the query that runs?
01:05:14.000 --> 01:05:27.000
Uh, for that view. Now, all the other views, or most of the other views, had a big, big, ugly query that queried way more information than it needed to. That's part of the reason why those queries were so slow.
01:05:27.000 --> 01:05:37.000
Uh, and this one only queries what it needs to. The select statement that selects the data only selects the fields that you need to support that view.
01:05:38.000 --> 01:05:41.000
And um it it it.
01:05:41.000 --> 01:05:57.000
The service running in Node gets that request from the client and opens up a connection to the database and starts running that query and delivers the results. And there's a lot of things I did.
01:05:56.000 --> 01:05:59.000
So the query is happening.
01:05:57.000 --> 01:05:59.000
to make this better.
01:05:59.000 --> 01:06:04.000
at the node location. In other words, on the server.
01:06:01.000 --> 01:06:18.000
Node is making the Postgres connection. Yes, yes. Node is making the connection to Postgres and executing the query, or feeding the query to Postgres, and Postgres returns the data back to Node, and then the Node… process, we'll send it back to the client.
01:06:18.000 --> 01:06:27.000
Um, I've used Node for a long, long time, and with Postgres, and it works nice. The issue with that, though, is you can only have.
01:06:27.000 --> 01:06:34.000
Um… Uh, one… for every connection you make to the database, you can only run one query.
01:06:34.000 --> 01:06:54.000
and any other queries you submit. Node is asynchronous. You submit a query to the database, and then Node goes about doing all kinds of other things. It's a JavaScript thing, right? It's just a constant event loop. So Node will feed the query to Postgres, Postgres will churn on that query while Node is doing other things.
01:06:54.000 --> 01:07:05.000
responding to other clients connecting up, and those clients connect, and they'll issue a query, and it just gets queued. So the query doesn't even start yet.
01:07:01.000 --> 01:07:16.000
Does… does no need… Does Node give you the same machinery that web workers do? Because JavaScript itself is about threads, but web workers are better than threads.
01:07:10.000 --> 01:07:24.000
It sure does! It sure does. Yes. So I knew this about node going in and I knew this, I was gonna have to solve this issue. And.
01:07:24.000 --> 01:07:41.000
Um… So instead of all my clients connecting up and issuing their queries and then sitting in the queue waiting for their query to run and getting the results, as a client connects up and we tell it what view we're running, and by the view we know what query is going to run.
01:07:41.000 --> 01:07:54.000
Uh, now… I create a worker thread, that's what they're called in Node, worker thread. I create a worker thread, I spawn a new thread to run that query.
01:07:54.000 --> 01:08:07.000
And so that query runs, and if another user connects up and they're running the same view, so therefore the same query, it doesn't spawn another worker thread, it subscribes to the same worker thread.
01:08:07.000 --> 01:08:10.000
Great design, I love it!
01:08:07.000 --> 01:08:22.000
So now, if I had 10 users… if I had 10 users, or 30 users, running the same view, they're all gonna subscribe to a single worker thread, so there's one query running, hitting the database. So the first time you connect up.
01:08:21.000 --> 01:08:33.000
It's just like Git. When you've got 50 files that are identical, there's one object in the database, and because… and once it… because you have the hash of that object.
01:08:25.000 --> 01:08:27.000
Yeah.
01:08:27.000 --> 01:08:29.000
Deduplication.
01:08:29.000 --> 01:08:31.000
Yep.
01:08:33.000 --> 01:08:34.000
Right.
01:08:33.000 --> 01:08:37.000
You all use it. It's the same thing.
01:08:35.000 --> 01:08:53.000
Yeah, I'm using a hash. I'm using a hash. I take the query, and I create a hash value of it, so that's how I know that that query is different from any other query, or it's the same as a query. And they don't even have to be running the same views. If they're running different views, but those views happen to use the same query.
01:08:53.000 --> 01:08:55.000
It's one worker thread.
01:08:55.000 --> 01:08:57.000
Love it.
01:08:56.000 --> 01:09:04.000
So, so I thought you were going to argue with me. I'm waiting. Okay. Okay.
01:08:59.000 --> 01:09:04.000
I am! Like, the title sucks!
01:09:04.000 --> 01:09:13.000
We'll get to
that eventually. So the worker thread starts up and it hits and it fetches the data from the server.
01:09:13.000 --> 01:09:29.000
And it might return 540 rows. And then that data gets pushed back to the main thread that's running in Node. And then it gets sent out to each subscriber.
01:09:29.000 --> 01:09:30.000
of that query.
01:09:29.000 --> 01:09:34.000
Here comes the magic word. I've been waiting for you to say the magic word.
01:09:30.000 --> 01:09:33.000
So the clients get the update.
01:09:34.000 --> 01:10:02.000
Um, okay. We'll see if I say it. Um… Uh, so the clients get the data, and there's filters along the way so that those 540 rows will get filtered out, and so now we know where they belong on the screen. And… And that really helps. Now, the first time a session or a client connects up, they get the full set of data.
01:10:02.000 --> 01:10:11.000
for that… for that view. So if there's 500 patients in the office, they're gonna get all 500 patients on the screen in one payload, right?
01:10:11.000 --> 01:10:23.000
But now, as data starts changing, there's trigger functions on tables in the database, and that sends… you know, Postgres has got this cool thing called Notify.
01:10:23.000 --> 01:10:32.000
you can issue a notify command, and it's a message queue. So you do a notify, and you can give it a payload, and you give it a name.
01:10:33.000 --> 01:10:48.000
And then the server issues a listen. So it's sitting there listening for these notifications or these messages. And so now when data changes, the trigger function doesn't notify the node process.
01:10:48.000 --> 01:10:57.000
Does the listen, and it… it gets a notification that says, oh, this row changed, or this… this patient changed, or this… something changed.
01:10:57.000 --> 01:11:00.000
So it does a query of the database.
01:10:57.000 --> 01:11:10.000
I gotta stop here right now. And I'm wearing my user hat now, but this is also for me, because I just want to know. I have come to…
01:11:00.000 --> 01:11:02.000
Okay.
01:11:04.000 --> 01:11:05.000
Yes.
01:11:07.000 --> 01:11:08.000
Yes.
01:11:10.000 --> 01:11:23.000
disrespect many uses of trigger functions. Trigger functions can be used to turn your database into a doorstop. So.
01:11:16.000 --> 01:11:17.000
Yeah.
01:11:22.000 --> 01:11:26.000
Oh, it could be a mess. It could be a huge mess.
01:11:24.000 --> 01:11:27.000
My question for you is.
01:11:27.000 --> 01:11:41.000
How are you not doing that? Are you only installing or enabling and disabling, because that can happen depending on what level you've set the trigger at, whether it's a system or a user, for instance. Are you…
01:11:38.000 --> 01:11:40.000
Mmhm.
01:11:41.000 --> 01:11:51.000
installing them and uninstalling them as you are… are you turning them on and off? Are you… or is it the case that the changes you're detecting.
01:11:43.000 --> 01:11:45.000
No. No.
01:11:51.000 --> 01:12:00.000
are root enough that seeing those changes is all you need to satisfy
any query or know that it's time.
01:12:01.000 --> 01:12:04.000
Fill me in, how is it not a doorstop?
01:12:02.000 --> 01:12:17.000
I'm not sure I totally understand your last question, but let me explain how they do it. First of all, the trigger function is very, very lightweight. There's not much happening in the body of this trigger function. It basically says, oh, the appointment.
01:12:17.000 --> 01:12:28.000
a record changed, I'm gonna send a notify. And notifies are lightweight, they're very efficient, so all it does, it doesn't do any processing on the data, it just sends a notify.
01:12:28.000 --> 01:12:36.000
So, yes, I have a lot of triggers triggering, but they're all doing very lightweight things, just sending notifications.
01:12:37.000 --> 01:12:52.000
So the server, we're back in Node.js, the server is listening for these, these, uh, messages, and it gets a message with a payload that says, appointment, uh, uh, let's say, appointment 1234, uh, has been updated.
01:12:52.000 --> 01:13:01.000
So the server re queries the appointment. It runs the query for that appointment one, two, three, four, and it just retrieves the one row.
01:13:02.000 --> 01:13:12.000
and it takes that row, and now it sends deltas to the client. So instead of sending 500 rows to the client in one big payload, it sends.
01:13:12.000 --> 01:13:17.000
One row changed. Here it is. Here's the data for that one row.
01:13:14.000 --> 01:13:16.000
All right.
01:13:17.000 --> 01:13:20.000
Let me make sure I understand.
01:13:17.000 --> 01:13:21.000
So now my payloads are much smaller.
01:13:20.000 --> 01:13:28.000
The client… is a node, or the client is a view on a workstation.
01:13:27.000 --> 01:13:31.000
The client is a view on the workstation running JavaScript.
01:13:30.000 --> 01:13:46.000
And there can be, you know, there could be 30 views that are using the same query. And some of them are going to be older in terms of when they last got data than others. So one is going to need this one appointment.
01:13:34.000 --> 01:13:38.000
Could be 140 of them. Yeah. Yeah, yeah.
01:13:42.000 --> 01:13:44.000
Yep. Yep.
01:13:46.000 --> 01:13:49.000
And another is going to need five.
01:13:51.000 --> 01:13:52.000
Well.
01:13:52.000 --> 01:13:57.000
If five rows changed, there's going to be five messages sent.
01:13:57.000 --> 01:14:01.000
And and and 5 listens 5.
01:13:58.000 --> 01:14:04.000
I see. These happen one at a time, no matter what.
01:14:02.000 --> 01:14:06.000
Yes, yes, but.
01:14:06.000 --> 01:14:16.000
There's some… there's some logic where, uh, when we get a notify, we wait 10 milliseconds before doing anything with it, so that if we get an update storm.
01:14:16.000 --> 01:14:22.000
Right? If you… if you issued an update, uh, like a bulk load on a table, you could get.
01:14:20.000 --> 01:14:23.000
You can cluster.
01:14:22.000 --> 01:14:39.000
you could get tens, or hundreds, or thousands of rows, uh, all sending, uh, uh, messages, right? All run the trigger function, all sending messages, the server responding to all those messages, and, and, you know, having to… if you sent a thou… if you updated a thousand rows.
01:14:39.000 --> 01:14:46.000
uh, the server would have to do a thousand queries, which is nuts, right? So, uh…
01:14:44.000 --> 01:14:48.000
But because you're clustering, it could be one.
01:14:46.000 --> 01:14:56.000
Because we're clustering. It could be one. In fact, if it's, um… if it receives multiple messages for the same payload.
01:14:56.000 --> 01:15:15.000
it will just… it'll collapse them down to one, which is nice, but if it receives multiple messages for lots of different rows, if it's more than 25, if the queue grows to more than 25 of these messages, it just throws away all the notifications. It forgets about those and just does a full query.
01:15:16.000 --> 01:15:32.000
Oh, that's nice! Like, hey, I can do magic, but by the time you get to X, forget magic, let's just pretend you're starting up again. Uh, that's simple, that's fast, it's easy to debug, I love it!
01:15:17.000 --> 01:15:21.000
So it's… Yeah, it, it.
01:15:23.000 --> 01:15:26.000
Yeah, I'll.
01:15:26.000 --> 01:15:30.000
Yeah, right. So it'll do the full load.
01:15:31.000 --> 01:15:49.000
Isn't that nice? So, um… you know, the data gets down to the client, and they see it on the screen. Now, I think I mentioned earlier that you can, like, drag a patient from one box to another. Did I say that? Maybe I said we were just viewing the data, okay?
01:15:48.000 --> 01:15:54.000
You had said that in previous episodes, you had not said it today.
01:15:49.000 --> 01:16:01.000
But… Okay, so, okay, so, uh, one of the things that you can do with these views is, uh, let's say you have a patient that's ready to check out.
01:16:01.000 --> 01:16:06.000
You can take the patient from one box and drag them to the checkout box.
01:16:06.000 --> 01:16:09.000
And when you do that, code can run.
01:16:09.000 --> 01:16:27.000
So, these are… I call these actions. It's either an on-drag or an on-drop. So, when you drag a patient out of one box, the on-drag action runs. When you drop them on another box, the on-drop action runs. And these actions are written in a language, a domain-specific language that I wrote.
01:16:27.000 --> 01:16:47.000
It's a very simple stack-based language that just… you know, it's got some if, you know, some conditional logic, and then run some functions. And those functions are… I've made available to them. I give them a list of them. And there's a whole plug-in architecture for adding more functions without having to, you know, do a big update.
01:16:47.000 --> 01:16:52.000
Stack based like like postscript and forth.
01:16:47.000 --> 01:17:08.000
So these… Yeah, I suppose. I mean, you're pushing arguments. It's like any language, really. You're pushing arguments onto a stack, and when you call a function, it pops the arguments off the stack and does things with them. Name a language that doesn't
work that way. I know there are some.
01:17:02.000 --> 01:17:05.000
That's awesome.
01:17:08.000 --> 01:17:24.000
But so it's like, it's a little virtual machine that's running that, you know, that, I mean, virtual machine, I mean, in terms of a, like a Java VM, a JVM kind of a thing. It's just a little runtime that's running.
01:17:21.000 --> 01:17:23.000
I hear you.
01:17:24.000 --> 01:17:39.000
you know, looking at the code, and looking at the stack, and pushing, and popping, and running, and all this stuff. And that's a language I wrote, it's a little domain-specific language I used. Some of this code, like, when you drag a patient, that code actually runs in Perl back on the server.
01:17:39.000 --> 01:17:57.000
it's not running in the Node application. It just makes an API call back to the server, and it runs it in that. So that language is written in YAP, which, you know, if you've ever used, uh… if you've ever created a compiler, you may have used YACC, Y-A-C-C. Well, there's a Perl equivalent called YAP, yet another.
01:17:53.000 --> 01:17:56.000
Yeah, right.
01:17:57.000 --> 01:18:00.000
Perl parser, or something like that.
01:18:00.000 --> 01:18:16.000
Um… So I wrote it using that, because that's the language I'm most familiar with. And so that all works beautifully. So they're dragging patients around, doing all kinds of neat things with conditionals and everything. So that all works really nice.
01:18:16.000 --> 01:18:24.000
So… anyway, this whole system is up and running. I installed it, uh, about 10 days ago.
01:18:24.000 --> 01:18:40.000
I actually installed it a month ago, but I went out there to show them to start using it. And I created a conversion utility so they can take one of the old views in the old system and right-click on the view and say, okay, convert it to the new system.
01:18:40.000 --> 01:18:56.000
By the way, the new system, yeah, I mentioned way at the top, I own my own company. The name of that company is Avaris, it's A-V-A-I-R-S. We write RISC software for, RISC stands for Radiology Information Systems, so we write software for radiologists.
01:18:56.000 --> 01:19:11.000
Uh, so that's part of where the name came from. Um, anyway, this program is called, uh, the Averis Data Engine, and I know Wolf's got something to say about why did I call it a data engine, but it's the Averis Data Engine, AVDE for short.
01:19:11.000 --> 01:19:25.000
So I gave them AVDE while I was out there, and, uh, did this whole nice little… we had 2 hours to show them, you know, how it works, and… or we allocated 2 hours to show them this, and quite frankly, I overwhelmed them.
01:19:25.000 --> 01:19:37.000
Um… did you ever… did you ever have an idea in your head about how people are gonna respond to things? And in the back of your mind, thinking, yeah, this is gonna create a standing ovation?
01:19:27.000 --> 01:19:29.000
Yeah, I have to.
01:19:37.000 --> 01:19:46.000
Every. Single. Time. And do you know how many times I get that standing ovation? It is approaching zero.
01:19:39.000 --> 01:19:55.000
Yeah, okay, that is zero. Yeah, yeah. So in my mind, that's what was gonna happen. But I realized about halfway through that I was just overwhelming them. I was showing them way more than they were able to take in.
01:19:55.000 --> 01:20:09.000
in that period of time. I've got a nice 50-page manual for this, and we went all out on this project.
01:19:57.000 --> 01:20:02.000
Yeah, that's how people respond to me when they say, how are you doing?
01:20:09.000 --> 01:20:26.000
At the end, they did start asking questions, so I knew they understood what I was doing. And then the real payoff came the next day. You know, I gave them the manual, I printed out copies of the manual for it, and they all went home, and I thought, yeah, okay, they're overwhelmed, they're not gonna do anything. Well, the next day, a couple of the people that used this.
01:20:26.000 --> 01:20:39.000
um, had really good questions, and, and they were already creating views, so I, I was quite happy with that. That, that was, uh, that was a good time, yeah. So…
01:20:34.000 --> 01:20:36.000
That is awesome.
01:20:37.000 --> 01:20:41.000
I have to instantly ask you THE question.
01:20:39.000 --> 01:20:41.000
Yes.
01:20:41.000 --> 01:20:42.000
Yeah, the question.
01:20:41.000 --> 01:20:57.000
This is the question that you… I always fail when I'm trying to get you to try something. You, one way or another, ask me this question, and you are never happy with the answer. And so…
01:20:50.000 --> 01:20:51.000
Yeah.
01:20:56.000 --> 01:20:58.000
Okay, what's that?
01:20:57.000 --> 01:21:12.000
You don't switch. And that is, uh… What is the switching cost? What do they have to do to use the new thing, and what do they get in return for that work?
01:21:12.000 --> 01:21:18.000
Great question, and I've got a really good answer for that. The switching cost is near zero.
01:21:15.000 --> 01:21:17.000
Okay.
01:21:18.000 --> 01:21:22.000
Because of your app, your tool that switches.
01:21:18.000 --> 01:21:27.000
Yes, the old view and the new views come up in the same list of views.
01:21:27.000 --> 01:21:33.000
So it's not like they have to go to a different program to see these new ones. They appear in the same list of views.
01:21:33.000 --> 01:21:39.000
So you point to one of the old views, you right-click on it, and you say, convert it to the new system, to AVDE.
01:21:39.000 --> 01:21:46.000
Oh, you can tell the difference. When you see an old one and a new one side by side, they're just their names. It tells you.
01:21:39.000 --> 01:21:41.000
twenty.
01:21:41.000 --> 01:21:43.000
Twice.
01:21:44.000 --> 01:21:54.000
Yes, there's a… the name of the view is the same, but there's a column that says either AVDE or blank, so you can tell which one it is.
01:21:53.000 --> 01:21:55.000
Okay.
01:21:54.000 --> 01:22:07.000
And the users, the actual users that are gonna run this, don't get it until you publish a view. You can
create a view, you can do all the tweaking you want on it, nobody sees it until you publish it. And then once you publish it, then it shows up in the users menu.
01:22:07.000 --> 01:22:13.000
as a view that they can run. So the switching cost is nearly zero. I mean.
01:22:13.000 --> 01:22:18.000
you know, 20 seconds to point at it, and convert it, and…
01:22:16.000 --> 01:22:20.000
For a person who's using them.
01:22:20.000 --> 01:22:24.000
But the switching cost for a person who's creating them is higher.
01:22:23.000 --> 01:22:37.000
Oh, no, that is the switching cost for creating them, for creating the views. They point at it, they convert it, and I mentioned they have 252 views. That was as of the day that I gave it to them.
01:22:37.000 --> 01:22:41.000
Uh, 85% of those views convert perfectly.
01:22:41.000 --> 01:22:48.000
I ran every one of them over and over and over again, and 85% of them convert perfectly.
01:22:48.000 --> 01:23:05.000
15%, that's 37 views. They have a little bit of problem with that domain-specific language, because that changed a little bit. I tightened it up a lot. They had a problem where, you know, I said they can have these conditions where they can say, you know, if the appointment type is this, and the location is this.
01:23:05.000 --> 01:23:08.000
You know, then do something.
01:23:07.000 --> 01:23:11.000
So the old one had that DSL also.
01:23:08.000 --> 01:23:16.000
Well, they had… It did. This one's rewritten to be much tighter. Uh, the old one…
01:23:14.000 --> 01:23:16.000
But it's the same language.
01:23:16.000 --> 01:23:31.000
Uh, very similar language, yeah. Yeah. The, the, the, uh, uh, I could convert the differences between the two, but the, the problem is the old one let them mix ANDs and ORs in the same conditional.
01:23:17.000 --> 01:23:18.000
Mostly.
01:23:31.000 --> 01:23:41.000
And as a programmer, I know how to deal with, you know, structuring my order of my ifs, you know, my conditions to get what I want.
01:23:40.000 --> 01:23:42.000
Aha.
01:23:41.000 --> 01:23:44.000
You know, and it largely involves parentheses.
01:23:44.000 --> 01:23:51.000
Yeah, use parentheses. Any time it might be misunderstood, because…
01:23:44.000 --> 01:24:08.000
And the language… Anytime it's ambiguous, use parentheses, right? So, so, um, and my language supports that. It supports it beautifully, but they don't, they weren't forced to do it. So they had 37 views. All of the failures were for the exact same reason. They had mixed ands and ors.
01:23:51.000 --> 01:23:52.000
Right.
01:23:52.000 --> 01:23:54.000
That's right.
01:24:09.000 --> 01:24:10.000
Together.
01:24:10.000 --> 01:24:21.000
Uh, in the same condition, without parentheses. So now, if the appointment type equals, uh, screening, and the location is, um, uh, waiting room.
01:24:21.000 --> 01:24:23.000
Yeah.
01:24:23.000 --> 01:24:27.000
um… The patient's age is 85 or older.
01:24:27.000 --> 01:24:38.000
What's it gonna do? Right? And try to explain
that to them. They're not programmers. I've been… I've given them a programming language, but they are not programmers. So what do you do?
01:24:32.000 --> 01:24:34.000
Mm-hmm.
01:24:36.000 --> 01:24:42.000
Which, by the way, is why AI is not going to solve all our problems. But keep going.
01:24:40.000 --> 01:24:56.000
No, no. So I now strictly enforce that they can't have mixed AND and OR. I don't care about order of precedence. It doesn't matter in this case because they can assume the wrong thing.
01:24:54.000 --> 01:25:04.000
Yeah, what matters is, a human being cannot have ANDs and ORs in the same sentence, and know what they're going to get.
01:25:03.000 --> 01:25:11.000
Yeah, so that's the… so the switching cost, 85% of the time, is zero.
01:25:12.000 --> 01:25:14.000
Right? They convert the view.
01:25:14.000 --> 01:25:22.000
Test it a little bit. So there's a few seconds or a few minutes there. Then they publish that view and they disable the old view.
01:25:22.000 --> 01:25:30.000
And the user, the next time they go pick the view that they want to run, the one that they've always been running, they're just going to get the new system.
01:25:30.000 --> 01:25:34.000
So the switching cost is very, very low.
01:25:34.000 --> 01:26:01.000
And I'm really happy about that. The conversion was a huge help. If I didn't do the conversion, they would never convert all those views on their own. Absolutely would not. So… so, yeah. So, I'm… That's it in a nutshell, in a long nutshell, in an hour-long nutshell. But I'm really quite happy with how it's working. They've converted a few views already, some people are using it, not the level I wish they would.
01:26:01.000 --> 01:26:13.000
Um, oh, remember I talked about that 18-second query? The one that took 18 seconds to run? During my demo, when I was explaining this whole system, I chose that view.
01:26:13.000 --> 01:26:19.000
And I said, now let me show you how easy it is to convert these views. I right-clicked on it, I converted it.
01:26:19.000 --> 01:26:23.000
Everything converted perfectly. I knew it would.
01:26:23.000 --> 01:26:26.000
I saved the converted view.
01:26:26.000 --> 01:26:28.000
and then I ran that view.
01:26:28.000 --> 01:26:34.000
Less than one second, almost as quickly as you could start the view running, the data was on the screen.
01:26:34.000 --> 01:26:36.000
And did they notice?
01:26:36.000 --> 01:26:44.000
Oh, God, yeah. In that case, I didn't get the standing ovation, but they kind of erupted with happiness.
01:26:44.000 --> 01:26:46.000
I like that.
01:26:45.000 --> 01:26:56.000
So they knew it was better. So anyway, I've got them to commit to next week spending some time converting more of these views and getting users using them.
01:26:56.000 --> 01:27:13.000
Because… you know, I did a lot of testing, I did a lot of work on this thing, but I have no idea what it's gonna be like when 140 real sessions are doing real things with this. But based on the way the queries
work, um… I believe it's gonna be so much faster.
01:27:13.000 --> 01:27:27.000
Alright, so let me ask you a couple practical questions, because I think everybody who listens to this podcast has heard me say that, um, you don't do a total rewrite.
01:27:15.000 --> 01:27:16.000
So.
01:27:17.000 --> 01:27:19.000
Yes.
01:27:27.000 --> 01:27:28.000
Umm.
01:27:27.000 --> 01:27:28.000
Right.
01:27:28.000 --> 01:27:40.000
And that's sort of a summary, a rule of thumb, you don't do a total rewrite. The real statement, the full thing is, you don't pull the stop.
01:27:33.000 --> 01:27:35.000
Mmhm.
01:27:40.000 --> 01:27:50.000
uh, strap on the train, and bring the entire train to a stop so that you can build a new train. Um, is… is the idea.
01:27:50.000 --> 01:28:04.000
You need to be NOT JUST! uh… getting a brand new thing to parody. You need to be making the same forward progress you would have made.
01:28:04.000 --> 01:28:24.000
If it wasn't a total rewrite. And to me, it sounds like… The thing that you did didn't stop the train, hasn't stopped the train, and you were making forward progress. You got better than you would have been in the same time.
01:28:25.000 --> 01:28:30.000
Like, you would have made forward progress if you had not done the total rewrite.
01:28:30.000 --> 01:28:31.000
Mmhm.
01:28:30.000 --> 01:28:36.000
But you made better progress with the total rewrite than even from that.
01:28:36.000 --> 01:29:03.000
Um… So, I think that is a thing we don't get to fight about today. Um… And also, when we say total rewrite, usually we mean, hey, you're going to spend X years doing it, right? Like when I worked at Netscape, they wanted to.
01:28:58.000 --> 01:29:00.000
Right.
01:29:03.000 --> 01:29:29.000
uh, completely replace the rendering engine inside. And they said, the people who wrote the rendering engine, this will take us, um… three months to do. The rendering engine is written, all we have to do is plug it in. Those were their words. And they asked every other engineer, and we said, it's a minimum of two years. Um…
01:29:28.000 --> 01:29:29.000
Yeah.
01:29:29.000 --> 01:29:36.000
You can stop now, we'll put it in, two years later, we'll ship our next one, and it won't be better.
01:29:33.000 --> 01:29:35.000
Right.
01:29:36.000 --> 01:29:37.000
Right.
01:29:36.000 --> 01:29:42.000
It'll be exactly what we have now, but working in a way where we can see it's better.
01:29:42.000 --> 01:29:44.000
Right.
01:29:42.000 --> 01:29:45.000
Do not stop the train.
01:29:44.000 --> 01:29:50.000
Right, it's a better starting point. Yeah, it's a better point to move forward on. But this…
01:29:45.000 --> 01:29:47.000
And they stopped the train.
01:29:47.000 --> 01:30:01.000
Right. They… But they… they stopped the train, and uh… and then Microsoft ate our lunch. So all of the stuff that I'm complaining about, and said we were gonna fight about.
01:29:50.000 --> 01:29:52.000
This wasn't that.
01:29:55.000 --> 01:29:57.000
Yeah, yeah.
01:30:01.000 -->
01:30:02.000
You didn't do.
01:30:03.000 --> 01:30:06.000
Well, I guess that's good.
01:30:03.000 --> 01:30:10.000
You did the right thing, and you got to the right answer. And I think that's great.
01:30:06.000 --> 01:30:22.000
Well, thanks. Thanks. Thanks. I, uh, you know, I've said it over and over again. I've been thinking about this for 15 years, so I had a lot of time to consider my options, and so when I hit the ground on June 1st to start doing the real work.
01:30:10.000 --> 01:30:11.000
All right.
01:30:22.000 --> 01:30:25.000
I already knew what I was going to do.
01:30:26.000 --> 01:30:31.000
Right. I maybe hadn't hadn't worked out every single detail.
01:30:31.000 --> 01:30:40.000
but I already pretty well knew what I was gonna do. And my thoughts in the past, they involved things like Redis, storing data in Redis so I could get at it quickly.
01:30:40.000 --> 01:30:55.000
Turns out, I didn't need that. This just works so well. Oh, and one thing I didn't mention, you know, these worker threads that I spawn when a user connects up, when all users disconnect, I don't throw away that worker thread yet.
01:30:55.000 --> 01:31:01.000
I hang onto the worker thread for 60 seconds because what if your connection gets disrupted?
01:31:02.000 --> 01:31:11.000
Right? Wouldn't it be awful if your connection was disrupted, and the worker thread went away, so then when you reconnect.
01:31:11.000 --> 01:31:28.000
Um, it… it, uh, has to go do all that big work again, do the full query, and… and… and that's just… that's just nonsense. So, for 60 seconds, I'm hanging onto that worker thread, and there's no subscribers, so there's no data to push out to the clients, but it's still sitting there.
01:31:28.000 --> 01:31:32.000
Watching for updates and updating its internal state.
01:31:32.000 --> 01:31:49.000
That sounds like a reasonable balance to me. Like, I feel like the thing you're describing as the BigQuery and stuff like that, if you really didn't have any connections, doing it again, it would not be as big as the words you're using.
01:31:32.000 --> 01:31:36.000
Um, but… Yeah, yeah.
01:31:49.000 --> 01:31:54.000
But the balance that you picked is probably reasonable.
01:31:49.000 --> 01:31:51.000
Yeah, maybe not.
01:31:52.000 --> 01:32:04.000
Well, there's… there's always data updating in the system. You know, there's… there's… they got 140 employees, they're always doing stuff, whether it's in this application or not, so the database is constantly being updated.
01:32:04.000 --> 01:32:21.000
So, you know, the query is gonna be getting updates, you know, the worker thread is gonna be getting notifications of updates, and it's gonna requery those individual rows, but there's just no clients yet, you know, to send it to. But that seemed like a good thing, and it's a tunable parameter.
01:32:21.000 --> 01:32:36.000
you know, that earlier parameter, the 10 milliseconds that we use for debouncing duplicates, or deduplicating the duplicates, and the
60 seconds to hang on to a worker thread, those are all tunable things. That's just a starting point. We're gonna see how it goes.
01:32:35.000 --> 01:32:40.000
Yeah. Um… So.
01:32:40.000 --> 01:32:45.000
I don't know if people can tell when they listen to our episodes.
01:32:45.000 --> 01:33:02.000
Both of us will occasionally choose a topic that we ourselves think is fantastic. I talk about, in particular, things that are really interesting to me. And lots of times that means.
01:32:53.000 --> 01:32:54.000
Yes.
01:32:59.000 --> 01:33:00.000
Yeah.
01:33:02.000 --> 01:33:16.000
There's a whole fraction of the listeners out there who don't care, and sometimes, sad as it is, and we don't normally tell each other, uninteresting to.
01:33:16.000 --> 01:33:20.000
the guy on the other side of the Zoom screen.
01:33:19.000 --> 01:33:21.000
Yeah.
01:33:20.000 --> 01:33:30.000
You have no question, picked topics, and I'm like, I support you, Jim. I just don't care about 2038.
01:33:29.000 --> 01:33:31.000
Right.
01:33:34.000 --> 01:33:46.000
This is not one of those times. Uh, the topic you chose, and I knew it was going to be interesting and even exciting to me up front, um.
01:33:46.000 --> 01:34:02.000
This one was one that was pure fascination, because it has all the parts I care about. The story of weighing the different things against each other, what costs time, what costs storage, what costs what…
01:33:50.000 --> 01:33:51.000
Oh, thank you.
01:34:02.000 --> 01:34:09.000
You didn't say the magic word I wanted to hear, which is WebSockets. WebSockets.
01:34:04.000 --> 01:34:06.000
Oh, what was that?
01:34:06.000 --> 01:34:21.000
Oh, I didn't even say that, did I? That's how we communicate between the client and the Node.js server. In fact, that's my reason years ago why I chose Node.js, because it does WebSockets so well. And WebSockets are way better than…
01:34:19.000 --> 01:34:20.000
Yeah, what…
01:34:21.000 --> 01:34:32.000
plain old HTTP, uh, uh, calls. Um, it's bi-directional, and the data flows both ways, so the client is not sitting there polling. The server is…
01:34:25.000 --> 01:34:27.000
Yeah, they really are.
01:34:32.000 --> 01:34:37.000
Absolutely, pushing the data out to the client when there's data to push.
01:34:36.000 --> 01:34:38.000
For realsies.
01:34:37.000 --> 01:34:52.000
Yeah, so yeah, WebSockets are the way to go. One of the big cool points about this project. So yeah, you could probably tell I'm excited about this. I'm so happy with how it's turned out. I'm so happy with how it's turned out.
01:34:41.000 --> 01:34:42.000
Yes.
01:34:44.000 --> 01:34:46.000
Totally agree.
01:34:47.000 --> 01:34:52.000
I and when well, you should be. I love it when.
01:34:52.000 --> 01:35:02.000
Um, I wasn't really a big A-Team fan when I was growing up, but there was a thing that Hannibal used to say, which was…
01:34:59.000 --> 01:35:02.000
Yeah, yeah.
01:35:02.000 --> 01:35:10.000
I love it when a plan comes together. Uh, but the… let me
tell you THE reason.
01:35:06.000 --> 01:35:08.000
Yeah.
01:35:10.000 --> 01:35:13.000
This is so exciting to me.
01:35:13.000 --> 01:35:26.000
Um, I have brain damage or whatever, like, I care about certain things, and I just don't care about certain other things. And, um…
01:35:14.000 --> 01:35:15.000
Okay.
01:35:23.000 --> 01:35:24.000
Sure.
01:35:26.000 --> 01:35:31.000
There's a certain kind of problem to me.
01:35:31.000 --> 01:35:38.000
That… I get more enjoyment out of than any other kind of problem.
01:35:37.000 --> 01:35:40.000
Kind of like me and SQL queries.
01:35:40.000 --> 01:35:47.000
It could be, but my problem is a very big one, and that is, you know, when I say it on my resume.
01:35:43.000 --> 01:35:45.000
Okay.
01:35:47.000 --> 01:35:54.000
I say it like this. I do a thing, and that thing is… I make things go faster.
01:35:54.000 --> 01:36:06.000
But that sentence, um, is doing a lot of heavy lifting. Because when you say, make something go faster, when I say it, what I mean is.
01:36:06.000 --> 01:36:22.000
It's not about the CPU cycles. It's about every piece of the system. And that means how much RAM, how much storage, how much network bandwidth, how long it takes to get from one end to the other.
01:36:22.000 --> 01:36:38.000
What does it take for the human being to enter the information? Did it come the right way? Is it shown the right way? Do they go through the right steps? Is the AP… I want to build something that, from STEM to.
01:36:38.000 --> 01:36:44.000
Stern is the ship that gets you there for the right price.
01:36:42.000 --> 01:36:43.000
Mmhm.
01:36:43.000 --> 01:36:45.000
Mmhm.
01:36:44.000 --> 01:36:47.000
That's what I mean. And to me.
01:36:47.000 --> 01:37:02.000
There's this huge factor, uh, people… Hire me because I can make it be less CPU cycles. Okay, fine, yes, I can do that. That part's actually pretty easy.
01:37:02.000 --> 01:37:03.000
But.
01:37:03.000 --> 01:37:23.000
Part of making it go fast is… What are the people doing? What order are they doing it in? How do they make the thing they want with the pieces you give them that let them make things? Is it easy to run them? Is it easy to put them in the right order? Do they persist for…
01:37:18.000 --> 01:37:19.000
Mmhm.
01:37:23.000 --> 01:37:41.000
There are a ton of… and also, there's places where you don't actually make it faster, but you make it better because it seems faster. Maybe because here's a place where you can overlap two things that didn't overlap before.
01:37:39.000 --> 01:37:41.000
Hey.
01:37:41.000 --> 01:37:43.000
Or…
01:37:43.000 --> 01:37:47.000
Perceived performance is more important than actual performance.
01:37:49.000 --> 01:37:58.000
Now we might fight, but it absolutely is super important. And I knew that your system.
01:37:58.000 --> 01:38:10.000
Everything you described was not just going to be about the cost of a query, about the obstacle of a round trip, but was going to include.
01:38:10.000 --> 01:38:20.000
the handles you put on it, so that somebody could carry it down to the basement. I knew you were gonna tell me the big picture.
01:38:20.000 --> 01:38:24.000
And that, to me, was the thing I care about.
01:38:24.000 --> 01:38:33.000
So I got everything out of this episode I was hoping for and more.
01:38:32.000 --> 01:38:34.000
Well, good.
01:38:33.000 --> 01:38:34.000
Thank you.
01:38:34.000 --> 01:38:35.000
Thanks.
01:38:35.000 --> 01:38:38.000
So, take us out.
01:38:39.000 --> 01:38:40.000
I'm tired.
01:38:39.000 --> 01:38:40.000
Yeah.
01:38:41.000 --> 01:39:01.000
It is… it's been the end of a long week. Things are… it's hard. Uh, let me say all the important things. First of all, thank you so much for listening. Uh, the fact that you are listening, and that this is making a difference for you, and that you even want to take the time to talk about it.
01:38:43.000 --> 01:38:46.000
Yeah, yeah.
01:39:01.000 --> 01:39:04.000
That is the whole reason we're doing this.
01:39:04.000 --> 01:39:11.000
That means we love your feedback. Send us feedback. You can e-mail us, feedback@realhealth.com.
01:39:11.000 --> 01:39:15.000
runtimearguments.fm.
01:39:15.000 --> 01:39:20.000
You are already looking at a show, so you've got the show notes.
01:39:21.000 --> 01:39:34.000
You probably don't need to know that you could go to the website, which is, at this moment, http colon slash slash runtimearguments.fm.
01:39:34.000 --> 01:39:47.000
Maybe we can fix that. Right now, we're audio only, but we do provide a transcript, which you have with you if you're looking at the show notes in your podcast player.
01:39:47.000 --> 01:39:59.000
Um, we are thinking of doing… Maybe a visual component. We need your feedback. It would be hard and different for us.
01:39:59.000 --> 01:40:08.000
Is it worth pursuing? If you say it is, we'll look into it. We'll figure out if it's… if it's in the scope of our powers. Um…
01:40:07.000 --> 01:40:08.000
Yes.
01:40:08.000 --> 01:40:09.000
Okay.
01:40:09.000 --> 01:40:11.000
You know?
01:40:12.000 --> 01:40:13.000
Yep.
01:40:12.000 --> 01:40:20.000
There's one thing I should have mentioned at the top of the show. We have never had a guest on an episode yet.
01:40:20.000 --> 01:40:22.000
But we have thought of some.
01:40:21.000 --> 01:40:37.000
That's gonna change. That's gonna change. Let's see, this is episode 39. Episode 41, we are gonna have a guest. We have mentioned a few times in passing that we've got this brilliant friend. He's a genius. He works at Meta.
01:40:22.000 --> 01:40:24.000
Here's a guy we love.
01:40:37.000 --> 01:40:39.000
Friend of the show.
01:40:37.000 --> 01:40:47.000
in, uh, uh, friend of the show, uh, a great friend of mine for 25-plus years, uh, Marlon. Uh, he is gonna be a guest on our show.
01:40:47.000 --> 01:40:50.000
Um, I'm really looking forward to that.
01:40:48.000 --> 01:41:02.000
We've known him since he was, I want to say, just a kid, right? Like, he wasn't married, he didn't have a job, but you
already knew. When you looked at him, you knew.
01:40:52.000 --> 01:40:57.000
He was in college. He was in college. He was like 19 years old.
01:40:57.000 --> 01:41:11.000
In fact… In fact… Today is his birthday. Not the day that you're listening to this, but today, what is today? October 16th is his birthday.
01:41:04.000 --> 01:41:05.000
Is it?
01:41:11.000 --> 01:41:20.000
So that's exciting. Oh, 40 something.
01:41:12.000 --> 01:41:14.000
Can you say how old he is?
01:41:19.000 --> 01:41:22.000
A kid. He's a kid.
01:41:20.000 --> 01:41:32.000
I know, just a kid, I know. Um, anyway, he is going to be a guest. We're going to be talking about performance. He's got a lot to say about performance, because in his world.
01:41:32.000 --> 01:41:49.000
Everything is about performance. He works at Meta, he works on the infrastructure, he works on the infrastructure, so when they have a library that somehow got a couple of milliseconds longer at executing something.
01:41:35.000 --> 01:41:38.000
Welcome to my world too!
01:41:49.000 --> 01:41:54.000
that's a huge deal so he's going to talk to us about some of that and I'm really looking forward to that one.
01:41:52.000 --> 01:42:09.000
So, when we were discussing the idea of Marlon being a guest, a lot of existing podcasts, when they have a guest, or maybe they call it doing an interview, if they're a two-host.
01:41:59.000 --> 01:42:00.000
Mm-hmm.
01:42:09.000 --> 01:42:13.000
show, like we are, sometimes when they have a guest.
01:42:13.000 --> 01:42:34.000
The other host goes away, and it's just one host. Um… And when I found out what the topic was, that the topic is performance, I'm like, they'll take my slot as a host on that show when they tear it from my cold, dead hands.
01:42:19.000 --> 01:42:49.000
We're not… No. No, there would be 3. No, I think, as I mentioned to you, when you said that to me, was a lot of times it's when one of the hosts can't make it for an episode, then they pull in a guest as a replacement. That is not what we're doing here. It's going to be Wolf.
01:42:49.000 --> 01:42:58.000
And myself, talking to Marlon. And, uh, and really, I think, uh, you know, Wolf talks a lot, but I have a hunch Marlon's gonna do most of the talking.
01:42:57.000 --> 01:43:13.000
Oh, I actually wanted to say something about the talking problem. Uh, yeah, I don't answer questions quickly enough, uh, and we had talked about that, and that my plan was to start a stopwatch, and that has not been working.
01:42:58.000 --> 01:43:00.000
And I'm really looking forward to it.
01:43:02.000 --> 01:43:03.000
Yeah?
01:43:13.000 --> 01:43:28.000
And so, because it requires judgment, like I have to look at the watch and say, yeah, it's been two minutes, that was too long. No. I need to, for things where I have bad judgment, I need to make a rule where I don't.
01:43:28.000 --> 01:43:30.000
Make a judgment.
01:43:30.000 --> 01:43:43.000
Like, for instance, I have made a new rule in the house, I don't watch TV.
At all. Ever. I unplugged the TV in my office, and I'm not allowed to turn on the TV in the living room.
01:43:43.000 --> 01:43:55.000
I have uninstalled YouTube. I have set my limits on my screen time, so I can't run YouTube. There's lots of great stuff on YouTube.
01:43:55.000 --> 01:44:08.000
But YouTube will make me stay up too late. Here's my talking solution that I'm about to try. At least for answering questions. It doesn't solve all my problems, but maybe it solves this one.
01:44:08.000 --> 01:44:12.000
When I answer a problem, a question, anything.
01:44:13.000 --> 01:44:14.000
First.
01:44:14.000 --> 01:44:16.000
The answer.
01:44:16.000 --> 01:44:18.000
Then.
01:44:18.000 --> 01:44:36.000
But there are some fringe, whatever, like explain that there might be more. Do you wanna talk about it? So when you say, Hey, does a bowling ball and a feather drop at the same rate? The answer is yes. At that scale, there's more to talk about, but that might be enough for you.
01:44:37.000 --> 01:44:45.000
The real answer is no, they don't. You just can't tell the difference. If one of them was the moon…
01:44:42.000 --> 01:44:43.000
Right.
01:44:45.000 --> 01:44:54.000
There is a difference because the moon has gravity of its own. Do not start with the moon. Bowling ball and a feather. That's what they wanted to know.
01:44:54.000 --> 01:44:56.000
Yeah, yeah.
01:44:56.000 --> 01:45:01.000
All right. I look forward to asking you questions and getting an answer like that.
01:45:00.000 --> 01:45:18.000
Man, I hope I can do it. Is there anything else I needed to take us out with? I said feedback. I said that you can reach us both on Mastodon and our show, Runtime Arguments, has a Mastodon address, Mastodon…
01:45:07.000 --> 01:45:13.000
Oh… Yes.
01:45:18.000 --> 01:45:29.000
runtimearguments at hackyderm.io, and I am yesjustwolf at hackyderm.io, and Jim is jamms…
01:45:27.000 --> 01:45:29.000
J.
01:45:29.000 --> 01:45:32.000
It's J-A-M-M-C-Q.
01:45:31.000 --> 01:45:48.000
So I was going to say the right thing. jammcq@hackyderm.io. So you can reach us all on Mastodon and you would have found those in the show notes. Please talk to us. Tell us what you want to hear. Tell us what we said right. Tell us what we said wrong.
01:45:32.000 --> 01:45:33.000
Add.
01:45:33.000 --> 01:45:34.000
Yep.
01:45:37.000 --> 01:45:38.000
Yep.
01:45:48.000 --> 01:45:55.000
Tell us what questions you still have. Teach us new things we don't know so we can share it with everybody else.
01:45:56.000 --> 01:46:05.000
we're kind of friendly, and it's not that we're friendly because we want people to listen, we just are friendly. If you talk to us.
01:46:05.000 --> 01:46:07.000
Guess what?
01:46:07.000 --> 01:46:17.000
You get to cross over a line into a different circle in the Venn diagram, and that circle is labeled Friends of the Show, or Friends of Us! So do it!
01:46:15.000 --> 01:46:17.000
Yeah. Yeah.
01:46:17.000 --> 01:46:18.000
Yeah.
01:46:17.000 --> 01:46:20.000
You, Jim, got anything else to close us out with?
01:46:19.000 --> 01:46:30.000
Uh, hey, join us for lunch. We meet at a place called Biwako, uh, just south of Ann Arbor. It's in Saline Township every Saturday morning at 11 a.m.
01:46:30.000 --> 01:46:54.000
Uh, you're welcome to join us. Just walk in, it'll be obvious where we are. And, uh, we… I think last week… we had, like, 8 people. Maybe last week was, like, 5, but we get anywhere from, uh, 3 to 8 people showing up, and it's a blast. We just talk about all kinds of neat stuff. So join us, we would love to have you if you're in the area or near the area.
01:46:53.000 --> 01:47:07.000
All nerds, all people who specialize in different things, and at different levels and different ages, everybody who shows up learns stuff, I learn stuff, everybody does.
01:46:54.000 --> 01:46:55.000
So, yeah.
01:46:55.000 --> 01:46:58.000
All… all nerds.
01:46:58.000 --> 01:47:00.000
Yep, yep.
01:47:03.000 --> 01:47:05.000
All right, all right.
01:47:06.000 --> 01:47:15.000
Our newest friend is a rocket scientist. He's a professor of aeronautical engineering at University of Michigan.
01:47:12.000 --> 01:47:18.000
And he works with a big telescope! His name is Jamie! I love this guy!
01:47:15.000 --> 01:47:26.000
Jamie, yeah, yeah. So hey, pop in and join us. It would be a blast. And hey, as always, Wolf, thank you for podcasting with me.
01:47:26.000 --> 01:47:28.000
Thank you!
01:47:27.000 --> 01:47:29.000
All right.
01:47:28.000 --> 01:47:32.000
Especially since you brought the receipts this time.
01:47:31.000 --> 01:47:33.000
Ha, thanks.
01:47:32.000 --> 01:47:49.000
I had a great time, thanks. Um, we'll see what people think of next week. Next week, or next show, I'm gonna talk about something. I'm not directly gonna bring in my number one hero, Dick Feynman, but I kinda am. Because I'm, I'm gonna talk about, um…
01:47:35.000 --> 01:47:37.000
All right.
01:47:37.000 --> 01:47:39.000
Yes.
01:47:46.000 --> 01:47:47.000
Okay.
01:47:49.000 --> 01:47:51.000
Cargo cult.
01:47:52.000 --> 01:47:58.000
Ooh, that sounds like fun. And I don't know what that is, but I'm going to learn what that is next episode.
01:47:56.000 --> 01:48:02.000
All right, everybody. Thanks for listening. Talk to you next time.
01:48:01.000 --> 01:48:02.000
All right.
01:48:02.000 --> 01:48:03.000
Bye-bye.