And we'll just lady it a happy Father's Day. Happy Father's Day, everybody. Thank you for staying up late with us. Today was not a great sleeping day, but that's okay. We got some good video instead. So, Mr. Lady, did we have, or Daddy, Ada, do we have any news updates if you want people to look at it? Yeah, well, first off, this was, we were at Ada Fruit today at the factory and our kid was sort of taking it out but she was playing, we were playing kids play.  No, we didn't kidnap a person. This isn't some, yeah, Twitter man, Twitter. So anyways, I put it online, because I'm like, oh, this is cute. This is like, you know, this is a tender touching moment. People are like, oh, this is nice. I can't, and then of course- It's a crib, not a cake. And then of course, Twitter's like, some guy on Twitter. Anyways, so the other thing that's going on besides Father's Day is tomorrow is Juneteenth. Ada Fruit has had this as an official holiday and we're not shipping tomorrow. So please keep that in mind. We'll be shipping on Tuesday. So if you order anything tonight, it will not ship until Tuesday and please check our blog for coverage and more stories of people and some folks in the Ada Fruit community and our team are doing some things for Juneteenth. So check out AdaFruit.com slash blog for more. Lady, what is on your desk this week? Okay, well we have a couple of cool weird retro mailbag things. I'm still doing hardware, but I'd like to intersperse some of the hardware and hacking stuff with some stuff that we get in the mail. So what do you want me to show? The McNugget Tetris or the DOS Tetris? Let's start off with the McNugget. So this is a Tetris game from McDonald's China. Yeah, maybe go to the computer and we'll do the whole intro. Yeah, and it's been covered in some places, but I thought it would be great to get one and have Lady Ada take it apart. Okay. So let's just start it off. What... Oh, did you wanna go to the computer? I could show. You wanna do that? I'll go. Yeah, I could show this. Okay, so about 20 days ago, like three weeks ago, we saw articles about this like funky giveaway, like Happy Meal toy that was a chicken nugget shaped Tetris toy. And this is like everything I've always wanted in my childhood, I love chicken nuggets and I love Tetris. And so it was really important for me to get one of these. So I had one of our purchasers in China pick one up and send it to me. And they're bigger than you think. These are fairly large chicken nugget-based Tetris player, but I guess you would purchase them or you got it with your Happy Meal. Anyways, so I got one... Well, it comes in a little McNugget box. Yes, it got smuggled in. So I did open it already because I wanted to see what was going on, but let's show it on the overhead all of this McNugget goodness. I think this is the first tear down that I've seen of the guts of it and maybe what's in it. I thought Lady Eda could talk about it. So here's the thing, actually, I messed this up because it turns out the box is actually like a McNugget box. Yeah. Like this is the same box that McNugget would come in. Yeah, I opened it. You ripped it on the side like a raccoon. Yeah. That's how a raccoon opens up McNugget's Lady Eda. Yeah, okay, so you can see this actually did get, you know, it pays licensing official Tetris. Look at this, they got like official Tetris product. And this is their little logo. So people know it's an official Tetris and you can see there's a long Tetromino about to make a Tetroid, whatever they call it for four bar Tetris success. Okay. So I don't know that I'm sure there's like names for all the different things like four bar clearing. Okay. So this is, I just removed the screws. You know, there was, there was a bunch of screws on the outside and I removed them. It does come with AA batteries. Ironically, the screwdriver I picked out was like my Heath kid screwdriver. So like most kids toys, it has a screw in to keep the batteries from getting open.  So it comes with two AAA batteries and they're already, you know, it was actually already in place. So I didn't have to put the batteries in, which makes sense. Like most people are not going to have a screwdriver handy when they're at the McDonald's.  And then on. And when you turn it on, you know, it quickly lights up all of the segments. So you can see that they're active. One thing is because I opened this, I also opened up this, I'll open up this later. This is a little loose. So the M sometimes doesn't light up. Yeah, there you go. And then to actually activate it, there's a little power switch and it does a little song and it blinks. And then if you actually want to play, you can select the levels. So you can see it can go level. You want to get to like level 15, maybe don't start with level eight. And then the thing that took me a while to figure out, you press pause to start. Oh my God, that's actually fairly hard. And then there's left, right. And then this is rotate, except I can't, I'm not going to be able to play very well. With a, over a screen. But so there's up down left, sorry, up down, sorry, left, right, rotate, down fast, down, like instant down. So like immediately goes to the bottom and then just like sped up down. Although like the game is much faster than I remember. I kind of vaguely remember it being fairly slow for things to drop. And there's also a speaker button. If you don't want to have it beep so loudly. So let's take a look at what's going on inside. So I opened it up. The screws, which is, I think it was kind of funny. The screws are triangle, not Phillips or Flathead. And I don't think that's any like, like, oh, we don't tamper proofness. I think just probably when you're torquing a lot of screws very quickly, maybe triangle is easier to get a good grip on. Maybe it's like less likely to strip. But I just used a Flathead, like we have Flathead set and it was fine. Got good enough grip. I mean, it's only plastic.  So let's open this. See, I mean, it's always an epoxy blob. But maybe there's something to see with the epoxy blob. You can always learn something from any teardown. Can we push it up a little bit more? Oh, yeah. So there you go. One thing that's interesting is how recently that these were fabbed. I mean, this was a very quick build. These were manufactured in, you know, basically last day of February. That's when the PCBs were made. And then they were immediately, you know, pick and placed and then assembled. And they made 500,000 of these. So that was very fast. They were basically released, you know, within the last month. So it's been, it was like two months to manufacture 500,000 pieces. McDonald's knows how to do stuff in large quantities very quickly. Okay. So now we got this PCB. So let's remove the PCB. First off, let's make sure we turn this off, which is off. It's a good idea. Okay. So here is the circuit board. It's a couple of interesting things here. I mean, not surprising. It's an epoxy blob. It's a ASIC. I'm sure it's got custom programmed, you know, whatever, 8051, something cheap with write only memory, sorry, read only memory. So you write once and it's the problem, probably not flash, but you never know. And then it's a single-sided PCB, which I always think is great because it's like, it's always fun to see how the routing is done. I mean, like, you know, for 500,000 pieces and they're probably like, well, maybe we'll release this in the US later. You know, the die, they could probably request, I mean, there's all these GPIOs, but maybe they could request the ordering to be a certain way, I don't know. Or maybe they're just, they really are plain GPIOs. These are LCD drivers. There's no, there's no separate LCD chip. I don't think unless there's one bonded underneath. It could, I don't think it was like a custom chip chip, but maybe there's a chip that is configurable enough that it wasn't too difficult to make this layout. Looks like, yeah, there's no jumpers even. So everything was totally linear. It's kind of cute. And they can see the test pads here. These are all test points. So before they did the final assembly to make sure that the epoxy under the epoxy, the wires were bonded correctly, they'd probe all these pads to make sure that, you know, all the signals were coming out properly because it's a lot of, you know, they want to manufacture these as quickly possible, verify, program them if necessary or, you know, whatever, burn in that final firmware and then test all the pads before doing the final assembly. So that's the most labor intensive part.  So single-sided PCB and then, you know, test pads everywhere. And then this is one elastomer piece. So you can see in this, you know, looks like, it's probably a hassle code or maybe in, it looks like it might be a very light gold code. It's kind of, kind of got a little bit of a golden color. This is a custom elastomer with, these are called like carbon pills. So little, so this is molded and then these little black carbon conductive bits are glued in or molded in and glued in. And then this is like the big button and then these are the smaller buttons and then the directional pad. You know, this is almost certainly not programmable but you could probably hack the buttons if you wanted to have like different controls for the game. And then we've got, this is the battery port here. So a little bit of epoxy, which is nice. And then this is soldered nicely into the case that's molded in to the battery case that's molded in.  And then there's one resistor here for the power switch. Oh, no, clear, what's up with that? Maybe it's a light pull down to act or whether it's, you know, what would it be for? So this is the ground. The two sides are ground and then the middle connects between the battery.  It's probably a draining resistor.  So this is a 100 ohm resistor that when it's off, it connects between power and ground and just like the, now disconnected from the battery power ground, the power on this chip to drain it completely, make sure there's no floating voltages at all. It keeps you from getting like weird, you know, the display might still be lit up and people are like, oh, is it really off or not? This way it would like totally clears out the display instantly. And then over here is a piezo disc for the bleepy sound effects and some wires and the wires go into this. This is like a little driver chip. Interesting that, you know, it could be that this chip that was used here doesn't, wasn't initially designed to do like a piezo beeper or maybe it wasn't meant to go off of such a low voltage. So this might be a little driver. It might be a little, it might be a little booster, like a switch cap booster to get the 2.5 to five volts to get this nice and loud because I see two capacitors here, although this, I'm clear, this capacitor goes in here, maybe this capacitor goes in there. I mean, this is a blank chip which I find kind of fascinating, right?  But there's no marking on it. So it's been sanded off or, you know, they got the chip without printing on it. So, but it's connected to the piezo and you can see that the two piezo pins are connected without, like they're not showing a ground. So it's probably like some H-bridgey type thing that just alternates the pins. It gives you a little bit more volume to do that with piezos. When you have a PWM on one pin and then you have the flipped PWM on the other pin, you know, you get this differential voltage that's higher, that's a little bit louder. Yeah, like a, you know, about twice as loud. So that's it. And then over here is the, you know, this is the button, like cluster. So this is molded and then you just pop this in directly. So you don't have to do, you know, any work. And then what's interesting is usually, yeah, so this is a little notch. So this notch has to match up with here and that's how they make sure that whoever's assembling this, you know, they quickly assemble it. They put it the right way up because these have to be facing up.  And then this is the LCD. So the LCD is custom, not surprising, there's this glass. And then what's interesting, this is what's called zebra. I'm gonna remove this. You can kind of like barely see from behind here. See the little stripes? I don't know if you can see it. Maybe I need something dark. Bucket there, snap, give me a little bit more contrast. No, maybe this phone. Yeah, so you see the zebras. So that's those stripes, those are the ITO pattern contacts that connect to all the segments on here. There's a lot of segments because remember every single brick is a segment and then there's the segments for the number of lines.   And then on this side, ditto. And one of the things they do to, let's see, yeah, you can kind of see it there. So one of the things that's done to save money is, well, first of all, there's no backlight here.  To save money, these are not bonded to pads. Instead, there's these things called like zebra elastomers. And you can see also there's a little conductive bit here. And it looks like it's a solid piece of conductive but it's actually not. It's a very fine layer of conductive and non-conductive. And so basically what this means is that this has little threads of conductivity going through it in the Z-axis only. And it doesn't connect this way. It doesn't conduct it this way or this way, just down. And so if you wanna make a lot of contact, like this has a couple dozen contacts total, you just put these in, you use this as a holder. You put these in and then you use the screws on the back here to press the contacts here against the zebra elastomer, which then goes to the LCD and as long as you just torque it tight enough. And actually, if you look at almost every LCD, even your standard 16 by two character LCD, underneath that black metal piece is a zebra elastomer. So I can show that maybe on the overhead and I'll elastomeric. So yeah, this is a really good diagram. Okay, go to the computer and show. So this is what they look like underneath. And for LCDs because it's just the LCD itself is glass and so it's not easy, you can't solder to it or use like a SMT connector. And so you see that there's these patterns on the glass and then this is a very low cost piece of elastic. And then here's the contactors and the PCB. So these are custom made. You can get this elastomeric stuff, strips and the patterning isn't generic, it's just very, it's very finely sandwiched. And so they say like, you guys can just wanna make sure you have at least like five of these little conductive bits per contact down here. But as long as the display is aligned over, it's basically like a little sandwich conductor and it's rubbery. So with temperature and with pressure, it'll still work. So that's a fun tear down, anything else you wanted? No, so can you go to the Oren? Yeah. All right, so everyone's gonna ask and so the black spot, the blob there, what if you wanted to get at that? What if you wanted to do that? What would you do?  Although I do think it's kind of funny, there's like this SDA, SCK down here. And though I think that's probably a temperature sensor or something, it's not necessarily a... You don't want this to get too hot. Yeah, you don't want that to get too hot. I sort of doubt that it's reprogrammable. So, you know, you would have to mechanically, I mean, this is very strong. You would have to mechanically grind it away and you're kind of likely to dampen the chip. You might be able to get from the other side, ironically, might be a little easier because this is paper phenolic. You could just gently sand it. So people might wanna just figure out what it is. Yeah, you could absolutely scrape it away, but it's, you know, and then you would use a really high quality microscope to maybe be able to see the, maybe there's something on the chip that says who made it or something.  But also maybe, like, you know, again, McDonald's could say, hey, we wanna release this in other countries. We need the ability to be able to make, you know, 5 million which becomes popular. Okay. So I have to think about it. So that's a turnout of a McNugget. It's very hard, by the way, once you can move the elastomer to realign it. Usually they have a tool to make the alignment. So I'll try, but I did get two. So this is gonna be, this might have been our sacrificial nugget. Thank you, thank you so much. Okay, cool. All right, so. All right, you got something else now, too. Yeah, okay, we're gonna, we'll go a little long because heck, it's not like we have like a baby or anything to do with it. Yeah, it's fine. All right, so I'm gonna put them in back over here. Okay, so, okay, go to the computer again. Okay, so the next thing is, like many people, we saw this ridiculous laptop with an 8088, 8086 processor. Like, no, it can't run Doom because it's like so early. And in a laptop with like original chips and a socket for an 8087, I don't know. I think maybe it's like a floating point unit. I don't know what the 8087 is. It has an OPL3 Yamaha chipset. So it can like do more than just plain beeps. And it runs MS-DOS and it's just this like funky weird laptop. So we just got it like today. So I haven't done a lot of hacking with it, but let's go to the overhead. And I'll show some of this off. So this is, I'm gonna make some room here. So it is a laptop. You can even see down here, there is a massive four amp hour lithium polymer battery. I removed, there was some removable cover so you can see and replace the chip. So this is the RTC, the HD465. I don't know how the heck this person got these old chips whether they found some cache of them and that's what came up with this idea or whether they actually like gutted some 8086 motherboards somehow they got like some PC, IBM PC Junior chips. This year is the 8253. This is the color graphics adapter. So you can do up to 320 by 202 bit color, text amount and four bit color or graphics 160 by 104 bit color. That's what it says down here. Oh, it's hard to see. Maybe I'll try to autofocus it. This is the HY638256. This looks like it's just, it's an eProm. So it's a program chip. 8284, 8288. Yes, it's like 1990, 93. This date code 92, this is made in the mid 90s. So these are a little late in the game. Honestly, I thought these chips would be mostly made in the 80s but I guess they're made in the 90s. And then I don't want to take it out because it's booted right now but there is a compact flash card and that's the data storage. Fun fact, the first MP3 player I made used a compact flash socket. Maybe I can, man, what was it called? Can you go to, let's see. No, this is, hold on. Let me see if I can find this file. It was the original Minty MP3.  So I just don't even know. I was like, oh, I'll look at my Minty MP3 folder. So it's like, I have a folder called old and it's like CVS because it didn't exist at the time. But let's see if I can open this. Minty MP3 version one on BRD. People are like, how long have you been using Eagle CAD? Since 2004, it's been like 20 years. I just got like a cake, happy birthday. We'll see if this even opens in Eagle nine. Oh, it does, but it wants me to sign in. Okay, so just like always fun. So you can see, hold on. See, this is a compact flash socket here. So compact flash, this was with a PIC16F877, great chip. And then, yeah, this is a mollusk compact flash. So compact flash is basically like an IDE drive. You have eight bits of data, you have three bits of address. And then I think you have like latch, I mean, this is kind of a terrible schematic, but I think you have like latch, read, write, et cetera. Yeah, ready, write enable, output enable, et cetera. So you can just, you talk to it like an IDE driver just looks like a gigantic memory space. So that would make sense why compact flashes is what's used here. So let's go back to the overhead, go fast. Okay, so I don't want to remove it, but I think it's like a 256 megabyte compact flash. So it's like a little mini IDE drive. This is a USB key. So there is a USB port, which I was like, whoa, what's up with that? Cause obviously USB did not exist at the time, these chips were invented. So inside actually is, when you boot it tells you, it's got a CH375, which is a, like I said, interface, like, you know, eight bits data, interrupt, chip select, address, write and read latch, interface to USB, and they wrote a driver for USB keys. I will note that not everything will work. I try, you know, you really want to have something simple. I think a four, I did have a four gigabyte SD card, micro SD card, but that, it might have worked, but it like hung and I was like, well, either it's broken or it's just taking forever. So in the shop, we have very small micro SD cards. And these are, these are like a kind of a godsend whenever you're dealing with very older, like cranky electronics because they use the original SD format, not like SDX something or SDHC, it's like SD, and that's it. And so this, this one did work. And so I was able to transfer some files over. So this is it. Oh, I forgot the buttons. I pressed the little thingy with my driver. So that's just, it just beeps, but it's fairly fast. And then yeah, I can put in this, there you go. It's got a BIOS, it's booting, it's like a GPL BIOS. And then this is, there's a screen protector here, but I'm just going to keep it on. It's not IPS display, it's just kind of a little, I mean, but like this was like 150 bucks. So like what do you expect? And then you can see here, yeah, the CH375. And then, you know, you can plug in the disk drive. And then this time when I reboot, it'll recognize it. I mean, it's a thing.  It's not a 386, it's an 8086. Okay, so I did find this time a disk. So it's like, okay, I loaded that USB key on disk drive D. Give it a second. I think it has to scan the disk drive. Yeah, you can see like, it's like accessing it, okay? So the keyboard is not bad. And it came with a couple of things built in like Fox base. I don't completely understand like the first time you do something at like, I think it's like reading the whole fat table and memory or something or it's swapping stuff in and out. It takes a moment. One thing I did remember is you can keep typing and then like when it comes back because it's handled by DMA, it's like, oh, CD game. And then I copied over Tetris, but it came with like Arcanoid. I tried Hobbit, but I think, I think the Hobbit was meant for the 386 and it didn't run. I think I was a little bit optimistic from when it came out. So this is the DOS version of Tetris. I just downloaded this from the site called abandonedware DOS. I just took a little for like DOS, 886 games. And then you can run this, but yeah, I mean, in case you're wondering, like, oh, can I run Doom? You can't run Doom. So I believe this only does CGA. Gonna say no to a joystick. And it doesn't have the audio card working. So you really just get beeps. Let's see. You can do it. Yeah, I mean, I kind of like, I vaguely remember this startup screen. Okay. Yeah, so you can, yeah, this changes the backgrounds. Not bad graphics. Four color graphics, whoa. And then we'll return a, I don't know how you rotate question. Not like that. It's been a while. Okay. Let's see. How do you rotate? Oh, it's a shift. X, Y, Z. Oh, Q quits. Anyways, let me remember how to play Tetris later. Oh, I'll practice on my McNugget. So that's the DOS machine. That's it for now. I mean, it's kind of cool. Maybe I'll, I saw some people like, yeah, trying to write some assembly code. Yeah, and someone wants to, they said the brightness wasn't that great. And then they emailed the company. It's not. The company said you can change your resistor out. Yeah. And one thing that's funny is it's like, you know, these chips were really not meant to run on battery. So it's like, it gets quite hot as it was designed for sitting on a gigantic desktop. So the minute they squished it down so small, but it did work out of the box. It was quite nice. And the keyboard is kind of cool too. Like it's a nice laptop keyboard. Not sure what it was used, recycled from, but I mean, obviously it's some, you know, it's got a Windows button. Just funny to have it on DOS machine and it's cute like DOS sticker instead of Windows 3.1 sticker. Anyway, so this is a cool find. So we'll take some photos of it. And yeah, it does run on battery.  You could run on it. I mean, WordPerfect, what was WordPerfect for? Why does it say Windows? I don't know Windows, kind of weird. Pretty sure Windows 3.1 will acquire a 3D6. Oh my God, it's taking forever. That's a mistake. I don't know, just try, wow. I guess Windows 3.0 could run on a 886. To be honest, I didn't use this early of a machine. I didn't only kind of came in to like using DOS at the, I guess at the 3D6.46 era. All right, I just need a mouse. All right, cool, cool stuff. All right, well, that's my, like I just opened the box today. So I'm learning stuff. If you want to do next, why don't you do a great search? Yeah, let's go to the great search. The Great Search brought to you by DigiKey and Adafruit. Thank you, DigiKey. Every single week, LadyAda user power of engineer and help you see and find the things that you want on digikey.com. LadyAda, what are you looking for this week? Okay, so let's go to the overhead because I'll show what I'm going to chat about. So on the desk of LadyAda this week, I took apart this adorable chicken McNugget themed Tetris toy game. We kind of looked at what's going on inside. One thing I noticed is that to make its BB blops, it uses a piezo disk buzzer element. And we've talked about and searched for buzzer elements before on the Great Search. So let me go to the blog and Great Search. Yeah, go to the computer, sorry. Don't forget, you can only see all the previous Great Searches. Look at the blog. So yes, many years ago, November 12th, 24th, 2020. Oh, what a time. Piezo and magnetic buzzers. So for a lot of our boards, like the circuit playground and like the clue and the mag tag and basically the time or the macro pad, whenever we have something that needs to make little tones, not very loud tones, like little quiet, you know, just alerts, I like to use magnetic buzzers. And so this is a magnetic buzzer and they have lots of stock, which is great. So this is kind of the magnetic buzzers I'm going to go to, seven millimeters by seven millimeters square and you give it about 3.6 volts wave forms. And you know, it can make slightly better sounding than beeps. I mean, the trade off is it's not a piezo element. A piezo element is like two discs separated by this piezo crystal. And when voltage goes across it, AC voltage goes across it and vibrates. Whereas inside here is actually a floating magnetic disc like a diaphragm. And then there's a coil. It's like a 16 ohm coil or 32 ohm coil. And when the coil has AC voltage going through it or current going through it, it lifts and raises the magnet just like a normal speaker. So it's like a little miniature speaker speaker, like with the magnetic. So you need fairly good amount of current going through but the trade off is first off, these are picking placeable, whereas piezos are not picking placeable. You need to have wire solder to them. So if you go back to the overhead real fast, I'll show. This, you know, sometimes there's a spring, but oftentimes there's wire soldered into one part and the other part of the piezo disc. And then in between there is the crystal. So this is the flat disc, which is what ends up vibrating. And then there's the thin crystal and then a conductive layer put on top, which is what these two wires are soldered to. And then again in between is a dielectric of piezo material. So this is not, this is a capacitor, whereas the magnetic buzzer is an inductor. So it changes how you drive it.  With the magnetic buzzer, you're gonna want something that's, you know, I use a very small class D amplifier, but you'll want like a true class A or class AB amplifier that pushes DC current through, not AC. Okay, so it doesn't have a bias across it, which is this, of course, you can have a bias, it's fine. All right, so let's go back to the computer. Okay, so this is a magnetic buzzer. Again, you know, I use them, but the trade-off is they're not particularly loud. You know, they do make a fair bit of noise and you can pick and place them, which is what I like, but they're also gonna be more expensive than a piezo transducer. So let's look at piezos. And it's not surprising that this toy company that made the Tetris toy, they made like a half million of these and every penny counts, like you want them to be as inexpensive as possible. And you don't have to have very good resolution, but you do want to have it be kind of loud so you can hear it, whereas our little buzzers are not very loud. So don't forget that piezos can be used both as voltage to, like AC voltage to sound, but they can also detect vibration in and turn it into a voltage for sensing. So vibration sensors are also piezos, but you want the kind that are like these large disks, which looks just like the thing that we were just checking out. Okay, so let's also look at, only look at active ones to start. They're sometimes called piezo benders, because again, they bend and flex as the voltage goes across them. And yeah, these start to look pretty good. So we're not gonna look for the exact one. What we want is actually just the least expensive one available, so let's say we're gonna look at at least 5,000 pieces. Let's look for ones that are normally stocking and not marketplace. Okay, so as you can see, they get pretty inexpensive, 15 cents, it's a lot cheaper than the 80 cents for the magnetic buzzer. Morata makes a lot of these, looks like Ola Wolf is another company. This one, that's kind of interesting little, oh, it looks like there's a feedback. So you can read the feedback, which can help you adjust the frequency, the resonant frequency of your piezo. But most of them look just like this, very simple element. You can see, they usually don't even have data sheets because they're like, hi, it's just piezo. There's usually a resonant frequency, and that's where they're gonna be the loudest, and that's based on the size and the thickness of the material. With these, they have impedance and the max input voltage, but again, we're running it off of a couple of AA batteries, so we don't have to worry about hitting the maximum. The frequency, the resonant frequency, it's gonna be, you know, it's not like they don't make noise at other frequencies, but that you're gonna hear like a louder squeak at this eight kilohertz or 3.6 kilohertz.  Not meant for really making very musical tones. For this Tetris toy, it works out okay because you're kind of like, dee, dee, dee, dee, dee, dee. It's not a very symphonic sound. You're looking for just a very basic beep when you press the buttons, feedback element. So the next thing is that, you know, we want wire terminals. One thing is, you know, springs are kind of interesting. Let's just look at the springs. There are ones that, you know, it's a disc and on your PCB, I've seen this actually on multimeters, you take them apart and instead of wires, because they want, you know, they have a different manufacturability. They, to make it inexpensive instead of soldering wires, the piezo, they have springs that come out of the PCB. And I think the springs are pickin' placeable. And then the springs touch the piezo in the two contact points and that's how they make contact. I think the, so far, when I've taken a multimeter apart, that's how that works. But we want with wire leads. So let's check it out. So wire leads, you know, none of these are going to be, oh, we want the standard style, you know, we don't really care for feedback. This is a little bit less expensive that way. Different diameters are available. Looks like a couple of ones are available. These morada ones look good. PUI audio.  With wire leads, that's nice. You get to skip one step but you can just solder these in or use terminal blocks and you're good to go. So I think this one's not in stock. So let's go with this one, you know, in quantity, 40 cents. Got the wire leads. Oh, they're even tinned. So like even one less step you have to do, easy to integrate. You will want to have something holding up the desk. So usually you can't, of course, glue the whole thing because you have to let it resonate within the cavity. So if you go to the overhead again, the way this tends to be done is if you look here, this is a plastic, it's a soft, you know, ABS plastic enclosure. And then these are little heat steaks.   So you'll want to do something like that or you'll have a cavity with like a little ridge on it so that this can freely vibrate within your enclosure. So this is my pick. We can go back to the computer, the Morata ZB7Z, sorry, the Morata 7BB series comes in a bunch of different diameters, I picked the larger it is, the louder it's going to be basically. This little one is going to make a good amount of sound and then don't forget you'll need something to drive it. You'll need a good AC driver for that impedance. 300 ohms is, you know, you'll need something, not a microcontroller pin if you want to get the good amount of sound and then differential drive, like an H-bridge drive will also get you the best audio output. So it's my pick if you want to add some beeps and boops. Is that research? All right, that's our show for tonight. Thanks everyone for joining us and we'll be doing everything during the week as usual. Don't forget we're not shipping orders until Tuesday. We'll see you Wednesday for show and tell and ask an engineer in addition to all of our other shows. Yeah, we're gonna be using some toy hacking. Yo, we have some fun stuff that's coming in for the toy hacks. Yeah, we'll get back into it. We didn't even get to show Scott's cool design. Well, this is gonna be in the store soon, it's a little great. Turn on the overhead real fast. Yeah, real fast, sorry, like on core. This is a really long show. Scott and Jebler came up with this idea and they posted up, they made a little Ky-Kat generator for, this is aluminum PCBs. So aluminum PCBs are very inexpensive. It's cheaper to get a PCB that's aluminum that has like all the cutouts you want than to get a custom stamped aluminum piece. So yeah, there's no copper used here. It's just solder mask, silk screen, which of course looks great. And then aluminum, this is really easy to cut and machine, but it's got, these are 0.6 inch grids. And so it's perfect for laying out eight of the boards that tend to have holes on point one or point, you know, usually point two, but sometimes point one divisible. It's cool to have your project semi permanent. Yes, this is like kind of nice. Maybe we'll do, this is a giveaway. We were talking about doing some giveaways. This is a nice one. We'll do some nice texts to explain what this is, but nice work, Jepler and Scott. So they were working on this in the Slack chat and the, I think Jepler came up with this idea for 3D printing. And then Scott, I think did the Ky-Kat script that would auto generate or open scan script that would auto generate these or one of them. And then I said, hey, can you send me some Gerbers? And then I was like, hey, I just ordered 250 of them and they'll be in the shop like in a week. So we're gonna put this into the shop this week. And you can see here how you can use a, you can either use this as a gigantic ground plane or use nylon screws to attach your hardware. Okay, anyways, that's a sneak peek, it's not out yet. Don't ask. Bye.


