505: Potato in a Number Field
Transcript from 505: Potato in a Number Field with Peter Griffin, Christopher White, and Elecia White.
EW (00:00:06):
Welcome to Embedded. I am Elecia White, here with Christopher White. Our guest this week is Peter Griffin. We are going to talk about communicating with dogs, pivoting tables and making non-traditional GUIs. Or we might talk about sunshine and flowers.
CW (00:00:26):
All right. Hello Peter. Welcome, again.
PG (00:00:30):
Hello. Good to be back on, talk to you guys again.
EW (00:00:34):
Could you tell us about yourself, as if we met at Supercon?
PG (00:00:39):
Let us see. Oh gosh. The "at Supercon" one, I am tempted to try and recall what I have actually said to people. Usually it is something along the lines of, I do programming or consulting for my day job, but I am an embedded enthusiast. I am excited to be at Supercon or Teardown to learn more from people who do this more seriously.
EW (00:01:04):
Did you go to the recent Teardown?
PG (00:01:06):
I did. It was awesome! Yeah, it was even bigger than last year. They had two stores that got taken over in the mall, to host all of the spaces. It was absolutely incredible. Was there anything in particular from that, that you were curious about or had heard about?
CW (00:01:29):
I do not think we have talked to anybody about this year's Teardown, have we?
EW (00:01:33):
No. I was going to actually turn it back on him. Is there anything particular that you saw that was-
CW (00:01:38):
Pretend we are completely ignorant of this year's Teardown.
EW (00:01:41):
I saw some Instagram post.
CW (00:01:43):
Yeah, I saw very little.
EW (00:01:45):
What was the best part?
PG (00:01:46):
Oh gosh. The whole thing. Honestly. Start to finish, that is a packed weekend. The keynote speaker was Corey Doctorow, who I did not know about beforehand. He gave a talk about, and this is a wonderful word, "enshittification."
EW (00:02:00):
Mm-hmm. Mm-hmm.
PG (00:02:02):
Which I was kind of familiar with the process. But he laid it out in exquisite detail, of how it is that companies acquire users, lock them in, acquire businesses, lock them in. And then just squeeze them for everything they are worth.
(00:02:16):
It is kind of disturbing to be honest, but it was also eyeopening. There were pieces of that that I was already aware of. But the extent, and exact causes and remedies, it was nice for someone to put all of those pieces together in a coherent story. So that was a really interesting keynote.
(00:02:39):
There were a lot of interesting talks. A lot of people who have been on the Embedded podcast before. I could not see all of them.
(00:02:47):
Oh! I also did a workshop there. That was, I put together a jumperless graphical user interface workshop. I was really worried before I left for the conference, because I looked and only two people had signed up. Fortunately Kevin and I were able to talk this up throughout the conference.
(00:03:07):
Kevin is the guy who actually made the jumperless hardware that I was using in the workshop. He was kind enough to bring enough for everyone to play with. But, yeah, we were able to get a full house by the time we actually had the workshop, so that was quite a nice surprise.
EW (00:03:24):
What is Kevin's full name?
PG (00:03:29):
I am going to mangle his last name, if I have to guess. I should look that up. But I am also not a hundred percent sure how to pronounce it.
EW (00:03:37):
We will cut this part. <laugh>
PG (00:03:39):
Yeah, maybe-
EW (00:03:39):
We will put it in the show notes, when we get there. So Jumperless, for people who have not heard of it, it is a breadboard, right? That is software configurable.
(00:03:51):
So you can place your- It says what it does on the tin, but you can place your components on the board, and then using software, you route the rows and columns of the breadboard to other rows and columns. Is that right?
PG (00:04:10):
That is exactly right. I got interested in it after Supercon last year. I had a project where I wanted to work with parallel flash memory, and it is just a lot of rows to wire up.
(00:04:25):
So I started being like, okay, I got the original version Jumperless from the previous year's Teardown, during one of the workshops that Kevin did. And was playing with it, and was like, "Okay, this would be the perfect project to do. Because there were just lots of things to wire up." So that got me started.
(00:04:44):
And the more I played with it, the more I wanted to play with it. It is a really cool device. Especially the new one. There is not just one way to interact with it. So you can interact with it with software, but it also comes with a probe, which is like a needle with a button on it. You can click the button, and then just tap the different rows and columns you want connected.
CW (00:05:05):
<laugh> Oh. No way. Okay.
PG (00:05:07):
So you do not actually need to hook it up to a computer. I just do that because silly, and I like graphical user interfaces.
CW (00:05:11):
You can just draw it.
PG (00:05:12):
But it works, yeah, completely standalone. There is also a scroll wheel. It has got a single click, so you can either click it once, or click and hold for a second, to do the alternate function. But then you can scroll back and forth to also set rows and columns.
(00:05:28):
He has tried to make all of the menus work with all of the interfaces. Which is an impressive challenge, given how different some of these interfaces are.
(00:05:39):
But yeah, it is a really cool device. I had a lot of fun playing with it, building stuff on top of it, for the workshop. Then seeing people use it was also eyeopening. Because it was everything from, "What is an LED? What is a breadboard? How do I plug it in?" Just excitement getting the first LED to light.
(00:05:59):
To someone was trying to debug something else, and trying to interface with it, over bus lines. And I was just like, "Okay. That is beyond what I had imagined people trying to do with it in the workshop."
(00:06:11):
Oh, there was even- There was another guy who I met at the conference, I think his name was Brett. He was a web developer. During the workshop, from an eTablet, he was able to transform the GUI that I had built from a Colab notebook, which is a hosted Python notebook, to a completely standalone website.
(00:06:34):
So you can just go to a website, and it will access your device over serial and give you a user interface, which was mind blowing to me.
CW (00:06:44):
So what was the GUI that you built? Was this a way to talk to Jumperless from Jupyter Notebooks? Or?
PG (00:06:51):
Yeah. That is exactly it. It is a little Rube Goldbergy in how it works. But it is a Python notebook that generates JavaScript, and it injects the JavaScript into your browser. Because a Colab notebook hosted by Google, it is running on Google server somewhere, and Google server of course does not have access to your USB port. And so that is why you jump through these-
CW (00:07:13):
<laugh>
PG (00:07:15):
Well, you hope it does not have access to your USB port. So you jump through these hoops of injecting JavaScript into the browser, and then it is your browser that is actually talking to the device. It generates a little terminal window, kind of like the Arduino serial IDE- Not IDE. What do they call it? The "serial monitor," I think it is called.
CW (00:07:36):
Oh. Yeah. Yeah. Mm-hmm.
PG (00:07:38):
Then I added some buttons on the side, that do a lot of the basic things in the menu. You can always type those things. But some of the cool ones are like, instead of typing- I forget what the command is to adjust the voltage. I just made it a little slider bar, so you can just click and drag, to adjust the voltage on the two different rails.
EW (00:07:56):
Okay. I am sorry. I wandered off and got distracted with the jumperless breadboard. Because that was- You said, "Jumperless breadboard," and my brain filled in "solderless breadboard." Those white things that you use the wires and you wire it together.
CW (00:08:18):
With the jumpers.
EW (00:08:19):
With the jumpers. But-
PG (00:08:21):
That is a "jumperful" breadboard.
EW (00:08:23):
Right. I know how to use those. They are irritating, because <laugh> you end up in the wrong place.
CW (00:08:31):
For one thing-
EW (00:08:32):
The jumpers do not always sit there.
CW (00:08:34):
Various components' pins do not like-
EW (00:08:35):
They never line up.
CW (00:08:37):
Well, the holes are sometimes grabby for some things, and not grabby for other things. That is a technical explanation.
EW (00:08:40):
Grabby.
CW (00:08:43):
Yeah. And you can ruin them. You can ruin the breadboards, by putting in ICs that have too wide-
EW (00:08:48):
Yes.
CW (00:08:48):
Yes. Yes. Go on. Sorry.
EW (00:08:54):
Yeah. I think of them as not disposable but semi disposable, because they only last for a few projects, before you have to just let the project sit there forever. So this Jumperless thing, looking at it, it has got LEDs. I do not really understand where you put the components.
CW (00:09:18):
Well, if you go to that page, there is one component at least- A couple of components populated on the-
EW (00:09:24):
Crowd Supply page?
CW (00:09:25):
On the YouTube screenshot. But it looks just like a normal breadboard.
EW (00:09:30):
Yeah. And then you have LEDs that tell you which rows are connected together, and which rows are connected to which columns. It is all very configurable. And slightly terrifying.
PG (00:09:44):
What about it do you find terrifying? I am curious.
EW (00:09:49):
Okay, so if something can be done wrong, I will do it wrong. Let us just be really clear with that. It is sort of my superpower. It is great because when there is hardware on my desk, it is 400 times more likely to blow up on my desk, than in the field.
CW (00:10:06):
Have you considered that maybe people are just sending you hardware as pranks, that are prone to-
EW (00:10:12):
Yes. But.
CW (00:10:12):
Sorry.
PG (00:10:16):
I know the feeling, actually. It is the, "How do I not cross wire the expensive hardware, and cook the whole board?" Right. You are saying if the ones you have to use jumper wires for are disposable, if you accidentally short it and you melt the plastic, okay, big deal. You throw it out and you do a new one.
(00:10:35):
But if you somehow short Jumperless, that is more of a problem. I was worried about that too, for a while. I found out that there is actually very clever software, that checks whether or not you are going to connect like your voltage rail directly to ground, and just will not make the connection. So you at least cannot directly short the board with just itself.
(00:10:56):
Now there is nothing that really stops you from plugging in a wire, because it is a breadboard, and shorting it to ground the old fashioned way. But at the very least, it does have some smarts in that.
(00:11:09):
The other helpful factor- This is a blessing and a curse. It was very helpful at the workshop. Is the way all of these connections are formed are with crosspoint switches on the back of the board. Each junction through a crosspoint switch adds about a hundred, 150 ohms of resistance. So the good news is you can literally just plug in an LED and give it three volts or five volts and it will turn on, and it will not blow out.
(00:11:33):
But if you are doing really sensitive things, where you are trying to use the fact that things have very specific resistances, your results can get skewed. By like, "Oh, it went through two crosspoint switches, instead of just one. So now it is 300 ohms, because of routing."
(00:11:55):
The good news is you are less likely to blow it up. It is pretty robust. So far I have not managed to blow up mine, and I do not know, I would not say that I have been the most careful breadboarder. I have definitely cooked some things on a breadboard before.
EW (00:12:12):
I feel like I should say at this point, "Challenge accepted."
PG (00:12:18):
<laugh> Fair enough.
EW (00:12:20):
It does look really interesting. Okay.
CW (00:12:24):
What prompted you to do the Jupyter Notebook thing?
PG (00:12:27):
Well. It started out, there was a- This is a journey. What prompted me to do the Jupyter Notebook, was what started out as a joke for a different project. So going back to what got me started on Jumperless, I was trying to program some flash memory for driving LEDs.
(00:12:43):
The thing that was generating the binary for what should go in the flash memory, I was using Excel. Because I could visualize the different colors with some conditional formatting, so I could make sure that the patterns were right. That is all well and good, but now I want to get my data from Excel to the flash memory.
(00:13:00):
I found out, "Oh, it has a serial communication thing." And I was like, "Well, Jumperless has serial communication." So yes, Excel has serial communication, and I went on this whole thing to try and connect the two. Because I was like, "Well, if I could just pipe my data from Excel directly into the flash chip, all would be good. Then I would not have to deal with another tool, and deal with exporting it, and I could just make these two things work together."
(00:13:22):
I started doing that and I did get the flashing to work from Excel. But at the time I could not use Jumperless, because I was making too many connections and the routing was not optimized yet. I have not circled back to that project.
(00:13:35):
I got distracted with once I got Excel speaking serial well enough, I decided that I would just build a user interface for Jumperless in Excel. Because one of this- This started as a joke, but then I was like, "Actually, it is kind of not a joke. It is actually kind of cool!"
(00:13:51):
There are two things you can do with it, that you cannot do with if you just wrote a user interface in a Python script and ran it locally.
(00:13:59):
The first- Well, okay, if you ran it locally, you could use it offline. But one of the cool things that is new, is there are not a lot of offline ways to interact with Jumperless. So if I could get the Excel thing working, it would be one of the first ones that worked, like you could use it in the field from your laptop.
(00:14:17):
The second thing you can do, which is bananas, is it works online. Because the only way that you get serial in Excel is with the Microsoft Office 365 version, the subscription version, which is obnoxious. But you can do it without using macros. If you do it without using macros, you use their first party plugin called "Data Streamer."
(00:14:40):
The crazy thing you can do, is share an Excel file on OneDrive or SharePoint. It is the same backend. They just have different front ends for business and users. But you put your Excel file on OneDrive, you share it with someone else, and you leave your computer up connected to Jumperless.
(00:14:56):
Now they can access the Excel file and make changes, and it will send data to Jumperless. The clever part is you get a return trip of data from Jumperless saying, "Oh. I colored this row, this color. And this other row, this color." Then you can visualize it in Excel. And because it is a shared file, they get to see the colors.
(00:15:16):
So without having any access to the physical hardware, someone can literally rewire a breadboard remotely, from anywhere in the world.
EW (00:15:25):
As a hardware-in-the-loop test, that would be fantastic.
PG (00:15:28):
Yes! Yes! That was my brainwave moment, where this reached- I have heard it described as the "Maryland point." Where Maryland's flag is just an absolute cluster duck. It is so bad, that it wraps around to the other side, and becomes good again. I feel like the same thing happened-
CW (00:15:48):
<laugh> I just looked it up. I have never seen it before. This looks like a test pattern. <laugh>
EW (00:15:52):
Maryland's flag?
PG (00:15:55):
It looks like a test pattern, where someone applied distortion. It is absolutely bananas.
EW (00:15:59):
Oh! The flag of the state of Maryland in the United States. Wow. That is really, really, and I am using this word correctly, vexing.
PG (00:16:08):
If you are listening along, you must look this up. Because it is special.
EW (00:16:14):
That is the vexing of vexillology.
CW (00:16:17):
It is like a bee and a royal guard smashed into each other.
EW (00:16:22):
I know bees do not fly well, but I would have thought they would do better than that. Okay. We will link that in the show notes. That was hideous. Okay.
CW (00:16:30):
Sorry Maryland.
PG (00:16:32):
Well, that is kind of what the Excel graphic user interface was. It became. It started as a joke. Then when I learned more about it, it wrapped around from being terrible and an awful joke, to being like, "Wait. That is actually interesting and useful, in these unexpected ways."
(00:16:52):
Your question was about how did I get to Colab. This came from someone mentioned like, "Oh, I wonder if you could do that with just your browser." I did some quick googling just to see if anyone had been able to do this with Colab, because then you would not have to install anything.
(00:17:11):
I was trying to find a platform. I think I was just doing this before I submitted my Teardown talk, because I know it was included in the- Well, it was not a- I submitted a talk. They said, "Yes," to a workshop, so I did that instead. But that is a <laugh> different story.
(00:17:28):
I was trying to find something that would work for Mac and Linux users, because the frustrating thing about Excel, is you have to have this very particular version of Excel for this trick to work. So I was trying to find something more general. I was like, "Okay, if it runs out of Chrome, it runs on all operating systems, including Chromebooks." So that is what drove me to try it.
(00:17:51):
I found an example code. I think it was- I want to say it was by Arm. But it was basically building, flashing and communicating with an RP2040, all from a Colab notebook. Which is absolutely mind-boggling when you think about it. Because then they were running machine learning on top of the sensor data that was coming back from the flash device.
(00:18:16):
So it was like this whole as full stack as you can get basically, all out of something that you did not have to install. I went and stole a tiny little piece of that, which was their terminal interface. Then sort of built some UI buttons on top of their terminal interface.
EW (00:18:35):
The terminal interface is great! I have a lot of things that interact via terminal interface, that it would be nice to have Python Colab for, so that I could share with more of my team. That is neat!
PG (00:18:49):
Yeah. If you figure out how to do that, let me know. I got a little stuck. I spent a little bit of time trying to pipe data back from the JavaScript that generates the UI, back into the Python coding environment. I could not figure out how to do it
(00:19:07):
But I think that is mostly due to the fact that I do not know JavaScript, and was just twiddling examples to extend what I had. Now, if you are even slightly more competent than me, there is a good chance you will be able to do that. But at least they are cohabitating in the same environment. So in theory, you could copy paste your data back out.
EW (00:19:35):
<music> Now a word from our sponsor, Mouser Electronics. If you are interested in the intersection of neuroscience and engineering, you might want to check out what Mouser Electronics is doing with brain-computer interfaces. It is all about how you can control machines with your mind. It is one of the coolest areas of innovation right now.
(00:19:53):
Mouser's Empowering Innovation Together site has great content on brain controlled interfaces, from videos to in-depth articles, and podcasts that break down the tech. If this peaks your curiosity, head over to mouser.com/empowering-innovation and explore what is happening with BCI, and other exciting developments in the world of design and engineering. <music>
(00:20:20):
Okay. I have more questions about Teardown. I have more questions about actually a lot of things now.
PG (00:20:24):
<laugh>
CW (00:20:24):
That is good.
EW (00:20:24):
But we did not do lightning round.
CW (00:20:29):
Okay.
EW (00:20:31):
This one is going to be a little special.
CW (00:20:33):
Because it is late?
EW (00:20:36):
No. No. Because well, we have our normal lightning round questions, and there were a good section of them. I have a specific set that I want to power through pretty quickly.
CW (00:20:47):
Oh my goodness. That just appeared in my edit. Okay, I see it now.
EW (00:20:51):
Knowing nothing about the project and answering quickly, would you rather use Excel or Lotus 1-2-3?
PG (00:21:01):
Excel.
CW (00:21:02):
Would you rather use Excel or Python Colab?
PG (00:21:06):
Excel?
EW (00:21:07):
Excel or Java?
PG (00:21:07):
Excel.
CW (00:21:10):
Excel or Rust?
PG (00:21:10):
Excel!
EW (00:21:13):
Excel or a banana?
PG (00:21:13):
Oh! Excel.
CW (00:21:16):
Excel or a sword?
PG (00:21:17):
I get to use a sword? A sword.
CW (00:21:20):
<laugh>
EW (00:21:22):
Excel or a puppy?
PG (00:21:24):
Ooh. Puppy.
CW (00:21:24):
Okay. I think we-
EW (00:21:26):
I think we found the limits here. Yes.
CW (00:21:27):
Okay.
EW (00:21:27):
Violence and cuteness.
CW (00:21:29):
<laugh>
PG (00:21:31):
<laugh> Well. You also did not ask, "Excel or SQL?"
EW (00:21:34):
<laugh>
CW (00:21:36):
Who would?
EW (00:21:38):
Or, "Excel or Google Spreadsheet?" I missed that one too.
PG (00:21:41):
Actually, that is an interesting one. Because they are not perfect-
EW (00:21:46):
They are not!
PG (00:21:47):
They are obviously not perfect substitutes, but there are some circumstances where I would say Google Sheets over Excel, but not all, which surprises even me.
CW (00:21:55):
I tend to reach for Google Sheets when I am doing anything that is even slightly casual. Just because I just need the spreadsheet. I do not need fancy, and I need it to be shareable.
EW (00:22:06):
But I am good at Excel.
CW (00:22:10):
I am bad at both, so it does not matter.
EW (00:22:11):
But then I found out that Google Spreadsheets Charts are different, and different in some really good ways.
CW (00:22:15):
Oh, really?
PG (00:22:15):
Yes. Yes, they are.
EW (00:22:18):
Irritating in some ways, but also really good in some ways.
PG (00:22:22):
But also not terrible in others. I think one of my favorite example differences, is if you want to make a link using a formula like a hyperlink, so that someone can click it and go to a website. In Excel, you cannot make a link longer than 255 characters. Full stop. Has not been fixed since its inception.
CW (00:22:43):
<sigh>
EW (00:22:43):
Ehr!
CW (00:22:43):
Somewhere there is an eight bit <laugh> blank field from 1997, that has not been updated. Oh man.
PG (00:22:54):
Google Sheets, no problem. Same code basically. There are other ways to force cells to become hyperlinks, but they get increasingly manual and increasingly complicated. You either have to bring in VBA, or you have to manually set up each link yourself, which is just- It is fine if you are doing a finite number of them. But even a very large finite number quickly becomes like you want to throw the whole thing out the window.
EW (00:23:28):
I really am tired of Google trying to figure out what kind of data I have. It is a comma separated list, with a few spaces I want you to ignore. I just want to put Control-V. I do not want to have to do Control-V, Control-U, F, S. No. NCF- I have this pattern in my hands what I am dealing with large sets of data and I just want to paste it. In Worksheets, it just let me paste it.
PG (00:24:02):
So there is a fun trick you can do now. Google Sheets now supports the opening and editing of Excel files. So you can paste it in Excel and then upload the Excel file, and then deal with it that way if that is easier.
EW (00:24:15):
Yeah. My files are one megabyte, so that is the edge of irritation. I can do it in Excel, and then the next few steps I know how to do in Excel, but- <sigh>
PG (00:24:33):
Then you want to make a chart and you are like, "Oh, I wish it was-" Yeah.
EW (00:24:36):
I wish it was those charts.
PG (00:24:38):
Yeah. You mentioned "pivot tables," and you were going to ask me about pivot tables. Now I am immensely curious about why you were asking about pivot tables.
EW (00:24:49):
Well, I am not going to talk about what I actually want to do with them. I am going to make up random things that are parallel, so I do not get myself into trouble. But we have been talking about hardware-in-the-loop testing, and when you are running- Let us go back to cars, because cars are obviously complicated.
(00:25:06):
When you are running a hundred tests every night, and a thousand tests once a week, you do not really want to know which tests failed. You want to know which class of tests failed, first. Because if you have a class failure, that is different.
(00:25:23):
If you have, okay, all the failures this week involve the steering. All the failures this week involve the brakes. And then involves the brakes when you are towing a boat. Boy, my example is getting complicated here.
PG (00:25:41):
Right. But it is like state dependent. You want to be able to classify and summarize at a higher level.
EW (00:25:48):
But you also need each test to be individually identifiable, and some of them have different criteria. You just have a complicated system, and you want to pull out the information of most of my- Even though I have got ten different types of classes, that are not all different. Like brakes and steering are not separate. There are times when your errors are in both, or your errors are only in the overlap.
(00:26:17):
Pivot tables seem to be a way to pull out this data, without me going in and saying, "Okay. Here is the limit. If it is less than three in this column and more than ten in that column, then there is an error." Which is what somebody found me doing, and then said, "Have you heard the good news about pivot tables?" And I said, "Yeah. But it was like ten years ago, and I do not remember."
PG (00:26:43):
So, yes. Okay. I want to ask some questions first.
EW (00:26:51):
Okay.
PG (00:26:51):
When you paste the data in, or when you get the data in, are you formatting it as a proper Excel table? Or is it just cells that happen to look like rows and columns?
EW (00:27:07):
This is a good question, because it is always just cells for me. But somebody else I work with, he pastes it, and it is always a table. I do not know what we are doing different.
PG (00:27:20):
Interesting. I do not know what he did to make it automatically paste a table. But I would highly, highly recommend once you have pasted it, converting it to a table. You basically highlight all the cells that you want to be part of this table. And I think it is on the home tab, home ribbon, home tab of the ribbon. There is a way to say "format as table."
(00:27:44):
The reason for doing this is it eliminates a whole class of errors. So tables by default, when you enter a formula in one cell, it will automatically fill down. You are operating on your data as columns of data, which is how you should operate on data. There are very few exceptions, where you want to do weird things across the rows. But. Yeah, no. Okay.
(00:28:13):
So it automatically fills down. So you never have the, "Oops! I forgot to fill down this formula and then my answers were wrong." That is a huge class of errors.
EW (00:28:21):
But I am really good at Control-C, and then Control to the end, and then one over, and then back up, and then you highlight it, and then you put Control-V. You are telling me I do not have to take these steps?
PG (00:28:32):
I will tell you that you can take it one level further. So you paste today's data. You make it a table. Now when you go to the bottom and you want to paste tomorrow's data, if you paste it starting at the first open cell after the table, the table will automatically extend its range.
(00:28:50):
All of the formulas in that table will automatically fill down, and the alternating row highlighting, that makes it easier to read- This is really helpful for me because dyslexic and I will absolutely read the wrong lines if they are not color banded. But yeah, that will also automatically fill down. So those are two just very common errors that I see when people use spreadsheets, and it just eliminates those two categories.
(00:29:17):
The other reason to do it, is you can name your tables, the same way you can name a rang. Then you can reference your table sources by name, instead of by cell something something whatever on sheet.
CW (00:29:35):
Oh. Wow. That is nice.
PG (00:29:35):
Yeah. It gets really cool, because then you can do lookups that are by name. It is like, "Oh, in this table I want this column," and it actually uses the column name. Because it is referencing your whole data, based on columns.
EW (00:29:51):
And I do not have to use VLOOKUP and HLOOKUP, which are just- Those are evil.
PG (00:29:56):
Ah. Ah. No. Do not use those. Use XLOOKUP. It is new. It works for both VLOOKUP and HLOOKUP. The syntax is clearer, and it is faster. XLOOKUP.
EW (00:30:06):
Okay. So there is this problem that I am realizing here. I learned to use Excel in 1996.
PG (00:30:14):
And it still works that way, which is amazing.
EW (00:30:16):
It really is.
PG (00:30:18):
It also works these other ways, which are also amazing.
EW (00:30:21):
But I do not feel like what you are telling me is in "Excel for Dummies." I cannot just pick up the "2025 Excel for Dummies" and get this, because that still is going to explain to me what a worksheet is. And honestly, I do not need that explanation anymore.
PG (00:30:38):
Yeah. It sounds like you are asking, "Where would I get this information?"
EW (00:30:44):
Yes. Where would I get this information, where it is not stuffed in with a bunch of information that I do not- I can skip some, but this is intermediate information. I do not want to have to wade through the basic information, to get to the new intermediate information. Because the basic information did not change very much.
PG (00:31:07):
Okay. The hardest part about the intermediate information, is knowing the names of the things you want to look up.
EW (00:31:14):
Yes. <laugh> Yes.
PG (00:31:14):
Because once you start googling about tables and pivot tables, you will suddenly get all of this intermediate information, that assumes that you know what it is. Because you knew the name of the thing you were googling.
(00:31:26):
So for that purpose, I am also going to name drop one other feature in Excel, that is intermediate to advanced, and that is called "Power Query." It is a way for you to suck data into Excel, and it will land that data as a table.
(00:31:41):
If you want to get really fancy, you can point Power Query at a folder on your drive. It can be full of CSV files. It can automatically stitch those CSV files together, by parts of the name. So if this one starts with "door," it will stitch together all the "door" files, into one giant report or one giant table. It will stitch together all of the "engine" files into another table. You can land those in separate sheets in your workbook.
(00:32:10):
Then anytime your system generates new data, as long as it lands in that folder, the CSV files in the same format matching the patterns that you have established, you can just right-click and click "refresh" on your table and suck that new data in.
CW (00:32:27):
It is incredible to me that it can do this stuff, and also only has 8-bit URLs. Sorry.
EW (00:32:32):
<laugh>
PG (00:32:40):
I know. I know. It kills me. Oh my God. Yeah. Excel is so powerful, and there are times when it just wears the biggest dunce hat I have ever seen. The URL thing is one of them.
(00:32:51):
The way you would use this to investigate data- You ask me about pivot tables. Pivot tables show off all of the power and warts of Excel. They have a lot of awesome features. But there are a lot of defaults that are set incorrectly.
EW (00:33:08):
The defaults?
PG (00:33:09):
The frustrating thing about these defaults, is that they are hidden in little sub sub menus, in a couple different places. If you copy paste a pivot table, it will be inherently linked to the pivot table you copied it from. So if you change one, you are changing the other one too.
CW (00:33:30):
Arrh.
EW (00:33:31):
In a different workbook?
CW (00:33:31):
Oh!
PG (00:33:34):
I do not know if I have tried a different workbook, but definitely in the same workbook. And normally what you want, is you want two pivot tables that are linked to the same source data, but slice it in different ways.
EW (00:33:45):
Right.
PG (00:33:47):
So the frustrating thing is you go in and change all of these fiddly little settings, and get your pivot table looking just the way you want. It responds just the way you want. And you go, "Great! I am going to make a copy of it." And now you edit that copy, and you have just destroyed the first one you were working on. So that is something to be aware of.
(00:34:04):
There is a way to set a template for pivot tables, and set that to be your defaults. When you create a new pivot table, it uses that. That is also a fiddly little setting somewhere. It is so tedious, that I have never done it. With one exception, where I was on a project where I was making literally dozens of pivot tables.
(00:34:23):
Because this client was new to using their data. Everything was in Excel. So it was just like, "We do not even know what we want to visualize. We are just poking around and exploring it. Trying to figure out which end is up." A lot of it was just exploratory.
(00:34:37):
So it was lots of pivot tables on different data sources, to kind of say, "Oh, is this a chart that helps you understand your business better?" Which it sounds like you might be doing the embedded version of. You are trying to figure out what is worth visualizing, how to visualize it, where to group things together.
EW (00:34:56):
Yeah. And how to communicate results. And how to communicate sensors.
PG (00:35:01):
Pivot tables are great for that. Okay. A couple quick things on this. If you want charts out of pivot tables, there is an option called "pivot charts," which is a huge improvement over Excel's normal way of doing charts. There is a normal way to do charts. I used to know it. I have long since forgotten it, because it is awful. And you are right. Google Sheets does it better.
(00:35:25):
Pivot charts still have a place. Basically if you do, when you create a pivot table, you have the option to just create a pivot chart, just create a pivot table or create a pivot table and pivot chart that are linked together. That one will give you a better understanding of how changes in the pivot table affect the pivot chart.
(00:35:46):
But one of the frustrating things I found, is that good ways to visualize data with a chart, tend to make terrible pivot tables. And good ways to visualize data in a table, tend to make really terrible charts.
EW (00:36:00):
Sure. Because a chart is a whole bunch of data, and the goal for the pivot table is to mash it down into under ten lines.
PG (00:36:09):
Exactly! Yeah. No. I was not going to try and explain it, but you already understand that inherent conflict. So that is one part of it.
(00:36:23):
The other thing to note about the pivot charts is they have- This is Excel charting in general. There are a bunch of defaults that are not great. I would recommend once you get a chart looking the way you want, saving a template of that chart, so that you can apply it to new data. Because things like you want your chart to have a title, you want your axes to be labeled.
EW (00:36:49):
Why do I have to push that button every time? I always want axes.
PG (00:36:54):
You do not.
EW (00:36:54):
Well, yes. But apparently I am using the old way of doing charts, and it makes me crazy. I am like, "You should have labels by default. In fact, you should not allow somebody to make a chart without labels." Going to make crazy!
PG (00:37:13):
<laugh>
EW (00:37:14):
Okay. So, template of charts. The old way of doing the charts definitely has the templates. But you have to go and you have to choose a template. Then you have to type things in, even though technically I had most of that information in my sheet. Okay. Templates of charts.
(00:37:31):
Do you have a book or a website you like to look at for a pivot table, so that I do not get lost in the morass of advertisement?
PG (00:37:43):
I will have to get back to you on that. I do not think that I have picked this up from a single source. It has been a couple of years. I am sure there is a good one. I will find a good source of pivot tables, and get you that link.
EW (00:38:04):
If it is "Pivot Tables for Dummies," I am okay with that.
PG (00:38:07):
One thing I would recommend, even if you are not interested in learning more about Excel, is there is this YouTube video called "You Suck at Excel." You can just google it, and find the video. It is basically like a standup comedy routine, but it is actually like "Excel for Intermediate Users." But you cannot really listen to it on two times speed, like you might for other things, because it is already really fast paced.
(00:38:37):
I watched that video at least twice and even the second time, there were still some new things that I learned. If you have a pivot table, did you know that you can double-click on a cell, and it will create a new sheet with the data that was used to create that cell? So if you have totaled up all of the door alarms that have been triggered, you can double-click on that number of 4,000 errors on your door alarms, and get a list of just those alarms.
EW (00:39:06):
Okay. This is from Joel Spolsky. He is a pretty good presenter. I am looking at it from a recent reupload, but apparently it was like ten years ago.
PG (00:39:21):
Well, it turns out still works pretty much the same as it did then. <laugh>
EW (00:39:25):
Well, since I am working with information that is like 30 years old, I am willing to update to skip a couple decades. Wow. Cool. Okay. "You Suck at Excel." That is not a video I would have clicked on. That is just not a title that- I would be like, "Yeah. I do not know what you are talking about. But I do not need to be told I suck."
PG (00:39:46):
Well, no, that is the thing though, is it is actually- Do not take it as criticism at all. See it as an opportunity to really see another way of doing things. Because he makes a good case for outlining how you might have done something to start with, and how you can go the next step beyond it.
EW (00:40:09):
It is funny with the pivot tables and some of the data handling, I feel like I am mentally outlining the way I wanted to do it. Then bringing it back to what I can do in Excel, because I lack the skills. If I could bring what I mentally want to do, to what I actually can do, that would be thumbs up super awesome. I guess that is true of everybody for everything, huh?
CW (00:40:37):
<laugh>
PG (00:40:37):
I am not sure I follow. You would do it in C++ if you could? Or?
EW (00:40:42):
No. No. Okay. So given a pile of data and thinking about what I want out of it, I will go through and think, "Well. This is how I would want to format it, if I could." And then I will think about what I can do in Excel, and then I might get partway there, but I will never get the whole way there.
(00:41:02):
Like, I have 50 failures from my a hundred tests last night. I want to break those out into different categories, but if it failed in this catastrophic category, I do not want that failure counted against the doors not closing. Because that is just not- Even if the doors did not close, once it is-
(00:41:26):
I can think about how I would slice the data. But then I go back to Excel and I am like, "Okay, all these key commands. I will just load this data one more time. Bup, bup, boo. Here is a nice chart. Okay, I will just copy this sheet, and then I will put the new data in, so I can have the same chart, so I do not have to reset up the chart." It is tedious. And I know it is wrong.
PG (00:41:49):
Yes. And it is error prone.
EW (00:41:51):
Yeah. Yeah. And yet when I am dealing with- I probably processed a hundred, 200 megabytes of data on Friday. In the end I realized that I did something wrong at the very beginning, but it had nothing to do with Excel. But it was a lot of data and-
PG (00:42:10):
And it took hours to do all of the manipulations to it.
EW (00:42:13):
It took a whole day. There was a wrong thing at the beginning. I do not want to do it again. Yeah. <laugh>
PG (00:42:25):
We have to talk offline about this. Because I do not think we can cover all of the things that- This has been a journey I have been on too. It is really painful. I did my undergraduate thesis. It was in economics on the reputation of champagne wine. But all of my data processing was done in Excel, before I knew anything.
(00:42:49):
I could barely write an Excel formula at that point. It was really painful when I messed something up, and you have to redo all of it. It really drove me to get better at it. It started with monster formulas. But eventually there are these other tools, that are just so useful for exactly this kind of thing.
(00:43:13):
You want to do exploratory work. It needs to be ad hoc, but you want it to be repeatable. You want it to be reliable. And you want to make sure that if someone looks at it funny, it does not implode. Yes. There are a lot of tools.
EW (00:43:31):
Part of my process here does include a Python script, because I knew I needed that Python script in multiple ways. I do not want to output everything into Matplotlib, because-
PG (00:43:43):
Oh! Did you know you can run Python in Excel?
EW (00:43:46):
That is just wrong. I do not think we should admit that. That is really quite wrong.
CW (00:43:50):
<groan>
PG (00:43:52):
But all of that pain you had with charting?
EW (00:43:54):
<laugh>
PG (00:43:58):
Do not use Python to do insane stuff, that you would not- I mean, Python with the Pandas library, with Matplotlib, is really good for trading stuff.
CW (00:44:09):
But then, if I am using Pandas, why am I in Excel? I am already- Aah!
PG (00:44:14):
Ahh.
CW (00:44:14):
Now it is put in the turducken-
PG (00:44:14):
Because you can now send this file to someone who has not set up Python the same way as you.
EW (00:44:20):
<laugh>
CW (00:44:20):
Ahh.
PG (00:44:20):
And they do not have to spend a day installing toolchains, and figuring out what dependencies are needed. None of that.
CW (00:44:26):
So you are telling me we have fixed Python's dependency and package management hell with Excel.
EW (00:44:31):
<laugh>
PG (00:44:33):
I am not saying that.
EW (00:44:33):
But that is what you mean, is it not?
CW (00:44:35):
<laugh>
PG (00:44:35):
<laugh>
EW (00:44:35):
It is either that or Colab. That is the other way to fix Python's dependency hell.
PG (00:44:40):
I was going say- Yeah. Colab is closer.
CW (00:44:41):
Okay. I do want to hear more about this. But there is one caveat. I believe it is that the Python in question is running on the cloud, right?
PG (00:44:51):
Yes. I believe so. Yes.
EW (00:44:54):
Oh. Yeah, I am-
PG (00:44:56):
Is that a no-no for this project?
EW (00:44:59):
I just do not trust it.
PG (00:45:00):
That is fair.
EW (00:45:01):
I do not know who is looking. I do not know whose computer it is. Colabs, when I run a Colab-
CW (00:45:06):
Microsoft, I assume. I hope. <laugh>
EW (00:45:09):
I know I am on Google site. I am never using the data that I think has any value to anybody but me. I use Colab a lot for origami, because I do not care if somebody wants to look at that data. Good luck. And if you figure it out, let me know.
PG (00:45:26):
And you can do all your prototyping there, and then you can run it in a local notebook when it matters. Yeah.
EW (00:45:31):
Right.
PG (00:45:33):
Yeah, I get that. So that is just one charting option. I mentioned that because you were familiar with Python charting, perhaps? There are definitely ways to do it in Excel, without having it leave the environment.
(00:45:47):
I would recommend pivot charts. I find they are easier to manipulate than normal charts, just because they have a bit of a user interface to them. One other note, the user interface for both charts and pivot tables in Google Sheets versus Excel is very different. I think the one in Sheets is better. They do pretty much fundamentally the same thing under the hood.
(00:46:09):
But there is one other difference that is worth mentioning. Excel pivot tables do not refresh automatically. Google Pivot tables do. So if you update the data source for a Google Pivot table, the pivot will automatically re-aggregate. In Excel, you will go back to your pivot table and you will go, "Oh. Why is it still wrong?"
(00:46:30):
Or you might not notice that it is wrong, which is the worst thing. You have to right-click on the pivot table and click "refresh." Or go to the data tab and click the "refresh all" button. Worth noting. Just an extra step to have to do in Excel. So if you are going to use pivot tables, that one is always worth mentioning.
EW (00:46:52):
It is funny. You are telling me about a ten-year-old Spolsky presentation that sounds fantastic. I am looking forward to seeing it, and I suspect it will change some things I am doing, especially since I am right now in Excel hell. And it would be worth learning these tools that will make my job easier. So this is new to me and I am happy.
(00:47:11):
And you just learned about Corey Doctorow, which I am like, "You did not. What? You did not?"
PG (00:47:18):
<laugh>
EW (00:47:18):
He has got a bunch of sci-fi books, which personally do not care for. But he has also got a lot of sci-fi ideas that are really interesting. Like the enshittification. I think he might have come up with "the liquid democracy," which is a great idea.
(00:47:36):
He just got- I like his short stories, because then nobody ends up taking long baths with each other, which seems to be a theme in many of his works. I am sorry, I went off the rails.
CW (00:47:48):
<laugh>
PG (00:47:50):
<laugh> That is actually a useful tip to know. I will...
EW (00:47:55):
But information diffusion?
CW (00:48:00):
Sure. Dissemination?
EW (00:48:01):
Dissemination. It is hard. It is hard being open to the idea. I mean, I read Spolsky's blog forever until he quit it, he stopped doing it. But I never caught this, because it is just one talk. And the name is such that it was not a talk I would normally click on. Even if it is good. Title it "Tricks in Excel you did not know," and I still would not click on it, because it would sound- I do not know.
PG (00:48:29):
It would sound like clickbait actually.
EW (00:48:30):
Yeah.
PG (00:48:30):
Yeah.
EW (00:48:34):
Christopher, tell us something we do not know.
CW (00:48:37):
About what?
EW (00:48:38):
I do not know. He now knows about Doctorow. I now know now know about this video.
CW (00:48:43):
Well, metric modulation is pretty easy, if you think about subdivisions.
EW (00:48:46):
<laugh>
PG (00:48:46):
<laugh>
CW (00:48:48):
So if you start with 16th note subdivisions, and instead of putting the accent on the first of each grouping of four, you put the accent on each grouping of three. And then play as if that is the new meter. Then you can effectively shift between kind of a four base to a three- You change the tempo, without actually changing the tempo.
EW (00:49:09):
Last night, my journal prompt is, "If you could go back in time and give advice to yourself, what would it be?" And when Chris started the metric modulation chapter-
CW (00:49:22):
This is his musical thing, by the way.
EW (00:49:22):
The amount of whining, about how hard and impossible and inexplicable it was. And so right now-
CW (00:49:28):
Oh. It is very explicable. It is just really hard to do.
EW (00:49:30):
Now I want to take this audio clip back to him, just a few months ago.
CW (00:49:35):
No, no. I could have explained it as easily back then. It is just playing it on an instrument that is difficult, because your brain does not want to do it. Anyway, that is something.
EW (00:49:43):
No! We had many walks where you tried to explain it to me.
CW (00:49:45):
Well, I guess just then you knew it. Then I should not have said it.
EW (00:49:47):
No, I still did not understand. You can explain it to me on our next walk too. Yeah. Okay.
(00:49:54):
Is there someplace you go to find new information, Peter?
PG (00:50:00):
Yes. It really depends on what I am looking for in Excel, for new information. New information in general, Google, Stack Overflow, those are great sources.
EW (00:50:15):
But you have to look for those. You have to know what you are looking for.
PG (00:50:18):
Yes! I am a hoarder of keywords. When you find a term, that is the thing that it is called, it gets seared into my brain pretty quickly. That is just a thing I learned really early, that it was more important to know what something is called, than to know how it works. Part of that is being a product of the age, where you could just look everything up, and you did not have to remember it all.
(00:50:49):
But I think chaining that. So when you do a search and you find something that looks like it might be the thing you are looking for, doing the search again with the keyword. So it is like, "How do I move data around in Excel?" And you get a couple things, and it is like "pivot tables," "tables," "Power Query." Then do some searches on those things.
(00:51:10):
Usually I am looking for something specific, so I am not sure my advice is as general. Or watch YouTube videos, but I do find that a little tedious sometimes, if it is not quite what you are looking for. But sometimes that is the only place where someone has documented how something works.
(00:51:32):
I came across this with Data Streamer actually, where the online documentation is- Well, it is technically there. It leaves something to be desired.
EW (00:51:45):
<laugh> Anything that ends in "streamer" is going to have terrible documentation. GStreamer. What is Data Streamer, before I slag them?
PG (00:51:53):
That is the serial- That is the first party Microsoft plugin for Excel 365, that lets you connect to serial ports, and stream data back and forth from a serial port. It took watching somebody's video of them using it with an Arduino, to figure out how to use it.
(00:52:11):
But there are some really interesting ones out there. Like, somebody made a video where they controlled a robot from Excel, entirely with Data Streamer, which is pretty mind blowing. Because they were just sending commands to a microcontroller that controlled servos.
CW (00:52:29):
I tend to think of Excel as somewhat static. You bring in more information as chunks, and you work with it.
PG (00:52:37):
Oh! No! Excel is alive!
CW (00:52:37):
But the idea of having data come in and out, and continuously- I know people have ported "Doom" to it or whatever, but that is a joke.
PG (00:52:46):
Oh! Yeah, "Doom" can run on Jumperless too, by the way.
CW (00:52:48):
I <laugh> saw that.
PG (00:52:49):
<laugh>
CW (00:52:49):
I was not going to say anything, but I saw that. Somebody- Well, I think maybe the original developer, had ported a bunch of graphical things to the LEDs. But, yeah but. So it is weird to shift your mindset toward this being a- I do not know. Some people use it like a programming language, which programming languages are dynamic, and they work on data that is continuously changing.
(00:53:13):
But Excel just for me is it has its roots in actual spreadsheets on a table, that people wrote numbers in the cells, and that was static. So it is a mindset shift for me to be like, "Okay, this is a dynamic thing, that can operate on continuously changing data, and have inputs and outputs and such."
PG (00:53:34):
Excel has nine different programming languages in it.
CW (00:53:37):
Is that good? Is that a good idea?
EW (00:53:38):
<laugh>
PG (00:53:40):
It is more like an IDE, than it is like a spreadsheet on a table. I get the history from that. I found learning about that part really fascinating. That that used to be a thing. That is where the term "spreadsheets" comes from. You would spread out this grid on a table and write numbers in them. It is just mind blowing that that is all automated now. But. Yeah.
(00:54:08):
I would say, "Do not use all nine." <laugh>
EW (00:54:10):
<laugh> Challenge accepted.
PG (00:54:17):
No, seriously, do not use all nine. There are some that-
CW (00:54:20):
Is one of them Microsoft BASIC? Did they shove that in there? I guess Visual Basic, the modern one.
EW (00:54:26):
Yes. Yes.
PG (00:54:27):
There is Visual Basic-
EW (00:54:27):
That is like the big one.
CW (00:54:28):
Oh. All right. Wow. <laugh>
PG (00:54:31):
Yeah. That is the big one. That is also the worst one.
EW (00:54:34):
<laugh>
PG (00:54:34):
It might only be the second or third worst one. I have used it. There was one project where I think I used four of the languages in Excel, in the same project. That was- No, five. It was five.
EW (00:54:51):
Why? Why Peter? Why? Is this a cry for help? You can tell us.
PG (00:54:55):
No. This was to do- It is called an "ETL pipeline." Extraction, transformation and loading. It is where you take data out of one system, do something to it, and load it up to another system. In this particular case, we did not have a lot of tools to do this. Excel was available, and it was capable.
(00:55:17):
Normally the way you do this is with a programming language, or some kind of data language, because you are working with databases or systems, and they have APIs. This system did not have an API. The only way to get data into this system was to write a batch script. Not "bash," "batch."
CW (00:55:37):
Noooo.
EW (00:55:37):
<laugh>
PG (00:55:38):
And send it a CSV file. It would send you back a file, with the success and failure of the various records you just tried to load. Yeah.
EW (00:55:51):
No! No. I am sorry. That is just wrong.
PG (00:55:56):
Well. So given that that was the limitation on the system, it was hard to limbo under that bar with Excel. Excel was going to outperform that, if built correctly. So that was why it was like, "Okay. That is fine. Excel is not the bottleneck in this project."
EW (00:56:19):
Yeah. It is like you just give it punch cards, it gives you punch cards back.
PG (00:56:24):
Yeah, pretty much! Yeah. That is a little bit what it felt like. I was just like, "Well, <laugh> at least with Excel, you can have discussions with the client about, 'I want to map this source column to this field in the destination, and I want to perform X, Y, and Z transformations.'"
(00:56:43):
Instead of just making that documentation, like it is in most projects, you can actually ingest it and process it. It works more like a config file, than standalone documentation. That way your documentation is always up to date, and it is human readable. But it actually drives the process of transformation.
EW (00:57:00):
Did you just say, "Excel is human readable"? I just want to check.
CW (00:57:05):
Compared to batch files.
EW (00:57:06):
Compared to batch files. <laugh>
PG (00:57:07):
Well. Compared to like- Hate to pick on some of these things, like YAML, JSON, some other thing you might use to do a config file. They are readable to programmers.
(00:57:20):
I am talking about to a client, who knows their data very well, and can read a table of data. But is not going to understand why there are squiggly curly braces and colons, and the significance of something being indented.
EW (00:57:39):
Worst choice, Python. Worst choice.
PG (00:57:44):
Yeah. Use a config file if you are working with programmers. If you are not working with programmers, use Excel and read it in. And just lock it down, so you cannot put "potato" in a number field, because you will have a bad day. <laugh> And so will the potato.
EW (00:57:59):
So Data Streamer is a Microsoft thing. Datastreamer.io is some random thing that is not related. So if you search for "Data Streamer," include "Excel" in your search. I put the link I had, so it will go in the show notes.
PG (00:58:16):
I should warn people, if you are going to play with Data Streamer, it is cool. But one, you have to have the right version of Excel. If you go on the options menu and enable the special plugin. Find a YouTube video for that.
(00:58:28):
It has some really quirky limitations. It can only send data at a maximum rate of one message every ten milliseconds, and can only receive data at a rate of one message every ten milliseconds. That is not the default, that is the maximum. So you have to go change the defaults.
(00:58:50):
There- Oh gosh. What else does it do? It injects-
EW (00:58:51):
Ten milliseconds?
(00:58:53):
Yeahh. Yeahh. It is good for command line, bad for data streaming. Ironically. <laugh> Let us see. It injects commas into everything you send, because you put your messages in cells and the first ten cells end up being comma delimited. So it will send nine commas, no matter what you do. So your system had better be willing to speak Excel's flavor of text.
(00:59:23):
Then when you send data back, it goes, "Oh, I see a comma. That must mean you want it in a different cell." So beware, every comma you send will force your data into different cells when it gets brought back.
(00:59:34):
So much for nicely formatted 10,000.
PG (00:59:40):
<laugh> Yeah, exactly.
EW (00:59:40):
Ten and zero.
PG (00:59:42):
Oh gosh, there is one- Oh. This is the thing that made it so I could not actually finish the Excel user interface for Teardown. It does not assert- I think it is DTR? DTS line? There is some line that used to be part of the communication protocol for "data terminal ready," part of serial communication.
(01:00:02):
Apparently USB serial has virtual lines, which applications can say, "This line is high," or, "This line is low," and it is all virtual. And guess what Excel does not do? It just does not assert the data terminal ready line. So if you have a microcontroller that conforms to protocol and says, "Well, you said you were not ready, so I just dumped all my data in a black hole. Oh well, sorry. Oh, you are still not ready? Nope. Well, it is all going in black hole."
CW (01:00:36):
I have not used flow control in a while on a micro.
PG (01:00:39):
Yeah. So some of them ignore it. And there are some USB stacks that have an override parameter. So you can say, "If you are connected over USB, ignore the data terminal ready line." Unfortunately, TinyUSB is not one of these stacks.
CW (01:00:53):
Really? Okay.
PG (01:00:55):
Yeah. There is an open ticket where people have requested this. Where they are like, "Hey, I am communicating with a third party app. I do not control it. It does not assert this line. Can we please have a way to override and ignore it?"
(01:01:07):
The gist of the response was along the lines of, "Well, that does not conform to protocol. So we do not want to put that in our stack." And it was like, "Well. Okay." Then-
EW (01:01:17):
But turning off hardware flow control should be- I guess. Yeah, no, that still is part of their stack. If it is wired, it should be used. I can see both sides.
PG (01:01:28):
Yeah. That is how I was too, so I am not holding out hope that that will change. I am just like, "Okay. I need to go find a different USB serial stack for my particular brand of crazy, to connect Excel to hardware."
EW (01:01:45):
Switching subjects. You have puppy buttons, which I am familiar with, from "Misocomehere."
PG (01:01:51):
Oh, yeah.
CW (01:01:53):
I think we talked about this last time.
EW (01:01:55):
Oh yeah, I think we did.
PG (01:01:56):
Briefly. That was when I was still planning them, I think.
CW (01:01:58):
Oh. Okay.
PG (01:02:00):
So, yes. They have been built. They are cool. I gave a talk about them at last year's Teardown, so 2024. Sorry, you were going to ask about them. I should wait for the question.
EW (01:02:14):
No, no, that was the question. Puppy buttons, huh?
PG (01:02:19):
Right. So for those who are not familiar with what these are, these are oversized novelty buttons, like the kind you would see that are like the Easy Button, or-
CW (01:02:29):
Whack-a-mole.
PG (01:02:30):
Panic Button.
CW (01:02:30):
Oh. No. Those are moles.
PG (01:02:31):
Yeah. Whack-a-mole style buttons. I 3D printed mine and mounted them in a board, and hooked up an ancient Raspberry Pi as the brain. Basically what it does, is when a button is pressed, it plays- You can play any sound, but I have it play recordings of me saying words that my dog already knows. So "outside," "potty," "water," "play."
(01:02:53):
You can train the dog to communicate their needs with these buttons. Now they are not going to write a sonnet. There are people online who show that these dogs seemingly communicate some pretty sophisticated things. Maybe there is a dog out there who does that. Maybe a stopped clock is write twice a day.
(01:03:19):
I know our dog is not going to be writing sonnets anytime soon. But it was really helpful, because at least our first dog only had one means of communicating. I do not know why this was the only way she did things, but she would just whine when she wanted something.
(01:03:33):
It did not matter if it was "potty," or "play," or "I am hungry," or "The cats are harassing me." It was just <whine>. That got kind of old when we kept taking her out to potty, and she looked at us like we were idiots. So we tried to come up with another way that she could communicate.
(01:03:50):
They say you should do things like bell training for "outside to potty." We did not have any bells, so this was the next best thing. It actually works pretty well. She can be a brat with the buttons. Like in the evening when she wants people to play with her, she will just keep mashing buttons until she gets some attention. Which that is-
EW (01:04:16):
You gave her a way to talk to you. You do not like what she says. It is not her fault.
CW (01:04:20):
<laugh>
PG (01:04:22):
<laugh> Yes. That is kind of how I see it. It is useful, because there are times where just the distinction between her two favorite words of "potty" and "play" is tremendous.
(01:04:35):
You will also find a lot of information online that say you should start with "treat." I really cannot recommend that, because how do you ever take that button away? Yeah, you have taught them that they can push a button and get a treat, and that they can push buttons. But yeah. That is a trap.
EW (01:04:59):
Well, some people do take buttons- Put buttons on and off, depending on...
CW (01:05:03):
Context.
PG (01:05:06):
Yeah. We had to do that. We were moving house and our old house had stairs. One of her favorite games was to run up and down the stairs. So we added an "upstairs" and a "downstairs" button. The apartment we are in now does not have stairs, so we just removed those buttons. Because they do not really have a meaning that we could use here, and we do not want her learning that they mean something else.
(01:05:26):
Although we are not sure she ever really got the concept of an area. She only ever understood "upstairs" and "downstairs" as verbs, not as places. So that was an interesting learning for our part, was sometimes you have to keep things simple for the pets.
EW (01:05:49):
"Upstairs" and "downstairs" as verbs? Like "Go there"?
PG (01:05:52):
Like, if you are at the bottom of the stairs and you say, "Upstairs," she would sprint up the stairs delighted. Or if you are at the top of the stairs and are going to go downstairs and let her out, you could say, "Downstairs," and she would run down the stairs.
(01:06:02):
But if you are upstairs where the buttons are, she would sit there and press "upstairs" and we are like, "We are upstairs, Annabel. What do you want?" What she wanted, was you to go to the bottom of the stairs, and tell her to run upstairs.
EW (01:06:19):
Okay. That is sort of logical.
PG (01:06:22):
It is. She understood the meaning of the word. It is just she understood a different meaning, than the one we had intended.
EW (01:06:31):
I recently read a book. I am not even going to remember the name, because it was not that good. About learning to communicate with whales, which you would think, "Oh my God. That sounds like a great book." Yeah, I thought so too.
(01:06:42):
But it was clearly started the book as a, "Okay. This is what we know about whales. This is how they communicate. Some really interesting facts. And by the time I finish writing this, we will have solved whale communication using AI. Here is some information about AI, with semantic definitions."
(01:07:00):
And, "Oh my God! The book is due. I accomplished nothing. Just publish it." That last chapter was terrible. Because the problem is that as we translate human languages, we get semantic webs, which I did not really understand what they are. Do you know what they are?
PG (01:07:18):
No. Tell me about this.
EW (01:07:19):
Okay. So in English there is a word for "man" and "woman," and there is a word for "mother" and "father," and "king" and "queen."
PG (01:07:31):
Oh! Is this the word "Word2vec"? Sorry. It is like you can take "king" and subtract the associated- Like, it is translated to a vector numerically, and you subtract the associated vector for "man," and add the vector for "woman," and you get something that should be pretty close to the vector ascribed to "queen." In theory. If you are doing your semantic webs right.
EW (01:07:56):
Exactly. You do not need to know- You do not need to understand the language, to translate it. Because once you have filled in this idea of humans eat fruits, vegetables, meat, you do not have to then try to find- I mean, yes, we eat salt as a mineral, but that is like the only one.
(01:08:17):
So each language will have these definitions, and they may not be precise, but they are close. As you said, you subtract "male" from "ruler," and instead of "king" you get- And then you add a "woman," and you get "queen."
(01:08:32):
It is a matter of subtracting vectors and it is all math, and it is really cool! The problem with trying to do this for whales, or dogs, is that we do not share a semantic web with them. We do not know where they go for half the year. We do not know what their views of the world are.
(01:08:52):
Annabel wanted to run upstairs. That was what the "upstairs" button meant. "Run upstairs."
PG (01:08:59):
Yeah.
EW (01:09:02):
And that was not your context for it. I guess I have no idea where I was going with this.
CW (01:09:09):
<laugh>
EW (01:09:10):
Semantic webs are cool!
PG (01:09:12):
Bootstrapping to another species.
CW (01:09:15):
No. There are just some extra steps there. Yeah <laugh>.
PG (01:09:18):
Yeah. It is not enough to just be able- It almost seems like the hieroglyphics problem that the Rosetta Stone was useful for. It is like you have to find that common ground of things you do understand, and even then it is not obvious.
CW (01:09:36):
Well. It is a different mind, with perhaps no or a different theory of mind. It is just not communicating with other- There is no dual lingo for dogs. Yet.
PG (01:09:47):
<laugh>
EW (01:09:53):
We definitely can ascribe and be certain of some of their motivations. "Treats, pets, potty." But-
CW (01:10:02):
<laugh> "Evil other dogs."
EW (01:10:03):
Every time- <laugh> "Evil other dogs." Yes. JoJo has a serious problem with "evil other dogs." But whenever I try to give her a dollar to do something, she does not care.
CW (01:10:12):
<laugh> Oh. Really?
PG (01:10:12):
<laugh>
CW (01:10:13):
The economics of dogs. That is a different topic. Yes. And she does not know how to use Excel at all.
PG (01:10:24):
You know, there was a guy who trained his dog to play a video game. He basically built two oversized buttons, and did one of the Games Done Quick. It was the first game to be beaten by a dog or something.
(01:10:36):
Because basically he could cue the dog to push either button, and it was a game that only required pushing these two buttons. So he was able to get his dog to beat the whole video game.
EW (01:10:48):
But the dog did not do it because it wanted to beat the video game. It did it-
PG (01:10:53):
It did it because it was told to push the left button, or the right button, or both.
EW (01:10:58):
For the treats and for pleasing its human, not for its own amusement. I do not know. If we gave JoJo buttons, she would push "pet me" 5,000 times a day.
PG (01:11:13):
Well. I think if people invested as much money in designing a video game for a dog, as they do in designing video games for humans, we might get a different result on that front.
CW (01:11:26):
<laugh>
EW (01:11:29):
But you would have to figure out their motivations.
PG (01:11:31):
Well yeah. But I think you could reasonably design an enticing visual and auditory and potentially smell stimulus for a dog. With simple controls that the dog could learn to interact with. That would do something that the dog would find interesting and worthwhile and engaging in.
EW (01:11:55):
Oh, that is simple. There is a German Shepherd Lab mix down the street. Its name is Bixby. We could just put it on a screen, and JoJo would stare at it in adoration. Bixby does not care about JoJo at all. But JoJo loves Bixby. Yeah. So if we just want her to sit and stare, and not do anything or bug us for pets, this is what we should do. We should just-
CW (01:12:18):
Why do we not just print a picture? A poster.
EW (01:12:21):
Yeah. That is great. My office will look like a teenage girl's room, except instead of hunky guys, I will have hunky dogs.
CW (01:12:28):
<laugh>
EW (01:12:28):
I am sorry. What was this conversation supposed to be about? We did Excel.
CW (01:12:35):
Puppy buttons.
EW (01:12:36):
Puppy buttons. You have a new dog though, right?
PG (01:12:41):
Yes. We just got a new puppy. She is almost 16 weeks now. Golden retriever, so she is also going to be a big dog. She has not started using the buttons yet. We found some bells since then.
(01:12:56):
Puppies, when you get them really young, can only hold their pee for like 45 minutes. So you literally have to take them outside, and then when you get them back in, you set a timer. And if it is 45 minutes, you take them outside again and they have to pee.
(01:13:07):
We have been working on getting her on a schedule, which has been helpful. So we are recording during her biggest nap time, which is tremendously helpful. Very high energy. We will get her to use the buttons.
(01:13:22):
I am a little worried actually, because she has demonstrated that she is a lot smarter than our other dog. So that is going to be interesting to see how that develops. Just some little things with like how she interacts with the cats. Or like how she has escaped her pen multiple times.
(01:13:42):
Or how she has figured out how to signal different things to us, without the puppy buttons, which her sister could not figure out. So she will sit at the door and bark when she needs to go out to pee. Very reasonable. That is what you expect most dogs to do. Not stare at you and whine, which is- It is like, "Oh, that is also what you do when you want me to play. Or when the cat has hidden your toy."
EW (01:14:14):
You are just failing to read Annabel's mind.
PG (01:14:17):
Yes. This is, I think what she believes, is that we are just very bad mind readers. But hopefully the new puppy will- I do not know. Might use more of the buttons, or-
EW (01:14:32):
Might write sonnets.
PG (01:14:34):
<laugh> We will see.
EW (01:14:37):
"Grass. Grass. Play, grass, pet." I do not know where I was going.
CW (01:14:43):
Maybe start with haiku.
PG (01:14:43):
Haikus. Yeah. <laugh>
EW (01:14:47):
Your day job is a data analyst?
PG (01:14:51):
It is consulting. But my specialty is data and analytics. Usually we go to different clients and help them with their data stack, whatever they are trying to do. Sometimes that is collecting data, sometimes it is transforming it or visualizing it, or adding AI on top of the data they already have. Sometimes it is all of the above. It really depends.
(01:15:18):
But. Yeah, it is nice to be able to bring that specialty and focus, of- They know their business really, really well, but I am like I see the same kind of data problems over and over. But they are always with new flavors and spins.
(01:15:34):
It is kind of like embedded that way. When it is in a different system, the things that are more important change. Like, is responsiveness and real time logging important? Or is security and reliability important? Or is battery life the most important thing? It is kind of like that with data too. Maybe not battery life.
EW (01:16:00):
You need to optimize for different uses.
PG (01:16:04):
Yeah.
EW (01:16:05):
That part makes a lot of sense.
PG (01:16:07):
But there is still that room for having someone who is specialized in the broad area, and it is just adapted to the particular client needs. I really enjoy it. I really like the variety. I think that bothers some people and I am like, "You are in the wrong profession, if you did not want variety in your job. If you just wanted to do one thing and master it over the course of ten years, then it is not consulting. Because that job is different every single time."
EW (01:16:39):
As a consultant, I do- Yes. It is similar, but never the same.
(01:16:47):
Well, Peter, do you have any thoughts you would like to leave us with?
PG (01:16:52):
I was going to mention the nine languages in Excel before, but that is the only other one I can think of. So I will just say, "Thank you. This has been wonderful."
EW (01:17:01):
Our guest has been Peter Griffin, embedded enthusiast by night, and data analysis consultant by day.
CW (01:17:09):
Thanks Peter.
PG (01:17:09):
Thank you.
EW (01:17:11):
Thank you especially to Peter for filling in at the last moment, our Patreon supporters, and to Christopher for producing and co-hosting. We would also like to shout out to Mouser for sponsoring this show.
(01:17:25):
If you would like to contact us, our email is show at embedded.fm, or you can hit the contact link on embedded.fm, where we will also have links for the show and a transcript in a couple days.
CW (01:17:40):
And subscribe to the newsletter, embedded.fm/subscribe.
EW (01:17:45):
Our quote this week, of course it was Charles Schulz. "All his life he tried to be a good person. Many times, however, he failed. For after all, he was only human. He was not a dog."