1 00:00:00,000 --> 00:00:00,060 2 00:00:00,060 --> 00:00:02,476 DAVID MALAN: --start to implement this notion of something 3 00:00:02,476 --> 00:00:03,720 either being one or a zero. 4 00:00:03,720 --> 00:00:05,620 Indeed, we could just do it over here. 5 00:00:05,620 --> 00:00:09,090 You know this next demo is actually the result of a progression of demos. 6 00:00:09,090 --> 00:00:12,750 It was a few years ago where I had always kind of talked in the abstract 7 00:00:12,750 --> 00:00:15,990 about turning light bulbs on as representing one and zero, the presence 8 00:00:15,990 --> 00:00:18,420 or lack of electricity, and then just on a whim I think, 9 00:00:18,420 --> 00:00:23,460 before one year's first lecture, drove down the road to a Target, big store 10 00:00:23,460 --> 00:00:25,461 like Walmart, and grabbed a few inexpensive desk 11 00:00:25,461 --> 00:00:27,585 lamps, the kinds of things that you would like clip 12 00:00:27,585 --> 00:00:28,920 onto your shelf in college and-- 13 00:00:28,920 --> 00:00:29,130 DOUG LLOYD: Those are flexible, yeah. 14 00:00:29,130 --> 00:00:30,270 DAVID MALAN: --and you've got a few light bulbs. 15 00:00:30,270 --> 00:00:32,478 Yeah, these little goose-neck things, and then I just 16 00:00:32,478 --> 00:00:34,354 attach them to the lectern on stage. 17 00:00:34,354 --> 00:00:36,270 And then it was actually a great demonstration 18 00:00:36,270 --> 00:00:40,050 I thought, in retrospect, being able to then literally turn the switches on 19 00:00:40,050 --> 00:00:43,530 and off, all our transistors on stage, and have something very visible, 20 00:00:43,530 --> 00:00:45,390 let alone in a big space like this. 21 00:00:45,390 --> 00:00:48,560 DOUG LLOYD: Right, but the CS50 is constantly reinventing itself every 22 00:00:48,560 --> 00:00:50,850 DAVID MALAN: I know, creating work for myself. 23 00:00:50,850 --> 00:00:53,010 So these are-- yes, are binary bulbs. 24 00:00:53,010 --> 00:00:56,040 So you might recall, Ansel Duff, a former advisee of mine, 25 00:00:56,040 --> 00:00:58,890 and an undergraduate here majoring in engineering sciences, 26 00:00:58,890 --> 00:01:00,450 actually built these for us. 27 00:01:00,450 --> 00:01:04,500 And the vision was, he machine this long tube that held eight light bulb 28 00:01:04,500 --> 00:01:07,950 sockets, and then we were really on a kick with Hue light bulbs 29 00:01:07,950 --> 00:01:10,777 that semester, which are these Internet of Things devices where 30 00:01:10,777 --> 00:01:14,100 you can actually control via an API or application programming interface. 31 00:01:14,100 --> 00:01:17,100 And you'll see, we also went on Amazon and got these little grade school 32 00:01:17,100 --> 00:01:19,975 refrigerator magnets for the one's place, two's place, all the way up 33 00:01:19,975 --> 00:01:21,540 to the 128th's place. 34 00:01:21,540 --> 00:01:23,730 And so you'll see eventually that I can take out 35 00:01:23,730 --> 00:01:29,400 an iPad where Ansel wrote some software that talks via Wi-Fi to the light bulbs 36 00:01:29,400 --> 00:01:33,137 so that our student volunteers can turn the lights on and off in a pattern. 37 00:01:33,137 --> 00:01:35,970 DOUG LLOYD: And the other cool thing about having this magnetic tube 38 00:01:35,970 --> 00:01:38,370 or magnetic paint on there is that a little bit 39 00:01:38,370 --> 00:01:42,480 later on when you see a second demo of this, where we can sort of magically 40 00:01:42,480 --> 00:01:43,647 wipe the place values away-- 41 00:01:43,647 --> 00:01:45,855 DAVID MALAN: Dramatically wipe the place values away. 42 00:01:45,855 --> 00:01:48,240 DOUG LLOYD: And suddenly we have the hacker edition 43 00:01:48,240 --> 00:01:50,880 version of the binary bulbs problem. 44 00:01:50,880 --> 00:01:54,540 DAVID MALAN: Indeed, which gets some good like, oh, from the audience there. 45 00:01:54,540 --> 00:01:56,670 Though admittedly, I think we actually over 46 00:01:56,670 --> 00:02:00,360 engineered the solution so to speak, whereby this past year 47 00:02:00,360 --> 00:02:03,600 we actually reverted to not using Hue's, but just using old school light 48 00:02:03,600 --> 00:02:08,659 bulbs and little toggle switches, which were just so much easier to set up. 49 00:02:08,659 --> 00:02:11,700 These things are great when they work, but honestly setting up the Wi-Fi, 50 00:02:11,700 --> 00:02:14,783 making sure we had our own private network that all eight light bulbs were 51 00:02:14,783 --> 00:02:17,670 on, and the iPad was working, it was just so many variables 52 00:02:17,670 --> 00:02:21,300 and it would be just awful if that doesn't work in the first few minutes 53 00:02:21,300 --> 00:02:24,720 a class when you're trying to send a message that, hey look how simple this 54 00:02:24,720 --> 00:02:26,304 is, but you can't even get it to work. 55 00:02:26,304 --> 00:02:28,386 DOUG LLOYD: What was great about a demo like this, 56 00:02:28,386 --> 00:02:31,950 is you don't even need a rig as awesome as the one that Ansel helped put 57 00:02:31,950 --> 00:02:34,650 together because a lot of schools that might be-- 58 00:02:34,650 --> 00:02:36,000 there's the dramatic wipe away-- 59 00:02:36,000 --> 00:02:38,540 A lot of schools might want to do something like this, 60 00:02:38,540 --> 00:02:40,350 but it's really easy to do with just cell phones now, 61 00:02:40,350 --> 00:02:42,330 just turning on your flashlight or your an app-- 62 00:02:42,330 --> 00:02:42,820 DAVID MALAN: Indeed. 63 00:02:42,820 --> 00:02:43,620 DOUG LLOYD: --or an app like that. 64 00:02:43,620 --> 00:02:45,630 DAVID MALAN: And that's what I've started doing when traveling and giving 65 00:02:45,630 --> 00:02:46,963 little demonstrations like this. 66 00:02:46,963 --> 00:02:50,294 It's just much easier than packing like three big light bulbs in your suitcase, 67 00:02:50,294 --> 00:02:51,460 you just ask for volunteers. 68 00:02:51,460 --> 00:02:53,640 DOUG LLOYD: I can imagine getting three of those lamps through the TSA 69 00:02:53,640 --> 00:02:54,300 would be very easy. 70 00:02:54,300 --> 00:02:54,966 DAVID MALAN: No. 71 00:02:54,966 --> 00:02:55,650 These days, no. 72 00:02:55,650 --> 00:02:59,650 So any form of lights work, or barring that, a piece of chalk 73 00:02:59,650 --> 00:03:02,540 and a one and a 0. 74 00:03:02,540 --> 00:03:03,390