Speaker 1: 00:08 [inaudible] you good Speaker 2: 00:10 sir? No. How to make a great gift. Speaker 3: 00:12 Oh, did you like my gift? I had this funny idea and if it felt like, you know, drawing a cartoon picture and giving it to your mom, but I'm glad you liked it. Yeah. Yeah. We were at the wedding. Congrats. By the way. We should throw in, James is now a married man. It's a new era. A new epoch has dawned upon us. It won't change the show. Speaker 2: 00:37 Yeah. Everyone's like, how does it feel? How's it going? I'm like, it's exactly the same now. Now we have to open up check, you know, checking accounts and savings accounts together because we can't cash checks that people gave us Speaker 3: 00:46 separate work. Oh right. People signed it out to both of you. That's funny. Speaker 2: 00:52 Here is a pro tip. When you write checks, this is, this is almost a blog post that I had to cash, so my aunt left it blank. One of them blank. That's a great idea. The other thing is when you write checks to individuals, don't say frank and James put frank or, or, Speaker 3: 01:15 or do banks honor the or Speaker 2: 01:18 I'm sure they do. That's what they told us. Yeah, they told us. Yeah. And then the other thing we had to do is if, if it says both, like if it says both of the names individually. So if I said Frank Krueger and James Mountain Mag now, right. I could sign the check over to you, but we'd have to be there together and someone would have to witness that. The other thing I could do is I could add you frank onto one of my accounts and then even if it says, and since both of us are on that account, it would work, but it would have been a lot easier if you woulda wrote or so pro tip. Right. Or that's all you gotta do Speaker 3: 01:59 today. I learned, never thought to do that. I guess it's a little safer than the plank one. I still have the paranoia from the 1980s of, you know, make sure you fully fill in the check, otherwise someone's going to steal it from you. But I mean checks. When do we ever run into checks anymore? I guess it's just gifts. That's the only time. Speaker 2: 02:19 It's the only time. Yeah. You're probably having flashbacks to the epic 1994 comedy family movie, blank check. Speaker 3: 02:27 Mm, no, I don't remember that. Um, but remind me, or is it worth even talking about Speaker 2: 02:32 classic classic coming of age tale where, um, this boy is 11 year old kid. Um, Preston. Is that it? Yeah. Preston. He gets run over a gaze on his bike. He gets hit basically. He's fine. Sure. He's fine. W no helmet, however the bike is thrash. So the guy gives him a check and he says, oh, how much it a, you know, $100. He does, he doesn't have time. He gives him the check, blah, blah blah. Or something happens along the lines, but it's a blank check. So he writes it out. The kid writes it out for $1 million, which you know, Speaker 3: 03:12 took advantage of the guy. What a bad kid. I don't like this kid. Yeah. I mean you got to take a little bit but not that much. A millions. Speaker 2: 03:21 Quite a lot. So it's all about this kid goes a town spending $1 million, which today would not even buy you a house in Seattle. And then this, you know, these crux trying to bring it back. But as a kid I thought it was so cool cause he bought like a bunch of video games about the house. It was, you know, it was great. Speaker 3: 03:40 Nope, totally missed that one. Um, I think I'm better off for it. I like those coming of age ones though. It just sounded like big to me. But now we're just sounding like old people talking about old movies. That's all right. But you are a married man now, which is what you do. You got to have your dad jokes now and all that stuff. Speaker 2: 03:58 That's right. And we have one of the best gifts of all time that we got from you. Not a check. You do not go with a check, you one wailed your way into our heart with the most amazing Iot gift ever given to anybody of all time. I've never seen anything like it. So why don't you cue it up and tell the people what you did. Speaker 3: 04:18 Okay. So I'm not a good gift giver. You know how there are people in the world that are really empathetic and smart and caring and they're like really good gift givers. Do you know why are you one of those people? You are kind of, you give me gifts all the time. It's annoying. Yes. Yeah. Okay. So you're one of those people. I'm not. So um, I was just thinking, how am I going to get a card for James? Cause even that sounded like a very difficult task. And then I was sitting around and I was thinking, you know what? I should make toy a thing, a iot thing, I guess you call it. I guess it is Iot. Yeah. So I just got this image in my head of this pink cart and all it is is a clock. And for all of eternity, all it's gonna do is count how long it's been since James and Heather got married. That's it. Yeah. Speaker 2: 05:17 And it's amazing. It's absolutely like when you say, okay, so here's the thing, step back. Because when you say you're not a good gift giver, I understand because I have been known to give gifts. Danny, I've been known to give people gifts and you're random. It's a random acts of kindness or sort of the things, and I think in this instance you, you thought that you weren't a good gift or good gift giver, but in factuality you are. Because it was a very thoughtful and also very frank gift because Heather and I as both developers, we saw this, our minds were blown. Uh, and our first and our first became, how'd you make this? How this come together? And then we both thought what happens if it runs out of battery? Like what are, you know, how it look, what is inside of here? And I, I still don't know which is why we had to do this episode of the podcast cause I have no idea how any of it works. And it's blowing my mind because it did run out of juice after five days. Speaker 3: 06:18 I'll [inaudible] make it a week. Okay, I'll keep going. Speaker 2: 06:22 But as you told me in the instructions in the card how to get everything back online and it all worked flawless, I just plugged it back in and every, everything was working just flawlessly. I have no idea how, but it was great. Speaker 3: 06:34 This is one of those very untested gifts. We didn't have unit tests for this gift. Um, but just going back to the gift giving, I think it was just, um, well for one, I just love the idea of a single purpose device in this world. We have a phones that can run whole companies on them, but instead we just use them for pictures and things like that. There's a piece, there's a microprocessor in your little thing in your little heart and that things more powerful than the Apollo computers, you know? So there's amazing things that you can do with the hardware that we have available to us. And so I just loved the idea of something stupid and simple and that for the rest of eternity just did one thing. It's natural, no purpose. It's single purpose. So turning a commodity item into something unique, fun, fun, fun. So James, um, uh, where to begin with this, I had the idea Thursday afternoon at noon and your wedding was Saturday at 5:00 PM. Correct. And I'm like, I can do this. I can so do this. So Speaker 2: 07:44 our first person, I first I've heard of, I thought that this was a long cause you gotta you three d printed this hard. And I'm like, yeah, that must've took a week to do. Cause you probably had to mess around with it, fidget around with it, Spec it out. But apparently not. Speaker 3: 07:59 Uh, it took every one of those hours. I did not sleep very much. I was constantly working on this thing. Okay. So let's break it down to like maybe the order in which I did everything. Yeah. So number one was get the electronics and the software workings. So that's a whole thing we can talk about. Number two was, yeah, the three d print, my terrible job at it. Then the painting and then trying to put it all back together so that that all had to happen in about a day with, with many coats of paint. And I had to keep, um, man, I'm such a bad painter. Whew. Okay James, start at the, uh, start at the electronics, Speaker 2: 08:41 I think started at the electronics level because there's things to know about this is that there obviously is a battery in there. This is what I know. So here's what I know is this beautiful heart. I'll put it in the show notes so you can see a photo of it on merge conflict out FM. There'll be a photo of it too. Speaker 3: 08:56 So hopefully we'll be, I'll be able to talk through some of this with [inaudible]. Speaker 2: 08:59 Oh, okay. What we'll do is we'll put together a little go Google photo album and then I'll put that in the show notes. You can pop that up and take a look at it. That'd be better. And you know, it was fun about this is that it is just as hard and it has this LCD display on it that says each plus j and then it has account up for all intensive purposes of how many days it is. And it's fun because we walk by it every single day and we go 4.8 days, you know, Blah Blah Blah. It's really, it's great. And like it just hit six days literally right now. And it continues to work and we're amazed that it continues to work. Uh, and the thing is that I know that there's obviously some board in there cause I can see it, it has a USB micro adapter. Speaker 2: 09:38 It obviously has a battery attached to it. It obviously has an LCD screen. And then the other part is that there's internet connectivity to it because you have coded in the date and time in which we got married. But as you told me, it has to know when, what time is it, you know, it just has to know what time it is in general to understand the counting up and the counting down. So knowing what's the functionality. Now we can break down what's actually in it and then talk about the software and things and build on top of it. And the complexity of the one purpose little tiny thing that it does. What Speaker 3: 10:22 so all this device has to do was get the current date and subtract it from your wedding day. I thought, how hard is that? You know, this is like some of the original code I ever wrote. Learning how to program something. But there's this fundamental problem that you already said that these devices don't know the current time. It's funny like you can get, how long has the device been running down to the nanosecond where you have very accurate clocks for that. But what is the absolute time and the really real world? No idea. Um, so tough luck. I wasn't actually sure where to begin there. So I had three ideas. I'm just curious though, where would you have begun? Speaker 2: 11:04 So yeah, you know, we're pretty lucky in which when we write code, this is daytime UTC. Now we just know that it's going to work. Yeah. And we don't think about it. So, uh, well that's the thing is I don't, and I guess I, I guess these little tiny boards don't know the time. Right. And my assumption is that there's not a config file that says you're not counting up. You're doing massive subtract things. So get the current time and then subtract the time or something. And that's what I'm not positive about. You know what I mean? Is it checking it every tick? Is it checking it every second? Like how is it calibrating these times? So the, my thought process to go down is since daytime UTC now I guess doesn't work that you're going to have to either a build a website server call that you know, when you can connect, if you can connect to the Internet, then you can make a call, query it, save that somewhere until the juice runs out. Um, you could hope that there's a API somewhere on the internet, but then also, what if that API changes? Like you can't update this device. Um, the other thing you could do is maybe make a little desktop software program where if I plug it into the desktop, then we could sync something so it didn't need to connect to the Internet. So those are kind of like my three ideas. Speaker 3: 12:36 Yeah, those were all good. In fact, you just invented something that already exists. So there, there are Internet time servers out there. So if you have access to the Internet, you can get, um, ver, you can get you synchronize yourself very easily with, um, I don't know, some atomic clock and some military base. I have no idea what time we're all synchronizing to. That's actually easy. The problem is, James, how do you get on to the said Internet? Um, Speaker 2: 13:09 correct. Yes. So by the way, there's no input on this device. You don't even know that it has wifi. It does. You don't know if it's connected to the Wifi at all. I do not Speaker 3: 13:18 clear. I wanted no buttons. I want to know switches. There's no way to turn it off. It's either going to die or you recharge it. It's up to you and your personality. But I wanted a very apple approach here. Absolutely no UI other than it's just a clock that counts. Speaker 2: 13:32 Yes. Johnny Ives approves of this wedding gift. Speaker 3: 13:36 Yeah. So at first I thought I was going to be super clever. James and I knew about a thing. We are all walking around with mobile devices that over Bluetooth, l, e r constantly blabbing, blah blah blah. Look at me, look at me. Places are swarming with Bluetooth traffic. So I figured this little device that I'm going to use has a Bluetooth radio on it. So I'm going to power up the Bluetooth, look around for some phones, connect to a phone, ask it for the time and beyond with my merry way. Okay. Uh, this is all I need to mention something called a real time clock. What we'll get to that, but let's get the current time to start with. I spent four hours on that and couldn't get it to work. Talk about humbling, humbling James. I've been doing Bluetooth for years now. Every time I connected to a device, the app would just crash with this heap corruption error and just die cause it's all c code and it's terrible. And I had snow, air handling for anything. It's the worst change. Like I've never missed.net more than just staring at pack crash. I could get stack traces, I knew exactly where it was crashing, but it's memory corruption. It could literally be anywhere and it's not in my code, my code, Stu dumb, my code is not doing anything. Ah, that was frustrating. So I spent hours and hours on that chasing around Internet forum threads on how to fix it. None of that worked. So Speaker 2: 15:15 yeah. And the also issue here is that Bluetooth is always advancing at the same time. So devices, the Protocol Bluetooth, what happens in five years of Bluetooth goes away and it's just replaced with something else. You have to dig out that as, I mean this is with any technology that you're about to pick because our, the USB cables is going to be around in 20 years. I'm like, what are all these, you know, different implications that think about 20 years of James. I was giving your wedding long or your marriage longer than that. I want to just design it for 60 years. All I know. I know I'm saying, but like even in 20 years, if it lasts, if it's supposed to last 60 years, you know what's gonna happen in the next 10 years, 20 years, 30 years as technology changes and Bluetooth. By the way, it's very complicated just in general of how it works in my personal opinion, get numbers, all these things. And additionally, if you connected to it, I don't know if the device Bluetooth would even just give you back the time stamp or if you would have to have an app that would communicate over Bluetooth, Speaker 3: 16:15 which makes another complexity. Right. Well the problem is some devices do broadcast the time and some don't. So I would actually have to go out there, ask devices, do you broadcast the time, connect to them, ask for the time. It's a whole process. Yeah. Got It. Well, I just couldn't get that to work. Also that was asynchronous programming with c plus plus, which is just God did not intend for programmers to be doing this. Okay, so back to the Internet. I'm stuck now. I'm stuck. But I know one thing, and this is my, my big epiphany is if you go to an airport or someone who has an open Wifi, it pops up that annoying screen that says like, Hey, log into our annoying wi-fi. We all know them, we live with them every day. It occurred to me those are most likely programmed by decent programmers and decent programmers that would abide by the http Spec, the HDD Spec, which requires that servers transmit the time and the response, no matter what the response is, but the time, the server time. So it occurred to me to blindly just scan for Wifi access points, find any that are open and go through each one, connect to it and try to make a random web request and see what I get back. If they send me back the time, great, I've done my job. If not, I'll move on to the next router. Try to connect to that on it. And start making random web requests. So that was my solution for getting the current Speaker 2: 17:50 time. Wow. That um, okay. So that is very, very interesting cause you have to know how the http protocol works and understand that. And I also did not realize that. I mean it makes complete sense now that you think about it because how I was originally thinking about it as an instructions by the way it said, and frank told me, he said, oh just it'll reconnect. It needs an open wifi network. And Frank said, if anything just create an open wifi network on your network, that'd be great. I was like, Oh, I'm not going to do that temporarily. I meant temporarily. But opening up my phone, there are two specific, three specific, um, open wifi spots and there's one that is always open all across the globe, which is ex affinity wifi because it's everywhere. Uh, and that has a gateway portal that you have to log into. Speaker 2: 18:46 Funnily enough. Um, but there are a bunch of them around. So I did set it down. I didn't see how long it took to resynchronize, but I left it. I was plugging it in. I came back and it was just right there. So one of them must have worked, which is uh, which is awesome. That is very clever because you don't actually need to even connect to the Internet for it to work. You just, you're connecting to that hotspot. Yeah. Uh, people do all sorts of terrible things with this like DNS tunneling, like you can do tricky things to get up. Okay. Let's not talk about that. But I was just trying to avoid the, um, the VCR problem of setting the time. Like I said, I want to no buttons or anything. Zero configuration is very important to me with hardware devices. They should just do what they're supposed to do and move on with life. Speaker 2: 19:32 Now I want to go into how you coded it. You said C plus plus. What tools are you using? I also want to know what hardware in general. Let's take a quick break, frank and thank our amazing community sponsors this week. Very excited about it. We have two of them that you need to know about first-time sponsors, the podcast. The first one is our good friends over at Aurora controls. Are you building mobile apps with Xamarin forms or Xamarin, Ios or android? You need some Aurora controls in your life. They're an amazing pack of highly customized controls. Whether you're building, you know, doughnut charts, floating entry level is great in pill bottles. If you want your controls look exactly the same between Ios and android. You can make them do that. They have Cupertino, they have material, they have step indicators, they have tiles, they have confetti views, they have sliders, they have crop image controls. Speaker 2: 20:21 They have all sorts of amazing things built right into it. You can get a free trial of it or if you want to upgrade and get the pro versions of it. For merge conflict listeners, you can get 40% off, four zero 40% off, which is amazing. Go to Aurora, controls that app and enter offer code, merge conflict, all one word. We'll put that in the show notes. Aurora controls that app. Now are you looking to have someone build your mobile applications? Well, you need to check out inferno red. They are software development company building products and apps for businesses all over the country. They build a web cloud, Iot, mobile TV apps, even smart refrigerator applications. They have a long history of building dotnet and Xamarin applications. And if your company, you yourself need an app of built, go to inferno, reddit.com and learn more. Thanks in front of red and Aurora controls for sponsoring this week's pod. Speaker 3: 21:17 Thanks. I love those too. I love that. Uh, yeah, it's, it's all about the controls that getting things done and also in front of red. It's an amazing name. Cool. Yeah. Speaker 2: 21:27 All right frank, so you figured out how to do this, but you didn't really talk about one and what's in there or how you coded it and what you coded it on. So first before we talk about how you coded it, like what are you coding on? Like what is inside this thing? Speaker 3: 21:44 Yes, the chip in there is the one I've used in other projects and I've probably mentioned on this podcast a whole bunch, but it's the SP 32 that e s p three two that is, yeah, very popular because it's very cheap and does a lot in that price point. But I have a more expensive version of it, which is put onto a board. And the Nice thing about this board is that it has the aforementioned, the USB connector and also a battery connector and also a chip that manages charging that battery. So that's all, that's a complex enough circuit that I don't want to build it. Now fortunately you can buy little charging circuits like that. They're very cheap because they're not that complicated really. Um, but I like this board because it's an all in one package. It has that sp, uh, the USB mount and the battery mount and it's made by a company called [inaudible] out of fruit and it's the Huizar 32. Speaker 3: 22:46 It's like 20 bucks. You can get an SB 32 for 10 bucks normally, or even cheaper. Uh, but it's worth it just to have all the integrated little bits on it. Wow. Very cool. Yeah. I'm looking at it now. It's a really nice little tiny little chip. I like it. Yeah. Yeah. Great. Great price point for all of it. It gives you a, I just happen to have a battery laying around. You got my last batteries. I think that's a battery out of like an old cell phone or something. Who knows? Batteries are pretty simple. Batteries are cheap on Amazon, so just get them there. A, I programmed this puppy, James and Ardwino in the Arduino ide, which I don't know why I do this to myself. Visual studio has amazing Arduinos support visual studio code rich runs fine on the Mac, has amazing Arduino support with intellisense. I used the Arduino ide, which is terrible. It's a bad text editor has no intellisense. You're constantly googling for things. I don't know why I do this to myself are then I feel like it puts me into a mode where I try to keep everything as stupid simple as possible, but at the same time it's infuriating and I don't know why I do it, but are do we know ide coding in C plus plus? Speaker 2: 24:08 Well first off, thank you frank for going through that. I'm sure it was joyful and every moment of this coding experience was a blast and I can contest that. Additionally, yes. Um, the Ardwino software, I mean no shade on Arduino but it's going to get pretty dark up in here because uh, last time I bought an Arduino based game thing to program, I booted up Arduino editor and then I continued to put that device in a drawer and never touch it again. So Speaker 3: 24:36 what are, do we know has going for it? It works. It's bugs have been its bugs for Millennia now. So you've learned to work around them. It's one of those products that they're not actually getting all crazy and adding a billion features. Kind of wish they were adding a few, but the fact is it is solid. So that's what's nice about it. I appreciate that. Especially when, um, I kept getting that Bluetooth crash, you know, it, I wish I had a debugger. I wish I had better tools, but the fact was the Ardwino was able to keep reprogramming and working through it. So that was nice. But James, it's 8:00 PM. Okay. I haven't physically built anything. I have a little chip that crashes whenever it tries to do Bluetooth. And then I screwed up the a router code at first where it would just as fast as I could connect and disconnect from routers. Speaker 3: 25:36 And that got me banned from every router. That was the general vicinity. Beautiful. Beautiful. So then I spent another hour trying to figure out how to change the Mac address of the device so that some router would let it back on and know, couldn't figure that part out. Oh my goodness. Okay. So anyway, um, finally get all that Wifi stuff working, I'm able to get the current time. Now, the rule with this device is it has what's called a real time clock. This is a piece of hardware that just sits there. Tick, tick, tick, tick counting the time. So the moment you tell the clock what time it is, it's good. Oh, okay. Got It. This makes sense. Yeah. Got It. Got It. Got It. But with some caveats, as long as the device doesn't crash or lose power. So this is why I'm PC motherboards have a battery on them because you have to keep the realtime clock charged up and running. Speaker 3: 26:37 And if you do that, you lose the time and you lose some data because there's actually, you can store data along with the realtime clock. It's kind of fun, fun, odd pizza hardware, but fun to work with. So the device actually has to go into a sleep mode because I don't want it to ever turn itself off or reboot, uh, because I would lose the time and have to go through all that rigmarole again. So the device actually spends the majority of its time asleep. And, uh, I'd say, I forget what I left that constant at, you know, when you're coding you forget thing. It's just kind of threw it all together. But I think it spends like 10 minutes asleep, wakes up, updates the screen, goes back to sleep. I think that's how I coded it. Speaker 2: 27:21 Okay. Got It. Yeah Cause I've noticed that I haven't figured out necessarily when it updates the display. All I know is that it every time I walk by it, it, it, it does update, you know, from time to time. And so I'm imagining the screen is always on and then just the logic loop just runs whenever. Speaker 3: 27:41 Yeah. The screen is great because once I send it what to display, it'll display it in forever. Um, and I, I'm not sure if you're familiar with these numbers, but the display only takes, um, 15 milliamps at three volts, which is not much. That battery can run that for quite awhile. Five days. Yeah. It turns out and the device takes, um, 150 milliamps whenever it turns on, but it's only awake for one second. It wakes up, updates the screen and then uh, turns on an led for one second, a little red led. So if you ever really want to know when it's updating, you have to look through its little hole and just observe the Little Red led light up. That's it. You have to have an led. I didn't expose it on the front. I thought it'd be tacky if I actually like started scrolling the display and all that. But Speaker 2: 28:39 no, it's very well designed I would say looking at it, it, it's, it's, it's, it's on our mantel right beside our television. So we walked by it. It's a center piece of the house and it is very elegant. I, I, it's not too bright. And additionally, what's Nice is how you cut out. You'll see the, everyone in the drawing when you look into the show notes is the, the cutout is you would think, oh, maybe it'd be on the back of the device or on some area that device. So you could charge it all the time. But the problem there is that there is charging lights and other things there. So frank would have put it on the back or put those lights on the front. That means that this big light would be coming at you randomly. And if you're watching a movie on this one, this light goes up. Boom. But how I have it set is the USB charge where there's the whole cutout, which is very small. It's on the sides of the heart. So it's on one of the angles of the heart and how you can sit a heart down is on one of its sides. So it's actually covered the entire time. So you never see any of the lights or um, Speaker 3: 29:42 as a light up on it, which is Kinda cool. Thanks. Uh, I was pretty proud of this 3d design that I did. Um, I, I've, I've wanted to get better at enclosures as the general name for this. Whenever you have some electronics and you want to shove it into something that looks kind of Nice, it's called an enclosure. And the trick with them is I'm not good at it. Um, I wanted a two piece in closure with cutouts for the hardware. So the hardware would be really sturdy in there. They're not going to slip anywhere. I wanted, um, I wanted that port coming out the side. I wanted it split into two pieces, a top and a bottom half. And then this was new for me. This is the first time I ever did this, but a little lip on the top side to join them so that they're really interconnected with each other nicely. Speaker 3: 30:31 In the past I've always just had to glue my things together, but I wanted this one to be slightly disassemblable just in case I ever had to repair it or just in case you ever got curious and you, you tore it open yourself or something like that. But I was very proud of myself. Um, I used a cad software called open js cad. Uh, it's just a website. If you search for open js cad and you don't draw an a, instead you write Java script code and it's a way to program magically, uh, create designs. And it's neat because you can write functions and you know, do stuff with code. I just like it because I'm a nerd and I like numbers and I like math. And so I just find that to be my favorite development environment or a design environment. What word to use? Speaker 3: 31:21 I Dunno that one. Yeah. Design Environment. Sure. Yeah, it turns out it's not that great for making heart shapes. So it took me awhile to figure out how to do a heart. I ended up just doing a two philanders and then a cube rotated at 45 degrees to be the bottom corner. It's not technically the shape of a heart if you look it up, but it's good enough. And then I tried to add some curvature to it, but as he said, time was running out. So it was 8:30 PM when I started the cad work and I finished the cad work. Uh, well I wasn't even sure if I had finished the cad work because I had started the print and I came back to it and I decided it was ugly. James. It was big and flat and ugly. I was like, I can't give this as a gift and just be embarrassing. So I read, redesigned it and started printing it somewhere around 1230 or one o'clock, it finished printing the top half and I wasn't sure if it was gonna fit with the bottom half and I said forget it, whatever. So I started printing the bottom half and then painted the next morning. Speaker 3: 32:42 Wow. That's impressive. Huh? It's tricky. Um, with three d prints like this because it was big enough that it takes a while to print and I did not know if they were gonna fit together or not. In fact, I didn't know if they were going to fit together or not until after they were, uh, painted and I basically had no choice but to make them fit together because I just didn't have enough time to print. Another one was up against a clock and I was literally watching paint dry because I just had no time. Speaker 2: 33:15 Oh my goodness. That is, that's pretty crazy. I mean, it's very impressive in general. Like, not only did you assemble hardware, coded the entire thing, tested the entire thing because it does work. Designed something constructed that design and painted it and delivered it on time. Speaker 3: 33:37 Yeah. Oh, I was so happy if finish the paint was, Speaker 2: 33:41 it's still a little tacky when I gave it to you. I was like, just don't leave it up against anything. Why? It'll be fine. I literally bought that paint that morning. Um, yeah, it was, Speaker 3: 33:54 I'd like to say it was easy and fun to do, but no, it was a lot of work to squeeze into a day and a half. But I think if I actually planned out a project like this, it'd be more fun cause it was super satisfying to come to the, um, device in the end because it was, it had no buttons or switches on it. It had a battery and it had a screen and it was my own creation until I gave it to you. Now it's yours, but up until that point it was mine. Speaker 2: 34:23 Nice. Very cool. Yeah, I mean it definitely blew our minds in general and now it's kind of blowing my mind even more just to know the time, the time and energy that went into it because it is something you could plan out. But uh, it might be something you do over time and then you know, you kind of have this really tight restriction, which means that your mind has to go down these other ways of figuring it out. Right? So you could have, if you had two months, you could have maybe rabbit hold down the Bluetooth thing, you know, for two months. But for sure you didn't have time to do it, which is good. I had to find another solution and Speaker 3: 35:00 that one ended up working. But can I give one more little funny story about this whole thing? Yeah. So it's 1:30 AM and I'm watching this part 3d print and I have the software working and I'm staring at it and thinking it through. And I realize in one year it's going to say 365 days. If passed in two years, it'll say, Oh God, don't do math. 730 days, whatever, whatever the number is have passed. But then what about leap years? James? What about months? What about these units of time that humans use that aren't just days? Cause days are easy. You take the number of seconds, divide by 24 done, happy. Um, I that wasn't good enough for you James. This has gotta be a good wedding gift. So I wanted to know how to find the difference between two dates, which anyone who's ever written like a birthday app or something, we've all solved this problem, but I think we've all realized it's slightly a harder problem than we realize in the beginning because calendars are dumb the way they work. Speaker 3: 36:13 Yeah. even.net doesn't have, um, a date death. You can't subtract two dates. So if you subtract two dates, it'll tell you the number of seconds between them. It won't tell you how many years, how many months, how many days, how many hours, you know, it won't do that because that's a hard calculation. It's not hard, but no one wants to do it. John Skeet did it. You can get no time. No time does it? Yeah. So, but here I am and stupid c plus plus world, they're not going to have anything. So I'm chasing Internet forum thread after Internet forum thread, you know, people are like just divide by 365.25 that's kind of like leap years. And I'm like, it's not good enough because what I wanted was you to know that you had one more day until your anniversary. Like it's, it should be a ticking clock for your monthly anniversary, your six month, your one year. Speaker 3: 37:09 Like I wanted to tell you when those are coming up. So I uh, tore out just tons of code cause oh my God, this calculation got longer and longer. The more I got into it of code from P H P no, my goodness. VHB they had a really good implementation of subtracting two dates to get a good human readable date diff and there and PHP was written in c by really good programmers. So it's pretty clean. See. And so I just started copying and pasting code after code, basically the entire time library from PHP and put that onto the device so that it could tell you how many years, how many months and how many days have passed since he been married. James. Speaker 2: 37:58 That's excellent. Yeah, cause we, I was curious, you know, we're recording it at six days and I'm curious if it is going to say one week or one month or I don't know what it's going to say. No, spoiler alert. Um, I can, you know, I go on fire. I, you know, I think it would be, it's going to be a very, you know, clever mystery and I'm very intrigued by it to see what, what it says or how it does or if the code is going to work or not. You know what I mean? I'm, I'm, I'm assuming it will cause Frank Kruger made it, but at the same time I'm just like, well, I know day times a day times are hard, especially how you had to coat it, noting and setting it and things like that. So, um, yeah, you don't just have, uh, you know, date time now versus that date time now type of thing and you could just do two years. And then I also thought what happens when it's so long? Will the display, if it's just days, will it have enough space to display 1,000,565 years or days or whatever? Um, I don't know. It's one of those gifts that will keep giving and will continue to boggle my mind as the 60 years go by or whatever Speaker 3: 39:06 or, you know what I mean? So I won't give anything away, but I'll say that a, I was testing until two 30 or three o'clock. So it does have a few scenarios handled. So we'll see. We'll see how it works out. I, I think it'll be fine. I have full faith in my Janky three, a m s e code. Speaker 2: 39:26 I love, the other question I have is, is Frank Kruger going to open source this code? Speaker 3: 39:34 Oh, I mean, I'd be happy to. It's slightly embarrassing. I mentioned the 3:00 AM issue, right? Um, there were a few other funny issues. Uh, none of the http libraries for the Ardwino would actually give you back the date header, which is the one I needed for the time. So I had to hack up http libraries to send back all the headers correctly because people are such bad coders in the hobby world. Then there's like other things where I just, the built in date time parsing code, there's a famous c function, um, string p times string part time and it doesn't work. It flat did it work? So I wrote my own terrible Chames I know how to write parsers but then I write it in the right way. No, I wrote it in the most terrible way possible. I wrote my own, um, parsing code. So yeah, I'll open source it, but, uh, everyone's gotta be nice when I do, Speaker 2: 40:42 I think it is fantastical and it is again, one of the most amazing gifts basically ever. So, um, yeah. Thank you. Speaker 3: 40:51 Did you see the pictures I sent you at all? Did you get down to some making of good I did it. Yeah. Speaker 2: 40:57 Put those in a little gallery and I'll take some photos of it. And do three 60 views for everybody. But yeah, is super cool to kind of see it all come together. And it was funny because just a week before we're hacking on some, you know, you have three d printing hacking out some GameBoy hardware, which you know is not, you know, crazy crazy hardware. Now we're doing the same thing and uh, are you're doing the same thing but your three d printing stuff, putting this hardware together and putting you back lit LCD screens on it, which is like mind blowing. So Speaker 3: 41:27 I was hoping you would find that connection. Yeah, I thought of this as the single purpose GameBoy that's exactly what I was thinking of it in my head. Also, I should note that the pictures are funny because it's not just a count up timer. It was a countdown too. So the negative days were working. So every time I kept looking at it, it kept telling me how long I had to drive down to Oregon and get to the wedding. This is like ticking clock over my head every time I was trying to make a decision. I'm like, nope, clock says I got to keep moving. Speaker 2: 41:57 That's awesome. Yeah. Then you really know, you know at five o'clock when it was programmed. All right. Is it go and up there? It is. Yes. So that's so cool. Well thank you frank so much. Speaker 3: 42:09 Oh, you're welcome. I was just going to say plus or minus daylight savings time because again, dates are hard. You're welcome. I'm glad you appreciated my little cartoon drawing Speaker 2: 42:19 gift. I super appreciate it. I loved it so much and I'm really just humbled to see, hear all I can, how it came together and I'm going to probably just share, obviously share this episode with Heather so she knows as well how it all came together. So that was really cool. Thank you frank so much and [inaudible] and if we open source it or do anything, we'll, we'll tweet it out. We'll put on things, we'll put links to all this stuff we talked about today and of course to all the photos of this really amazing gift in general. But thank you frank so much. You're amazing human being. Speaker 3: 42:48 You're welcome. And congratulations, James. Congrats on getting married. Speaker 2: 42:52 Thank you so much. Uh, I, so far I am loving every moment, just like I've loved the entirety of the last four months, three days, and 12, three months and 12 days that we have been together. They're all in my head, right? I had a look at it and then I know it was so fast. Math fast math. All right. All right, everyone that's going to do it for this week's episode. Frank, thank you for being an amazing human being yet again. Thank you. Thank you. Thank you. Thank you so much. You're so amazing. I don't know, just warms my heart. Thanks all of our listeners for hanging in with us. All these hundred and 60 some odd episodes. It's bananas. We're on our way to 200 but it's gonna do it for this week's merge conflict. And until next time, I'm James wants a magnum Speaker 1: 43:31 and I'm Frank Krueger. Thanks for listening.