Hey everybody, thanks for coming back after lunch. I know we all had like lots of food and wine and stuff But we're gonna be talking about something that I find really exciting this afternoon and hopefully you do, too The the title of this talk is SVG can do that Part of the reason why I'm giving this talk is because SVG as a graphics format is just capable of so much And I think we're just at the tip of the iceberg for really touching on all of those capabilities So yeah, like I said, my name is Sarah Drasner. This is a photo of me as a child and my mom and my relationship with authority I'm a senior developer advocate at Microsoft. I just started so that's exciting and I just think SVG is a total party You can kind of make your party yourself or you can have JavaScript be the event coordinator get it event Okay, there's gonna be lots of bad jokes where that came from And we can do so many cool things with it So some of you already might know the benefits of SVG, but just in case you don't let's go over some of those It's crisp on any display. It's built with math So basically any time you're making an SVG You're just plotting a few coordinates and the computer is drawing all those coordinates out for you So it's not like bitmaps where you know if you make something really big or really small It loses clarity and it kind of loses pieces of it. So that's really nice It has less less HG. I always mess that part up at less HTTP requests to handle did it. All right, cool It can have no HB requests to handle because you can have it directly in line unlike other images where you have to make requests from other sources as we move into HTTP to this is less of an issue But we're not quite there yet. So for the time being SVG is really awesome for that It's easily scalable for responsive one of my favorite things. It's in the name Scalable vector graphics that means that you can make it adjust to any kind of viewport and we're definitely gonna be doing stuff with that today It's a really small file size if you design for performance If you design for performance is an important part of that. So we'll talk about that today as well It's easy to animate again one of my favorite things. I wrote a literal book about that It has a navigable dom which means that you can reach right inside of it and move certain pieces around So if you have a flat image where everything is just kind of presented in front of you in order to make an arm move or something You'd have to go in and cut out pieces of it in order to you know kind of move them around These are literally just dom nodes that you can slap classes on that you can do all of the same things that you do HTML elements with so that's really cool We talked about how it's a now it has a navigable dom it also can be accessible because it has a navigable dom and It's fun. Remember when we used to have fun funds cool. Yeah, cool. All right So with all of the pens that I'm going to be showing today I I made all of these demos, but I'm gonna be showing you some work that other people made as well to kind of showcase them But I'll definitely have their names at the top of them and then also I make the slides open source so you can check them out later SVG is such a flexible medium. We can do so much with it We can manage state even with within it and do all sorts of beautiful effects So I actually hope that this is the last year. I have to show this slide People think that SVG is really not well supported because years past it wasn't but look at all that green We got opera mini we never get opera mini. That's just amazing And you know, it says IE 11 there, but it actually goes back to IE 9 with partial support on IE 8 I don't know why can I use doesn't show you all of that information But if you're not using SVG because you think it's poorly supported you can update that information in your mind as well So what does the scalable mean when we talk about scalable vector graphics? You can see here we place the graphic directly in line in the HTML and it has width and height attributes Which keep it to that size, but then when I take those out It adjusts and it fills that entire area Which means that if I wanted to you know make it constrained to the viewport width or the viewport height I can do so or if I want to put it inside of a flexbox or grid or percentage you name it so that's really nice because everything stays totally consistent and Is positioning in CSS keeping you down what sometimes it but it kind of bothers me SVG might just be your answer You saw all of those things that were inside of the SVG were staying exactly at their coordinates no matter What we were doing to it? That's really awesome for positioning You can kind of just throw all of the like crazy CSS stuff to the wayside and position things within SVG It even has text as a side note I did this to myself on the plane on the way here. I was drinking wine and watching a horror movie and Splashed it in my face anyway SVG allows you to do create create advanced Effects like this type lock up and it can look really slick and professional while still using actual accessible text That's so nice for responsive Which also means that in terms of animation we can create something that's fully Responsible and scalable in every direction and the animation values are working within that coordinate system So they'll to stay totally totally stable even if you're changing the sizes of them and moving things around and adjusting it These type of positioning refinements are really really wonderful if you have a ton of information on Smaller screens like mobile and you don't want to show all of the information at once if you have tons of icons And you need to kind of collapse that view you can do really advanced layout effects where you're showing and hiding that information with only a small amount of kilobytes So it doesn't necessarily have to be you know squishy either We don't just squish things back and forth when we make responsive design. Let's do some real responsive design So I made a huggy laser panda factory because you know we need to know where huggy laser pandas come from And that's where they come from So if we have the huggy laser panda on desktop We it's actually comprised of three different SVGs we've got one for the top part and one for the side and one for the other side and then on mobile They're going to stack and reconfigure you can see that middle part that one on the side That's magenta is actually just being transformed Translated and kind of moving over to the side So if we have the panda factory running we have our panda getting painted to be a panda Then we have our panda getting lasered and then we have our panda getting huggy'd you know like you have in real life and Then when we scale it down to mobile everything can kind of reconfigure and reconform and all of this works on Android devices old Windows phones and it's only 13 kilobytes So if we look into the code here What we'll actually see is that I have a timeline that's wrapped in a function That's named appropriately in case in this case the naming it appropriately is like function paint panda And I I really literally have a click event listener to re-trigger that timeline But you'll see all of the functions are scoped to the SVGs itself So the design and the functions are all organized in the same way So if I need to update something everything stays totally organized We can also use that stability for page transforms So react is really awesome because it helps us manage state in a really responsible manner I made this with react and green sock what green sock is an animation API react coordinates the state Well green sock coordinates all of the interim intermediary values So we're showing the transition from page to page and all SVG will stabilize all of our graphics while we do so So in this example, I have this concept of screens I'm toggling the screens forward and then they wrap back around to the to the beginning screen And then we have a timeline function that can choreograph all of the animation But something that's really cool about the green sock animation API is this thing called SVG origin here or this thing called clear props here The clear props will actually allow us to remove any inline styles that are set on that Element or that Dom ref so I can remove those if we need to recalculate values or put it into another position So here's another one I made with view and next which I love View is a front-end framework that is very similar to react in that it's the V of MVC You probably are familiar with it Next is a really quick and easy way to get server-side rendering with view And it allows you to do routing and all sorts of code splitting without stepping outside of a view file And because we're using SVG for all of these animations everything states totally stable Nux also gives us page transition hooks so we can hook into the animation and make it different per page So all the ways that the mountains are changing and the text is changing changes per page So if you'd like to check out the code, I have a repo for it and also a demo site that you that's live that you can check out too I'm showing the site so you can get a sense of how those JS hooks work We have these different page routes and if you want to plug into them There's a bunch of different page hooks per page The one that's really important here is this transition mode and that's super cool because when you have a transition mode in view What it will do is it'll allow that component to completely unmount But it'll wait for the animation to to fully fade out then it will unmount and the other thing will wait until it's done So you don't have to write any like messy callbacks, which is what you usually end up having to do when you write that kind of code So this is from code drops It's a similar concept, but it's built in a different way the fixed content lies beneath and once we move the content up It gets revealed and all at the same time that SVG path is changed Through path data ID and this is done with anime.js not green sock This pen by Sullivan Nolan uses transitioning effects and morphing This is back to green socks morph SVG and you can see how it's really captivating and again because we're using SVG It stays totally stable for mobile But we can also use SVG for the layout itself when we were making this page for web animation workshops Our branding is all these triangles. So we wanted to make some interesting page layouts Those little triangles between the sections are little pieces of SVG where we've said preserve aspect ratio none Which means that it's always going to scale in every direction with the container So usually you don't want that right if it's like a face or something. We don't want that. It's gonna be like And that's a technical term for that But in terms of page layout, that's exactly what we want Cool. So SVG can also be super tiny if you look at this HP archive graphic It's a breakdown of all of what we're transmitting over the web, right? All of the kind of content breakdown So we've got a bunch of video.  You can't be a web performance expert without being an image expert It's actually pretty true if you think about it If you think about that last graphic if you're not thinking about the size of your graphics Then you're really doing yourself a disservice I was asked to I used to be a consultant before I worked for Microsoft and this company hired me because they had 10 page 10 second page load times and just by optimizing the SVGs on their site I brought the the site speed down to less than two seconds That's all of those seconds of deployment and performance all came from the graphics. So how did I do that? Well, not all SVG graphics are created equal We have everything drawn with math But if you have tons and tons of path points and you're not not optimizing correctly it can really bulk your files So I really like using SVG OMG again These are like linked up in the slides if you want to check them out later SVG OMG is by Jake Archibald. It uses a lot of service workers So if you have a bunch of settings in it, it will remember the next time you go there, which I think is super cool It uses SVG. Oh the last one under the hood, which is terminal based So if you're more comfortable with your terminal you can use SVG. Oh, but I suggest you pair it with SVG Oh gooey because the way that you optimize Actually affects the way that that SVG will look the middle one is Peter Collin Ridge's SVG editor It's like a 15 year old rails app that I just keep in there because like I'm a neck beard and I like it still Probably a little less useful, but really really still kind of fun I also wrote a post for CSS tricks called high performance SVGs That was all of the process that I went through to reduce the size of those SVGs for that consulting gig So in this pen I have this little draggable thing And it's a little spaceman and he's standing on the moon and the cow keeps scaring him as he goes over the moon and it's touch enabled for mobile and That whole SVG is two kilobytes So you can do really kind of cool effects and you know show really really Interesting information and have things be super small So while we're looking at this Let's take a gander at what's happening under the hood because I ran into a gotcha when I was trying to build this So at first I was like oh, okay. I'm gonna make this like thing. That's like a null object You know around with this cow and I can spin that and it can also Detect if there are collisions with like get pounding get bounding client wrecked or get B box For that little astronaut head, but then it was firing all the time and I was like what's going on I think the browser is wrong. No the browser is not wrong What was happening once I started you know putting like you know borders around it and kind of understanding this a little bit more is That the browser doesn't see diagonals the browser only sees in rectangles So to give you a better idea of what that means if you look at the bounding box stroke of these rotating elements This is what the Dom sees so I just think that's crazy like look at that circle. That's so weird So sometimes in order to debug things like this you do actually have to think like the browser not like yourself Okay, back to the weight of SVGs because they're they have the potential to be so small SVG is the perfect time to use something like a loader a lot of loaders are really Ugly and a lot of loaders are using gifts which are really heavy if you have a heavy and ugly gift Maybe you should think about updating it this graphic when I was given this Given this graphic by the designer. This is for smashing magazines checkout experience It was 35 kilobytes and I brought it down to six kilobytes just by optimizing it correctly And that includes the animation and everything So SVGs can make other graphics smaller there's this thing called SVG dot JPEG dot SVG And by this guy named Shaw and this is not like a particular graphic that I found But you can see that just dropping in any graphic that I had around which is my I am happy Marge Simpson You know, we brought the file size from 38 kilobytes to 16 kilobytes Just by switching it to an SVG and creating an image mask over the kind of repeated You know images if a bit mask has a lot of the same colored squares It's still mapping out all of that territory where an SVG can say like take the bounds of these things and don't paint them Just show this one color. So that's pretty cool SVG can be accessible we mentioned this before there's actually like a ton of ways that SVG can be accessible And it's like can be complicated, but nine times out of ten This is what you're gonna need in order to make an SVG accessible. So I'm just gonna dive into that really quick So we write aria labeled by and then a title and that title It has to be the first thing that follows that SVG tag That title also has to have a unique ID on it Otherwise, it won't be picked up by Jaws and in NVIDIA devices. Just writing title is not enough We also have roll of presentation on the SVG itself what that'll do even for your icons It'll allow it to screen readers to know that it's an image and not announce everything inside If you wanted to announce things inside, you'd move that to a roll group So that's some of the ways that you can make it responsive I also like writing Lang, you know, whatever language it is so that you know, somebody's using an Screen reader in another language the computer does the hard work for them. That's pretty cool So there's a resource with support charts There's also this article by Heather that she wrote for CSS tricks She spent like every weekend going to the library checking every different device This whole big labor of love for the community. So definitely check out that article. She did a great job with it SVG can be styled like text This is kind of like not too fancy But something that a lot of people kind of come to me and ask me about so let's cover it real quick Someone on Twitter asked me about this They made an SVG sprite sheet and it they're not styling it along with the text They wanted everything, you know, if they changed that line of text for it to pick that up So really so this is the question code. I left it exactly how it was and The secret trick here that you may or may not know about is that you change the fill to current color camel case And that will just make it reflect whatever it is So right now I just have that line with a class that says color red on it and it's picking up that color So if you are using SVG icons for your site, that's a really quick way to not have a headache whenever you're working with it SVG can bounce We can make a ball bounce with SVG really easily without any Animation libraries using request animation frame If we have this bounce ball bouncing we can use a little physics to kind of drum up the bounce of the ball And we can make the radius bigger and we can do all of that midstream So I'm using view again here, and there's some info that I'm not sharing showing here, but here's the gist of it We've got data. We've got the total like height of everything. We've got the radius We're incrementing things based off of a quick event And then we're we have gravity that increases the vertical speed horizontal speed increments from the horizontal position All of these things I learned from like just pulling things out of physics books So you don't have to invent all of this stuff from scratch. You can steal ideas that have been around for a really long time This pen by Tiffany Ray side is one of my favorite animations of all time She's not using any library or anything at all She's spinning up pieces of the SVG applying physics and even these like crazy bounces to to it Also, she manipulates the SVG path values when it hits the wall She's just kind of a master. So if you don't already follow her on Twitter code pen, you should definitely go do that SVG can snap in order to create some, you know, really really beautiful effects We're gonna use some ES six template template literals Which you're probably all familiar with but just in case you aren't I'm just gonna say something about them really quickly Previously we had string concatenation and all of that printed out to this Which was really hard to read and it was kind of ugly and it was kind of error prone because it was hard to read and now We have awesome template literals that when you put things in back ticks We can just manipulate strings really really readily and what does that have to do with SVG? well SVG all of those paths inside and then SVG are really just a bunch of strings of commands And they have these curve values and all of the letters mean a certain thing and draw certain kind of curves and create certain kind Of path so I really like this kind of path explorer tool If you're not familiar with them the way that SVG works you can go and play with this I also wrote about it in my book if you want to you know something. That's a little bit more traditional And if we know enough about how those curves are made Updating them is very simple with something like template literals When we're building out these paths we start with a move to and then we can create those curve By using things like C and Q so we give it a handle And then we give it another point and the computer draws a curve for us How cool is that you can like plot three points and the computer draws a curve? I just think that's great So that's really neat and then we can plot the points We have a bunch of different coordinate values that we're updating and it's so flexible We can make effects like this So you might have noticed that that SVG was distorting at the end there So let's kind of cover distortion really quickly and dig in to how you can do that So distortion filters are really awesome There was this great code code drops demo with a bunch of buttons and definitely the most you know Impressive technique was you hit a button and this little ripple effect came out and what they're doing in order to create that is they're using a filter called turbulence and You can Animate this filter in JavaScript. You can't do it in CSS. It's not an annimateable property We're kind of like hacking the spec here and manipulating it because there's just a bunch of numbers But I would say that from manipulating filters and pushing the dom's boundaries and stuff and doing things I'm not supposed to do I would suggest setting the filter on a timer like applying it when you need it and taking it off When you don't because it is performance insensitive. It's not really hardware accelerated So we can make things like this pool and that's pretty fun because the way that this is done is by applying that filter and Using an image to distort anything that's beneath it So we can have tons and tons of path values like you see here Everything under the pool is also getting updated too and we can do it really really simply all we're doing is we're taking That distortion filter and that image and we're basically Making it scale down hit the wall and scaling up and we're also animating the filter So we can do like really really crazy effects and when I made this pen I wasn't really thinking about like the political climate It's kind of a weird one to show But we can by animating filters we can also make things like a realistic candle that's drawn with math That's really really fun In order to make this I have a few different Pieces that I just kind of traced off of a candle photo. So I just made this in Illustrator and then made a gradient that's attached to it and then I they're not actually blue But I have a bunch of different path values that I'm going to set on a for loop And I'm going to morph between those path values for each second and plot them along a timeline But I also am using a filter and it's this gooey filter that Lucas Beber Created so he has some prior art here. He he's actually using this with divs You can make an SVG filter and apply it to HTML You don't only have to use SVG. So that's pretty cool. So a lot of people use this kind of gooey effect It's a blur filter and a contrast filter applied at the same time So yeah, we cannot because you know that standard deviation of the filter is just using numbers We can have JavaScript update those numbers request animation frame knows how to update numbers So we can do that we go through all of the path values And then we've got a little math dot random opacity because nature is just a little unpredictable And then we can use that effect to create smoke with math SVG can do on-the-fly logo adjustment This demo was made by Leah veru who if you don't follow her already You should probably go do so because she makes all sorts of crazy great things But basically you're allowed to update these logos on the fly Which I think is super great if you have to collaborate with a designer who keeps on not making their mind up And you're like they're like oh Change it out here. Oh, no. It's like fat is in. Oh, no flat is in You can kind of make all of these things really really adjustable So you don't have to keep changing things up and she made this with a tool called mavo that she built That's basically so that you can drum up sites using HTML and CSS with very little JavaScript Which is not very useful for us But I'm pretty sure that almost everyone in this audience has a family member. That's like hey Can you make me a website? And if you do this is a really good thing to show them because they with just a little bit of training They can make their own website and you can get on to your real life work SVG can draw itself too So let's say we have a shape and that's the stroke of that shape is dashed But we make the dash all the way around that entire shape It's the length of the entire shape that offset the offset between those two dashes is animatable So we can have an SVG draw all onto the page just using CSS or something So I made this pen to kind of celebrate New Year's And there's like, you know the fireworks are that kind of idea and pew and yeah This pen by Chris Ganon is also really awesome He does this that same effects if you don't follow him you should go follow him because I think he's just pretty much a genius He's also doing this with clip path. It's super cool You can also interact with an SVG we can manipulate it and interact with it on the fly as well So if since it has a navigable navigable Dom, you can do all sorts of things with it Again, I'm using view here to like update the text and make random lines and allow the user to kind of play with the SVG graphic as much as they want to I can also animate it if I want to And have them be in charge of that as well And I made this demo too long, so we're all gonna watch it So it's gonna play the animation but the coolest part of all of this is I'm gonna play this animation It's still a graphic so I can still download it and it's gonna respect all of the positions that were set during that animation So even though I'm animating it. It's still in all of those places. It's still a graphic that they can hand out to their friends or something So here inside the HTML template we can create some semantic form elements And then we combine them to these methods where we're creating and kind of drumming up pieces of the SVG on the fly We use as we can use SVG to respond to things that the That the browser is doing so we have this like little Wally pen I don't know if you've seen the movie Wally, but I really like it He has a little cockroach friend and he's you know kind of reaching out for him every time the user Moves across the page so what we have here and we have a bit more code than that Basically we have these at mouse move events and I've created an entire timeline for him reaching his arms out complete with eases And then I plot that along that progress of the timeline along with the coordinates So the user can control all of that and it stays really really lifelike So in order to make that pen we had to clip and mask things so SVG can clip and mask things SVG offers this thing called clip path, which is really nice because if you looked at his arms They had to kind of reach out from somewhere, right? I can't just keep tucking everything behind of everything else in order to make it look realistic It has to clip out parts of his arm. So we were able to do that with clip path and If you use something called mask you can use opacity so clip pass will just kind of respect the geometry But something like a mask we can create something with an you know Like a gift masking with all of these SVG patterns and you know slowly unveil them We create a mask and desks and and put inside of it the image that we want to use and then we have we apply it to Erex that also has a pattern associated with it So I learned this technique from Yoke so who has like a whole bunch of pens like this that are super super awesome She also has the most comprehensive, you know collection of SVG And CSS clip pass so if you need to learn about them or you're confused about them This is all like interactive and you can play with it and the code is open source I also kept getting confused between the difference between clip pass and masks So I wrote a CSS tricks article that you can look at to that defines the differences between them CSS has tricks has pretty good SEO. So I knew I could just go look at my own resource again and again If I got confused again and since SVG also has text you can Have that clip that masking apply to text and do things like have your users update text to This pen by Noel Delgado is probably the most famous and also my favorite example of this Clipping and masking that's paired with animation SVG can signify something changing So I kept going in between different time zones for my work And I you know couldn't remember where all my co-workers were or what time it was And I could have just made a dial that just showed what time things were but by changing the SVG and making that dial That associates that change in time I get a better sense of whether or not it's day or night and I can ping them or not and they're probably with their Kids or something like that But while I was working on this Something interesting I found was I used to use this thing called moment.js that kind of allowed me to work with Time data and understand where everybody was you know in in terms of like daylight savings time But there's actually a native method called to locale time string that offers all of these defaults like hours and minutes and All sorts of things so that actually respects all of those daylight savings time so you can eliminate a big library like moment You can use SVG's view box as a camera. This is one of my favorites You might already know this but when you have something like a graphic when SVG is plotting all of those points to draw those Coordinates it's doing so on a big piece of graph paper basically and that piece of graph paper is endless It's just this giant coordinate system and in order to see inside of that SVG and know where to plot those coordinates And what you're looking at You have a thing called the view box and the view box is made up of four values 00 that's x and y where to start it off and then width and height So if I wanted to update this view box to just look at these little houses or something I would have to you know update them to 215 want by 160 42 by 20 So SVG also has a native method called get B box and that will return this object that has X Y width and height for anything that's inside the SVG That's cool. That sounds a little familiar that might be what we need to maybe animate it or you know updated on the fly So here I'm just you know using that to update the view box And then if I take that out it will go right back to where it was So I'm just setting the attributes based on that So then we can do something like this data visualization where we're zooming in on a certain country in order to show Different pieces of information and again because it's SVG It's all totally scalable for mobile and it's so small because it's just one path that's drawn We can also make a flow chart I'm basically this is just a giant SVG and we're just like moving things based on the user input and like Then people can pick a certain thing and then they can go to you know a different kind of output So we can make you know interactive flow charts. This one is really cool This is like a game that somebody made Updating the view box where they're like placing little household items and stuff But we can do better. We can do like a big game. So So let's make a game and that will be the last thing we do this afternoon So if we have a game about a hipster elephant that's going to go get tacos But his friends keep texting him to change plans and you're supposed to try to go get the tacos But avoid the text messages and like there's margaritas for extra bonus points Oops So you can basically move this guy around and like your heart meter goes up and down And if you lose the game you become hangry and you have to watch a movie you already saw and If you win the game you can tweet out your score. It's based on real life events So how do we use SVG in order to create this? We're using react to manage all the state for that application if you know how to manage state for an application You can probably already make a game too So we're using SVG three ways. We have it directly in line in the HTML for loops We have background images for things like tacos where we're not really, you know updating the tacos We're just kind of throwing them across so they don't have to do anything Super special and we have things that are in line directly in react. So let's look at that last one really quickly So if we have this is a slightly older pen. So yes, I know I'm using react create class. I wouldn't use that now I would use classic stens So if we have the initial state of that score that's at 500 and then you know We're setting the game to start because they can play it again They can you know get to the end and decide to replay so we're setting the score back to 500 if they do So we don't want them to have too much, you know winning too much or losing too much And then we have this update score that will either like end the game or win the game if it gets to a certain amount But then and my highlighter is not on this It's on the dots but it should be on the heart meter and that heart meter We're passing down this dot state dot score So you might have noticed that heart meter at the top of the at the top of the game that was kind of keeping track of our score So basically we have this SVG and that SVG is actually really really big because I want to use whole Numbers for this. I don't want to use like 27.25 or something to update the score when he's a thousand or zero So it's really big and then we have the width that's this stop props dot score and in our racks in SVG in order to update it We have an xy width and height just like the bounding box so we can update that on the fly and Because it's SVG we can make it super small then for the size of the screen that we need and on desktop It's a certain size and on mobile. It's a different size with media queries All of that and we didn't even get to any data visualization I wrote a book about SVG animation. This is not my book. This is my friend making fun of me I don't have a man blob animal. That's not even my last name. I Do have a real or I look I think I have like a fancy chicken or something. That's cool Um Yeah, thank you so much for coming today. I appreciate it Thank you so much Sarah Those animations totally blew my mind and I love how you shouted out so many other creators in your talk way to spread the love Yeah, yeah, there's a lot of them. We have time for one quick question What resources would you recommend to get started creating awesome SVGs like the ones you showed? Yeah, actually, I think a misconception that a lot of people have is that you have to be a designer in order to make things with SVG you don't there's tons of free SVGs online that you can go play with Free pick with a K. No CK free pick comm has tons of free vectors that you can use The noun project also has a bunch of free vectors So you can just you know download them and start playing with them and animating them and manipulating them Awesome. Thank you. Yeah, definitely go buy her book if you want to learn more


