Embedded - 362: Permutations of Underscores

Episode Date: February 18, 2021

Chris and Elecia chat about their projects, Python, choosing boards, social media, tshirts, and self care. T Shirts are on sale until the end of February! To decode the titles check out the giant lis...t of all embedded episodes. Our social media empire is growing. Please follow us on any of these sites: Twitter @embeddedfm Instagram @embeddedpodcast Facebook @embeddedfm LinkedIn @Embeddedfm YouTube Embedded Podcast  Patreon Embedded Mailchimp Newsletter (weekly) Embedded.fm 2021 Embedded Online Conference is May 18-19 & 20, 2021 Raspberry Pi Pico Meaning of underscores in Python and Python CTypes

Transcript
Discussion (0)
Starting point is 00:00:00 Welcome to Embedded. I am Alicia White. I'm here with Christopher White. It's just us today, so we have lots of little things to chat about. Hello. I'm awake from my nap, I believe. Unless this is a dream. Could be.
Starting point is 00:00:22 Okay. Is there anything you particularly want to talk about this time? I want to talk about Python and how I'm trying to learn it for real instead of using it as a scripting language. I barely know. No, I don't know. Something we could talk about. I mean, Python's... I use Python as an amateur.
Starting point is 00:00:46 Yeah, yeah, I know. I know that anytime I have a for loop, I'm doing it wrong. But I'll still put in a for loop if I'm lazy and it's not time critical. I mean, for loops are usually okay, but I tend to find myself feeling like I should be doing for x in the collection or for x in range instead of for i equals 0 to 100 and then do stuff with the indexes. But yeah, I'm writing more Python
Starting point is 00:01:13 because one project that you know about, I'm interfacing with hardware and I've got to talk over a CAN bus and stuff. And the reason I'm using Python for this is because the client, as I believe, would not be interested in me throwing a bunch of C or C++ at them and saying, here's your software, and then disappearing a year from now. They know Python. They're familiar with it and comfortable with it.
Starting point is 00:01:37 All their other code is in Python. So that's a perfectly valid reason to use a particular language, is you're familiar with it. And there's no special performance requirements for this. So yeah, I just found myself, okay, I've got to write this script to talk to this device and gather data. And I'm like, well, maybe I should actually architect this code. Not architect, it's a big word. Maybe I should design this code with a little more thought than I usually do when I'm writing a Python script,
Starting point is 00:02:03 which is more like how I wrote code when I was 10 in AppleSoft Basic. You know, it's like, okay, we start here and we finish here and in between stuff happens and I spit stuff out and we're done. And, you know, God help you if you want to maintain this code. So this is a little more complicated where I have to talk to a network and then I have to parse packets and there's various kinds of packets and it's not the sort of thing that really is conducive to choose your own adventure kind of just splat stuff in order and hope for the best coding so i've been trying to pick up some more language features and use it in a more object-oriented way um than i had been so it's kind of interesting i'm learning some things that i don't know if they bug me exactly, but I'm surprised.
Starting point is 00:02:48 You mentioned the underscores. Yeah, that's the one that surprises me. I mean, the class part and the object-oriented, that I'm pretty familiar with. Especially, I use GStreamer, I use Matplotlib and NumPy, and those are all very class-oriented. So when I'm looking at their code, I get used to the class parts. But I didn't even realize that underscore, underscore, something, underscore, underscore, really meant something different. I thought it was just a naming convention.
Starting point is 00:03:18 So there's a whole bunch of... So the one thing I'm having trouble with coming from Swift and C++ is that Python's a little looser because of the way it handles types and things. So some of the things I'm familiar with doing in object-oriented programming, it either does it a different way or just kind of like, well, you don't really need that. What are you doing? But one of the things is, yeah, this underscore business. It's like I was interested in, you know, when you make an object in Python, a class, you have to give it a constructor. And the constructor is always under, under, under, under. And I was like, well, that's kind of weird because it looks like a C, you know, reserved keyword when you're like.
Starting point is 00:03:57 It's kind of ugly. Printing out your, you know, file and line or something in printf when you're writing debugger. It's weird. And so I wondered what that was about and asked people on Twitter and got a lot of good answers. And it turns out if you search for dunders, Python dunders, you get a whole bunch of articles on how the underscores work in Python. But it's not just the surrounding double underscores.
Starting point is 00:04:20 There's every variation you can imagine of underscores before and after a keyword mean different things. So the keyword? Yeah, it's like init. Okay. So like under, under, init, under, under is a reserved keyword for Python. It's special. You can't have this, you can't write that function in general and have it mean something else. It's always a constructor. And there's another one called call and some other stuff like that. You mentioned version. That's another reserved one. So if you want private member functions or properties in a class, the single underscore in the front. So I found that one useful. I was like, oh, good.
Starting point is 00:05:10 I was looking for how to do that. So that's great. And then there's different meanings if you have one after or two after or two in front. Anyway, you can look it up. I did not memorize the entire taxonomy of permutations of underscores that exist in the universe of Python. But that was one of the things I've been learning. So it's an interesting language. I'm having to,
Starting point is 00:05:36 I don't want to go on about Python for hours, but to do the network thing I'm doing, I'm having to do some strange things. So in C, when you get a network packet in, typically you have a struct that maps to the exact bits on that network packet. A lot of people sometimes will do a lot of shifting and masking and stuff and shove it into a struct later, but I find it in almost all networking code I've written or read professionally, do a lot of shifting and masking and stuff and, and, and shove it into a struct later. But, uh, I find it in almost all networking code I've written or read professionally.
Starting point is 00:06:09 It's better done as a struct with bit fields. Uh, and you know, byte order gets involved in that, but you read from the network device, you, you splat your buffer into the struct that fits it. And then you can just read out your fields.
Starting point is 00:06:26 And you don't have to stand on your head and do a bunch of shifting and masking. I'm trying to figure out how to do that in Python, because I got this thing coming in from CAN. And it's even worse than a normal network packet. Don't get me started. But because they've split fields where some of the high bits are completely separated from some of the low bits of the same field by other stuff. So it's really fun. You can't even define a struct perfectly. But I wanted that kind of behavior where I have a struct and I splat stuff into it.
Starting point is 00:06:52 And before you say struct, which is a module in Python which is really cool, where you give it a format string and it knows how to unpack and pack data in a buffer, that doesn't work for sub-byte-wide things. So if I have two bits of this and then six bits of this in a byte, I can't do that. Yes, there is another module, but I didn't want to add a dependency. But there's this thing called C-types, which it's part of Python. It's not something you have to pip install.
Starting point is 00:07:24 But it's very disturbing because i feel like it breaks python but i ended up using it because it's really nice you can define a c style struct and pack and unpack into it um you could also use pointers but i didn't get into that but um so c types was kind of cool because you can create a class that derives from a super class called structure. And then you lay out your struct much like you do in C, although it's more like a table in Python. And then when you want to stick stuff into there, you just read it out or you can stick it from a buffer. Like if you have memory buffer, you stick it into
Starting point is 00:08:05 the structure and then so what i'm doing is i have one of those and then i'm created i created an intermediary function that takes that and puts it into a more nice python class that somebody could use so i'm hoping to isolate that from the client so yes there's this weird c type thing in here but you don't need to worry about that when you you use any of this, you'll just see the API, which gives you the fields you want. It's a cool language. I like Python a lot. It's just I have prejudices and
Starting point is 00:08:34 biases from other languages that I need to figure out what the similar things are in Python or why the things don't exist and what the motivation is. This whole Dunders thing is really incomprehensible to me. Python has made it so that you can do dir on some structure and it tells you what is in there and it's got these keywords that help you.
Starting point is 00:09:02 And then it has these other keywords that are completely hidden. And you can't even search for them. I mean, the word dunder, I'd never heard it before now. And how was I supposed to ever know about that? Even now searching for it, I don't end up at python.org. I end up at a bunch of other places. Yeah, and I don't know where you'd find it on python.org. I will link
Starting point is 00:09:25 the article somebody sent me in the show notes. I mean, I did find it on Python.org under data model. Data model. Yeah, well, it's some of its internal stuff. So, it's kind of...
Starting point is 00:09:41 But it's just the double ones, and I don't know how to go about finding the single ones, and they have other special things about inheritance. It's just really weird that you'd have a language that tries to be friendly, and then you hide this stuff badly. Yeah, and some of it's just
Starting point is 00:09:58 kind of namespace fix-ups, like single underscore in I don't remember, oh oh no double underscore in the front is tells it to to mangle the keyword differently than it normally would a trailing underscore is if you want to yeah so you can read the article it's interesting and it is useful to know um yeah it's just kind of weird. It feels like a...
Starting point is 00:10:27 No, I feel like a power user. Oh, yeah. Yeah, wow. Yeah. When I start actually using lambdas properly, I may become a power user. Okay, so I do have a list of things people have asked us about. Shall we start on that? Or do you have any other...
Starting point is 00:10:47 Do you want to talk about CAN? Because I know you have some strong opinions. No, I don't have much to say about CAN. I've never used it before. This is my first experience with it. The Linux tools are much better than I expected. Oh, yeah. Linux tools are great.
Starting point is 00:11:00 So there's a lot of stuff that just seems to be part of Linux now where there's utilities, canDump and canSend, and you can just, it's like TCP dump in a lot of ways. It'll dump everything that's coming out and you can filter stuff. Or you can
Starting point is 00:11:18 construct a byte string right on the command line, spit it out, can. And then the drivers seem pretty good, too. I'm using socket can, which turns it into a basic socket interface. Once you get that set up, receive from works fine, send works fine, and you can set up filters that are pretty sophisticated for which can message IDs you care about and don't care about. And you spit those into the kernel and the socket options.
Starting point is 00:11:47 So that part's been pretty easy. It's the way that CAN stuff tends to be documented that drives me nuts so far. Like, I come from a long networking background, so I'm used to RFCs and things where things, you know, a message structure is extremely well-defined. You can almost take it straight from the document and splat it into a C structure, and, you know, a message structure is extremely well-defined. You can almost take it straight from the document and splat it into a C structure and, you know, it all makes sense. With this, it's, so I have one document from the device manufacturer
Starting point is 00:12:14 and it's got all the messages laid out. It's got them all described in a very big table. It's undifferentiated. It's hundreds of pages long and only has the table header at the start of the table. It's undifferentiated. It's hundreds of pages long and only has a table header at the start of the table. So once you're 30 pages into the table, you don't know what the columns mean anymore, but it's not in order. So if you have a particular message you want, all of its fields are there in contiguous, but they're not in any particular order. It doesn't tell you what order the bits
Starting point is 00:12:46 are. So, for example, I'm using a radar, and for the radar track message, it has a bunch of stuff. It has the range of the target, the acceleration of the target, the azimuth of the target, the usual stuff you'd expect from something. You know, where is it coming from? How fast is it going? That kind of thing. And those, you know, some kind of thing and those you know some of those are eight bits some of those are three bits some of those are 15 bits and on the wire they're all kind of scooched together in a particular order but in the document it's like yeah here's the stuff these are in the packet these are how wide they are um but this is not the order necessarily that they come in. If you'd like to see the order, there's a database file included with the documentation called a, I think it's a DBC
Starting point is 00:13:34 file, something like that. And I've never heard of that format before. But you can open it with a special free utility, some from some random company on Windows only. And then you open that database file, and then you can mouse around and convince it to give you a graphical representation of the bits in each of the messages. So I have this collection of JPEGs that I've been creating in a Windows VM and copying them over to my Mac. Yeah, so that's one thing I haven't really enjoyed. But other than that, it seems like a networking protocol
Starting point is 00:14:10 and it's fairly friendly to work with. Yeah, I assume that the documentation fallops are due to it being developed by some industry consortiums or something. Seems likely. But you've used it, right? Yes, but I've used it to put messages over and not looked at the actual messages. And then I've used it for the radar you've used, but all I had to do is make sure it turned on. Yeah.
Starting point is 00:14:40 So I didn't end up parsing much on that. Yeah. And yeah. And they do some weird stuff. Like the radar has multiple tracks. Instead of having a track ID in the track message, they just made 64 or whatever it is, different track messages. So they have the same contents.
Starting point is 00:15:00 They just have a different message ID. So if you want to filter on track messages, you have to add 64 filters to the kernel to see them all. Oh, that's so sad. And because they're not, you know, they're not, like, network
Starting point is 00:15:15 addresses, you can't mask them. So, yeah, it's just, computers are dumb, and I don't like them, but I have to work with them. So at least for now. I've been using robot operating system a lot, which I mean, it's okay. I'm stuck on kinetic, which is a particular version that's a little old.
Starting point is 00:15:41 And it only runs on Ubuntu 16, which is a little old. And it's just, I'm shaking my head because, I mean, the client needs Kinetic because that's what everything else they do. And I'm just looking at ROS 2 and going, someday, someday I'll get to play with that. But it's, I mean, the thing I'm using it for right now or that I've been working on this week has been a visualization tool, which is the thing that Ross does well. All the message passing and the subscribe and publish sorts of models means that I can put another widget on the network and have it just be my display for what's going
Starting point is 00:16:26 on with everybody. Yeah. So that's been really cool. The other project I'm working on is Bluetooth and Zigbee and a TI chip. And, you know, it's a lot. Do you get to do real embedded and the weird embedded that i've been doing yeah i mean with the rviz and and most of that project is in python and there's a lot of machine learning that goes with it and i really do have a good time with all that especially as we're entering the
Starting point is 00:17:00 last phase of the project and we've completed most of our milestones, I have a freer range for just trying random stuff. And let's just say my brain gives me lots of random stuff to try. Okay, questions? No, go ahead, go ahead. I mean... Oh, yeah, yeah. I have no further questions. Okay. So, this one came kind of weirdly. We were talking to a friend who said that before and maybe after meetings,
Starting point is 00:17:49 they have these questions that appear on their chat system so that people have this feeling of going in and out of meetings like we used to, you know, the chat part, which is a good part of meetings that isn't always apparent that it's a good part because it helps you to know other people as people and not just as engineers. And so one of the questions that was proposed or written was, what kinds of self-care are you practicing? I thought that was just such a strange question. Why? I guess, I guess what is self-care? Self-care is things that you do that aren't work to try to make sure that you're not burning out.
Starting point is 00:18:35 Or otherwise turning into a psychological problem. Or a physical problem. There's self-care and there's self-soothing. And you think about it like a kid. Yeah. As a parent, you would care for the kid. You'd make sure they were fed. You would make sure they went to bed on time, they were healthy, they brushed their teeth, all these things that just make sure that for the long term, they're going to be healthy and happy.
Starting point is 00:19:01 Right. And then you have the things you do when you just want them to go to sleep or stop screaming or stop crying. And those are soothing activities. Those are just whatever works. Yeah, I don't think that's what this is meant by self-care. But- I mean, there's some overlap,
Starting point is 00:19:19 but I think it's more making sure that, I mean, taking the current circumstances aside, it's still something that's important. So exercise is good self-care, making sure you're exercising, make sure you're not sitting at your desk for 10 hours a day and not doing anything else. Not being too hard on yourself if you can't work for, can't find yourself working on, you know, there's various aspects of it. I think most of it comes down to doing things that keep your mental health and physical health up when you're enduring stressful circumstances. But it isn't always fun stuff.
Starting point is 00:20:00 Not necessarily, yeah. Because it often has this aspect of long-termness to it. Like, I don't necessarily want to go exercise, but I know I should because I will feel better tomorrow if I do exercise. If I don't exercise tomorrow, I'll be probably sad and whatever my brain does when it's unhappy. But I think there's other, I mean, true, yes, and and flossing, you know, lots of things that aren't great. But taking a nap if you need to, I think that's self-care, as long as you're not deciding that you're going to nap for a week. You know, if your body's telling you, I need to nap, and you're fighting it and trying to work through it,
Starting point is 00:20:42 sometimes it's better to take a 15-minute nap or a 30-minute nap or whatever than to continue to try to push through and then be unhappy. Same thing with like, I blanked out because I haven't been practicing self-care. Well, that's okay because I actually want to talk more about the nap and you said if you do it too much. Yeah, yeah. So one thing that might be self-care for some people is to take some quiet time and and read a novel yeah yeah but the way i do it it's more like an addiction and i probably need an intervention sometimes but i mean i think it's fine most of the time i think you're one aspect of self-care is is having some having that perspective to know when what you're doing is interfering with the rest of what you want to accomplish.
Starting point is 00:21:33 If something's interfering, I mean, this is always a thing in mental health, right? And it's a question that gets asked a lot if you're in therapy or something. Like, oh, this bothers me. Or I feel like I'm doing this behavior too much, or is this right? And sometimes the response will be, well, is that interfering with your life? Is that keeping you from doing the things you want to do? And if it isn't, then ask yourself if you really need to change it or need to feel bad about it. It's a good perspective.
Starting point is 00:22:08 So, I mean, I would say for you, it's like, yeah, okay, you do tend to read a lot, but, you know, you don't do other things that other people do. You don't sit and play video games a lot or, you know, whatever different activities that people fill in for leisure time, and you're getting your work done. So if you weren't getting your work done, that would be a different thing, right? Today I didn't get my work done because my book was very good. Yeah, but you should take an hour.
Starting point is 00:22:39 Take an average longer than a day, right? Because there's plenty of days where people... Many, many days when I used to work in an office where I got nothing done and I was there sitting at my computer, right? And we all know that. And it wasn't because I was reading a novel. It would have been better had I been able to read a novel because I might have taken two hours to take a break from work and then been more productive. But I couldn't because I was at a sit-down job. So another thing about self-care is that it's often easier to think about it as things you would do for someone else. I mean, there's the parent model, but also the friend. tell you it is better for you to go take a shower or to do that last chore that probably doesn't actually need to be done for three days and is totally stressing you out. Yeah. A good friend would probably say,
Starting point is 00:23:33 look, you don't have to do it all right now. And so that's part of the care for me. And I have to be careful with the self-soothing because I'm... Well, we all do. I mean, we all have behaviors that... It's easy to go from care to soothing pretty rapidly. But there are things, too, that are neither, right? They're kind of Twitter.
Starting point is 00:23:59 Spending the day reading Twitter, that is probably neither self-care nor soothing. It might feel like it. It's kind of soothing. It's kind of soothing, but it's soothing in a... It's just dopamine hits. Yeah, it's probably not soothing long-term. It doesn't make you feel better. Well, I mean, even with crying kids, your goal is not long-term. It's just...
Starting point is 00:24:18 Yeah, but that's why I think that's not a great analogy, because... Well, the other analogy I had was like programs. Self-care is where you design, where you think about the API and how the program is supposed to work and make some unit tests. And soothing is typing at it, praying that this time the bug will go away. Okay. Or monkey typing where you're just, okay, I'll just try this. I'll just try this. I'll just try this. And you know deep down that even if it works, you didn't get there a good way. Yeah. Yeah. I just don't want to tar things that are generally helpful as just soothing. Well, I mean, soothing's not bad.
Starting point is 00:25:05 Sometimes you just need to turn off the sympathetic nervous system. Sometimes you just need the kid to go to sleep, and that's okay. Okay, if we're talking, if your sympathetic nervous system is your kid, then yes, sometimes you just need it to go to sleep, whether that's meditation or a nap or something where you're not constantly activating your stress response. Anyway, I'm not a psychologist, psychiatrist. Well, and weirdly, before the pandemic started, we started a book club, which was supposed to be...
Starting point is 00:25:43 About books? About books. And it has turned into a weekly Zoom call with friends. And I think it's more important to all of us than we had ever imagined. And the book we're reading now is ridiculous. Is it even really a book? It isn't. It's more of a...
Starting point is 00:26:06 But I mean, we finished the poetry. So, you know, it's not like technical management book, which was, I thought, what we were starting. And that counts as self-care. And it's something that I don't always want to do, but I almost always feel better having done it. Yeah, yeah. Okay, so the next question, and this is another one of those chat at the beginning of a meeting questions is what are you hopeful in the next few years?
Starting point is 00:26:35 Hope. I'm sorry. What are you hopeful for in the next few years? I'd like to get through the next few months. I don't, I don't know. Yeah. I'm probably a little too damaged to answer that question right now.
Starting point is 00:26:50 I could come up with something probably, but there's nothing off the top of my head. That's kind of sad, although same. I mean, there's things I would like to accomplish in the abstract. There's always music to do. But a lot of things I would like to accomplish in the abstract. There's always music to do. But a lot of the things, a lot of things I want to hope, a lot of things I'm hopeful for are more near term than the next few years.
Starting point is 00:27:12 So I'm thinking past, like I said, the next few months is hard. Yeah. So, I mean, there's some obvious things that I'm hopeful for in the next few months. But beyond that, in the next few years, I mean, I'd like a few years of kind of normal quiet if that's in the cards that's what I'd be hopeful for there's a decent chance we'll get a roaring 20s out of this as people get so excited to see each other again
Starting point is 00:27:39 well I don't really like the flapper dresses that much I don't think I would look good in them okay so moving on. This one's a listener email. And it says, my name is Yash S. V. And I'm from India. I listen to Embedded FM podcast and it's entertaining as well as informative. That's awesome.
Starting point is 00:28:01 We like to hear that. Yeshevsi wonders if we can suggest solid certifications that would be nice to have in the embedded slash firmware field. Do you have any certifications? No. Yeah, me neither. The hilarious thing is Cisco had certifications. Yeah, they were really big on certifications. And nobody, I don't think anybody in the engineering team had any from Cisco. So all of the software running the routers is designed, all the routing protocols are designed and implemented by people who, as far as I knew, did not have certifications from Cisco.
Starting point is 00:28:39 A lot of certifications tend to be, as far as I know, maybe I'm wrong, tend to be like operator certifications. So like Microsoft Certified Engineer and the CCIE was the Cisco one, Cisco Certified Internet Engineer. They were all about people who use the products to implement stuff. So this is a certification that says you know how to use a Cisco router and put it into a network, and you know how routing protocols work, but it's not about being an implementer. Same thing with, I think, Microsoft. It was about how to set up IT stuff. I could be totally wrong, but that was my impression. I think the certifications have grown since then. Have they?
Starting point is 00:29:24 Yes. I mean, I know you can get Coursera certifications and that sort of thing and developer certificates. TensorFlow has one. I think AWS has several. Then I don't know what I'm talking about.
Starting point is 00:29:40 And it's about learning to use the tools and making sure that you pass the exam that says you know how to do that. At the same time, I've not worked with a lot of people who either put certifications on their resumes or said anything about them. So I don't know. It's probably not a bad thing. Yeah. Is it a good way to learn versus taking courses and well there was an ml unembedded coursera course and i can take it for
Starting point is 00:30:16 free or i can pay 50 or 80 dollars and get a certificate if I finish. What does the certificate say? That I took this class. Oh, that's different from a certification. So I'm not sure what we're talking about. Well, I mean, either one, really. Certification, like the TensorFlow is a certification you have to pass an exam. Okay. Yeah, that's what I think of as a certification.
Starting point is 00:30:39 You have a standard exam that they give and everybody takes it. That makes sense. Yeah, I don't know. So, I'm sorry we are the wrong people to ask. And if anybody else out there has an answer, we will... Yeah, and if you have ones that you have or you like or you thought were worthwhile getting or that you've seen people getting positive benefit from. Yeah. I would be interested in knowing.
Starting point is 00:31:09 Okay. So let's see. Oh, oh, this is important. Our media empire is expanding. We have some help and we are on LinkedIn as Embedded FM. We're on Facebook. We're on Instagram. We're on Twitter.
Starting point is 00:31:30 We're on YouTube. We have a MailChimp newsletter. Anything you want, I think, I hope. Maybe we will end up on Medium, too. And we're trying... No, we're not on MySpace and we're not on Google Plus, even though it tried to make me add a little icon to our website that said we were on Google Plus. It still had that? I know.
Starting point is 00:31:54 That's pretty funny. We're trying to play in these areas in the ways that they are supposed to be played in. For example, I was yelled at for putting links in our Instagram. So no more of that. And LinkedIn will try to be a little bit more professional. Instagram may be silly. Twitter will be random. So YouTube will still just be the audio.
Starting point is 00:32:21 So I don't expect we'll have videos. Nicole's just right. Oh, right. She did ask us for a video, didn't she? Yeah. Well, we'll do something there. Yeah. We're just trying to reach people differently. See how it goes.
Starting point is 00:32:35 We appreciate it if you follow us. We appreciate it if you retweet, make your story like our Facebook. I don't know. I won't know. I won't be going on Facebook, so that's going to be its own little thing. Yeah, I fear Facebook will be the lonely one.
Starting point is 00:32:58 Yeah, and we've been thinking about other ideas for other things to do. Should I mention my other dumb idea? See if people like it? Go ahead. And this is not a guarantee that we're going to do this. Really not a guarantee we're going to do this. And if you like this idea, let us know. If we get a lot of people saying yeah. I was thinking of having a companion podcast.
Starting point is 00:33:19 Because our podcast might get lonely. Yeah. Maybe a pet podcast. It would be short, short form. So 15, no more than 30 minutes, definitely. 15, 30 minutes where people would come on and talk about their projects. And that would be it. It wouldn't be a long form thing where we, you know, have a long interview with career and stuff.
Starting point is 00:33:41 It would just be project focused. Um, and instead of us going out to find people, we would have people come to us and, you know, find us on one of those 50,000 different social medias that there exists for some reason and say, Hey, I have this project and we'd look at it and maybe invite you on to talk. And, uh, it would be low prep for us, uh, probably lower production value real quick. Uh, maybe weekly on a different day, maybe not. I don't know.
Starting point is 00:34:12 I haven't worked out the details, but sometimes, you know, it's nice to give people another platform to show off what they've done. Um, we have some listenership, so we could bring people to a different audience. And I like hearing about projects.
Starting point is 00:34:28 Yeah, and sometimes it's hard to schedule people for the big podcast when all we want to do is say, hey, so tell me about this. And it wouldn't be video, it would be audio, so that would be a bit of a challenge for some stuff, but probably fine. Anyway, if that seems like a good idea or something you'd listen to or something you'd listen to
Starting point is 00:34:45 or something you'd want to be on, let me know. Cool. I'm hesitant about this, but... Yeah, me too. We'll see. Let's see. Oh, back to the media empire.
Starting point is 00:35:00 Sorry, I should have brought this up. One of the reasons we're trying to kick this off in February is so that we can make sure to tell all of the outlets that we have the t-shirt. So we don't get the dozen people afterwards saying, hey, your t-shirts aren't available anymore. I missed it. Yeah. After we thought we shouted from the hills. Well, it's hard to shout from the hills when you're just starting out on some of these social media platforms. But if you want a t-shirt, you only have until the end of February. After that, they may never come back or maybe we'll do another one when I finally get spilled coffee on all of mine.
Starting point is 00:35:40 T-shirts, get them. Yes. I really like the design. It's a Rube Goldberg machine with many of our past show titles as part of it. There's chickens in helmets. There's a self-driving arm. There's a monkey head in a heart for I love my monkey head. And there's a unicorn sticking its horn in a light socket for Sunshine Jones's What the Hell's Wrong with Unicorns. There's just a lot of things that made me giggle, including the Tamagotchi on a potty, which was in honor of the potty trainer Tan Magachi episode. So I hope you like that. We do have a big list of titles, which I will include in the show notes.
Starting point is 00:36:36 If you want to go try to figure out what's what. You have nine days if you want a shirt. But you have forever to figure out the puzzle. Yes, but you have nine days to buy a shirt. Yes, nine days to buy a shirt. But you have forever to figure out the puzzle. Yes, but you have nine days to buy a shirt. Yes, nine days to buy a shirt. From today or when this drops? Today is when this drops. No, I've adjusted for time.
Starting point is 00:36:54 Cool. Because it is Thursday right now. Yes, it is Thursday. Thursday. Okay, next. I think that's true. There is an embedded conference that's coming up. This ESC, basically?
Starting point is 00:37:11 It's a lot of the same people. Okay. James Cranning, Jacob Beningo, Jack Gansel, all those people. So it's May 18th, 19th, and 20th of 2021. It's online, of course. That's my birthday. I can't go. It looks pretty good. I think maybe we'll have Jacob on to talk about it some more,
Starting point is 00:37:39 but I wanted to give people a heads up. All right, I'll go to some of it. But not on the 20th. I can't believe you tell people when your birthday is hell everyone knows my birthday you know you can find birthdays online you just type somebody's name and birthday that's how i know bear's birthday bears our dog who's sleeping very cutely okay um you got a raspberry pie or i have several raspberry pies raspberries pie pico picos i've done nothing with them i i did read the sdk manual at one point um but i have
Starting point is 00:38:19 not yet plugged them in sadly i wish i had before. But I have a project in mind, which I haven't got started on. What's your project? So when I'm recording drums, I have my computer usually to the left of me. The drum set being what it is, I can't really integrate my computer into it in a way that it's in front of me at any time. So it's usually to the left of me. And that means when I'm doing a bunch of takes or retakes or overdubs or something, I have to turn to my left and stop and start. It sounds like a first world problem, but it's kind of annoying to twist a bunch of times and then twist back.
Starting point is 00:38:58 So I saw, I went to some of the online NAMM stuff, and there's a bunch of products there that are basically... Wait, NAMM is the... No, sorry, the National Association of Music Manufacturers, something like that. Big conference dealing with music equipment. It's a huge conference. Usually a lot of musicians go to that too. So if you get to go to it in person, it's kind of fun
Starting point is 00:39:20 because you can walk around and trip over Chad Smith and... Sit behind the Oingo Boingo drummers, you listen to a different band it's very strange it's very strange to have a booth conference where most of the people walking around are rock stars it's very strange but anyway uh there was a product that uh on the one this year which is online obviously which is like a foot switch, a MIDI foot switch. And so it had a bunch of buttons you could stop on, and they would send a particular MIDI command to whatever device you want.
Starting point is 00:39:52 So I was saying, hey, that'd be great. I'd just get one of those and plug it into my computer, and then I can hit stop and start and rewind without turning around, just blast through different takes. But I decided that would be really easy to make. So I know that Pico came out around the same time. I was like, oh, that's a good project for that.
Starting point is 00:40:15 It's not perfect for it. Other micros would work fine too, but there's nothing wrong with it. So it seemed like a good project. So I think I'm going to do that. And I'll probably do it in CircuitPython because it's super easy. I feel like we didn't really introduce the Pico very well. No, of course. It's been on every other podcast in the universe.
Starting point is 00:40:36 So hopefully everybody knows what it is. But if you don't, it's not a Linux computer like most of the Raspberry Pis it is a microcontroller with two Cortex M0 processors and a bunch of IOs and peripherals and all that it is a microcontroller chip designed by Raspberry Pi
Starting point is 00:41:00 so you're not getting an STM32 out of this you're getting getting an STM32 out of this. You're getting an RP2040. And it's a it's really a cute dev board because it's $4 and you can make it low power
Starting point is 00:41:20 and you can make it do a lot of things. You can develop with C. You can use MicroPython, CircuitPython. It has at least one hardware feature that's really cool that I was reading about in the SDK that allows you to do some pretty crazy stuff that would be very difficult on other micros.
Starting point is 00:41:41 It's called... Shoot. I'm not sure what it's called now. Oh, the GPIO thing? Yeah. You can also program this with Arduino interface so you don't necessarily have to be super comfortable with
Starting point is 00:41:56 everything but you can also get into the big deep you know, HAL and sorts of things including the programmable I.O. state machines for custom peripherals. So basically what they give you after reading the SDK is there's these eight little state machines that you program in assembly.
Starting point is 00:42:18 I don't know what, I think it's a it's not ARM assembly, it's something else. And with that, you can do a lot of the high-speed, difficult work of an I.O. in that short section of assembly. So if you wanted to implement a Spymaster, for example, or... If 16 controllable PWMs wasn't enough. Right. You can put one there um so any sort of uh any sort of interface uart they had a uart example so you can turn the gpios into a bunch of things whatever you like assume you can write this assembly um i've seen an example i think
Starting point is 00:43:00 somebody implemented dvi so they plugged into a monitor and had a whole game retro gaming setup working because they they were able to basically turn these these into high speed bit banging things because you've got the assembly there that's running in hardware specifically designed for these ios so i don't think i'll end up using that for my project but i've got some other things i might play around with. Oh, they had the NeoPixel example too, the WS2812, which is traditionally difficult to do, I think. Just put it on the spy bus. I'm sure that'll work. Right. So it's pretty neat. And it's got a good amount of RAM too for an M0. So it's a cool little device. I saw somebody put a machine learning person detector system on it
Starting point is 00:43:49 there's been a lot of pretty neat projects that have come out of that although they're hard to search because you get raspberry pi pico and then a project name and you just end up with all the raspberry pi projects what does accelerated floating point libraries on chip mean? Because I don't think the M0... It doesn't have a floating point library. ...has a floating point unit, so I'm not sure what they mean by that. Maybe they just have floating point implemented in software.
Starting point is 00:44:20 They're calling it out for some reason. Don't know. But, yeah. It's cute. And there's some other variants coming out too, which is kind of nice. I think Adafruit has one coming, or Arduino, I think, has one coming that's got Wi-Fi and Bluetooth. As it stands, it's just got USB. Yeah. it stands it's just got usb yeah with with more iot connectivity if it stays in this general
Starting point is 00:44:49 price range it's it's pretty cool i mean i definitely suggested it to someone i was talking to um in fact i want to get to that question. I've been talking to Peter about a project, and he's working on something that's sort of lab-based. So he's not going to make a billion of these. They're not consumer products. And he wants it to be customizable for the user, because most labs need whatever they need instead of everything. But he's a software engineer. He's actually the one who talked to me about certifications. And I swear every week he's taking a different certification exam, even though his primary job is software development. I think. I hope. But he talks to me about embedded stuff and he's gotten into Arduino and it's been interesting to watch him get into the hardware. I always like that stage.
Starting point is 00:45:56 So here's an email. This may sound a little dumb, but I just learned that the Atmega328p chip on the Arduino is removable and can run all by itself or with very minimal hardware. For some reason, I always imagined it would be complicated to run a microcontroller outside of a dev board. There has to be a reason for all that stuff on the dev board. Okay. Some micros. Some micros. Some micros are harder than others. And when you think about what's on the Arduino, you have some power control and you have some ability to plug into USB and reprogram your units. You have a programmer there. Those are the two big things that when you go to your own board, you still have to think about. Your programmer, you may move off board. Clocks, sometimes you need clocks. Sometimes you need clocks.
Starting point is 00:46:54 Yeah. And with power, it's not just am I providing power, but am I providing power in the right order as the board comes up? Yes. Always super exciting. So I had suggested to Peter that he read the $1 microcontrollers from Jay Carlson. Yes. Even though that's getting a little older, it's still super useful. And at the time, I don't think Peter got what it was,
Starting point is 00:47:23 but now he's getting more into hardware and he's understanding what's going on. And he came and asked the question of, okay, well, he said, I keep going in circles because I don't have a specific project in mind. And I'm just trying to avoid ecosystem lock-in or suffering huge switching costs if I discover a particular feature isn't supported in the ecosystem. I recall you mentioning embed boards are a good place to start because they have a decent set of libraries, but I was wondering what ecosystems you would advise investing time learning and why. And that was the question I really wanted to talk about today, is what dev boards should people look at, and how important are the ecosystems that go with them?
Starting point is 00:48:08 It depends. Of course. Right? I mean, it depends on your goal. And I think this comes down to like the Arduino question. It depends on your goal. five of something that only have to operate a relay or do something on a time basis and your job is to do the other thing that you know like i don't know what this person is doing but um let's say they're making a bird feeder you know they need to feed birds every five minutes then uh use an arduino and don't worry about it if you need to make a thousand of them then that
Starting point is 00:48:44 changes the equation if you need more power you need to do. If you need to make a thousand of them, then that changes the equation. If you need more power, you need to do something else, you need to have Wi-Fi or Bluetooth, then that changes the equation too. And you have to look at a different ecosystem and that narrows it down. But if he doesn't have a project in mind, then the answer is meh.
Starting point is 00:48:59 Well, he does have a project in mind. But I think the project is so broad that he can choose too many things. And, you know, I kind of flip with these answers a lot of time and saying, well, it depends on your project. It also depends on what you want to learn. Actually, I'm taking this from a different perspective. The confusion that comes from Arduino and embed and what do these things mean because both are a type of board a type of development system and an ide yeah and i just think it's really confusing
Starting point is 00:49:37 i agree if you look at embed it it is a free online compiler from ARM who makes the Cortex-M series processors. And there are dev boards that conform to the embed standard, which means that they look like thumb drives on your computer. And that's kind of how the compiler can download software. But then we talk about an STM32. An STM32 may be a Cortex-M processor, and it
Starting point is 00:50:14 may be able to be programmed with embed, but it may not be. And it may just be a pair of processors we're talking about. So there's just this huge confusion with the terminology. Yeah, I get that. I don't know if there's just this huge confusion with the terminology. Yeah, I get that. I don't know that there's a good solution besides learning what it all means.
Starting point is 00:50:34 I wanted to go through that a little bit. Okay. So Arduino can refer to a specific board. The Arduino Uno, the first one. Less so these days, I think somebody said i have an arduino board that is still what i would assume they have really okay um but it also can refer to anything any of the arduino manufacturer designed boards of which there's the Duo, Due? Due, I think. There's a whole bunch of them.
Starting point is 00:51:07 Yeah. Arduino can also refer to anything that works with the Arduino processing compiler and IDE, which includes the Raspberry Pi Pico. The Teensy, and I think actually the Raspberry Pi. I think you can kind of use Arduino in many, many places. And for different chips, different family of the chips. And, I mean, the Arduino processing compiler, NIDE,
Starting point is 00:51:34 is built on top of GCC. Yeah. And it is assumed that anything that works with that also can be programmed from that interface. Which is why I wasn't sure that Raspberry Pi was on there, but I don't know. I could be wrong.
Starting point is 00:51:51 It also used to mean that Arduino boards conform to the Arduino header form factor. But that isn't true anymore. So if you tell me you have an Arduino board, I'm not going to assume that it has that form factor. But if you told me that five years ago, I would have assumed it had that form factor. So these terms are super overloaded. And when people say, I want to use an Arduino, you're going to have to forgive me because I start saying, well, tell me what that means. And then I feel stupid because I'm like, tell me what an Arduino is. But that isn't the question I'm asking.
Starting point is 00:52:32 It's just that these terms are so overloaded. Yeah, and like I said, it's very hard to untangle. I mean, I was confused about Arduino for a long time. Embed's a little less bad because there's no embed device. There's things that conform to embed, but they're usually normal devices that just have that as a bullet point. Oh yeah, it's so much better to say this is an embed board and this is a nucleo board, as though... Have you seen things that say... There's no one... You don't go buy an embed board though, do you? Well, I do tell people they should look at embed boards.
Starting point is 00:53:08 All right. Which is the list of hardware that is supported, that is conforming. Well, see, you're making it, you're doing it. I know, I'm just as bad. And then Peter asked about lock-in to environments. Yeah. And so there's Arduino, which I don't recommend for professional use because the licensing is weird. Embed usually has more liberal licenses.
Starting point is 00:53:41 But there are other platforms you can use GCC, you can use Platform.io which is sort of similar to embed that it's got a lot of libraries I mean the thing that's difficult that I think goes to lock-in is what libraries are using and what's provided for you the hard part about moving from one ecosystem to another is going to be how much of your code doesn't work anymore.
Starting point is 00:54:06 And you need a hardware abstraction layer. You need a layer that says, I don't really care what's under here. But then that makes your code a little more complicated. But if you're using Arduino, it's harder to go from Arduino to... Well, embed actually, most of the embed libraries look just like Arduino these days. No, I was just using Arduino as an example.
Starting point is 00:54:27 But if you were to take Arduino and embed as the same thing, a pile of libraries that abstracts away most of the hardware so you can flip between boards and chips as well, if you decide that you want to go to STM32 and just do everything with GCC, you're not going to have that in the same way. You'll still have some libraries provided by ST or whoever. Or the peripherals. But they're less friendly.
Starting point is 00:54:49 They are. And you have to understand more of what's happening and how to use them. And moving from those is also fraught. So if you decide to go from ST to ESP32, you have to throw all that out again. Well, there is a component of the code that you're going to have to change. Yeah. And I feel like people, like Peter, get discouraged with the idea that they'll be locked in forever when they don't have enough information.
Starting point is 00:55:23 Yeah, you won't be locked in forever, but it's still work to move. Yes, it's always going to be work to move. But it's work you do once for each move. It's work you do once for each move, and the difficulty of the work will be scaled by how well you've written your code. Right, if you don't use good software development techniques and things are all spaghetti together and intertwinkled with the drivers and things,
Starting point is 00:55:52 it's going to be much harder. If you don't have a good layering, where the code for your application, sorry for that overloaded term, but the code for the thing you want to make is not well separated from the device, then anything the device taints will be difficult to rewrite going to a different platform. an LED and an IMU together, and your LED depends on what your IMU does, that's okay if they're pretty high level. But if you put your LED in your IMU driver, because it's fast and easy and it makes sense
Starting point is 00:56:38 to put it there. You're rewriting everything. When you go to change it, when you go to a different IMU or a different platform with a different driver, you're going to have to change it. So if you stay at the high level, if you stay with the drivers and libraries you get, there's a good chance you'll find different drivers and libraries that are similar. Not 100% chance. But I feel like it's better to get things working, to get things prototyped, to get things going, than to spin wheels and just keep thinking about, oh my God, what if this isn't the compiler for me?
Starting point is 00:57:19 Yeah, yeah, exactly. And there's nothing that's going to, I mean, nothing's permanent. Software is not permanent. So if you decide you made the wrong choice, it's not the end of the world to move to something else. It really isn't. Especially if you're thinking about Arduino and prototypes. Yeah. if you're thinking about Arduino and prototypes. What you're making is probably not your final code. And if it is your final code, it probably isn't your final code when you get to production.
Starting point is 00:57:54 Well, that's ambitious. Sometimes it's always the final code. Well, yeah. But yeah, I don't get discouraged. I mean, this is hard. This is hard stuff. And it's hard for professionals. I mean, the landscape of devices and microcontrollers gets bigger every year, and they get more capable, and the software situation doesn't improve that much, even though the companies keep putting out more and more stuff that sort of works but it's all difficult and you know that's that's one reason to go back to the start of this is that's one reason to think hard about what you want out of it if your goal in life is to learn more about microcontrollers and things
Starting point is 00:58:34 and you have something you're making that you need to make a lot of and you have to be efficient about then yeah you look at something else if your goal in life is to make small projects that help you do something else and so you can focus on the something else tool yeah that's why i'm gonna use circuit python i don't care i'm not gonna and yeah maybe a raspberry pi is the wrong micro for it but i have one that's sitting here so yeah i'm gonna use that i'll use circuit python it's got midi it's a switch talking to MIDI. I don't need to get excited about delving into... That's a good point.
Starting point is 00:59:10 ...CubeMX or something. Are you building a tool to do something else? Or are you building something to learn in? That's the question. That's the question I'm asking. If you're building something to learn in, which is what I was doing last year with the MIDI project that I was doing on an Ocleo, which was
Starting point is 00:59:25 just a excuse to to use st's stuff and get experience with that for later use professionally but for like the project i want to do for my drum thing well i'd like to have a drum controller that i can stop on you know in a week so that's i'm going to take all the shortcuts i can take not worry about it well i, I have one more question. All right. This one is from, wait a minute, wait, no, I have two more questions. All right. Sorry.
Starting point is 00:59:54 The first is from Tom on Patreon. And he said that the origami seems like it started in part as a candidate engineering design tool, meaning my origami stuff. Now that I've done it, do I have any new thoughts about the engineering aspects of using it in mechanical designs? Because I did talk about the whole space idea of
Starting point is 01:00:17 curved creasing. SBIR or something. NIAC. NIAC, right. And the curved creases allow for better stability. Oh, wait a minute. The rest of Tom's question. Okay.
Starting point is 01:00:34 Any new thoughts about engineering aspects in mechanical designs? Are there any shortcuts or tools for someone who aspires to design foldy, flexy polyamide. Polyamide? Polyamide. I just made that up. I'm not sure that's right. Circuit boards, the flexible circuit boards. Yeah. Because it's now low cost enough to use because of Osh Park's Flex service. Okay, so I haven't done a lot with the sensor system because I am easily distracted
Starting point is 01:01:12 and paper and flex circuits are not the same. I was hoping they would have more similarities, but as I work more with different papers, I find the similarity with anything plasticky is just not there. That doesn't mean that it's not an interesting proposition, but it doesn't fold. And origami is mostly about folding. Who knew? It's more of a mechanical packaging design problem. And that I haven't been looking at. So my idea of working with flex circuits and origami would not have panned out. I'm not sure that there can't be more to it, but not right now. Okay. So really the last question.
Starting point is 01:02:05 Patrick from Patreon. How do you decide when to stop working? As a contractor slash consultant or as an employee remote working, how do you decide when the day is done? I'm going to answer this question as if it was a different time in my life and I could accomplish more. Wow. Wait, let me read that again.
Starting point is 01:02:35 You don't need to read it again. I'm just going to, as a contractor or an employee remover, you know, I just want to get this done. I mean, this could go into a whole how do you manage your own time thing, but I generally have a list of things I want to get done in a day. And I generally construct that on a weekly or longer basis. And so if I feel like I'm tracking to that, and I'm not going to feel too bad about stopping, then there's certain kind of stopping points that are natural. Like, okay, I got this portion of the code working today. That means I can work on this next thing
Starting point is 01:03:09 tomorrow. It's getting toward late afternoon. Do I want to keep pushing or not? No, probably not. Okay, I'll stop and then pick this up tomorrow. And that just comes from kind of planning out the project in big enough chunks that I can divide it up into smaller chunks that are kind of daily. Right. Uh, but that's kind of fallen by the wayside today because I have some much more loose projects. So I have to force myself to kind of construct those, those goals. Um, so it's become, become a little bit harder. And so I find myself, I find it easier to say, well, I'll pick this up tomorrow when I probably shouldn't be. It's the short answer.
Starting point is 01:03:54 If you procrastinate to the last minute, it only takes a minute. Yeah. Yeah. Which isn't a lot to bill. Yeah. Well, that's the thing the thing right so you have that flexibility there's a there's a tension there right there's the flexibility where you can knock off at three you get all your work done but then that means you're making less money on the other hand you don't just want to be spinning your wheels and making the taxi fare go because that's unethical and you know you don't want to charge your client for non-work.
Starting point is 01:04:25 So if you're efficient, you should look for productive other things to do if you want to bill more, not just kind of run out the clock. I don't have that problem. I mean, I've had little clients who really needed to count pennies. And one of the things I suggest for them is to make sure their project has a long enough lead time, because there are a lot of times I will clock out and still be thinking about it. And then they don't have to pay for that time, but if they need it tomorrow,
Starting point is 01:05:01 then I have to think about it and keep going. So there's some aspect of when do you need it by, and that affects how much time I work. I usually have more weekly goals, and I have weekly meetings. Yeah, I have weekly meetings too. But I plan out my week based on that. How far along am I to the end of the weekly goal? If I am spending three days on this client
Starting point is 01:05:30 and I'm one third of the way done on day one, then I'm probably going to knock off. I also get brain fatigue. At some point, I'm just like, I am not making progress. This is not a good use of my time or the client's money. So I have to be careful of that. And sometimes I will go for a walk or whatever. And that's a good way to both come back and get more done as well as just being good for me.
Starting point is 01:06:03 Talk about self-care. So how do I decide when I'm done for a day? Like today, I said earlier today that we should podcast today. And then... And then I had already just decided to take a nap. So it tells you when I decided to knock off. And I then spent too long reading at lunchtime because my book was good and because it was sunny outside and it was warm and I just didn't want to get back to work. Then I finally got back to work and Chris said, do you want a podcast now? I'm like, I really should finish this. But then I realized that I could check off all of the things that weren't the solution to my problem,
Starting point is 01:06:47 because I was pretty sure I knew what the solution was, but that the solution itself was going to take like an hour or two to finish. So once I was really sure that I had the solution direction, now is a good time for me to knock off, because my brain will percolate overnight to make sure that I have all my questions ready when I go look at the solution again. And I've thought about the corner cases now that I have eliminated all of the maybes. And so that's a knockoff point for me is the next thing I need to do a big enough chunk that I don't want to finish it right now.
Starting point is 01:07:23 And would the next thing I need to do benefit from not looking at it for a while? Yeah. And along those lines recently, I've found that maybe this is just the way my brain has been messed up, but I'm finding that if I spend, if I break up the time I spend on a task into shorter bits, like I'll spend a couple hours writing some code and then I will take a long break or move on to something else entirely and then come back to it, I do a lot better and I'm writing better code. In part because you come back and you have to remember what it was you were doing and so you have to write the code long enough. There's that, but I find with myself there's kind of an impatience with if I have a task where I want to make something happen and I'm most of the way there, I will start to take shortcuts to make it work. So I will start with good intentions. Oh, let's organize this code very well and have an object model that makes sense. And then I'll get very close.
Starting point is 01:08:27 And then I'll say, well, okay, I want to make this work. So let's write this method. And then spit out some absolute trash code that works. And then it works. And then I declare victory. And then pay for it the next time because that code is not permanent. It was a dopamine hit code. When if I had just taken a break and come back because I was a little tired and impatient
Starting point is 01:08:47 and I wanted it to work so that I could stop, if I just go ahead and stop and then come back, it's like, okay, now I don't feel like I'm rushed. I can write this code properly. I don't need the dopamine hit to just get it working. And then, yay, I win and then run away for the day and then come back the next day and regret everything I'd done. Or worse, regret it weeks later when I didn't realize that's what happened. I was like, oh, this code doesn't really work the way I expect.
Starting point is 01:09:16 This is hard-coded or this is not flexible or I got to tear all this out and redo it because, yeah, it worked for this step of the project, but it doesn't fit with steps, all the steps that follow. So I have to be, that's something I have to be aware of is, and it's happened before where it's like, it's very exciting to get things working. Oh yeah.
Starting point is 01:09:39 And there's a get there. I just kind of thing that happens with code. And I think that's the source of a lot of bad code. It's like, yeah, woohoo, it works. And ship it. And sometimes you shouldn't be shipping that. And so I do find that saying, okay, this is close. This is a good quantity of code.
Starting point is 01:09:58 I can look at this and be proud of it. We'll come back to it tomorrow. Don't worry about communicating yet. It's not really fair for us to answer this question because we do work hourly. We get paid hourly. Well, that still goes for when I worked remotely at Fitbit. But you and I are also lucky enough
Starting point is 01:10:20 to not have to work super hard anymore. Okay. I mean, we're not working 60-hour weeks, and I have worked 60-hour weeks. I mean, currently we're not. I worked some long weeks at Fitbit, which was in recent memory enough that I haven't, I don't consider, you know, I don't think that that wouldn't happen again somehow, but. When I am working really long days, I have a harder time deciding when to stop. Yes.
Starting point is 01:10:50 Because I just keep pushing. Yeah. And as you said, I don't always write good code when I'm in that just keep going mode. And so there's this benefit to stopping. And not everybody gets that choice. And so you still have to think about breaks. Well, and there's different kinds of work, too. If you're just a code person, which is the situation we're kind of in right now, we don't have a lot of daily meetings.
Starting point is 01:11:15 Oh, no. When I was at Fitbit or any of the companies before, you know, I had probably two, three meetings a day on average, plus having to do some code. This is because you let me choose the clients. Well, fine. And there would be plenty of days where I was just in meetings and I would get nothing done. And so that kind of thing, that really amps the pressure up because you do need to get stuff done, but you also need to be in those meetings. You need to be smart in those meetings and pay attention. So that's much, much, much more draining than if you just have a project with your contractor, the client doesn't talk
Starting point is 01:11:50 to you that much. All of your time is kind of your own to schedule. It makes life a lot easier. It probably makes the quality of the work a lot better too. But yeah, it's a totally different ballgame if you're a full-time remote employee with meetings all the time or even, you know, normal amount of time. And, yeah, getting to the end of the day and realizing, you know, it's 6 o'clock, I've been in meetings all day, but I haven't reviewed this code from this other colleague or I need to check this in. Sometimes you just got to do it and then you don't really get a choice, even if you're remote. So that's the thing where if you're remote, I would often try to take breaks where I could during the day. Hell, I used to do that when I was at work. I would go for a walk when I wasn't remote, not at work. When I wasn't remote, it's like, okay,
Starting point is 01:12:44 it's lunchtime. i got some time here i had meetings all morning i'm gonna walk around the campus for 30 minutes or longer i've never been good at i get in at this time and leave at that time yeah i i'm pretty good at getting in at a pretty at a relatively consistent time. And I'm happier with myself when it's on the early side of my window. But clocking out for me really depends on what I'm working on, how tired I am, and what I think I can finish before my brain stops working well. Clearly we can't decide when to finish this.
Starting point is 01:13:26 Well, actually, there's a follow-up question when do you decide a job slash task is accomplished and you can stop polishing it as a contractor that's a lot easier for me yeah that's a lot easier it's like when the value of continuing to work on it is not there for the customer. Yeah. Yeah. And so I, for, for me, it's a much easier,
Starting point is 01:13:55 I just moved his desk. It's a standup desk. Apparently my foot moved it. Yeah. Anyway, it's a balance of, am I charging them for good things? Yeah. And so that's, that's easier than when I was working full time.
Starting point is 01:14:09 I'm much more comfortable. Does this, does this do what you asked for? Yes. Done. With that sort of thing. And it still has to be work I'm proud of. Oh, yeah, yeah, yeah. Assuming it's good, you know, and, but, but yeah, but yeah with with contracting i feel much more like well-defined things they're done it's yours it's done um god i don't i don't know that i had that much trouble with because with non-contracting everything was usually well specified it's like this is what it you know is it doing that does it pass the test? Yes. Well, it's also, have you finished writing the documentation? Yeah, yeah. And put it as part of the auto-build.
Starting point is 01:14:49 It's all the things you have to do. And if you've done all the things you have to do, then I feel good about not touching it anymore, thank God. There's a point at which, please stop touching it so that other people can use it. I mean, music is, to always bring music into it, music's the same way working on this record we've gotten very good at not spending weeks
Starting point is 01:15:09 kind of oh it sounds a little better this way or a little better this way and just kind of letting sit sit with stuff but that can be a real problem in any endeavor is kind of coming back and tweaking stuff and you know
Starting point is 01:15:24 when it's done it's done it's nice to have something done and not go back and touch it like there's been times it's like oh maybe we should re-record this song we did 10 years ago it's like no that song is what it was and same thing with your code you know if it's working don't touch it well it's easy to know when this episode is done, because there will be a Winnie the Pooh quote. Thank God. Get me to stop talking. Thank you for listening. Thank you to our Patreon subscribers. Thank you to our new social media... Mavenus? Mavenus. All right, I'll go with that.
Starting point is 01:16:03 If you'd like to contact us, it's show at embedded.fm or at the contact link on Embedded FM. You can find links to the shirt on Embedded FM unless it's not February 2021, in which case, too late. Sorry. Even the Wayback Machine will not avail you. Okay, when we last left Pooh and Piglet, they were walking, worried about woozles, and Piglet had decided he had an appointment. Pooh looked up at the sky, and then he heard the whistle again.
Starting point is 01:16:40 He looked up into the branches of a big oak tree, and then he saw a friend of his. It's Christopher Robin, he said. He looked up into the branches of a big oak tree, and then he saw a friend of his. It's Christopher Robin, he said. Ah, then you'll be all right, said Piglet. You'll be quite safe with him. Goodbye. And he trotted off home as quickly as he could to be very glad to be out of all danger again. Christopher Robin came slowly down his tree. Silly old bear, he said. What were you doing? First you went round the spinny twice by yourself, and then Piglet ran after you, and you
Starting point is 01:17:14 went round again together. You were just going round a fourth time. Wait a minute, said Winnie the Pooh, holding up his paw. He sat down and thought, and in the most thoughtful way he could think. Then he fitted his paw into one of the tracks, and he scratched his nose twice and stood up. Yes, said Winnie the Pooh. I see it now, said Winnie the Pooh. I have been foolish and deluded, said he, and I am a bear of no brain at all. You're the best bear in all the world, said Christopher Robin soothingly. Am I? said Pooh hopefully. And then he brightened up suddenly.
Starting point is 01:17:57 Anyhow, he said, it's nearly luncheon time. And so he went home for it.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.