文字稿 🔗
WEBVTT
00:00:00.000 --> 00:00:10.000
Welcome to another episode of Runtime Arguments. I'm Jim McQuillan, and sitting here, right across the internet from me, is my great friend Wolf. How are you, Wolf?
00:00:10.000 --> 00:00:13.000
I wish I could swear.
00:00:13.000 --> 00:00:19.000
Or maybe if you were editing the swears out, it would be better. But I'm so good, it's worth swearing.
00:00:16.000 --> 00:00:18.000
Don't.
00:00:19.000 --> 00:00:21.000
That good.
00:00:21.000 --> 00:00:22.000
Yeah.
00:00:21.000 --> 00:00:32.000
Isn't that wonderful? Alright, today we're going to talk about naming things. We'll get into that in a couple of minutes, but first, how was your week, Wolf?
00:00:22.000 --> 00:00:24.000
It really is.
00:00:33.000 --> 00:00:37.000
Well, here's why I need to swear.
00:00:37.000 --> 00:00:48.000
first of all, I was wearing… I had some surgery on my wrist, De Quervain's, blah blah blah, wrist wasn't working, constant pain, surgery, no pain.
00:00:48.000 --> 00:01:08.000
I had to wear a dressing for a week, and then a cast for a week, and then a splint. All the time, almost. And then the splint only when I was doing things that could damage me. Like… Driving a long way or.
00:01:08.000 --> 00:01:13.000
sleeping because you turn every which way, or lifting weight, whatever.
00:01:11.000 --> 00:01:12.000
Wow.
00:01:12.000 --> 00:01:14.000
Wow.
00:01:13.000 --> 00:01:15.000
I got the cast off.
00:01:15.000 --> 00:01:28.000
or the splint off, and I have seen the orthopedic surgeon, awesome, Dr. Fred Henkin, and I am completely cleared, I can do any activity. I mean, I can't play the piano, because I could never play the piano, but…
00:01:27.000 --> 00:01:32.000
You never could. So you're splint free.
00:01:28.000 --> 00:01:31.000
Right, exactly.
00:01:32.000 --> 00:01:39.000
So that's, that's the first thing. That's the most notable thing on my list. Number two.
00:01:39.000 --> 00:01:45.000
is I have been rereading. I probably, gushed about this.
00:01:45.000 --> 00:02:15.000
last year or something, but it's really re-listening, because I listen on my commutes, to Thinking Fast and Slow by Daniel Kahneman. He won the Nobel Prize… shared the Nobel Prize for Economics in 2002, And, oh my god, is this guy smart. This book is fantastic. It is full of terrific things. Just one example, like, for some skill, X. Maybe X is driving, because everybody knows this.
00:02:17.000 --> 00:02:22.000
When you think how good you are, you're pretty sure you're better than average.
00:02:22.000 --> 00:02:34.000
Unless you really are a great driver and know stuff, in which case you underestimate your skill. People who are great don't… get how great they are.
00:02:34.000 --> 00:02:38.000
But there's one thing everybody gets wrong.
00:02:38.000 --> 00:02:43.000
Universally, you never get better at this. And that is.
00:02:43.000 --> 00:02:51.000
Deciding, explaining, communicating. How good you X.
00:02:51.000 --> 00:02:53.000
It's outside your capabilities.
00:02:53.000 --> 00:02:56.000
No matter what you say, you are almost certainly wrong.
00:02:56.000 --> 00:02:57.000
Aha.
00:02:57.000 --> 00:03:01.000
An expert might be closer.
00:03:01.000 --> 00:03:03.000
And if you don't know at all.
00:03:03.000 --> 00:03:09.000
Either you're smart enough to say I don't know at all or your guess is the worst anyone can have.
00:03:09.000 --> 00:03:24.000
Like, for instance, how good are you at football? Well, I watch it all the time. Right, I know how good I am. I don't actually watch football, but a person who watches football all the time, or a person who watches Jeopardy all the time.
00:03:09.000 --> 00:03:11.000
Okay.
00:03:13.000 --> 00:03:16.000
I know how good I am.
00:03:17.000 --> 00:03:19.000
Yeah.
00:03:19.000 --> 00:03:21.000
Right.
00:03:24.000 --> 00:03:29.000
Especially anything where you watch experts who make it look easy. Yeah.
00:03:29.000 --> 00:03:34.000
you think it is easy, but it almost never is. If it was, they wouldn't televise it.
00:03:34.000 --> 00:03:41.000
Okay, this sounds very closely related to Dunning-Kruger effect, or… is that it?
00:03:39.000 --> 00:03:43.000
Dunning-Kruger is one slice of this.
00:03:43.000 --> 00:03:44.000
Yeah.
00:03:43.000 --> 00:04:01.000
There is a point in your curve as you learn how to do X, and any X that's interesting usually isn't a skill. Usually it's a whole collection of mini skills, like driving. Driving means you know how to brake as you're turning.
00:04:01.000 --> 00:04:24.000
If you know how to drive stick, you know how to balance, the gas pedal and or brake versus the clutch and the stick when you're gonna actually change gears. That's a mini-skill, and that's a thing you can learn separately from how to get off the line fast. If you're a great driver, you know all those things.
00:04:24.000 --> 00:04:25.000
Sure.
00:04:24.000 --> 00:04:27.000
If you're a great chess player.
00:04:27.000 --> 00:04:32.000
You can look at any position and decide what's a good way to go forward from there.
00:04:34.000 --> 00:04:42.000
Dunning-Kruger happens when you just don't know how much you don't know.
00:04:42.000 --> 00:04:43.000
Right.
00:04:44.000 --> 00:04:55.000
and expertise, you never know it all. First of all, whatever it is, there's only one person in the world who's the best, and odds are it's not you.
00:04:55.000 --> 00:04:57.000
Right.
00:04:55.000 --> 00:04:57.000
No matter what you're thinking of.
00:04:57.000 --> 00:05:04.000
So if you feel like you're the only one, that's probably wrong. And if you think you're the best.
00:05:04.000 --> 00:05:12.000
that's probably wrong. And if you think, okay, maybe I'm about average or above average, well, you're closer.
00:05:12.000 --> 00:05:22.000
Those things can be true. I think I'm a reasonable driver, but I'll bet I'm below average overall. I think I'm safe.
00:05:12.000 --> 00:05:14.000
Yep.
00:05:22.000 --> 00:05:29.000
But I do not think I'm an above-average driver. I
Load full transcript
speed. For no reason. I know the math.
00:05:29.000 --> 00:05:35.000
It's insane! Why do I go so fast? I don't know. Probably because I'd like someone else to drive me home.
00:05:35.000 --> 00:05:38.000
I think I used to be a much better driver.
00:05:38.000 --> 00:05:42.000
Oh, I'm definitely decaying in some skills.
00:05:38.000 --> 00:05:41.000
That's something that happens.
00:05:41.000 --> 00:05:49.000
Yeah, I think I'm an okay driver. I would consider myself about average. I get to where I need to go without crashing into things.
00:05:49.000 --> 00:05:56.000
There's definitely things where I just have to come out and say, you know what? That's a thing I know I suck at.
00:05:56.000 --> 00:06:02.000
There's things you can talk about, like bridge. I don't know how to play bridge.
00:06:02.000 --> 00:06:14.000
And there's things you can't talk about, but, you know, it just happens to you as you get older. Anyway, another great thing happened to me over the span since our last recording.
00:06:05.000 --> 00:06:06.000
Yeah.
00:06:14.000 --> 00:06:15.000
I.
00:06:15.000 --> 00:06:24.000
no matter what you're measuring, like, oh, how hungry was I? or how delicious was that steak? or any number of things.
00:06:24.000 --> 00:06:26.000
10?
00:06:26.000 --> 00:06:35.000
Is, if you're going on a scale of the 10, You're bound by either the best or worst, whatever direction it is that you're measuring, that you've ever had.
00:06:35.000 --> 00:06:39.000
If that was the best steak you've ever had, it's a 10.
00:06:39.000 --> 00:06:41.000
Sure.
00:06:39.000 --> 00:06:45.000
Right? If, you got gout, and that hurt a lot.
00:06:45.000 --> 00:06:51.000
and your spouse stubbed their toe, and it really, really hurt them a lot.
00:06:52.000 --> 00:06:54.000
Maybe that's 10 for both of you.
00:06:54.000 --> 00:07:06.000
Now, in your mind, you're angry, because your 10 feels… worse than theirs. But it doesn't matter. They feel as bad about their ten as you feel about yours. Anyway.
00:07:05.000 --> 00:07:06.000
Sure.
00:07:06.000 --> 00:07:17.000
I had a really nice 10. As everybody who listens to this show knows, I compete in a divisive sport that involves shooting.
00:07:17.000 --> 00:07:30.000
And, my competition, my race gun, Steel Frame PDP, that was my 10, fantastic, beautiful, beautiful gun. And I saw something that was completely different than anything I ever wanted in my life.
00:07:30.000 --> 00:07:37.000
I can't explain why this thing was so beautiful to me, but I had to have it.
00:07:37.000 --> 00:07:39.000
And… I got it.
00:07:39.000 --> 00:07:51.000
and it's my new 10. The specific thing I got, because I'm not going to leave anybody hanging, is the CZ TS3 Orange, and it's everything I never wanted.
00:07:51.000 --> 00:07:55.000
And it's, I wish there was a number higher than 10.
00:07:57.000 --> 00:08:08.000
I would show you a picture of it, but two things get in my way. One is, you're not looking, and also there's nothing showing, and also, then
Jim would see it, and he's… he doesn't play that game. So…
00:08:07.000 --> 00:08:09.000
And I don't need to see it.
00:08:09.000 --> 00:08:24.000
Right. And it's so good. My beautiful, beautiful PDP is like a 6.5 now. And then the final thing I want to say, especially because I'm talking about Kahneman, is I like to measure things. I measure everything.
00:08:24.000 --> 00:08:32.000
Like, somebody complained in a meeting that there was a whole bunch of stuff we didn't have to talk about.
00:08:32.000 --> 00:08:38.000
So I wrote a script that, looks at outstanding pull requests.
00:08:39.000 --> 00:08:51.000
and makes it be that all this engineering talk that should have happened on the pull request, we can just check. Was everything satisfied? Did it get approved?
00:08:51.000 --> 00:08:52.000
Is it?
00:08:52.000 --> 00:08:54.000
Overdue?
00:08:54.000 --> 00:09:00.000
And then instead of us discussing it in a meeting with 30 people, most of whom make more money.
00:09:00.000 --> 00:09:03.000
than the engineers.
00:09:03.000 --> 00:09:05.000
We don't have to waste their time.
00:09:07.000 --> 00:09:08.000
So.
00:09:08.000 --> 00:09:23.000
I measured how long it took me to write, and I made some very, very conservative guesses about how much time it would save, and some slightly, more optimistic guesses.
00:09:23.000 --> 00:09:27.000
There's 30 people in this meeting, or can be.
00:09:26.000 --> 00:09:28.000
Wow.
00:09:27.000 --> 00:09:28.000
My conservative…
00:09:29.000 --> 00:09:32.000
That's not a meeting, that's a conference.
00:09:29.000 --> 00:09:31.000
What yours?
00:09:32.000 --> 00:09:48.000
Well, it happens every week. It's our thing that says these changes are okay and it's okay for us to merge this or it's going to be in this release. There's some things you need all 30 people to talk about. Like, what is the risk of shipping this?
00:09:38.000 --> 00:09:39.000
Wow.
00:09:48.000 --> 00:09:50.000
In December.
00:09:50.000 --> 00:09:57.000
versus, that needs everybody. But, should you use BIGSERIAL or IDENTITY ALWAYS?
00:09:57.000 --> 00:10:03.000
There are 25 people who not only don't care about that, couldn't help.
00:10:02.000 --> 00:10:03.000
Sure.
00:10:03.000 --> 00:10:09.000
That's a thing that should be comments on a pull request.
00:10:09.000 --> 00:10:16.000
So my little tool, which took me, I don't know… I spent longer on it than I intended, about eight hours.
00:10:18.000 --> 00:10:26.000
let's say that, using the Bureau of Labor Statistics, or whatever it's called, I can't remember.
00:10:26.000 --> 00:10:29.000
I'm just gonna pick the industry average.
00:10:29.000 --> 00:10:36.000
Total per hour rate that includes salary and benefits, which is in the neighborhood of $46.
00:10:36.000 --> 00:10:49.000
And software engineers in general make more than that, and, people in, higher managerial roles typically make even more than that.
00:10:49.000 --> 00:10:53.000
But I don't know who's in the meeting, so I picked the average across the entire industry.
00:10:53.000 --> 00:10:57.000
And I said, if of those 30 people.
00:10:57.000 --> 00:11:01.000
I save 10 minutes for 10 people.
00:11:01.000 --> 00:11:09.000
That's about $78, per meeting, and… Over the course of a year.
00:11:09.000 --> 00:11:14.000
That's a very conservative estimate of saves $4,000.
00:11:14.000 --> 00:11:24.000
And this script only cost about$375 of my time, if, you know, assuming the same numbers for everybody.
00:11:23.000 --> 00:11:25.000
Sure.
00:11:26.000 --> 00:11:34.000
And then, if it saves… more time for, and which I observe, I see that our discussions last too long.
00:11:34.000 --> 00:11:48.000
for more people. And so if nobody needed to know, like instead of 10 people, let's say 20 people, and instead of 10 minutes, let's say 15 or 20 or maybe even more time, which I've seen happen.
00:11:48.000 --> 00:12:04.000
And if those people are managers and are paid more, then a conservative upper bound of the savings is $40,000 per year. I think that's absolutely worth eight hours, five hours of my time, whatever I spent.
00:12:02.000 --> 00:12:03.000
Sure.
00:12:05.000 --> 00:12:26.000
Okay. So, I like to measure, and a thing I measured that gave me an unhappy answer is this. I get more done at the office than I do at home. I like working at home, and I especially like not driving in traffic.
00:12:26.000 --> 00:12:30.000
40 minutes to get to the office. But you know what?
00:12:29.000 --> 00:12:31.000
Each way, yeah.
00:12:30.000 --> 00:12:32.000
Each way, right.
00:12:32.000 --> 00:12:37.000
I accomplish enough more in the office.
00:12:37.000 --> 00:12:43.000
that driving in is positive ROI, return on investment. Anyway, that's my week. How was your week?
00:12:44.000 --> 00:12:59.000
Well, I returned from vacation, as I mentioned in the last episode. I went to Maine with a bunch of my friends. And sadly, Wolf was not there. He was in our thoughts, though. He's been there. It was a great week.
00:12:56.000 --> 00:12:59.000
It is a good time.
00:12:59.000 --> 00:13:10.000
And that is, that's where we recorded the episode with Marlon Dutra. And, boy, we had a great week. And, you know, for us, a great week is… really equates to great food, right?
00:13:10.000 --> 00:13:18.000
Because we all… we rent an apartment, and we cook all our food, and it's… and it's great. It's just a blast. We do it every year.
00:13:18.000 --> 00:13:24.000
So that was good. I'm back, and I went through about 3 days of, what I'm gonna call funk.
00:13:24.000 --> 00:13:36.000
where I just couldn't get back into work. I just couldn't pull myself up to get something done. But finally, that went away, and I'm back to the world of being productive.
00:13:35.000 --> 00:13:44.000
And was that the I need a vacation from my vacation effect, or was it the coming off of the writing the,
00:13:38.000 --> 00:13:41.000
That's what that was, yes.
00:13:42.000 --> 00:13:44.000
No.
00:13:44.000 --> 00:13:48.000
Data engine. Data view
engine.
00:13:47.000 --> 00:13:54.000
No, this was, this was, I need a vacation from the vacation, cause it, it.
00:13:51.000 --> 00:13:56.000
Because I definitely don't need a vacation from when we cook up 50 lobsters.
00:13:54.000 --> 00:13:55.000
Yah.
00:13:56.000 --> 00:13:57.000
Yah.
00:13:57.000 --> 00:14:27.000
Well, that's not the hard part, that's the fun part. But, so I'm back, and I'm once again productive, and that's real good. And, you know, one of the things I learned while I was there… I had a… I did a little bit of work. I know I was on vacation, but I did a tiny bit of work. Somebody had a query that was just running slow, and it bugged me. And I've mentioned before, one of the things I get the greatest satisfaction out of in my job is tuning queries to be faster.
00:14:27.000 --> 00:14:32.000
And I just… there's something about it. I'll run explain, analyze on a query.
00:14:32.000 --> 00:14:45.000
and that'll tell me how the query planner figured out what it was gonna do, and how long it's gonna take to do each step. And I had a query that was taking 4.2 seconds. That's 4200 milliseconds. It's not forever.
00:14:43.000 --> 00:14:46.000
An infinity of time.
00:14:46.000 --> 00:14:53.000
Yeah, well, it's not forever, but when you click a button and you're waiting for something to appear on the screen, yeah, it seems like forever.
00:14:53.000 --> 00:14:59.000
4.2 seconds, in my mind, just was not… Not something I wanted.
00:14:59.000 --> 00:15:14.000
So I got to work on it. And normally I would run Explain Analyze with a query and look at the output and figure things out on my own. Well, this time I took the query, a copy of the query, and I took the output of Explain Analyze and I handed them to Claude.
00:15:14.000 --> 00:15:16.000
I said, hey, Claude.
00:15:16.000 --> 00:15:28.000
tell me what's going on with this query and how I can make it faster. And it ruminated and deliberated and all those things that it does, and it came back and it pointed out exactly what was wrong with the query. And there was one case
00:15:27.000 --> 00:15:29.000
Which was amazing.
00:15:28.000 --> 00:15:32.000
It was great. I've done it a little bit before. But
00:15:30.000 --> 00:15:33.000
Not that it did it, like the thing it found.
00:15:33.000 --> 00:15:47.000
Yeah. So my query was extracting information about a patient. And in that information is a small stored procedure that finds the patient's primary insurance carrier.
00:15:47.000 --> 00:15:55.000
and another… the same function also finds the patient's secondary insurance carrier, because a lot of patients have two insurances, right?
00:15:57.000 --> 00:15:59.000
So it calls the function twice.
00:16:00.000 --> 00:16:14.000
When you call a function like that, the, it's actually doing it in a join, so it joins on the function, it joins the function as though it's a table, and, and I was doing that twice.
00:16:15.000 --> 00:16:48.000
when you do that, the query planner looks at that and doesn't know how many rows that query is going to return, or that stored procedure is going to return, because these stored procedures, they return something called a set of, which is one or more records. So the Query Planner doesn't know how many records it might return, so it can't really optimize the query properly, so it has a default of 1,000 rows. So it thinks this stored procedure's gonna return 1,000 rows. So I'm calling it twice, so it multiplies that, so it thinks my whole query could return a million rows.
00:16:48.000 --> 00:16:53.000
And that's not what it's doing at all. The query is only ever going to return one row.
00:16:53.000 --> 00:16:55.000
For both of those.
00:16:54.000 --> 00:17:09.000
So the query planner didn't do the right thing because it didn't know. It didn't have the right information to know that that stored procedure will only ever return one row every time you call it. Whether you're looking for the primary insurance or the secondary insurance, it's going to return one row. And I needed a whole row.
00:17:09.000 --> 00:17:20.000
Because there's information about the insurance I needed. I needed the insurance code. I needed some plan information. I just needed multiple things. That's why we do it that way.
00:17:18.000 --> 00:17:24.000
Would the query planner use any… do those rows that get returned.
00:17:23.000 --> 00:17:25.000
Mmhm.
00:17:24.000 --> 00:17:27.000
Pretend there actually was a thousand.
00:17:26.000 --> 00:17:28.000
Hum.
00:17:27.000 --> 00:17:34.000
But they're a real table, there… there could be an index, right? The query planner would use the index, or not?
00:17:32.000 --> 00:17:34.000
Sure, sure.
00:17:34.000 --> 00:17:47.000
Oh yeah, yeah, the Query Planner's great at doing that, and… and… the way I do the join, it just, you know, normally you do a join table name on some predicate that, you know, some condition.
00:17:47.000 --> 00:17:59.000
But when you call a function like this, we just do on true, so it assumes it's true. Anyway, the result was the query planner thought that the whole query was gonna return up to a million rows.
00:17:59.000 --> 00:18:17.000
And Claude told me how to fix that. And it's really, really simple. When you create the query or when you create the stored procedure in Postgres, there's a number of attributes you can give that procedure. And one of them I knew nothing about. It's you can tell it how many rows that that stored procedure is ever going to return.
00:18:17.000 --> 00:18:24.000
So instead of the default of a thousand, I added the, this is all I added, rows space one.
00:18:24.000 --> 00:18:30.000
That tells the planner that this function is only ever going to return one row.
00:18:30.000 --> 00:18:35.000
So now, guess what? My 4200 millisecond query?
00:18:35.000 --> 00:18:37.000
Runs in one millisecond.
00:18:38.000 --> 00:18:40.000
That is satisfying.
00:18:39.000 --> 00:18:44.000
That's That's, what is that, 4,200 times faster?
00:18:45.000 -->
00:18:46.000
That's.
00:18:46.000 --> 00:18:48.000
That's pretty fast.
00:18:48.000 --> 00:18:56.000
So, customer's happy. I'm happy. I'm still kind of riding that high. I just really, really like that.
00:18:48.000 --> 00:18:50.000
That's a big win.
00:18:54.000 --> 00:19:02.000
And you shared it with me. Like, you taught me about ROWS 1, and I was thrilled to learn that.
00:18:56.000 --> 00:18:58.000
Yeah.
00:18:58.000 --> 00:19:00.000
Yeah, and you know.
00:19:02.000 --> 00:19:11.000
I… I didn't… I have not written enough stored procedures to, have encountered that, and now I know better, and that is super valuable.
00:19:09.000 --> 00:19:19.000
Well, I looked back in our code base and we have seven stored procedures that only ever return one row. So guess what I did? I added that.
00:19:19.000 --> 00:19:42.000
that attribute to all seven of those stored procedures. So now, we're gonna see that benefit all over the place. There's lots of places. We have a procedure that returns a patient's phone number, all kinds of things. So… Anyway, you know when you, when you think you're pretty good, like, like you were talking earlier, when you think you're smart, right? You think you're above average?
00:19:42.000 --> 00:19:49.000
I just love it, because I thought I was really good at these… tuning these queries, and then all of a sudden, I learned something new.
00:19:49.000 --> 00:19:55.000
Oh my God, I love that. Learn something new that you didn't know before.
00:19:53.000 --> 00:19:56.000
Jonathan Livingston Seagull time.
00:19:55.000 --> 00:20:01.000
Oh, yeah. I learned, and I'm so happy. Can you tell?
00:20:00.000 --> 00:20:05.000
I can tell. And it's the exact same joy that I feel.
00:20:01.000 --> 00:20:07.000
Anyway, 1 1 1 more thing.
00:20:07.000 --> 00:20:44.000
I, for years, a couple of years, I've had one of those little Google Home hubs sitting on the kitchen counter. It's got a little tiny screen on it, and it's… it's got Google Assistant built in, or something like that. And, I'm gonna reveal a little bit about my age. I've got 4 grandkids. They're all young. Oh, this one's almost 5. But… yeah, I'm old enough to have grandkids, and the grandkids, they're over all the time, and they like to sit at the kitchen counter, and it's funny, a 4-year-old asking Google to tell it a joke. It's just… it's just great.
00:20:44.000 --> 00:21:00.000
And my wife uses it to, to, you know, ask what the weather is today, and just silly things like that. And one of the things it can do is play YouTube videos. And so the kids like to see, Marble Run videos and stuff like that when they're sitting at the kitchen counter, eating their lunch.
00:21:00.000 --> 00:21:03.000
So Apple came out with a new device.
00:21:03.000 --> 00:21:15.000
they call it the HomeView, and it's a similar device. It's a nice little thing with a little screen, and it sits on the counter, it's got a speaker, and… I don't know, it's, you know, it's got.
00:21:15.000 --> 00:21:26.000
iOS on it, or something on it, and you can talk to Siri with it, and it's got all these little widgets, you know, you can see what the weather is and stuff like that. So I thought, well, this is kind of the same as that.
00:21:23.000 --> 00:21:26.000
So, build better, works worse.
00:21:26.000 --> 00:21:34.000
Well, it's version one. Okay, first of all, Apple quality is fantastic, right? The hardware.
00:21:34.000 --> 00:21:49.000
is way better than that little Google thing. It's a little bit more money, but it's… it's 300 bucks. It's not a lot of money, and I had some trade-in money left over. You know, when you trade in a device at Apple, they give you a… basically a gift card. So that's been sitting in…
00:21:38.000 --> 00:21:39.000
Strong agree.
00:21:49.000 --> 00:22:00.000
in my wallet for a long time, so I thought, okay, well, this thing's out, it's 300 bucks, they announced it, I ordered it, it came in while I was in Maine. So when I got home, I opened it up, and I looked at it, and yeah, it's really nice.
00:22:00.000 --> 00:22:05.000
I turned it on, and started to play with it, and it's like, now what am I gonna do with it?
00:22:06.000 --> 00:22:09.000
One of the things that the kids love to do.
00:22:06.000 --> 00:22:09.000
Boy, that honeymoon didn't last long.
00:22:09.000 --> 00:22:23.000
one of the things they love to do… it's sitting on my desk right now, it makes a great clock. But one of the things the grandkids love to do, like I said, is play the YouTube videos. Well, guess what? This thing doesn't have a YouTube client. No surprise, right? YouTube is Google, this is Apple.
00:22:24.000 --> 00:22:38.000
so the kids can't ask Siri to play a video. The best you can do if you want to see a video on this thing… well, you can play Apple TV on it, but the kids aren't doing that. They want to watch Marble Run videos.
00:22:36.000 --> 00:22:39.000
But doesn't Apple TV have a YouTube app?
00:22:40.000 --> 00:22:44.000
Well, no, this is the Apple TV app.
00:22:44.000 --> 00:22:48.000
This is, you know, to play Apple TV shows, you know.
00:22:47.000 --> 00:22:53.000
I I I see, so when I look at my TV, which comes through Apple TV.
00:22:48.000 --> 00:22:50.000
like, Severance and things like that.
00:22:50.000 --> 00:22:51.000
Yes.
00:22:51.000 --> 00:22:53.000
Yeah.
00:22:53.000 --> 00:22:54.000
Yes!
00:22:53.000 --> 00:23:01.000
there are individual, you can't see the air quotes, but channels, and one of those channels is Apple.
00:22:56.000 --> 00:22:57.000
Yeah, right.
00:22:57.000 --> 00:23:06.000
Right, and you can load apps. Okay, that's the thing. Yes, that's Apple. Okay, but the Apple TV has an app store.
00:23:06.000 --> 00:23:14.000
you can install apps. There's a HBO app, and there's a Paramount app, and there's a YouTube app, and all those kinds of things.
00:23:12.000 --> 00:23:14.000
But I have a YouTube app.
00:23:14.000 --> 00:23:23.000
well, yeah, you have a YouTube app on your Apple TV, because that has an App Store.
Okay, this Apple HomeView doesn't have a… it doesn't have an Apple Store.
00:23:19.000 --> 00:23:21.000
Oh, this one doesn't.
00:23:23.000 --> 00:23:32.000
And some digging that I did, and boy, it feels like we're going on and on. But some digging I did is this little device is much more like CarPlay.
00:23:32.000 --> 00:23:36.000
you know, CarPlay doesn't have an app store. CarPlay is entirely dependent on your phone.
00:23:36.000 --> 00:23:49.000
you install an app on your phone, and if that app has the CarPlay bit enabled, or the entitlement, or whatever, it'll present itself on… on a Apple… on a CarPlay, on your screen.
00:23:47.000 --> 00:23:50.000
So this is CarPlay
00:23:49.000 --> 00:23:51.000
This is very much like that. It's…
00:23:50.000 --> 00:23:53.000
That doesn't go anywhere.
00:23:53.000 --> 00:23:56.000
Yeah, right, well, it can't go anywhere, it's got a cord.
00:23:54.000 --> 00:23:56.000
Like like in.
00:23:56.000 --> 00:24:09.000
The Last Starfighter, when Grig asks him, so he lives in a mobile home, he says, so you live in a home, a cave, that goes places, but yours doesn't go anyplace.
00:24:08.000 --> 00:24:23.000
Yeah. Well, this thing, yeah. This is like CarPlay on the kitchen counter. There's no app store for it yet. So I can't play YouTube videos. And that's kind of the thing. I want to replace that Google Home Hub. I don't like it. I'm trying to de-Google my house.
00:24:23.000 --> 00:24:29.000
And I can't do that yet because this device can't play YouTube videos. Maybe in the future it will.
00:24:27.000 --> 00:24:30.000
Which is funny.
00:24:30.000 --> 00:24:31.000
Yeah.
00:24:30.000 --> 00:24:31.000
Because.
00:24:32.000 --> 00:24:36.000
We share the show notes and discussion on Google Docs.
00:24:32.000 --> 00:24:33.000
Yeah.
00:24:35.000 --> 00:24:36.000
Yeah.
00:24:36.000 --> 00:24:37.000
Yah.
00:24:36.000 --> 00:24:51.000
Which I… am fundamentally opposed to, essentially. I want to make markdown files. And Jim is like, just paste it, just do the… every sentence he says to me starts with just. Can we de-Google that?
00:24:41.000 --> 00:24:43.000
Right.
00:24:49.000 --> 00:25:08.000
chest Well, let me try to de-Google my house first. You know, I've got cameras and a doorbell and a thermostat and stuff. And I don't like the Google ecosystem. I can't say I like the Apple one any better, but I don't like having two. That's what it comes down to. I don't like having two things because I can't look at my cameras.
00:25:08.000 --> 00:25:17.000
on my phone using, Apple's thing, right? I have to have a Google app installed. Anyway, this device is beautiful.
00:25:17.000 --> 00:25:29.000
it… it… the hardware is fantastic, and I'm hoping the software catches up, because right now, it's just a pretty… Don't get me wrong, it's got other things on it, but all I'm basically using is the clock.
00:25:29.000 --> 00:25:31.000
So.
00:25:31.000 --> 00:25:33.000
So, wow, that was my week.
00:25:34.000 --> 00:25:37.000
Yours was good.
00:25:34.000 --> 00:25:38.000
Should we get on to feedback? Yeah.
00:25:37.000 --> 00:25:47.000
We did get some feedback, and it was exactly what I had asked for, maybe a little weaker. One of our listeners, who has written us before, and we like.
00:25:39.000 --> 00:25:41.000
Yes.
00:25:47.000 --> 00:25:49.000
said.
00:25:49.000 --> 00:25:56.000
If you guys wanted to add on video for extra explanation.
00:25:56.000 --> 00:25:59.000
You know, knock yourself out.
00:25:59.000 --> 00:26:07.000
But just remember to keep up all the explanation for the majority of people who aren't watching.
00:26:05.000 --> 00:26:10.000
Sure. And that's that that that was your intention anyway, right?
00:26:10.000 --> 00:26:12.000
That was my intention, yes.
00:26:10.000 --> 00:26:17.000
For… for, pushing that. Yeah, so… so we are now… the score, I believe, is 3 against and 1 for?
00:26:17.000 --> 00:26:19.000
Weakly for.
00:26:19.000 --> 00:26:23.000
Weakly for, yeah. So, yeah.
00:26:23.000 --> 00:26:31.000
So I I don't know yet if we're gonna do it. That's just a just a thought. If we did it, we'd have to do it right.
00:26:28.000 --> 00:26:33.000
Thank everybody, by the way, for sending feedback.
00:26:33.000 --> 00:26:37.000
yeah, we appreciate that. Was that the only feedback we have?
00:26:36.000 --> 00:26:38.000
That's the only I had.
00:26:38.000 --> 00:26:50.000
Yeah, that's all I have. I think… when I was in Maine, a couple of the guys said they really enjoyed listening to the podcasts, and they pointed out a few episodes, but I don't remember enough of what they said to actually bring it up here.
00:26:46.000 --> 00:26:57.000
Actually, the big boss at, at the office where I work, he had something to say, and I would love to hear feedback on this.
00:26:58.000 --> 00:27:00.000
We have.
00:27:00.000 --> 00:27:08.000
You and I have very different origin points when we pick topics and talk about them.
00:27:08.000 --> 00:27:09.000
Mmhm.
00:27:08.000 --> 00:27:25.000
And yours are way more relatable. Like, I super envy you, all the listeners who tune in to hear the very relatable stuff you talk about, like, is my key fob, smarter than the lunar lander?
00:27:25.000 --> 00:27:27.000
And.
00:27:25.000 --> 00:27:27.000
Right.
00:27:27.000 --> 00:27:38.000
you guys should go back and listen, but of course you already know the answer is many orders of magnitude better. And I talk about Bayes' Rule, and Shannon, and…
00:27:36.000 --> 00:27:39.000
Abstract things. Yeah.
00:27:38.000 --> 00:27:48.000
Right. And so, if you're just reading the descriptions, and you could listen to the 2038 problem, or you could find out about,
00:27:48.000 --> 00:27:50.000
Claude Shannon.
00:27:48.000 --> 00:27:50.000
I don't know.
00:27:50.000 --> 00:27:57.000
Claude Shannon, which one are you gonna pick? So, plainly, our audience is multimodal.
00:27:57.000 --> 00:28:00.000
And the boss said.
00:28:00.000 --> 00:28:14.000
I think you guys have a problem. I'm paraphrasing him, these were not his exact words. Your problem is that each of you drives away parts of the audience for the other.
00:28:14.000 --> 00:28:26.000
So, you're limiting yourselves in your own, and I don't think that's the case. What I think is… that… Like there's a whole bunch of people who listen for you.
00:28:26.000 --> 00:28:33.000
And then they get some stuff from me and they're like, I never thought about that. And then there's people who listen for me.
00:28:33.000 --> 00:28:40.000
but then you say stuff, and they're like, I didn't know crap was gonna go wrong in 2038.
00:28:40.000 --> 00:28:52.000
I think that you can make just as big a case for we're growing our audience by being multimodal ourselves, rather than diverging.
00:28:52.000 --> 00:28:53.000
That's my opinion.
00:28:53.000 --> 00:28:55.000
So feedback, tell us.
00:28:54.000 --> 00:29:00.000
I think that's a great opinion. And I'm going to agree with you on this one.
00:29:00.000 --> 00:29:07.000
Even though the name of the podcast is Runtime Arguments, I'm going to agree completely with you on that one.
00:29:07.000 --> 00:29:10.000
I have no argument.
00:29:11.000 --> 00:29:14.000
Should we get the meat?
00:29:14.000 --> 00:29:20.000
Let's do it. We've spent 29 minutes so far. Let's get into it.
00:29:16.000 --> 00:29:17.000
Umm.
00:29:19.000 --> 00:29:26.000
This is actually my favorite part. I like this!
00:29:24.000 --> 00:29:26.000
We could just do this all the time.
00:29:26.000 --> 00:29:44.000
Yeah. By the way, I… I loved having Marlon on the show. I loved the stuff he had to say, and I was so enchanted, I completely forgot to ask him if he could somehow make it possible for me to have an Instagram account.
00:29:44.000 --> 00:29:45.000
Anyway.
00:29:45.000 --> 00:29:53.000
Let's talk about names. The name of this episode is Two Hard Things.
00:29:53.000 --> 00:30:03.000
and I'm only gonna talk about one, but of course, I'll bet everybody knows what I mean when I say two hard things. Phil Karlton.
00:30:03.000 --> 00:30:14.000
Has a kind of a joke, There's only two hard things in computer science. Cache invalidation.
00:30:14.000 --> 00:30:17.000
Naming things, and off-by-one errors.
00:30:17.000 --> 00:30:26.000
And this is like one of our absolute favorite jokes. We love this because it is the truth of the world.
00:30:26.000 --> 00:30:36.000
I actually like it better than I like Scotty's joke about there's only two kinds of people in the world. Those who can extrapolate from insufficient information.
00:30:26.000 --> 00:30:28.000
Right.
00:30:32.000 --> 00:30:33.000
Yeah.
00:30:39.000 --> 00:30:44.000
That's funny, because I think I heard that joke 5 times last week.
00:30:43.000 --> 00:30:47.000
That is a Scotty thing.
00:30:47.000 --> 00:30:49.000
Yeah.
00:30:49.000 --> 00:30:53.000
And before I actually start talking about naming.
00:30:53.000 --> 00:30:58.000
Every fantasy novel you've ever read.
00:30:59.000 --> 00:31:03.000
Knowing the true name of something.
00:31:03.000 --> 00:31:05.000
Is power over that thing.
00:31:06.000 --> 00:31:07.000
And.
00:31:07.000 --> 00:31:10.000
That is true.
00:31:11.000 --> 00:31:14.000
When you know the true name of something.
00:31:15.000 --> 00:31:19.000
You understand it all the way to the core.
00:31:19.000 --> 00:31:22.000
And naming is hard.
00:31:22.000 --> 00:31:25.000
Because picking a name for something?
00:31:25.000 --> 00:31:27.000
Before it has one?
00:31:27.000 --> 00:31:32.000
Is you making a decision about what that thing is?
00:31:32.000 --> 00:31:36.000
before you even really know what it is.
00:31:36.000 --> 00:31:41.000
So, no matter what I say during this discussion.
00:31:41.000 --> 00:31:45.000
The most important thing is.
00:31:46.000 --> 00:31:50.000
strong opinions weakly held.
00:31:50.000 --> 00:31:55.000
When you realize… You got it wrong.
00:31:55.000 --> 00:32:00.000
Your editor is smart enough to help you fix that one.
00:32:00.000 --> 00:32:24.000
you have, a language server in there, an LSP, and you can say this particular one, and it will get just the ones that are that, not all the ones that happen to have the same letters in them in the same order. Just the ones inside this function, or just the ones that get called everywhere, or just… because your editor knows. And if your editor doesn't know.
00:32:24.000 --> 00:32:28.000
Go back and listen to our why you won't switch editors episode.
00:32:28.000 --> 00:32:46.000
So, the thing you need to know about a name is, as you're looking at the program, if you really know what you're doing, a name is just a placeholder. It doesn't matter to you, and you give it a meaning as soon as you put it on something.
00:32:46.000 --> 00:32:54.000
And in your head, there's a picture of what's going on, and the names are there as notes, but you don't care so much.
00:32:54.000 --> 00:33:02.000
But to every other person who looks at your work, your peers, other engineers, code reviewers.
00:33:02.000 --> 00:33:15.000
The name… is the handle on that thing. It's the interface. It's the… and when I say interface here, I mean when you're looking at a machine with knobs and buttons.
00:33:15.000 --> 00:33:20.000
The knobs and buttons are the things you're going to touch to make it do the thing you want.
00:33:20.000 --> 00:33:23.000
When someone is looking at your code brand new.
00:33:23.000 --> 00:33:31.000
The names are the knobs and buttons and levers that they are going to understand.
00:33:31.000 --> 00:33:35.000
To figure out how to control the thing you've written.
00:33:35.000 --> 00:33:37.000
names.
00:33:37.000 --> 00:33:42.000
are promises, and they set expectations.
00:33:42.000 --> 00:33:44.000
When you say.
00:33:44.000 --> 00:33:49.000
that a thing is a… here's a mistake I made recently.
00:33:49.000 --> 00:33:52.000
I said, this is a speed curve.
00:33:52.000 --> 00:33:55.000
So I called the thing that I made a speed curve.
00:33:55.000 --> 00:34:04.000
it was not a speed curve. And as soon as I let the mathematician, who in this case, for the things I was doing, was the domain expert.
00:34:04.000 --> 00:34:07.000
The mathematician said.
00:34:07.000 --> 00:34:13.000
What is a speed curve? What are you, what are you talking about? I wanted a density function.
00:34:13.000 --> 00:34:31.000
We agreed on the thing that I actually made, which was a histogram. It's a bin, it's a, vector, or an array. I'm sorry, if I use the word vector, he wouldn't like that either. But it's an array in Postgres, in a row, 42 integers wide.
00:34:31.000 --> 00:34:51.000
It doesn't get bigger, it doesn't get smaller, it's always 42 integers. And those integers are the counts of observations in a day where the observation of a vehicle was going the speed covered by that bin.
00:34:51.000 --> 00:34:58.000
42 bins wide, and each bin is 1 meters per second per… No acceleration, 1 meter per second.
00:34:58.000 --> 00:35:35.000
So, 0 is the very first bin, anywhere from 0 to 1 meter per second, and the 42nd bin is kind of special, because it's, 150… 6 miles per hour, and anything greater, it's an open thing. So what that is, is it's a histogram. It looks like, meters in a sound thing, when you're recording someone, and they go up and down, but they're fixed integral number of lights, right? That's not a curve. It's a histogram. I should have called it a histogram.
00:35:29.000 --> 00:35:30.000
Okay.
00:35:33.000 --> 00:35:34.000
Sure.
00:35:35.000 --> 00:35:48.000
And when we talked about it, we agreed Histogram is the thing that it is, and that's the name I should have used. And if I had used that name, which, by the way, as soon as I found out that it should be Histogram, my editor helped me change it everywhere.
00:35:48.000 --> 00:35:56.000
Of course, then CAB has to review it. Yes, you're changing your schema, but, A.
00:35:56.000 --> 00:36:01.000
That was the right name, and it made it obvious to the domain expert.
00:36:01.000 --> 00:36:04.000
We're software engineers.
00:36:04.000 --> 00:36:17.000
The thing we're good at is… finding the right Big O for something. Doing the right number of loops. Caching here, but calculating there.
00:36:17.000 --> 00:36:22.000
We are never writing programs. Almost.
00:36:22.000 --> 00:36:25.000
about writing programs.
00:36:25.000 --> 00:36:32.000
We're writing programs about putting patients in particular rooms, about
00:36:30.000 --> 00:36:31.000
Mmhm.
00:36:32.000 --> 00:36:34.000
What speed?
00:36:34.000 --> 00:36:41.000
is… are people driving on this road? Having an average speed, not good enough.
00:36:41.000 --> 00:36:50.000
Because what if it's a school zone? And during school hours, they're going 25. And other times of day, they're going 45.
00:36:50.000 --> 00:36:55.000
That's multimodal. If you had a histogram, you'd see two bumps.
00:36:55.000 --> 00:37:02.000
One in the bin that matches, or bins around, that match the slow speed, one that matches the others.
00:37:02.000 --> 00:37:11.000
instead of
just an average. The histogram's more data. If you are putting patients in rooms.
00:37:11.000 --> 00:37:23.000
And everybody at the facility describes the process of putting patients in rooms from before you ever came on the scene as workflow.
00:37:23.000 --> 00:37:28.000
You better name it Workflow. You cannot call it Item List.
00:37:28.000 --> 00:37:30.000
Right.
00:37:28.000 --> 00:37:41.000
Because when they look to see if you're doing the right thing, and they see item list, they're just gonna turn the page. I have no idea what I'm looking at. That has nothing to do with me. Item list is probably stuff you were charged for in insurance.
00:37:41.000 --> 00:37:49.000
You want the eyes that come to see if your code is okay?
00:37:49.000 --> 00:37:53.000
to know immediately what they're looking at.
00:37:53.000 --> 00:38:01.000
And that means, don't make up words, use the words that already carry the promise of what you're making.
00:38:02.000 --> 00:38:04.000
And those promises?
00:38:04.000 --> 00:38:07.000
Can be deeper than you might expect.
00:38:07.000 --> 00:38:12.000
For instance, and this could have saved the Mars, orbiter.
00:38:13.000 --> 00:38:16.000
If you are carrying a measurement.
00:38:16.000 --> 00:38:19.000
It is worth it to say.
00:38:20.000 --> 00:38:25.000
Deviation underscore I N.
00:38:25.000 --> 00:38:29.000
deviation underscore cm.
00:38:29.000 --> 00:38:38.000
Now, when you mix an IN and a CM, Somebody is gonna see blinking red lights.
00:38:35.000 --> 00:38:44.000
What… where in this case, CM is centimeters, IN is inches, so you're including the units in your variable name.
00:38:40.000 --> 00:38:42.000
exactly.
00:38:45.000 --> 00:38:52.000
Right, right now our, so there is a thing we used to do.
00:38:45.000 --> 00:38:47.000
Nice.
00:38:52.000 --> 00:38:55.000
To make names easy easier to understand.
00:38:55.000 --> 00:39:06.000
IN and CM, those were part of it. We called this Hungarian Notation, and it came out of a Hungarian researcher who worked at Microsoft.
00:39:01.000 --> 00:39:02.000
Right.
00:39:06.000 --> 00:39:25.000
I actually think I've written his name down. But, the scheme he invented is pretty useful, but that's not what people actually did. They turned it into, where it just talks about the types. It didn't talk about what the thing actually means.
00:39:25.000 --> 00:39:36.000
All it talked about was that it is an integer, or that it is a long, or that it is a string, or a boolean, or that it has inches.
00:39:36.000 --> 00:39:37.000
Maybe.
00:39:37.000 --> 00:39:47.000
And that was horrible. It was not helpful, because your editor already knows the type, or your interpreter, or whatever particular thing you're looking at.
00:39:47.000 --> 00:39:57.000
All you have to do is know that they match, and the editor tells you immediately when they don't. Draws red underlines and stuff, maybe that's only recent, so this guy didn't have it.
00:39:57.000 --> 00:40:02.000
all the Hungarian notation did
was get in the way.
00:40:02.000 --> 00:40:12.000
That doesn't mean you should… the way they did it. The way humans actually typed it. If we had done what he said, probably it would be better.
00:40:13.000 --> 00:40:18.000
But there's lots of things that we make be part of words.
00:40:18.000 --> 00:40:26.000
in our programs to make it easier. For instance, Jim, as a Perl programmer.
00:40:26.000 --> 00:40:29.000
You use sigils.
00:40:28.000 --> 00:40:30.000
Sure.
00:40:29.000 --> 00:40:42.000
I can name 3 right off the top of my head. Dollar sign, at sign, percent sign, I think there's actually pound in there somewhere, when you want the length of something that would have been an at sign, or is it pound at?
00:40:41.000 --> 00:40:45.000
Yeah, and there's an ampersand if you want the reference to it.
00:40:45.000 --> 00:40:47.000
Right.
00:40:45.000 --> 00:40:53.000
Yeah, but the big ones, the pound sign, the dollar sign, the percent sign, and the at sign. Huge in Perl.
00:40:52.000 --> 00:41:00.000
Yeah. So, my question for you is this, and I'm gonna secretly write down your answer on a piece of paper. Do those help?
00:41:00.000 --> 00:41:02.000
Because I wrote yes.
00:41:01.000 --> 00:41:03.000
I like them. I like them.
00:41:04.000 --> 00:41:12.000
I, I like that I can, I can tell if something is an array, or a scalar, or a hash. That's very useful to me.
00:41:12.000 --> 00:41:30.000
So, do I think sigils should be used everywhere? Are they the best thing? No. But sigils are an integral part of the naming scheme in, Perl.
00:41:30.000 --> 00:41:31.000
Mmhm.
00:41:30.000 --> 00:41:37.000
and you use them, and they create expectations in you. When you see at, you know it's an array.
00:41:37.000 --> 00:41:38.000
Sure.
00:41:37.000 --> 00:41:40.000
Right? And when you see dollar, you know it's scalar.
00:41:40.000 --> 00:41:49.000
You don't have to say, some differences that, like, might make a difference. For instance, if I say speed.
00:41:50.000 --> 00:41:56.000
I am giving you the expectation that what I have is a scalar.
00:41:56.000 --> 00:41:58.000
Probably a float.
00:41:57.000 --> 00:41:59.000
It's a single value. Right.
00:41:58.000 --> 00:42:08.000
Right. Maybe, an integer, but boy, that would be kind of weird. So, like, you instantly got a feeling for what it is because of the name.
00:42:08.000 --> 00:42:09.000
Mmhm.
00:42:08.000 --> 00:42:12.000
If I say, speeds.
00:42:12.000 --> 00:42:25.000
you are almost certain to, expect, an aggregate value. Maybe it's, an array, maybe it's, who knows, a list or a hash table.
00:42:12.000 --> 00:42:13.000
That's.
00:42:17.000 --> 00:42:19.000
Sure.
00:42:25.000 --> 00:42:29.000
You do know there's more than one, because I put an S on the end.
00:42:29.000 --> 00:42:38.000
I created expectations. I better live up to them. If I said speeds, but it was a scalar, you'd be surprised.
00:42:37.000 --> 00:42:41.000
And confused and irritated.
00:42:38.000 --> 00:42:39.000
You be like.
00:42:39.000
--> 00:42:43.000
Right! Right! And.
00:42:43.000 --> 00:42:50.000
The principle of least surprise is one of the most important things we have.
00:42:50.000 --> 00:42:56.000
We want to make it be that when you are surprised.
00:42:56.000 --> 00:42:59.000
What you what you have found is a bug.
00:42:59.000 --> 00:43:13.000
It is not what they meant. Everything that is correct Should just flow as you expect, to the best of the engineer's ability to provide.
00:43:13.000 --> 00:43:24.000
So, for instance, when you write a predicate function that is going to let you divide something into categories, for instance, isReady.
00:43:24.000 --> 00:43:27.000
Would be a test that returns what?
00:43:28.000 --> 00:43:31.000
whether something's ready or not. It's a Boolean.
00:43:30.000 --> 00:43:35.000
That's right! The name was enough to tell you what it did.
00:43:31.000 --> 00:43:33.000
Yeah.
00:43:35.000 --> 00:43:45.000
if you were looking at a line of code that called isReady, you'd already know what isReady provides. And if isReady instead
00:43:42.000 --> 00:43:44.000
Sure, sure.
00:43:45.000 --> 00:43:47.000
wrote to the database.
00:43:47.000 --> 00:43:52.000
What would… what would you do? What would you say? You'd file a ticket.
00:43:52.000 --> 00:43:55.000
That's a surprise, right?
00:43:54.000 --> 00:43:59.000
Yeah, when we say is ready, we don't mean mark it as ready.
00:44:00.000 --> 00:44:01.000
We mean.
00:44:00.000 --> 00:44:02.000
All right.
00:44:02.000 --> 00:44:06.000
Right? You don't even think about that, because we don't do it that way.
00:44:03.000 --> 00:44:05.000
Right, right.
00:44:08.000 --> 00:44:14.000
Right. Right. The function that's going to change that would be something like set ready, right?
00:44:12.000 --> 00:44:15.000
Or Mark ready or.
00:44:14.000 --> 00:44:16.000
Mark ready, yeah, yeah.
00:44:18.000 --> 00:44:19.000
So.
00:44:19.000 --> 00:44:45.000
everything we write is all about expectations. It's the expectations the domain expert has, it's the domain… it's the expectations every name gives, it's the expectation of how you would process something? Like, in C++, or C, there's a thing everywhere, and that thing is for, open parentheses.
00:44:45.000 --> 00:44:55.000
i gets 0, i equals 0, semicolon, i less than n, or a slightly longer expression.
00:44:55.000 --> 00:44:57.000
Semicolon.
00:44:57.000 --> 00:44:59.000
And then people say this.
00:44:59.000 --> 00:45:08.000
horrible thing, they say ++i, or maybe they say i++, and I just haven't done it in so long. Those two things mean something different, and one is the one you want.
00:45:10.000 --> 00:45:26.000
But the one you write is the other one. And also it's executed in isolation, so it doesn't make a difference. Normally you want to do the easy one, the one that increments the value, and then that's the result, the incremented value. But people use the one.
00:45:26.000 --> 00:45:42.000
that remembers the old value, and increments the underlying thing, and then returns the old value. That thing, which takes more work, but it all gets optimized away, means something different than what they mean, so when I read that code, I yell.
00:45:39.000 --> 00:45:40.000
Sure.
00:45:40.000 --> 00:45:42.000
Sure, so.
00:45:42.000 --> 00:45:48.000
Yeah, so you're talking about when people use I++ to increment the I.
00:45:47.000 --> 00:45:51.000
Right. Which is what they do. But also.
00:45:48.000 --> 00:45:49.000
variable.
00:45:49.000 --> 00:45:58.000
Yeah, and you're saying that's technically… pedantically, that's not correct. It should be I++. You want to…
00:45:55.000 --> 00:46:00.000
Pedantically, but it doesn't matter, because it gets optimized away. But the middle thing…
00:45:58.000 --> 00:46:05.000
It doesn't matter, because when the condition is… when the condition is tested, that's the middle thing, that variable's already been incremented.
00:46:05.000 --> 00:46:09.000
That's right. The… the middle thing…
00:46:05.000 --> 00:46:08.000
So, like you say, in isolation, doesn't matter.
00:46:09.000 --> 00:46:11.000
Is interesting.
00:46:11.000 --> 00:46:17.000
Because in the middle thing, we almost always say i less than n.
00:46:17.000 --> 00:46:18.000
Mmhm.
00:46:17.000 --> 00:46:19.000
Or whatever. Right?
00:46:19.000 --> 00:46:23.000
If you slipped in i less than or equal to n.
00:46:23.000 --> 00:46:24.000
Mmhm.
00:46:24.000 --> 00:46:31.000
That It might go unnoticed, and when it doesn't go unnoticed, it's a surprise.
00:46:31.000 --> 00:46:34.000
So, surprises? Banned.
00:46:35.000 --> 00:46:38.000
All of these things are promises.
00:46:38.000 --> 00:46:44.000
I guess that's a stronger way of saying setting expectations.
00:46:44.000 --> 00:46:47.000
But if you name something, get user.
00:46:49.000 --> 00:46:57.000
and instead of… Finding the user and returning it, it writes.
00:46:57.000 --> 00:47:00.000
Through a database, somewhere.
00:47:01.000 --> 00:47:06.000
That… you broke a promise. You didn't even realize you were making that promise, but you broke it.
00:47:09.000 --> 00:47:12.000
Names need to be.
00:47:15.000 --> 00:47:17.000
There's a.
00:47:17.000 --> 00:47:35.000
everything is a balance, right? In every movie you've ever watched, where there's a wise old anything, I don't even care whether he's the little green, Jedi master, or… or he's the janitor, or he's the, The guy who runs the dojo.
00:47:35.000 --> 00:47:39.000
He has wisdom, and he always talks about balance.
00:47:39.000 --> 00:47:41.000
And here's a piece of balance.
00:47:41.000 --> 00:47:48.000
How long and descriptive is the name I give this thing?
00:47:48.000 --> 00:47:57.000
For instance, the name could be, Get just the user's phone number and age.
00:47:58.000 --> 00:48:04.000
I would argue already that's probably a bad function because it does two things, not one.
00:48:05.000 --> 00:48:09.000
But that's a really long name. Is it worthwhile?
00:48:09.000 --> 00:48:22.000
Maybe? Probably not. Maybe. If it were a
test, maybe, because tests that say exactly what they are, and then fail, and then your test harness prints just the name of the test?
00:48:22.000 --> 00:48:32.000
a test that fully explains what it's testing. Super useful! But if you already have a user object.
00:48:32.000 --> 00:48:40.000
And, name is a func- is a property or something inside that.
00:48:40.000 --> 00:48:43.000
then you've already got user.name.
00:48:43.000 --> 00:48:49.000
That already tells you what it is. It doesn't have to be long there. In general.
00:48:49.000 --> 00:49:02.000
something that is only alive inside a loop doesn't need a huge name. I is a great name for something that lives for 6 lines, or J, or K, or N, all of those things.
00:49:02.000 --> 00:49:09.000
If it's a variable that lives across your whole function inside.
00:49:09.000 --> 00:49:11.000
Speeds is fine.
00:49:12.000 --> 00:49:15.000
If it's a constant.
00:49:15.000 --> 00:49:21.000
that you expose to everyone who imports your package, whatever language you might be using.
00:49:22.000 --> 00:49:27.000
The name capital K? Absolutely not good enough.
00:49:27.000 --> 00:49:30.000
Right, right.
00:49:28.000 --> 00:49:34.000
A good name could be, for instance.
00:49:34.000 --> 00:49:41.000
Sufficient… no, let me say… statistically valid number of samples.
00:49:42.000 --> 00:49:54.000
Now, I happened to mean the same thing when I said both of those. And in a small enough context, or the right one, K would have been reasonable. A domain expert would have known what I meant by K.
00:49:54.000 --> 00:50:01.000
But it's not just the domain experts. Yes, they need to understand what you've written.
00:50:01.000 --> 00:50:08.000
But who's really gonna be putting eyes on your code? Other engineers. So you've…
00:50:07.000 --> 00:50:09.000
And future you.
00:50:09.000 --> 00:50:13.000
and future you. You've got to satisfy both people.
00:50:09.000 --> 00:50:12.000
Right? Yeah.
00:50:13.000 --> 00:50:14.000
Huh.
00:50:14.000 --> 00:50:18.000
I like to pull functions apart when they do two different things.
00:50:19.000 --> 00:50:41.000
I am doing a special kind of judgment across multiple, histograms to decide if they have changed enough and I know enough that it's valid, have I seen K days' worth, or points' worth, or whatever.
00:50:41.000 --> 00:50:47.000
and they have to be coherent. They have to agree with each other.
00:50:47.000 --> 00:50:49.000
Well, it turns out.
00:50:49.000 --> 00:50:58.000
there is a piece of this that I needed three different pieces of code to do, and the mathematician said to me.
00:50:58.000 --> 00:51:05.000
why would you make that three different pieces of code? That's just one thing, and we call it the estimator.
00:51:05.000 --> 00:51:06.000
Okay.
00:51:07.000 --> 00:51:29.000
I can't give you that. I can make something called the estimator, and I can pull it into those three completely separate mathematical operations, they can be in the same file, and you'll see what happens by looking at the one called Estimator, and you'll be able to fix it. But those are 3 different pieces of code, and they cannot be one function, that's just how it is.
00:51:30.000 --> 00:51:35.000
It's a balance. Every single piece is a balance.
00:51:35.000 --> 00:51:41.000
every single place where you have to choose.
00:51:41.000 --> 00:51:57.000
And every time, you know better. Like, I think I quoted this, in a previous show, where I talked about what, The Poet Laureate said to Oprah, what was that Poet Laureate's name?
00:51:57.000 --> 00:52:01.000
I keep forgetting like sometimes I remember and sometimes I don't, but.
00:51:58.000 --> 00:51:59.000
I don't know.
00:52:01.000 --> 00:52:11.000
The only record we have is what Oprah said she said. And the thing she said is… You did the best that you could.
00:52:11.000 --> 00:52:13.000
knowing what you knew.
00:52:13.000 --> 00:52:15.000
And then you learned better.
00:52:15.000 --> 00:52:17.000
Now?
00:52:17.000 --> 00:52:19.000
Do better.
00:52:19.000 --> 00:52:23.000
As soon as you learn better.
00:52:23.000 --> 00:52:37.000
now it's time to change the variable's name, the function's name, the package export, the constant. Whatever it is, there's two times Two best times to plant a tree. 20 years ago, and right now.
00:52:37.000 --> 00:52:43.000
If you missed 20 years ago, do it now. If you didn't give it the right name when you first named it.
00:52:43.000 --> 00:52:55.000
Well, the best thing you can do is change it now. Don't wait. Don't… It's time to change it now, because now is the least pain it's ever going to be.
00:52:55.000 --> 00:53:04.000
For most names with LSPs, they're super easy to change. For APIs, function names that you export? Ouch.
00:53:04.000 --> 00:53:37.000
This costs more. And there's a couple of things you need to know. First of all, use SemVer versioning. When you hit something incompatible, it is time to up the major… bump the major version number. Especially and including, if your schema changes, so any users of your database need to change, if you removed things, if you altered column names, if you But not if you add a table, that's not a major bump, that's not incompatible.
00:53:37.000 --> 00:53:51.000
There are incompatibilities that can't be known to anyone but the engineer. The engineer of one thing says, and by the way, now we calculate these in a different way.
00:53:51.000 --> 00:53:56.000
That's not easy to determine mechanically, but that might be worth a major bump.
00:53:56.000 --> 00:53:58.000
Here's what you do.
00:53:58.000 --> 00:54:09.000
You say, it's changing. You keep the old name, but now it just… calls the new name, or forwards the new name, or it's a property on the new name.
00:54:09.000 --> 00:54:19.000
And, the old one, you use whatever tool you have, in your toolbox. Python lets me do this, like, has words for this.
00:54:19.000 --> 00:54:35.000
deprecated. So if you use the old name, you see a warning in the log, and you see
it as the thing runs in standard error, and it does the right thing, but it doesn't go away.
00:54:35.000 --> 00:54:41.000
Until the next major bump. The next major version bump.
00:54:41.000 --> 00:54:46.000
You did Major Version Bump because you want people to use the new name?
00:54:46.000 --> 00:54:54.000
And the old name lives for one whole version, major version, until you're ready to bump it.
00:54:54.000 --> 00:54:56.000
So.
00:54:57.000 --> 00:55:03.000
there are some small, rules that pay off, I think.
00:55:03.000 --> 00:55:09.000
Booleans should read like questions, and you need to know the rule.
00:55:09.000 --> 00:55:19.000
that they're questions. So when you say, is ready, that's a question, because you know the rule, and is ready returns, or is, a Boolean.
00:55:19.000 --> 00:55:24.000
has children. Doesn't mark something as having children.
00:55:24.000 --> 00:55:28.000
Which would probably be best if you just added a child.
00:55:30.000 --> 00:55:33.000
Do not use negatives.
00:55:33.000 --> 00:55:37.000
I think the fact that I said not was bad.
00:55:35.000 --> 00:55:37.000
You just did.
00:55:38.000 --> 00:55:48.000
maybe I should say avoid negatives. Not disabled is even worse than a negative. It's, It's a double negative.
00:55:48.000 --> 00:56:00.000
everybody who hits a negative or a double negative, or, or god, you can go worse, is gonna slow down to figure out what you meant. They're gonna do a double take. So, if you meant enabled.
00:55:48.000 --> 00:55:50.000
Right, you want enabled.
00:56:00.000 --> 00:56:08.000
say enabled. If you're tri-state, like there's enabled, disabled, and unknown.
00:56:08.000 --> 00:56:12.000
Make sure you can say it that way.
00:56:12.000 --> 00:56:19.000
Make sure there's a positive and easy-to-understand name for each of the states.
00:56:19.000 --> 00:56:26.000
If there are units, and units matter, which they almost always do.
00:56:26.000 --> 00:56:49.000
Units should probably be in the name. So, for instance, size bytes, size megabytes, or MB, size, you know… That would have, saved a lot of money in the Mars Climate Orbiter problem, which… We lost because one team's software produced pound-force seconds.
00:56:49.000 --> 00:56:54.000
and the thing that was reading it expected Newton-seconds.
00:56:54.000 --> 00:57:02.000
They both mean the same thing underneath if you convert one to the other, but they're not the same units, and they don't go together.
00:56:55.000 --> 00:56:56.000
Both.
00:57:02.000 --> 00:57:04.000
Right, that was a mistake.
00:57:04.000 --> 00:57:06.000
And we're all learning from that.
00:57:06.000 --> 00:57:09.000
So it's not a total loss, right?
00:57:07.000 --> 00:57:11.000
Which, which most people don't do, especially kids.
00:57:09.000 --> 00:57:11.000
No.
00:57:11.000 --> 00:57:16.000
Like, a lot of people only learn from their own mistakes.
00:57:16.000 --> 00:57:19.000
I think.
00:57:17.000 --> 00:57:20.000
See, that's not bad.
00:57:20.000 --> 00:57:28.000
Right? You learn better from your own mistakes than somebody trying to. This is an age-old problem with parents, with parents and children, right?
00:57:24.000 --> 00:57:26.000
You do, 'cause it hurts more.
00:57:28.000 --> 00:57:35.000
parents thinking that, I don't want them to make the same mistakes I made. Sometimes they need to learn those mistakes, right?
00:57:32.000 --> 00:57:33.000
Right.
00:57:34.000 --> 00:57:36.000
They do.
00:57:38.000 --> 00:57:50.000
but boy, is that a lot of time. I want to learn from the mistakes scientists have made. I don't want to test, do vaccines work on me or not?
00:57:41.000 --> 00:57:43.000
Yeah.
00:57:49.000 --> 00:57:51.000
Right.
00:57:50.000 --> 00:57:54.000
I'm satisfied with previous mistakes.
00:57:52.000 --> 00:57:56.000
You want to stand on the shoulders of giants.
00:57:55.000 --> 00:58:05.000
I do! I love standing on the shoulders of giants, because I'm not all that tall by myself.
00:57:57.000 --> 00:57:58.000
Yeah.
00:57:58.000 --> 00:58:00.000
Yes.
00:58:00.000 --> 00:58:01.000
Yes.
00:58:03.000 --> 00:58:05.000
You can see much further, can't you?
00:58:05.000 --> 00:58:07.000
I can.
00:58:08.000 --> 00:58:28.000
And it's easy to change names. Now, let's talk about Charles… I don't even know if I can say his name, but Simonyi? Charles Simonyi at Microsoft. The original idea encoded meaning in the name, such as… This is a row, that is a column.
00:58:28.000 --> 00:58:46.000
that's a lot different from just sticking the type in there. Row or column… like, they're probably the same type, right? They're… they're a vector, or what… I don't even know what someone would put, because I don't do that. Homie don't play that.
00:58:47.000 --> 00:58:50.000
So.
00:58:50.000 --> 00:58:56.000
the thing that he described was, known as Apps Hungarian.
00:58:56.000 --> 00:59:03.000
But the thing that actually spread was called systems.
00:59:03.000 --> 00:59:04.000
Hungarian.
00:59:04.000 --> 00:59:15.000
And, you know, the compiler already knows everything you're putting in the name. That's like… I like using an ATM machine.
00:59:15.000 --> 00:59:17.000
Or.
00:59:16.000 --> 00:59:18.000
An ATMM.
00:59:18.000 --> 00:59:20.000
Yeah.
00:59:20.000 --> 00:59:22.000
Anyway.
00:59:22.000 --> 00:59:32.000
Joel Spolsky wrote an article about, the title was, Making Wrong Code Look Wrong.
00:59:32.000 --> 00:59:47.000
And that's like what we've been talking about, where the name shows you things about what it means and what it's for, so when you put two things together that don't go together.
00:59:47.000 --> 01:00:01.000
it's obvious from the names, and his article explains why that's good. Joel Spolsky and I, disagree on a great many topics, one of which is knowing the other one's name.
01:00:04.000 --> 01:00:09.000
I know who he is, and he's never heard of me.
01:00:09.000 --> 01:00:32.000
And he also hates C++, that's, like, a thing. He, he loves C Sharp, and a couple other things, and that's not
unreasonable, but, he has ideas about what you can trust and why that he doesn't see as projections of his biases. But he's super smart, and he said super smart things.
01:00:27.000 --> 01:00:28.000
And.
01:00:28.000 --> 01:00:39.000
and Joel, he's… Right, Joel, he's the guy behind Stack Overflow, right? Stack Exchange, Stack Overflow, yeah. One of the guys, yeah.
01:00:34.000 --> 01:00:36.000
He is?
01:00:37.000 --> 01:00:38.000
Yeah.
01:00:38.000 --> 01:00:43.000
one of the guys. The other is,
01:00:40.000 --> 01:00:41.000
Yeah.
01:00:45.000 --> 01:00:49.000
I know his name. I can't think of it right now.
01:00:46.000 --> 01:00:58.000
He's got that… he's got that really cool, Handle and then his name is long, his last name is long. I'm so I'm getting so.
01:00:56.000 --> 01:00:59.000
Is he a coding horror?
01:00:58.000 --> 01:01:01.000
Yeah, Coding Horror, that's the guy.
01:00:59.000 --> 01:01:03.000
Jeff Jeff Atwood. Jeff Atwood.
01:01:02.000 --> 01:01:05.000
Yeah, starts with an A.
01:01:03.000 --> 01:01:04.000
Right.
01:01:05.000 --> 01:01:17.000
So, languages have naming conventions, by the way, as we talked about with Perl sigils. More than a convention, it's the law. But,
01:01:13.000 --> 01:01:14.000
Mmhm.
01:01:17.000 --> 01:01:39.000
also, like, how you shape your names. In Go, I'm gonna talk about more laws. In Go, it's the fact that a name starts with a capital letter that makes it be exported, visible outside it's yeah. And a couple other languages did that too. Modula did that.
01:01:32.000 --> 01:01:34.000
Really.
01:01:38.000 --> 01:01:42.000
I think Fortran did that too, didn't they?
01:01:39.000 --> 01:01:41.000
In.
01:01:42.000 --> 01:01:47.000
like, integers started with… Fortran, didn't they have, like, integers started with an I or something goofy like that?
01:01:48.000 --> 01:01:52.000
Hmm, I don't remember that, but Fortran's been a long time.
01:01:50.000 --> 01:01:51.000
Anyway.
01:01:51.000 --> 01:01:53.000
Yeah.
01:01:54.000 --> 01:01:55.000
A.
01:01:58.000 --> 01:02:13.000
in some languages, like Java, CamelCase… no, it's not… they don't call that CamelCase. What do they call it when it starts with a capital letter and has capital letters in the middle, and no separation? That's called…
01:02:13.000 --> 01:02:16.000
Wasn't that Hungarian notation?
01:02:16.000 --> 01:02:21.000
No, no, like I'm talking about when you say.
01:02:21.000 --> 01:02:23.000
A.
01:02:22.000 --> 01:02:24.000
Patient name.
01:02:24.000 --> 01:02:33.000
Patient name, capital P, capital N, no spaces, or no underscores, or anything. It's one word, capital P, capital N.
01:02:28.000 --> 01:02:29.000
Right.
01:02:29.000 --> 01:02:30.000
Right.
01:02:31.000 --> 01:02:33.000
Okay.
01:02:33.000 --> 01:02:34.000
Okay.
01:02:33.000 --> 01:02:40.000
But in Python, it would all be lowercase. We're talking about a variable here, not a class.
01:02:40.000 --> 01:02:41.000
Sure.
01:02:40.000 --> 01:02:45.000
It would all be lowercase, and it would be patient underscore name.
01:02:45.000 --> 01:02:47.000
Okay.
01:02:47.000 --> 01:02:50.000
And in some languages.
01:02:50.000 --> 01:02:57.000
It would be… patient name, with a lowercase p to start, but a capital N.
01:02:56.000 --> 01:02:58.000
Right.
01:02:58.000 --> 01:03:02.000
And if it were a.
01:03:02.000 --> 01:03:04.000
Class name?
01:03:04.000 --> 01:03:19.000
in Python, it would be, like it is, in Java. So, database connection would have a capital D, a capital B, and no underscores.
01:03:19.000 --> 01:03:20.000
Right?
01:03:22.000 --> 01:03:27.000
That is an actual convention, not a law.
01:03:26.000 --> 01:03:28.000
mmhm
01:03:27.000 --> 01:03:37.000
you can name it anything you want. And there's a couple conventions. One is, a name that starts with an underscore, that's you saying.
01:03:37.000 --> 01:03:47.000
don't look at this one. This one is supposed to be private. In Python, you can touch anything you want. You can patch anything you want. You can make anything happen that you want.
01:03:44.000 --> 01:03:46.000
Yeah, same with Perl. Yeah.
01:03:47.000 --> 01:03:48.000
Sure.
01:03:47.000 --> 01:03:51.000
The underscore is telling you, please don't.
01:03:50.000 --> 01:03:53.000
It's a warning to users, yeah.
01:03:51.000 --> 01:03:58.000
This is much more worthy of… Joel's complaint about C++ was this.
01:03:58.000 --> 01:04:04.000
If you see A plus B, you have no idea what's going to happen.
01:04:04.000 --> 01:04:08.000
That was his complaint. Because you can overload plus, right?
01:04:07.000 --> 01:04:08.000
Right.
01:04:08.000 --> 01:04:27.000
And I said, that's a trust problem, not a language syntax problem. First of all, if you know the types of A and B, and they're some kind of system type, like long or whatever, you can't override plus for them.
01:04:27.000 --> 01:04:32.000
Long plus long has a meaning, and it always has that meaning.
01:04:32.000 --> 01:04:37.000
If… A is something special.
01:04:37.000 --> 01:04:43.000
You can know that plus means something, but the trust problem is.
01:04:43.000 --> 01:04:50.000
Do you have a team that promises to write code that does not surprise you?
01:04:50.000 --> 01:05:01.000
Because no surprises is the goal. And the fact that he doesn't know what it means, means he doesn't know if he can trust what they've written.
01:05:01.000 --> 01:05:08.000
He doesn't know if he's gonna be surprised or not. And that means you hired the wrong guys. Or gals, or… or…
01:05:08.000 --> 01:05:09.000
people
01:05:08.000 --> 01:05:11.000
Groundhogs, whatever it is that writes your code.
01:05:11.000 --> 01:05:22.000
And I know he didn't. I know that the team he hired all works together the right way. So he's talking about what happens if you're looking at somebody else's code.
01:05:22.000 --> 01:05:30.000
which I don't know why he's talking about, because I'm pretty sure he doesn't want to use other people's code. Anyway! Okay.
01:05:31.000 --> 01:05:40.000
Renaming? Do it as soon as you can.
It's easy in some places. Keep deprecation aliases. When is it worth renaming?
01:05:40.000 --> 01:05:45.000
Rename when the name is provably a lie.
01:05:46.000 --> 01:05:51.000
Because a name that promises something false?
01:05:51.000 --> 01:05:54.000
is absolutely a hazard.
01:05:56.000 --> 01:06:04.000
the domain language. If there are names that everybody uses, except you.
01:06:05.000 --> 01:06:11.000
Well, guess who's right? And guess who's wrong? Because there is a right and a wrong.
01:06:11.000 --> 01:06:17.000
In this world, there is a word, there's actually a ton, but I'm going to bring up one right now.
01:06:17.000 --> 01:06:21.000
The word is spelled G I F.
01:06:21.000 --> 01:06:28.000
It stands for Graphic Interchange Format. It was invented by Steve Wilhite at CompuServe.
01:06:24.000 --> 01:06:25.000
GIF.
01:06:28.000 --> 01:06:33.000
I worked at CompuServe. I worked with Steve Wilhite.
01:06:33.000 --> 01:06:37.000
I have talked to him. He pronounced the word for me.
01:06:37.000 --> 01:06:41.000
I know what it is pronounced like and why.
01:06:41.000 --> 01:06:44.000
And so, I say it his way.
01:06:44.000 --> 01:06:49.000
Everybody else… Everybody else.
01:06:49.000 --> 01:06:52.000
Including me. Me too.
01:06:49.000 --> 01:06:51.000
says GIF.
01:06:51.000 --> 01:06:53.000
including Jim.
01:06:53.000 --> 01:06:55.000
And I say JIF.
01:06:55.000 --> 01:07:01.000
I say JIF because that's what Steve wanted, and he's passed away now, so there's no arguing.
01:07:01.000 --> 01:07:11.000
But languages change. We add new words, we remove old words, words being something different. What the hell does it mean when someone says the maths?
01:07:11.000 --> 01:07:13.000
aren't mathing.
01:07:13.000 --> 01:07:16.000
Do you ever say that? No.
01:07:16.000 --> 01:07:19.000
Is, Connor gonna say that?
01:07:19.000 --> 01:07:21.000
Someday.
01:07:21.000 --> 01:07:24.000
I kind of like that term.
01:07:25.000 --> 01:07:32.000
But people will argue with me. When I say.
01:07:28.000 --> 01:07:33.000
It's just saying it's saying, but that that doesn't add up, right?
01:07:32.000 --> 01:07:36.000
When I say GIF, they'll say, oh, do you mean GIF?
01:07:36.000 --> 01:07:37.000
Yeah.
01:07:36.000 --> 01:07:38.000
And I'll say this.
01:07:38.000 --> 01:07:48.000
do you know what I was talking about? Because you suggested the thing I was talking about. And they'll say, oh, yeah, I knew what you meant. And I said, oh, so the word did its job.
01:07:50.000 --> 01:08:01.000
And at that point, they'll be forced to admit, yeah, yeah, the word did its job. And I said, so, I said a thing about a thing you're talking about, and I used a word that you know what it meant.
01:07:55.000 --> 01:07:56.000
Okay.
01:08:01.000 --> 01:08:04.000
What are you complaining about?
01:08:06.000 --> 01:08:09.000
And I don't complain when they say GIF.
01:08:09.000 --> 01:08:12.000
I just assume they meant JIF and go on.
01:08:11.000 --> 01:08:13.000
there
01:08:13.000 --> 01:08:14.000
Okay.
01:08:15.000 --> 01:08:31.000
Everything in our job has a name. Variables, classes, files! Host names, podcast episode titles,
01:08:27.000 --> 01:08:29.000
That's a big one.
01:08:31.000 --> 01:08:55.000
Which, and you know, this is important, because if we give it a terrible title, people aren't gonna click it, and if we give it a really great title, people are gonna click it, because you make a decision when you see the name! And if you see a name that sounds boring, you're not interested. A title that says, "Drink Me"
01:08:46.000 --> 01:08:47.000
Right.
01:08:55.000 --> 01:08:57.000
like Alice in Wonderland.
01:08:57.000 --> 01:09:02.000
Like, that name… kinda makes you want to click.
01:09:02.000 --> 01:09:07.000
But a name like, insurance statistics.
01:09:08.000 --> 01:09:12.000
I'm not gonna click on it, and I kinda like statistics.
01:09:09.000 --> 01:09:11.000
No.
01:09:14.000 --> 01:09:19.000
You just don't want to be bored to death. So yeah, names are important. No doubt.
01:09:18.000 --> 01:09:26.000
There, there is a thing that in our industry we have a word for it. We call it bike shedding.
01:09:26.000 --> 01:09:35.000
Bike shedding is when you devote way more attention to making some particular decision.
01:09:35.000 --> 01:09:37.000
than that decision is worth.
01:09:37.000 --> 01:09:49.000
And the underlying thing is, what color are you going to paint the bike shed? If you talk about that for more than 2 minutes, you're spending money for no reason.
01:09:50.000 --> 01:09:54.000
I don't care what color you paint it. All I care is, my bike is dry.
01:09:54.000 --> 01:09:55.000
That's it.
01:09:55.000 --> 01:09:58.000
You want it red? Fine, red's great.
01:09:58.000 --> 01:10:00.000
I have no problem with that.
01:10:00.000 --> 01:10:12.000
is this bike shedding? The thing we're doing right now, talking about names. There is a thing called Parkinson's Law of Triviality.
01:10:12.000 --> 01:10:32.000
And that law is that the less… maybe I'll say it his way. I was gonna say, the less valuable the decision, the more effort you put into it. But the way he actually said it is, the time spent on an item is inversely proportional to its cost.
01:10:32.000 --> 01:10:35.000
You want to talk about the dumb stuff.
01:10:37.000 --> 01:10:47.000
I can't stop you. Poul-Henning Kamp's 1999 Bike Shed email to the FreeBSD lists.
01:10:47.000 --> 01:11:02.000
is the thing where we actually talk about bike shedding and all the time people on conf on, you know, email lists or whatever or the meeting I was talking about.
01:11:02.000 --> 01:11:09.000
Waste time when they could have written a script that says a color was chosen and nobody objected.
01:11:09.000 --> 01:11:14.000
And then in the meeting, you say, we need the bike shed.
01:11:14.000 --> 01:11:16.000
here by March 2nd.
01:11:16.000 --> 01:11:19.000
That's the important part.
01:11:19.000 --> 01:11:21.000
When can we get the materials?
01:11:21.000 --> 01:11:26.000
How
much will it cost? Who will build it? And exactly where are we going to put it?
01:11:26.000 --> 01:11:29.000
I don't care what color it is. Nobody objected.
01:11:29.000 --> 01:11:31.000
Okay.
01:11:31.000 --> 01:11:45.000
Where naming debates are worth the time, public APIs absolutely involve the domain experts. If I'm writing stuff a mathematician is supposed to use.
01:11:45.000 --> 01:11:50.000
But I don't have a mathematician helping me make up the names?
01:11:50.000 --> 01:11:52.000
That's like.
01:11:52.000 --> 01:11:59.000
me Trying to make a decision about women's health.
01:11:59.000 --> 01:12:02.000
Whether abortion should be legal or not.
01:12:02.000 --> 01:12:06.000
What the living God do I know?
01:12:06.000 --> 01:12:14.000
I could have an opinion, but there's very little correlation between my opinion and what actually matters.
01:12:13.000 --> 01:12:16.000
Reality, yeah.
01:12:14.000 --> 01:12:22.000
So, yeah, there are, there are things where you need help. Get together on those. That's not bike shedding.
01:12:22.000 --> 01:12:24.000
And this is important.
01:12:24.000 --> 01:12:30.000
Just like a name tells a human what to expect.
01:12:31.000 --> 01:12:51.000
AIs read your code, and names are incredibly meaningful to them, based on what they've seen before. The names you give things are gonna help it Recognize the right concepts and go to the right places and make the right predictions.
01:12:52.000 --> 01:12:53.000
So.
01:12:54.000 --> 01:12:58.000
I want to say just one thing.
01:12:58.000 --> 01:13:01.000
I think, to sort of seal this up.
01:13:01.000 --> 01:13:05.000
And if you only remember this one thing.
01:13:05.000 --> 01:13:10.000
think you have everything you need to do what's right. And that is this.
01:13:10.000 --> 01:13:12.000
A name?
01:13:12.000 --> 01:13:18.000
is the shortest documentation you will ever write.
01:13:18.000 --> 01:13:19.000
And the most red.
01:13:20.000 --> 01:13:23.000
That's really cool.
01:13:24.000 --> 01:13:30.000
All right, I think I said everything I can say. But boy, names are important.
01:13:30.000 --> 01:13:32.000
They're worth your time.
01:13:30.000 --> 01:13:37.000
Oh, they sure are. And you're right. The very first thing you said was the hardest things we do.
01:13:37.000 --> 01:13:41.000
I… I struggle with names.
01:13:41.000 --> 01:13:47.000
whether it's host names for a computer or variable names inside of an application.
01:13:47.000 --> 01:13:55.000
I really struggle with it. And I think one of the points you made, I think you made it, was.
01:13:56.000 --> 01:14:01.000
It's hard to come up with a name until you really understand what it is.
01:14:02.000 --> 01:14:07.000
Right? Because it's a mirror. It's a… it's a… like, in the books.
01:14:02.000 --> 01:14:04.000
Right, right.
01:14:07.000 --> 01:14:10.000
The name gives you power over something?
01:14:10.000 --> 01:14:17.000
But it's a two-way street. It's not just that you have power over the thing.
01:14:17.000 --> 01:14:27.000
It's that that thing is now in your bones. You know what it really is. You've seen the truth. You've looked inside it.
01:14:28.000 --> 01:14:34.000
Yeah, and I think when you really understand something, the name falls into place without even thinking about it.
01:14:33.000 --> 01:14:45.000
It really does. When we were… starting this podcast, now I'm talking to the listeners directly, and not you, but when we were starting this podcast.
01:14:45.000 --> 01:14:51.000
We wanted to reflect the kinds of conversations we really have.
01:14:51.000 --> 01:15:07.000
and we knew what it was about, what we… how we interacted. We agree on a lot of stuff, and we disagree vehemently on some things, until I've talked long enough. And then Jim either agrees or gives up.
01:15:07.000 --> 01:15:16.000
That's not true. But we went through lists and lists and lists.
01:15:12.000 --> 01:15:14.000
Sometimes it is.
01:15:15.000 --> 01:15:19.000
Oh, yeah. Yeah, we had a lot of names flying around.
01:15:16.000 --> 01:15:28.000
But when we… when we decided on runtime arguments, it's not like other things were close. It's like, oh, that's true.
01:15:27.000 --> 01:15:29.000
Yah.
01:15:28.000 --> 01:15:32.000
That's the true thing. That's what we have to call this.
01:15:29.000 --> 01:15:31.000
Right.
01:15:31.000 --> 01:15:33.000
Right, right.
01:15:33.000 --> 01:15:37.000
So that's what we did. We didn't have to rename it later when we understood it better.
01:15:37.000 --> 01:15:47.000
Yeah, we knew what we wanted from up front, we just didn't know how to put that into… Something that fits in your mouth or on a business card.
01:15:46.000 --> 01:15:48.000
Right, right. Well, then we did.
01:15:48.000 --> 01:15:50.000
So good.
01:15:50.000 --> 01:16:02.000
So, wow, that's, that's a lot of fun content. I really enjoyed this episode. A lot of, interesting conversation. And, when you proposed this idea, I thought, oh, that's a good one.
01:16:02.000 --> 01:16:10.000
and I think you actually pulled it off, that's great. So, Thanks for that.
01:16:11.000 --> 01:16:27.000
You know, we love feedback. So, send us your feedback. If you enjoyed this episode, if you didn't enjoy this episode, if you enjoyed any episode, if you have ideas about future podcasts or whatever, let us know. And the way you can do that is.
01:16:27.000 --> 01:16:43.000
Send us email to feedback@runtimearguments.fm. I will repeat that in the show notes. There's always show notes for these episodes. And we include all of our contact information. We've got Mastodon accounts and email addresses and websites and all that stuff.
01:16:43.000 --> 01:16:45.000
So check out the show notes.
01:16:45.000 --> 01:17:01.000
And as always, we have transcripts in our show notes or attached to the podcast. You should be able to see the show notes or the transcript. Or you can see it on our website, runtimearguments.fm.
01:17:01.000 --> 01:17:12.000
There's a place there you can look at the, at the show notes and the transcripts. And, So yeah, this was a lot of fun, Wolf. Any parting words for you?
01:17:12.000 --> 01:17:26.000
I have… I want to say something about feedback, which is the whole reason we do this is to have a conversation with each other and with everybody who's listening.
01:17:26.000 --> 01:17:31.000
So, it's… it's the interaction that makes this valuable to us.
01:17:31.000 --> 01:17:51.000
Don't think that when you're sending us feedback, it's gonna slip under the wire, like, it doesn't matter to us. Not only does it matter, it's the whole reason we do this. We want to have a conversation. Please join us in the conversation. If we touched you, reach back, touch us.
01:17:51.000 --> 01:17:53.000
The second thing is.
01:17:53.000 --> 01:17:58.000
read the Kahneman book, Thinking Fast and Slow.
01:17:55.000 --> 01:17:56.000
Yeah.
01:17:57.000 --> 01:18:03.000
Yeah, we'll include a reference to that in the show notes, so you don't have to write it down right now, just look at the show notes later.
01:18:04.000 --> 01:18:17.000
And I just want to thank everybody who… who listened to this. I think names are important, and if more people, felt the same way, I think our code would be better. That's all I think.
01:18:17.000 --> 01:18:18.000
Thanks, everybody.
01:18:18.000 --> 01:18:34.000
All right. Yeah. Thank you, everybody. Thank you, Wolf, for podcasting with me. It's fun as always. And boy, everybody, hey, have a, well, this episode is going to come out just after Thanksgiving. So I was going to say, have a nice Thanksgiving. But by this time, you've already had a nice Thanksgiving.
01:18:34.000 --> 01:18:37.000
Hope your Thanksgiving was nice.
01:18:34.000 --> 01:18:36.000
So.
01:18:36.000 --> 01:18:40.000
Yes. We'll see you next time. Bye-bye.
01:18:40.000 --> 01:18:41.000
Bye bye.