the growth that you seek and we seek is in the process, it's not in the outcomes. Remember, in the movie Wizard of Oz, along the road Dorothy had these three life-changing encounters with the scarecrow who needed brains, intelligence, with the tin man who lacked heart, and with the lion who lacked courage. I want you to understand that along the yellow brick road in the process towards your Oz, if you like, is where you will find the increased intelligence you seek, whether it be mental or emotional, relational and so on, the increased heart that you seek, the deeper connection with other humans, the deeper levels of empathy and love and kindness and compassion, the greater courage that you seek to overcome the challenges you have in life and help others with theirs, all of these things and more are on the road, they are in the journey, part of the process, they are not what someone hands you at Oz, they're not gifts, they're things you grow and work for along the way.


suspense the highest honor that a california sherry can win has just been bestowed upon c-r-e-s-t-a b-l-a-n-c-a cresta blanca cresta blanca yes at the recent california state fair in the keenest judging of california wines ever held cresta blanca triple cream sherry was the judge's choice to receive the gold medal top award for outstanding excellence this is another tribute to cresta blanca triple cream by america's leading connoisseurs of fine wines proof indeed that when you pour distinguished cresta blanca you serve the best shenly's cresta blanca wine company livermore california and now shenly brings you radios outstanding theater of thrills presented by roma wines that's r-o-m-a roma wines for your everyday enjoyment tonight roma wines of fresno california bring you michael oshae in the twist a suspense play produced edited and directed for shenly by william spear listen gus you've got to do the show i can't do it you've written for all the big comedians you turn out a hit i don't have the time oh my god look i don't have the time anyways i i couldn't do it ridiculous a guy with your reputation yeah a guy with my reputation yeah what do you know listen 12 years ago i was on the calves gustav green the hack lison red cripes how i hated the calves work like a slab 12 or 14 hours a day for a lousy 27 bucks a week now do you blame me that i took the day dreaming like like maybe it was my limousine and i was driving because my chauffeur had a day off i used to sit at the wheel figuring out the down to situations like i'd pick up some rich old daemon she'd leave me a million bucks or or i'd save a guy all all kinds of situations but all i got was 27 per a week until the night i met fan take me home driver home your home or my home wise guy well you got talent you're driving a cab where can i get a job driving a cab you want the radio on now definitely no oh now don't let's be bitter shall we you know radio was quite immediate yeah just think some guy says a few words into a microphone and you can hear it as far west as georgia gustav green well well mr green meet van hauser the best gag man in the radio business currently freelancing unemployed on the beach well if you're so good why aren't you in there writing them yaks wise guy why because words i know rip tickling words gags yeah jokes to make a corp slap but plots situations situations that's another story i could i could coin a million if i could figure them out well look situations now let me tell you i am a veritable shahara zady on situations i got a million i look at for instance the guy who says that if i don't know i don't know something clicked between me and van hauser from the beginning i always hated his guts the way he talked to me like i was date but up in his room i started feeding him stories stuff i dreamed up on the cab he put in the put it into good words and it came out very funny too well inside a couple of years i was getting 1500 bucks a week but i was tied to that guy i couldn't work with nobody else i'd sit down with another gag writer and nothing would happen yeah i knew it was van or 40 bucks a week in some broken down job so so i hung on to him like a barnacle i worked with him ate with him played with him my place was just down the hall from his at the hotel sometimes i thought i'd go nuts if i had to look at his sneer and ugly puss another day and the the only satisfaction i had was that he needed me and hated me just like i needed and hated him but one day while we were riding a spot for schmo for a day he chose me a very unfunny line gus my good boy you uh maybe interested to know that i'm gonna marry julie felps julie felps a dancer that's right he used to be the club katalina she uh making trouble for you cut it all right all right i didn't say nothing against it all right you better not okay go ahead and enjoy yourself thanks so gus my cornball colleague we uh we may not be seeing so much of each other hence oh now look you don't mean that bigger hey now wait a minute what's going to be with our partnership here we'll see i'll uh i'll talk it over with julie no no van now look i mean it well we've always done what we wanted to loafed all day worked all night hadn't slept at any crazy hour now no dame is going to stand for that uh julie is different no dame is different yeah she knows how we operate and uh she knows you guys yeah and she's not exactly crazy about me neither i was just coming to that now uh if you want to stay in with me be nice to her it won't do no good listen van she'll make trouble between us see she'll work on that as soon as the knot is tied i said now listen to me i'm your pal van a dame like that is hot busy you know what the club catalyzer she was an exact gus julie is one of the million a joke man like you comes a dime a dozen okay okay if that's the way you feel the way i feel pardon me for having any feed hey i just be nice to her no cracks okay so i'll be nice now look about sunday show i said be nice to her but you're not thus we're finished yeah i should have been nice but i knew it wouldn't do no good julie was a small town girl who sowed on broadway after she had a bust up with nick edwards the the mug who runs the club catalyzer and she wanted out and she was going to take van with her too so it came to me that i'd better figure out a situation and pronto she didn't like me because she was a scared of me i knew about her and nick edwards and van didn't so i says to myself i says gus maybe the dame will scare away hey who is it van oh gus green what a surprise hello there julie yeah this is for you flowers yeah yeah van told me about you to see and i figured lovely come on in gus thanks i miss flowers so much in the city back home the garden's always full of them yeah yeah say this is a nice place you got him thanks yeah very swanky and wasn't that chair once in the lobby of the club catalina well i bought it when they redecorated the place oh sure sure you did honey but it it just reminded me but what i just happened to see your friend nick edwards today i haven't seen nick in months oh sure you haven't honey but he's still carrying the torchola for you i'm not interested no i didn't say you were but uh you might be interested in the fact that nick said if van hauser marries julie so help me i'll kill him did he say that now would i lie honey well that settles it i've had enough of show business van and me are going back home oh no no you can't do that to van julie this is his life what's he gonna do in a small town i don't care i'm sick of sick of all the cheap characters the bums and the hangers on if i want him too van will come with oh look maybe he would well i'm sure he would but julie what i what i really wanted to say was why don't you give me a few days i'll go talk to nick and who knows maybe i can fix the whole thing up would you guys i'd like to stay for van sake i'd like to see him get a good job with regular hours maybe an advertiser sure sure nick will listen to me and i'll at least i can try thanks gus you're nice i didn't know and and then i get another idea what's that maybe the three of us could all work together oh i can't write i can tie well we need a secretary we could dictate our stuff to you i don't know sure that you don't have to after all what is a comedy script along the left hand side of the page you put the name of the character and then you write out what he's supposed to say simple sounds simple you could spend more time with van how would you like to try i'd love to gus it would be wonderful sure it would be wonderful for me when she said she'd work with us julie was playing a part in a situation that i dreamed up and let me tell you it was a good one because it ended with me still making a grand and a half per week and julie phelps well julie phelps was just not there music chaser and a commercial credits and sign off got that darling every word mr housing well then how do you like our new secretary oh she's good guess how come you had such a swell idea because if this works out i'll be the happiest person alive oh no you won't julie i will now come on i'd like to try dictating ready okay take a clean sheet of paper here's a gag sequence for the fred benton show oh look who's writing gags don't laugh genius now look fred's talking to mrs mishmash and she starts reading the wrong page of the script you see ready let's go mrs mishmash please don't laugh at me i think we've made a mistake mistake now fred benton i know i have mrs m let's start all over from the beginning from beginning fred if you love me you will that's funny no no that's charming now this is mrs my going too fast no no okay this is mrs mishmash again i would do anything for you fred he says him he says i would like to see you i'm bored okay mrs m again let's talk this over how about tonight about tonight yeah fred when at midnight mrs m come come i'm waiting for you right now you're right now did you get it all good tight the right way wait wait don't bother julie we couldn't use that corn even on the benton show all right wise guy give it to me julie i'll file it under sustainers look if you're gonna fight i'm not gonna work for either of you van be a deer and get me a pack of cigarettes downstairs when you all right but gus don't try to write any more of those charming guys get lost gus yeah did you get anywhere with nick well uh yeah julie he's softening up but uh he wants to see you gus i don't want that man near me now look you don't see him you better start wearing black for van you know nick edwards i know nick wouldn't stop it killing but i now listen julie i i i haven't got time to argue with you now van will come back but why don't you come to my place tomorrow night at 11 i'll run in a van for sure well then come before eight and wait for me we'll have rehearsals till then what about that tell him you're going to sleep earlier so what if he calls anyway i'll cover you i'll probably be with him anyhow he must never know about nick i get it i get it now listen julie you just leave everything to me and in a couple of days you won't have to worry about nick edwards again yeah just leave everything to me and you won't have to worry about anything anymore julie phelps not even your own funeral come eight o'clock the next evening i paid a little visit to my apartment long enough to see that julie was comfortable and also to get the keys to her place out from her handbag i drove over there and went upstairs to do some interior decorating my kind take van away from broadway are you gonna send me back to 40 bucks a week and a pig's ear you are julie phelps get that and a pig's ear now just one more touch to complete the situation a little business outside the club catalina hey kid i kid come in here listen now here's a dime kid take this note and this here envelope and give it to nick edwards and if anyone asked you say a game a dame gave it to you got that a beautiful dame you got it from a beautiful dame right look gus gus no more work let's not call what's the matter van you're tired no no no what's eating you well you wouldn't understand all right so don't tell me i don't care anyhow all right it's julie said she had to go to bed early tonight so what it ain't legal i called a half dozen times no answer uh-huh afraid she's two time in your hand i didn't say that yeah but i know how you feel yeah well mind your own business look my friend i'll do you a good turn leave me dial the number for you the number's on the pad let's see what your fat fingers can do you could talk to her while i go down to my room to get my hat and coat i'll take you for a drive before we hit the sack sometimes you're even you okay here take it it's ringing now i'll be right back let's see julie darling van honey i'm sure glad to hear your voice where you've been why what i've been trying to get you all evening no answer then then that's right i told you i i was going home to get some sleep when i phoned you must have maybe it didn't wake me well now baby that's hardly likely with a phone right in your bed sometimes i i sleep julie i i can julie is there someone there with you of course not van i'm alone by myself i'm julie julie the very neat situation you're granted warden sure julie being killed in her apartment two miles away van hearing it over the phone and me in the next room to him at the hotel you like it ham warden yeah i like it too and i did it that was a very sensational situation for suspense roma wines are bringing you mr michael oshae in the twist roma wines presentation tonight in radio's outstanding theater of thrills suspense suspense radio's outstanding theater of thrills is presented by roma that's r o m a roma wines selected from the world's greatest reserves of fine wines have you discovered how much roma california wines add to your everyday enjoyment for example millions of american homemakers serve delicious roma wines to dress up everyday dishes to make even the simplest meals really delightful events yes good food does taste better with better tasting roma wines and there's a delicious roma wine to complement your enjoyment of every dish juicy steaks and roasts taste their best with robust roma burgundy fish fowl or any light meat become exciting treats with delicate roma sautern or pale golden roma rind wine for entertaining too you'll find better tasting roma wine adds the gracious festive note that charms guests and makes any dinner a rousing success so for extra mealtime enjoyment that's inexpensive always serve roma that's r o m a roma wines america's favorite wines and now roma wines bring back to our hollywood soundstage mr michael oshae as gust green with sydney miller as van hauser in the twist a play well calculated to keep you in suspense van was still screaming into the phone when i came down the hall from my place a minute later with hat and coat draped over my very shaking i opened the door because something's happened to julie something's happened to julie how do you know did you get her yeah she answered the phone so well she sounded funny like there was someone in the same room and then suddenly she sounded like she was hit or choked or something ah maybe it's just a gag she was pulling you know dames do that sometimes you think so why sure no no no it couldn't be i heard a gust gust what should i do now come on keep your shirt on van she screamed did you call her back no no i didn't well why don't you so i call her back that's what i'll do sure of course i'll call her hand me a phone yeah yeah that's what's happened i know it lying busy oh no no answer you just spoke to her a minute ago because i'm worried i'm worried sick that get it she's all right come on out for a ride although i couldn't look tell you what i'll do for a pal i'll drive you over there you can check up for yourself van looked pretty grim as we drove over to julie's place in the west 70s i checked over everything i'd done and figured how i'd work out the rest of the situation and we turned off central park west into the side street where julie lived on the second floor of a converted brownstone look there's a guy coming out of the house that's probably nobody he's making a getaway gust follow him i never catch him now oh gosh gus if you'd only got close enough to see his license number well i did what was it lk 573498 okay 573498 all right sam spade now let's go upstairs and visit julie the door to julie's apartment was wide open when we got upstairs and the place was just like i left it like to defend some kind of a fight and then then i saw where i'd made a mistake the telephone where julie was supposed to be strangled was as neat as a pin i watched van's face to see if he noticed it but well he was too broken up to notice anything julie because she was a sweet kid what do you mean was i know she's dead what do you know all you see is that her apartment is all busted up i heard her scream tonight guess i waited 20 years to meet a girl that i could marry so help me i'm not gonna die till a guy who did this is in his grave you'll see you'll see this i'm kind of mixed up now in a little while i'll be able to think i'll know what to do sure i'll know what to do look that's a telephone what about the telephone i'm gonna call the police uh no van now wait a minute don't be crazy what look put that telephone down why shouldn't i call the police it's very simply i got no evidence she was murdered but i heard a scream use your eyes van will you use your eyes julie said she was in bed has the bed been slept in and where's her coat where's her poison where's her hat they're not here but she said she you're right you're right i won't call you maybe she's still alive that's better now look van sometimes we haven't felt too good towards each other but after all we've been partners for a long time kid now tell you what i'll do anything anything you say to help you all right then look look just on an off chance cause trace that license plate will you let's find out who that guy was we went back to our hotel i slept like a log because i knew that julie was 10 feet from my bed in the closet very dead where she couldn't come between me and van anymore next morning i told van i checked at the license bureau whose car was it nick edwards catelyn edwards that's right why that dirty goon i look you don't think that i don't have to think i'll let the police now wait a minute hold it look van i i i never told you this before but i knew all along that julie was playing around with nick edwards with nick edwards yeah that's why i never liked it now you better not call the cops maybe we was just busting in on a private little party oh no i can't believe it no not julie well we gotta find out where she is and the guy who knows is nick edwards what makes you think i'll tell i'll tell you what i'll call him at the club tonight and ask him over i think maybe he'll accept me invitation well nick arrived at 11 p.m and from my window i watched him park his black car in a dark side street near the hotel just like i told him to and i carried julie's body down the back stairs and put it in the luggage compartment of nick's car nobody saw me and a few minutes later i knocked on van's door that's you guys come in hi van hi nick good evening gus nick was just telling me gus i look i'm just as worried about julie as you guys are see yeah that's easy to say okay okay don't take my word for it but i've had her house called every half hour all day why'd you go there last night in the first place you haven't been around long have you never mind that wise guy why'd you visit my girl who said she was your girl she was engaged to me she was tired of you why you sit down she told me so herself when yesterday then you saw her yesterday nick no no i ain't seen her since she quit working at the club and started to pile around with your friend here but you just said that julie was the only girl who ever had me on the rope see but when she called it quits i went along she was too good for an ex-con like me anyway i figured but the last night someone gives me a note in her handwriting oh what did the note say it was the most beautiful thing i'd ever seen i read it over and over until i knew it by heart please don't laugh at me i think we made a mistake i know i have let's start all over from the beginning if you really love me you will i love you i'll do anything for you i'd like to see you let's talk this over how about tonight when at midnight come come i'm waiting for you right now as soon as nick edwards left i told van i didn't believe anything he said and as far as i was concerned nick either killed julie or had taken her away van agreed with me and we called the police ah yes it all made a perfect situation the best i'd ever dreamed up all and nick edwards is high powered lawyers couldn't save him from being sentenced to the chair yes sir life looked pretty sweet but there was just one thing wrong van's comedy was getting worse and worse fred benton told us would have to get better or else now we sat in van's room sweating out a benton program that was a day overdue and van for the love of mike will you pull yourself together of course i i can't think you don't have to think i gave you the whole situation all you gotta do is write the gags for it gags now look look in the first scene fred and mrs mish ma steal a horse but here's the twist the horse is blind you get it well come on then give you know hundreds of horse gags now just give them a twist and fit the situation i can't they just won't come look if we don't get this script in tomorrow fred will can us now come on guy will you write all right yourself van you know i can't write i'm no good without a guy get yourself another gag man i'm through look washed up you know it won't work van you'll know that i've tried it under qt i was afraid that someday would break up but it never worked with you and me van something happens we're a great team without me you're just another guy making good words without you i'm just another joe now don't you see kid that's why we got to stick together even if we do hate each other's guts that's why nobody can't never break us up now come on guy right will you i can't think of anything look how we got something the files we haven't used you you got a senior dictator to julie what was that that mrs mish ma she's on the fred was it please don't laugh at me or something i i think we made a mistake no no van look that's a no good situation that's dead let's get something new it's a good situation no um a very clever situation all i need are the lines please don't laugh now van i'm telling you it's no good lines the lines please don't laugh i'm telling you it's no good van of course why didn't i think of that before those lines you dictated the julie they fit no they don't fit besides i can't ride gag you know that wasn't a gag us that was a situation the most desperate situation you ever invented now wait a minute what are you beating your gums about it find out what are you gonna do operator i want to speak to inspector martin a police headquarters get away from that door gus i got a gun now don't shoot van wait a minute listen to him don't move police headquarters inspector martin no inspector martin this is van hauser of the julie felps case hey i've been trying to get edwards didn't kill julie gus green did and i got proof that makes it even worse edward says you framed him green did nick's note was a script dictated to julie minus the character names how about his alibi he dialed his own number inspector not hers and killed her while she was speaking on the phone to make things look right he messed up her apartment i never could quite figure out why there were no signs of struggle around her telephone now i know he must have stowed her body in nick's car better send some cops over right away before i shoot him they're coming over hauser to protect you edwards broke out about an hour ago watch out for him nick edwards yes nick edwards all right hauser come across with that gun nick nick you heard what i said didn't you so what i i didn't frame you gusted he's a guy with a situation so what you took my girl away from me didn't you all right give me that gun now now nick wait a minute what are you gonna do with nothing except give me that gun hauser i'm a little too quick for you now now nick please now don't shoot me let me tell you how this car is going i've got a belly full of your stories they put me in jail remember they're all stuffed to me now see but like they say there ain't no situation that can't take a new twist here's the twist to this one you ain't gonna die for the murder of my poor julie no no you're going to die for something you didn't do what what do you mean nick just this the murder of van hauser well hey they didn't believe me at the trial so i'm up for killing my late unlimited partner but you know me i always like a twist they got nick for killing julie now i guess you can understand why i can't write the prisoner's annual show can't you warden not without van and besides like i said i don't have too much time do i before i go to the chair suspense the twist starring michael o'Shea presented by roma wines that's r o m a roma california wines america's largest selling wines when your family and friends enjoy glorious golden amber roma sherry or ruby red roma port you share the rich reward of choicest california grapes selected and gently pressed at peak taste richness with ancient skills and wine making resources unmatched in america roma master ventures guide this great treasure unhurriedly to full taste perfection these choice wines then are laid down with mellow roma wines of years before and from these the world's great reserves of fine wines roma later selects for your taste pleasure tomorrow and every day enjoy this naturally better taste of roma wines whether your favorite roma wine is not like roma sherry or rich roma port you'll find that every roma wine is better tasting wine that's why more americans enjoy roma than any other wines tonight's suspense play was by bave blau next thursday same time you will hear donald o'connor as star of suspense produced and directed by william spear for the roma wine company of fresno california in the coming week suspense will present such stars as claire trevor kirk douglas and others make it a point to listen each thursday to suspense radio's outstanding theater of thrills this is cbs the columbia broadcasting system