0:00:17.160,0:00:18.060 JULIAN SIMIONI: All right. Everyone can hear[br]me well now? 0:00:18.060,0:00:19.279 They've turned it off. Everything's good. 0:00:19.279,0:00:21.750 All right. It says 3:50 on the little clock 0:00:21.750,0:00:23.240 here which means it's time for me to go. 0:00:23.240,0:00:26.610 So, hi everyone. I'm Julian. This is my first 0:00:26.610,0:00:29.990 RailsConf. It's great to be here. We are not 0:00:29.990,0:00:31.500 gonna talk about Rails at all. We're gonna[br]talk 0:00:31.500,0:00:34.720 about space. This is one of my favorite pictures 0:00:34.720,0:00:36.800 ever, right. It's the, the Earth rise picture[br]from 0:00:36.800,0:00:39.920 Apollo 8. 0:00:39.920,0:00:43.370 And my whole life, I've just loved space.[br]From 0:00:43.370,0:00:44.690 when I was a little kid, it just inspired 0:00:44.690,0:00:46.860 me so much. I know it inspires tons of 0:00:46.860,0:00:48.580 other people. I know, I got into a technical 0:00:48.580,0:00:51.180 field because, as a kid, I loved space. Raise 0:00:51.180,0:00:52.969 your hand if you think it's the same thing 0:00:52.969,0:00:55.250 for you. I know I've talked to so many 0:00:55.250,0:00:56.809 people where that's the case. Awesome. 0:00:56.809,0:00:59.719 And I mean, just, space is really cool, right. 0:00:59.719,0:01:03.430 There is, just, you know, everything about[br]astronomy or 0:01:03.430,0:01:07.280 manned space explorations is just really,[br]really awesome and 0:01:07.280,0:01:12.009 inspiring. And there's one thing, above all[br]else, that 0:01:12.009,0:01:14.759 inspires people just so much, and that, of[br]course, 0:01:14.759,0:01:17.869 is the Apollo program. 0:01:17.869,0:01:20.950 Landing on the moon is, maybe, the greatest[br]thing 0:01:20.950,0:01:24.970 that humans have ever done. And, and, you[br]know, 0:01:24.970,0:01:27.080 people will talk about awesome rockets, right.[br]Like, the 0:01:27.080,0:01:30.300 Saturn 5. It generates seven and a half million 0:01:30.300,0:01:33.530 pounds of thrust on takeoff. That's. That's[br]a lot. 0:01:33.530,0:01:36.830 Or they'll talk about, you know, astronauts[br]who, who 0:01:36.830,0:01:39.830 trained for years, and, you know, were brave[br]and 0:01:39.830,0:01:41.700 took insane risks that, you know, most of[br]us 0:01:41.700,0:01:44.929 can't even comprehend. Or they'll talk about[br]mathematicians and 0:01:44.929,0:01:47.530 awesome things they did for, like, the guidance[br]equations 0:01:47.530,0:01:49.020 and stuff to get people to the moon safely 0:01:49.020,0:01:49.950 and back. 0:01:49.950,0:01:53.270 And then they'll say things, like, oh, yeah,[br]we, 0:01:53.270,0:01:55.080 we landed on the moon with, you know, less 0:01:55.080,0:01:58.429 computing power in a wrist watch, or something.[br]And 0:01:58.429,0:02:01.330 as a software developer, you know, that makes[br]me 0:02:01.330,0:02:03.270 sad. You know, for a long time, I didn't 0:02:03.270,0:02:05.050 really think that there was anything in the[br]Apollo 0:02:05.050,0:02:09.610 program to inspire us software developers.[br]And, fortunately, it 0:02:09.610,0:02:11.880 turns out, that is not at all the case. 0:02:11.880,0:02:15.470 So this is the Apollo guidance computer. To[br]give 0:02:15.470,0:02:17.950 you a sense of the scale, the little display 0:02:17.950,0:02:19.040 is, like, a little bit bigger than your hand. 0:02:19.040,0:02:21.860 I think it's like, nine by nine inches. So 0:02:21.860,0:02:23.360 this thing was built to take people to the 0:02:23.360,0:02:29.590 moon. And it is awesome in ways you might 0:02:29.590,0:02:29.870 not expect. 0:02:29.870,0:02:33.320 So it only had two kilobytes of RAM, I 0:02:33.320,0:02:36.370 think. Not very much. It was really, really,[br]really 0:02:36.370,0:02:41.810 slow. I did some back-of-the-envelope calculations,[br]and it turns 0:02:41.810,0:02:45.340 out all of the computation done on all of 0:02:45.340,0:02:47.840 the Apollo missions, ever, could be done by[br]my 0:02:47.840,0:02:53.260 little laptop over there in under a second. 0:02:53.260,0:02:57.360 But, my laptop may or may not make it 0:02:57.360,0:03:02.760 through this talk. The Apollo guidance computer[br]never hit 0:03:02.760,0:03:06.230 an unknown bug, in thousands of hours of time 0:03:06.230,0:03:08.770 in space. It never failed, despite the fact[br]that 0:03:08.770,0:03:15.760 space is pretty hostile, right. There's, there's[br]like gamma 0:03:15.760,0:03:19.430 rays. Anything metallic that floats around[br]will, will find 0:03:19.430,0:03:21.060 the one place where it can short things out 0:03:21.060,0:03:24.840 and, and cause lots of problems. 0:03:24.840,0:03:26.540 And so this thing is pretty amazing. It worked 0:03:26.540,0:03:29.860 really, really well. But what's even more[br]amazing is 0:03:29.860,0:03:32.510 that it was built at a time when we 0:03:32.510,0:03:36.860 didn't know much about making software. They[br]started working 0:03:36.860,0:03:41.030 on it in 1961. And they finished in 1968. 0:03:41.030,0:03:46.980 So to put that into perspective, in 1965,[br]the 0:03:46.980,0:03:50.819 MIT instrumentation lab, that's the department[br]of MIT that 0:03:50.819,0:03:53.860 was building this thing, they got this new[br]computer. 0:03:53.860,0:03:56.410 It's called an IBM system 360. Anyone heard[br]of 0:03:56.410,0:03:59.709 that before? It's one of the more famous computers 0:03:59.709,0:04:01.170 in the history of computing. 0:04:01.170,0:04:03.810 So there's one particularly famous person[br]that worked on 0:04:03.810,0:04:05.810 it. And anyone know who I'm talking about?[br]Anyone 0:04:05.810,0:04:08.750 have an idea? Come on, you all know. Fred 0:04:08.750,0:04:11.140 Brooks, right. And he, he wrote this book.[br]What 0:04:11.140,0:04:14.660 was the book called? Anyone? The Mythical[br]Man Month. 0:04:14.660,0:04:17.720 Yeah. So when did he write that book? Not 0:04:17.720,0:04:20.630 until 1975. And by then, you know, we had 0:04:20.630,0:04:24.470 been gone from the moon for many, many years. 0:04:24.470,0:04:27.240 So think about what that means, right. The,[br]the 0:04:27.240,0:04:31.289 software developers writing code for the Apollo[br]Guidance Computer 0:04:31.289,0:04:34.600 were learning the same things as Fred Brooks[br]at 0:04:34.600,0:04:37.150 the same time, right. So if you're a manager 0:04:37.150,0:04:39.000 at a, you know, you have some software developers 0:04:39.000,0:04:40.210 working under you, and your boss comes to[br]you 0:04:40.210,0:04:42.160 and says hey, you know, your projects a little 0:04:42.160,0:04:45.020 bit late. I'm gonna, you know, give you some 0:04:45.020,0:04:48.990 more developers to hopefully speed it up,[br]you say, 0:04:48.990,0:04:52.160 OK. Whereas today you might say, no. Read[br]The 0:04:52.160,0:04:55.000 Mythical Man Month, and you know that that[br]won't 0:04:55.000,0:04:55.700 work. 0:04:55.700,0:05:00.690 So, another thing. The word software was first[br]used 0:05:00.690,0:05:03.850 in 1950. It was used in, like, a research 0:05:03.850,0:05:09.220 paper. And there's some back story here. It's[br]pretty 0:05:09.220,0:05:11.180 important. We're gonna do a little aside. 0:05:11.180,0:05:15.460 So, the first computers in, in the, you know, 0:05:15.460,0:05:19.790 20s, 30s, 40s. They were built by men. Like, 0:05:19.790,0:05:25.060 predominantly, overwhelmingly men. And, and[br]they would build these 0:05:25.060,0:05:28.470 computers, and the computers did one thing,[br]right. You 0:05:28.470,0:05:31.710 would build a computer to, you know, calculate[br]the 0:05:31.710,0:05:33.490 Fibonacci sequence or something, and if you[br]wanted a 0:05:33.490,0:05:37.210 computer to, to calculate prime numbers, like,[br]you built 0:05:37.210,0:05:39.240 another computer, or you took the computer[br]you had 0:05:39.240,0:05:42.560 and, and modified it really heavily, right.[br]And over 0:05:42.560,0:05:44.900 time, you know, computers got a little bit[br]better 0:05:44.900,0:05:46.650 and, and then they could sort of be configured, 0:05:46.650,0:05:49.270 right. They could, you could like, flip some[br]switches 0:05:49.270,0:05:50.930 and set some bits and then the computers would 0:05:50.930,0:05:56.120 do different things and, and, and the men[br]building 0:05:56.120,0:05:58.130 these computers that, they hated this task,[br]right. They 0:05:58.130,0:06:01.840 thought it was boring and that it was easy 0:06:01.840,0:06:04.060 and that it wasn't very interesting at all.[br]So 0:06:04.060,0:06:07.169 they hired a bunch of women to do all 0:06:07.169,0:06:10.430 these things, right. And only later, like,[br]as time 0:06:10.430,0:06:13.210 goes on, did they figure out that, that this 0:06:13.210,0:06:17.050 task of configuring the computer that, that[br]the men 0:06:17.050,0:06:19.389 had built was actually the entire field of[br]software 0:06:19.389,0:06:23.410 development, and that it was actually really,[br]really hard 0:06:23.410,0:06:26.949 and challenging and it was a field onto itself. 0:06:26.949,0:06:29.790 And only then did, did men start coming in 0:06:29.790,0:06:33.710 and start saying, hey, I would like to do 0:06:33.710,0:06:36.500 this. During the Apollo program, one of the[br]managers 0:06:36.500,0:06:40.790 of, of one of the software teams, when he 0:06:40.790,0:06:44.020 was assigned to that team, his wife was told 0:06:44.020,0:06:45.960 by him, hey, honey, don't tell any of our 0:06:45.960,0:06:48.070 friends that I manage a software team. Cause[br]it 0:06:48.070,0:06:51.220 wasn't, it wasn't cool for a guy to write 0:06:51.220,0:06:54.080 software, yet, in the, in the 60s. It was, 0:06:54.080,0:06:55.030 it was getting there. 0:06:55.030,0:06:59.100 So, it's kind of interesting, right. So here's[br]my 0:06:59.100,0:07:02.180 takeaway from that. If you're a woman and[br]you're 0:07:02.180,0:07:05.590 writing some software, and you're maybe thinking,[br]hey, you 0:07:05.590,0:07:07.259 know, maybe I'm not cut out for this or, 0:07:07.259,0:07:08.900 or some other people are saying things that[br]say 0:07:08.900,0:07:11.500 that I shouldn't be here. Don't listen to[br]them. 0:07:11.500,0:07:15.570 That's bull shit. You're grandma was writing[br]code. And, 0:07:15.570,0:07:17.400 and she did a damn fine job. So don't 0:07:17.400,0:07:17.840 worry about that. 0:07:17.840,0:07:19.930 And if you're a guy, a man, or woman 0:07:19.930,0:07:22.710 I guess, and you're thinking or saying or[br]writing 0:07:22.710,0:07:25.900 things like, you know, women shouldn't be[br]here. They're 0:07:25.900,0:07:29.030 not as good at writing code as men. Stop. 0:07:29.030,0:07:31.600 Stop saying those things. That is all bull[br]shit. 0:07:31.600,0:07:34.840 It, that does not stand up to the history 0:07:34.840,0:07:38.150 of computing. So. Just a little aside there. 0:07:38.150,0:07:42.110 Anyways, OK. We're talking about the Apollo[br]Guidance Computer, 0:07:42.110,0:07:45.979 and things that people learned from that.[br]So, what, 0:07:45.979,0:07:48.690 let me ask you guys a question. How many 0:07:48.690,0:07:51.750 of you have built some sort of web app, 0:07:51.750,0:07:54.900 maybe a Rails app or something, and you depend 0:07:54.900,0:07:58.199 on someone else to service. Right, an API[br]or 0:07:58.199,0:07:59.780 something like that. Someone, something that[br]another team at 0:07:59.780,0:08:01.400 your company built or something external,[br]right. And what 0:08:01.400,0:08:03.620 happened to your site the first time that[br]thing 0:08:03.620,0:08:08.949 went down? Yeah, I heard a very sad noise 0:08:08.949,0:08:10.590 of something breaking. 0:08:10.590,0:08:13.130 Yeah. Exactly. Your pager goes off. Although[br]maybe in 0:08:13.130,0:08:16.509 the 60s, I don't think they even had pagers. 0:08:16.509,0:08:19.389 So what did you do after awhile, right? You, 0:08:19.389,0:08:22.009 you, the first time you fixed that one thing, 0:08:22.009,0:08:23.949 right, you fixed it so that that particular[br]thing 0:08:23.949,0:08:28.280 happens again, you know, it'll be OK. And[br]then 0:08:28.280,0:08:30.740 something else happens and something else[br]happens, and hopefully 0:08:30.740,0:08:36.589 after awhile you, your, your system is smart[br]enough 0:08:36.589,0:08:40.429 that anything that this, this other system[br]throws at 0:08:40.429,0:08:44.430 you, something you've never even seen before,[br]you know, 0:08:44.430,0:08:48.860 it doesn't matter. You'll keep running just[br]fine. 0:08:48.860,0:08:51.379 And so the same thing happened during the[br]Apollo 0:08:51.379,0:08:54.869 11 landing. So this is the Lunar module. So, 0:08:54.869,0:08:57.769 so picture, this is the most critical moment[br]of 0:08:57.769,0:08:59.970 the entire Apollo space program, right. Neil[br]Armstrong and 0:08:59.970,0:09:02.449 Buzz Aldrin are, are in this little thing.[br]They're 0:09:02.449,0:09:05.589 heading down towards the surface of the moon.[br]And 0:09:05.589,0:09:07.059 this, the last ten minutes of this are by 0:09:07.059,0:09:11.829 far the most, absolutely the most critical[br]and, and 0:09:11.829,0:09:14.759 high intensity part of the entire, of the[br]entire 0:09:14.759,0:09:15.649 mission. 0:09:15.649,0:09:18.769 Neil Armstrong said that those last couple[br]of minutes, 0:09:18.769,0:09:20.879 on a difficulty scale of one to ten were 0:09:20.879,0:09:22.740 a thirteen, right. And he's, he's a pretty[br]good 0:09:22.740,0:09:24.970 pilot. So that means a lot. 0:09:24.970,0:09:28.230 So, so, so they're cruising down towards,[br]towards the 0:09:28.230,0:09:31.279 surface. They're, they're busy. They're in[br]the zone. All 0:09:31.279,0:09:33.740 of the sudden, on their dashboard, you know,[br]a 0:09:33.740,0:09:37.079 big light comes on. The master alarm. Everything[br]is 0:09:37.079,0:09:40.670 wrong. And their computer is, is giving them[br]this 0:09:40.670,0:09:42.579 error, this, like, twelve-oh-one error. 0:09:42.579,0:09:45.459 And, you know, the astronauts are distracted[br]and mission 0:09:45.459,0:09:47.339 control, they're freaking out. They're trying[br]to figure out 0:09:47.339,0:09:50.679 what this is. You know, what does this mean? 0:09:50.679,0:09:53.410 One of the MIT engineers in, in mission control 0:09:53.410,0:09:56.879 had, very wisely, made a little cheat sheet[br]of 0:09:56.879,0:10:00.350 every error code that the computer could throw[br]up. 0:10:00.350,0:10:02.999 Very, very smart. 0:10:02.999,0:10:05.790 And he, you know, he, he looks up, OK, 0:10:05.790,0:10:08.009 twelve-oh-one. What does it say? It says,[br]if, if 0:10:08.009,0:10:09.389 nothing else seems wrong, you know, you're[br]good to 0:10:09.389,0:10:13.610 go for the landing, and he actually was too 0:10:13.610,0:10:16.199 scared to form words, so when he was asked, 0:10:16.199,0:10:17.110 you know, are we good to go? He just 0:10:17.110,0:10:19.970 sort of like, made a thumbs up. And then 0:10:19.970,0:10:21.709 he was awarded a medal from the President[br]of 0:10:21.709,0:10:24.129 the United States for his, for his decision[br]to, 0:10:24.129,0:10:26.119 to not abort the moon landing. 0:10:26.119,0:10:28.300 So what happened? What was this master alarm[br]that 0:10:28.300,0:10:31.179 scared the crap out of everyone for actually[br]no 0:10:31.179,0:10:36.540 reason? So, today we're pretty lucky with[br]our computers, 0:10:36.540,0:10:39.569 right. If you, if you write some code that 0:10:39.569,0:10:41.249 does an infinite loop or something, your computer[br]will 0:10:41.249,0:10:43.629 probably handle it just fine, right. You have[br]to, 0:10:43.629,0:10:45.779 you have to do something pretty crazy to crash 0:10:45.779,0:10:48.619 your computer. 0:10:48.619,0:10:52.739 The very idea that multiple programs could[br]even be 0:10:52.739,0:10:54.339 running on a computer was new in the 90s, 0:10:54.339,0:10:57.480 1960s. They, they didn't have words like scheduling[br]or 0:10:57.480,0:11:01.759 tasks or processes like we have today. They[br]called 0:11:01.759,0:11:07.480 it, they called it, like, like, timesharing,[br]right. And, 0:11:07.480,0:11:10.879 and up until the Apollo, Apollo guidance computer[br]had 0:11:10.879,0:11:14.839 been built, they didn't do anything sophisticated[br]like, like 0:11:14.839,0:11:17.579 have priorities assigned to different tasks.[br]They just said, 0:11:17.579,0:11:18.119 anything that wants to run, we'll let it run 0:11:18.119,0:11:19.999 for a little while, and then we'll run something 0:11:19.999,0:11:21.459 else. 0:11:21.459,0:11:24.009 And a lot of engineers thought that this approach 0:11:24.009,0:11:25.929 was safe, because it was more predictable,[br]and it 0:11:25.929,0:11:28.369 was easier to reason about. But it has a 0:11:28.369,0:11:34.670 downside, in that you, with something like[br]priority-based scheduling, 0:11:34.670,0:11:39.249 you can, you can figure out what are the 0:11:39.249,0:11:41.119 most important things that need to be running,[br]right. 0:11:41.119,0:11:43.249 The program to fire the thrusters should probably[br]run 0:11:43.249,0:11:45.540 exactly when it wants. The program to update[br]the 0:11:45.540,0:11:47.670 display for the astronauts, if it's a couple[br]milliseconds 0:11:47.670,0:11:49.339 late, I think they'll be OK. 0:11:49.339,0:11:51.230 And so this was a brand new approach for 0:11:51.230,0:11:54.139 the Apollo program, or for computing in general.[br]So, 0:11:54.139,0:11:58.360 the takeaway here is handle failure gracefully.[br]Just do 0:11:58.360,0:12:00.470 a little bit of actual work so that something 0:12:00.470,0:12:03.019 unexpected can come up and you'll handle it[br]just 0:12:03.019,0:12:03.899 fine. 0:12:03.899,0:12:05.559 Step two of that, by the way, is if 0:12:05.559,0:12:07.569 you get to the point where you can handle 0:12:07.569,0:12:11.259 an unknown failure gracefully, don't throw,[br]like a master 0:12:11.259,0:12:15.939 caution alarm and raise a ruckus when, you[br]know, 0:12:15.939,0:12:17.860 you're actually handling everything great. 0:12:17.860,0:12:21.519 OK. So, who would have ever thought that in 0:12:21.519,0:12:26.049 a RailsConf, talking about testing would be,[br]would be 0:12:26.049,0:12:28.350 weird? But I have an entire segment about[br]testing. 0:12:28.350,0:12:30.970 Thanks DHH for that. 0:12:30.970,0:12:36.389 So, there were lives on the line. They're[br]traveling 0:12:36.389,0:12:37.899 into space, which is pretty difficult. There[br]was a 0:12:37.899,0:12:39.889 ton of testing for the software, for the software 0:12:39.889,0:12:44.720 for the Apollo Guidance Computer. They, they[br]had unit 0:12:44.720,0:12:46.290 tests. They actually even called them unit[br]tests but 0:12:46.290,0:12:48.329 with, with quotes, cause it was like a brand 0:12:48.329,0:12:50.189 new word for them. 0:12:50.189,0:12:53.670 But the, the engineers didn't really talk[br]much about 0:12:53.670,0:12:55.660 their unit tests. They said they were OK,[br]but 0:12:55.660,0:12:59.670 they didn't, like, rant and rave about them.[br]And 0:12:59.670,0:13:00.869 I have a theory as to why that is, 0:13:00.869,0:13:03.720 and that's because most of the code for the 0:13:03.720,0:13:08.179 Apollo Guidance Computer was, was, was like[br]functional code. 0:13:08.179,0:13:09.929 Not in like the programming sense but al,[br]also 0:13:09.929,0:13:12.480 in the mathematical sense on which it's based.[br]Right? 0:13:12.480,0:13:16.519 You have, you have code for guidance equations.[br]And 0:13:16.519,0:13:18.839 furthermore you have mathematicians writing[br]them. 0:13:18.839,0:13:21.069 The idea of a computer science degree did[br]not 0:13:21.069,0:13:23.149 exist in the 1960s. I think the last, the 0:13:23.149,0:13:25.689 first computer science degree was actually[br]awarded, like, in 0:13:25.689,0:13:28.959 the late 60s. So no one writing these computers 0:13:28.959,0:13:31.850 was trained as a software programmer, right,[br]or as 0:13:31.850,0:13:34.929 a computer scientist. They were trained as[br]mathematicians. And 0:13:34.929,0:13:37.449 they were writing code to implement mathematical[br]equations. And, 0:13:37.449,0:13:40.420 as you can imagine, eventually they'll get[br]it right. 0:13:40.420,0:13:42.689 So, what they do talk really, really highly[br]about 0:13:42.689,0:13:45.079 is their, their integration tests. And now,[br]I have 0:13:45.079,0:13:46.749 no idea. Should we call these system tests[br]or 0:13:46.749,0:13:50.970 some other kind of tests? But anyways. 0:13:50.970,0:13:55.459 In 1972, they published a retrospective on[br]basically the 0:13:55.459,0:13:59.589 entire software development effort, and they[br]said things. They, 0:13:59.589,0:14:03.470 they talked specifically about things that[br]plagued the software 0:14:03.470,0:14:05.639 development effort throughout the entire program.[br]And they listed 0:14:05.639,0:14:07.739 two things, and they're both really interesting.[br]I have 0:14:07.739,0:14:09.109 a link to it at the end of my 0:14:09.109,0:14:11.670 slide, so definitely check it out when you[br]get 0:14:11.670,0:14:11.970 a chance. 0:14:11.970,0:14:13.850 The first thing that they just could not get 0:14:13.850,0:14:18.480 right was estimating schedules. And we don't[br]get that 0:14:18.480,0:14:19.980 right today so, great. We've made a lot of 0:14:19.980,0:14:22.379 progress there. One cool thing they did actually[br]was 0:14:22.379,0:14:24.189 they, they cataloged a bunch of ways in which 0:14:24.189,0:14:25.509 they can go wrong, right. Like if you have, 0:14:25.509,0:14:30.329 if you have two projects competing, or two[br]projects 0:14:30.329,0:14:33.910 that are running in parallel, and one of them 0:14:33.910,0:14:37.769 is gonna take longer, and you make the one 0:14:37.769,0:14:40.569 that is not gonna take as long happen even 0:14:40.569,0:14:43.980 faster, you haven't actually made your whole[br]project progress 0:14:43.980,0:14:47.730 any faster, right. Just to give an example. 0:14:47.730,0:14:50.809 The other thing they talked about, that plagued[br]their 0:14:50.809,0:14:55.420 whole project, was getting up to date specs[br]and 0:14:55.420,0:15:01.149 requirements and information about different[br]systems. The Apollo program, 0:15:01.149,0:15:02.999 you know, was in a rush throughout its entire 0:15:02.999,0:15:05.970 development. Everything, every part of every[br]system in the 0:15:05.970,0:15:09.989 space craft was constantly changing. And getting[br]up to 0:15:09.989,0:15:12.629 date information about these other things[br]is hard, right. 0:15:12.629,0:15:13.939 You have to go out and talk to every 0:15:13.939,0:15:16.509 team, and if they don't happen to tell you 0:15:16.509,0:15:19.009 that something's changing, you might not know. 0:15:19.009,0:15:21.949 Again, they didn't come up with a great way 0:15:21.949,0:15:24.720 to solve this, and again we still struggle[br]with 0:15:24.720,0:15:26.359 this today. I think communication is the hardest[br]part 0:15:26.359,0:15:29.279 of software development. But they did find[br]out a 0:15:29.279,0:15:32.129 great way to figure out if you have it 0:15:32.129,0:15:34.249 wrong. And that's to write integration tests,[br]where you 0:15:34.249,0:15:37.299 take everything together, right. Every part[br]of your system, 0:15:37.299,0:15:38.720 and you test the hell out of it and 0:15:38.720,0:15:40.709 see what breaks. 0:15:40.709,0:15:47.709 And, and, and, so. What happens is, there's[br]a 0:15:49.629,0:15:52.899 really interesting thing where your unit tests[br]with test 0:15:52.899,0:15:54.949 your own code, and then you have integration[br]tests, 0:15:54.949,0:15:57.799 which are also code. But they're not there[br]so 0:15:57.799,0:16:01.109 much, they're not there so much to test your 0:16:01.109,0:16:04.919 code as they are to test your communication.[br]So 0:16:04.919,0:16:11.470 to put it another way, if you. How do 0:16:11.470,0:16:14.470 I put this? Let's see. 0:16:14.470,0:16:17.350 If you, if your integration tests are failing,[br]what 0:16:17.350,0:16:20.489 it means, not necessarily that you wrote bad[br]code, 0:16:20.489,0:16:23.259 but you wrote great code that does the wrong 0:16:23.259,0:16:29.410 thing, right. So, so that's the takeaway there. 0:16:29.410,0:16:32.279 Another great thing they did that we don't[br]do 0:16:32.279,0:16:34.199 today, is they tested what they call the off 0:16:34.199,0:16:37.209 nominal cases, which is just an awesome word,[br]right. 0:16:37.209,0:16:40.449 We don't use nominal nearly enough anymore. 0:16:40.449,0:16:45.819 So, so. They said for every single, for every 0:16:45.819,0:16:47.549 one test they had that tested like the normal 0:16:47.549,0:16:49.209 case of things going right during a mission,[br]they 0:16:49.209,0:16:53.509 had a hundred that tested things going wrong. 0:16:53.509,0:16:54.649 So how many of you guys have a test 0:16:54.649,0:16:56.970 in your Rails app, something like, if a user 0:16:56.970,0:17:00.579 logs in with the right username and the right 0:17:00.579,0:17:03.019 password, they get logged in, right. I, I[br]do. 0:17:03.019,0:17:04.929 Right. A lot of hands go up. How many 0:17:04.929,0:17:07.510 of you guys have a test where if someone 0:17:07.510,0:17:09.770 puts in the right username and the wrong password, 0:17:09.770,0:17:12.859 they don't get logged in, right. Fewer hands[br]go 0:17:12.859,0:17:13.339 up. 0:17:13.339,0:17:16.040 I didn't have that test until I was making 0:17:16.040,0:17:20.429 this talk. So I mean, there's so many different 0:17:20.429,0:17:22.250 tests for things going wrong that, that we[br]don't 0:17:22.250,0:17:24.819 write today, I think. Anything from, you know,[br]security 0:17:24.819,0:17:27.940 related or, or like, checking of all sorts[br]of, 0:17:27.940,0:17:33.240 you know, inputs and stuff like that. But[br]the 0:17:33.240,0:17:36.450 Apollo Guidance Computer team got it right,[br]and there 0:17:36.450,0:17:38.930 were all sorts of cases during the Apollo[br]program 0:17:38.930,0:17:42.310 where, where something went a little bit wrong[br]and, 0:17:42.310,0:17:44.570 and something unexpected happened, and, and[br]like Guidance Computer, 0:17:44.570,0:17:47.280 because they had done all these off nominal[br]tests, 0:17:47.280,0:17:49.660 came out just fine. 0:17:49.660,0:17:52.120 So let's talk about their teams. 0:17:52.120,0:17:58.740 In 1961 when, when the instrument lab signed[br]the 0:17:58.740,0:18:01.400 contract to deliver the Apollo Guidance Computer,[br]that contract 0:18:01.400,0:18:04.440 didn't mention software at all. It said, you[br]just 0:18:04.440,0:18:06.810 have to give us this, this box, with a 0:18:06.810,0:18:09.590 computer in it that can take men to the 0:18:09.590,0:18:10.230 moon. 0:18:10.230,0:18:12.140 And, so they didn't know if it was just 0:18:12.140,0:18:14.260 gonna be, you know, just a bunch of hardware 0:18:14.260,0:18:15.700 and it did this one thing and that's all 0:18:15.700,0:18:17.400 it needed or if it was gonna be like 0:18:17.400,0:18:20.200 a, you know, a fully programmable computer[br]like it 0:18:20.200,0:18:22.480 turned out to be. 0:18:22.480,0:18:26.570 They, they didn't know, in 1961, what a space 0:18:26.570,0:18:27.790 craft that goes to the moon would look like 0:18:27.790,0:18:30.790 at all. They didn't know, you know, would[br]it 0:18:30.790,0:18:32.320 be one giant ship that goes all the way 0:18:32.320,0:18:33.360 to the moon and then comes all the way 0:18:33.360,0:18:35.580 back? Would it be several little ships that[br]are 0:18:35.580,0:18:37.630 combined together? Would they build two rockets[br]and have 0:18:37.630,0:18:39.410 them meet up in space and then go from 0:18:39.410,0:18:40.830 there? Would they build one giant rocket?[br]No one 0:18:40.830,0:18:42.300 knew. 0:18:42.300,0:18:45.350 No one knew if, even in principle, it would 0:18:45.350,0:18:48.510 be possible to navigate to the moon, right.[br]They 0:18:48.510,0:18:51.550 didn't have the math to, to prove that you 0:18:51.550,0:18:53.920 could go to the moon. And no one knew, 0:18:53.920,0:18:56.180 even given math that can help you navigate[br]to 0:18:56.180,0:18:58.070 the moon, if a computer could be built to 0:18:58.070,0:18:59.510 do it. 0:18:59.510,0:19:02.830 So there were, in these early days, there[br]were, 0:19:02.830,0:19:06.850 you know, no deadlines. No managers. No requirements.[br]Very 0:19:06.850,0:19:12.000 little communication with, with other teams.[br]And what that 0:19:12.000,0:19:13.980 means is they were free to experiment and,[br]and 0:19:13.980,0:19:15.980 figure things out, right. 0:19:15.980,0:19:19.220 A couple years later, OK. Now they know, we're 0:19:19.220,0:19:21.700 gonna go to the moon. One giant rocket. Two 0:19:21.700,0:19:23.540 little space crafts. One is just for landing[br]on 0:19:23.540,0:19:27.080 the moon. We have figured out that, just like 0:19:27.080,0:19:29.020 at sea, you can use a sextant and measure 0:19:29.020,0:19:30.890 the angles between, like, stars and part of[br]the 0:19:30.890,0:19:31.990 moon or part of the Earth and figure out 0:19:31.990,0:19:34.750 exactly where you are. And now we know what 0:19:34.750,0:19:37.660 the math looks like to take those, those navigation 0:19:37.660,0:19:39.690 measurements and plug them into a computer,[br]which we 0:19:39.690,0:19:41.260 now know how to build, and we know it 0:19:41.260,0:19:43.490 can fit in a space craft and it can 0:19:43.490,0:19:44.760 take you to the moon. 0:19:44.760,0:19:47.890 So now there's four hundred software developers[br]in the 0:19:47.890,0:19:53.160 Apollo Guidance Computer project. And now[br]there's, there's lots 0:19:53.160,0:19:57.190 of managers. There's lots of deadlines. There's[br]lots of 0:19:57.190,0:20:03.740 requirements. There's lots of documentation.[br]So what happened is 0:20:03.740,0:20:06.480 they built, they had teams that were the right 0:20:06.480,0:20:08.360 shape and size for what they were trying to 0:20:08.360,0:20:10.410 accomplish, right. 0:20:10.410,0:20:13.560 If, if you were talking to someone who is 0:20:13.560,0:20:16.170 founding a startup, it's brand new, and they[br]said 0:20:16.170,0:20:19.940 they had four hundred employees, you might[br]be a 0:20:19.940,0:20:23.820 little worried. Likewise, if, if you were[br]talking to 0:20:23.820,0:20:27.120 a programmer that happened to work for your[br]bank, 0:20:27.120,0:20:28.600 and he said, we have a team of, of 0:20:28.600,0:20:30.660 twenty and we don't really have any requirements[br]for, 0:20:30.660,0:20:32.850 you know, security or anything like that,[br]you'd probably 0:20:32.850,0:20:35.250 find another bank. 0:20:35.250,0:20:38.780 So, so teams have to be the right shape 0:20:38.780,0:20:41.680 and size for what they want to accomplish.[br]Another, 0:20:41.680,0:20:44.630 a corollary to that is switching between those[br]team 0:20:44.630,0:20:49.680 sizes will be difficult and, at any given[br]time, 0:20:49.680,0:20:52.480 there will be people unhappy with how your[br]current 0:20:52.480,0:20:55.970 team is shaped. So NASA and the other contractors 0:20:55.970,0:20:58.610 building the Apollo space craft did not like[br]that 0:20:58.610,0:21:02.030 there were these, these rogue engineers over[br]at MIT 0:21:02.030,0:21:05.580 just fooling around doing whatever they wanted,[br]you know, 0:21:05.580,0:21:06.830 and then that they were gonna have to somehow 0:21:06.830,0:21:09.300 deliver a guidance computer. 0:21:09.300,0:21:12.530 Likewise, as the team grew, a lot of the 0:21:12.530,0:21:19.530 smartest engineers, they left the, the guidance[br]project once, 0:21:19.800,0:21:22.090 especially once Apollo 8 had gone to the moon, 0:21:22.090,0:21:24.010 right. A lot of the engineers said, OK. We've 0:21:24.010,0:21:26.060 done it. You know, a couple years ago we 0:21:26.060,0:21:27.850 had this cool challenge, and now we've figured[br]it 0:21:27.850,0:21:29.520 out. Onto the next thing. 0:21:29.520,0:21:32.310 But the, the mission to the moon was successful, 0:21:32.310,0:21:34.200 right. The goal was accomplished. We had landed[br]on 0:21:34.200,0:21:38.980 the moon before 1970. So the team was always 0:21:38.980,0:21:40.010 the right size. 0:21:40.010,0:21:42.660 All right, what's next. Let's talk a little[br]bit 0:21:42.660,0:21:45.810 about working with users. Except, in this[br]case, it's 0:21:45.810,0:21:50.890 actually working with astronauts. So, who's[br]seen The Right 0:21:50.890,0:21:53.150 Stuff or read the book? Right, they're both[br]great. 0:21:53.150,0:21:54.310 OK, lots of you. 0:21:54.310,0:22:00.660 How did they describe astronauts? Anyone?[br]What's that? Reckless, 0:22:00.660,0:22:04.670 OK. Cowboys. Yes. There's a lot of scenes[br]of 0:22:04.670,0:22:10.060 them riding horses around and stuff. They[br]were arrogant. 0:22:10.060,0:22:12.690 They were extremely talented. They were hard[br]to work 0:22:12.690,0:22:16.760 with. They're just like software developers. 0:22:16.760,0:22:22.410 So, just like any other user, astronauts don't[br]know 0:22:22.410,0:22:26.160 what they want, right. As one of the most 0:22:26.160,0:22:28.340 important things you can, you can learn about[br]working 0:22:28.340,0:22:30.710 with, with your users is they won't tell you 0:22:30.710,0:22:33.730 what they actually want. There's a great example[br]of 0:22:33.730,0:22:34.080 this. 0:22:34.080,0:22:35.870 So the Apollo Guidance Computer was not just[br]a 0:22:35.870,0:22:38.250 guidance computer. It was also an autopilot.[br]It could 0:22:38.250,0:22:41.060 take you from Earth orbit to, you know, a 0:22:41.060,0:22:42.460 couple feet above the lunar surface, and it[br]could 0:22:42.460,0:22:44.740 take you from the lunar surface all the way 0:22:44.740,0:22:46.140 back to Earth. 0:22:46.140,0:22:49.280 So, so the, the engineers at MIT, you know, 0:22:49.280,0:22:51.590 would talk to the astronauts, and they said,[br]hey, 0:22:51.590,0:22:53.920 hey astronauts. You know, you know how, at[br]the 0:22:53.920,0:22:55.450 end of your mission you have this, this re-entry 0:22:55.450,0:22:58.880 process and, and it's, it's pretty dangerous,[br]right. If 0:22:58.880,0:23:01.350 you, if you're coming in too steep you can 0:23:01.350,0:23:03.370 burn up. If you don't come in steep enough 0:23:03.370,0:23:05.200 you can ricochet out into space and, and you'll 0:23:05.200,0:23:07.300 never come back. But, but we know we can 0:23:07.300,0:23:10.260 write an autopilot that will do this for you 0:23:10.260,0:23:12.560 automatically. You just have to press a couple[br]buttons 0:23:12.560,0:23:15.340 and we'll get you right through every time. 0:23:15.340,0:23:17.150 And the astronauts said no. Do not do that. 0:23:17.150,0:23:20.000 You will be wasting your time. We are astronauts 0:23:20.000,0:23:22.020 and we are trained to do these hard things, 0:23:22.020,0:23:25.430 like, like do a manual re-entry. And astronauts,[br]by 0:23:25.430,0:23:29.000 the way, were very distrustful of all automation.[br]Partially 0:23:29.000,0:23:29.840 for good reason. 0:23:29.840,0:23:32.310 In the, in the 50s and 60s, a lot 0:23:32.310,0:23:36.160 of early flight tests with, especially analogue[br]computers flying 0:23:36.160,0:23:38.910 aircraft had gone, had gone wrong. And a lot 0:23:38.910,0:23:42.040 of their friends had died. But on the other 0:23:42.040,0:23:46.080 hand, also, astronauts, you know, are super[br]macho, right. 0:23:46.080,0:23:49.550 They don't like the idea of a computer taking 0:23:49.550,0:23:51.780 away something that, you know, they use to[br]show 0:23:51.780,0:23:52.810 their skills. 0:23:52.810,0:23:54.680 So the astronauts said no. Don't even bother[br]building 0:23:54.680,0:23:57.740 this, building this re-entry program, cause[br]we'll never use 0:23:57.740,0:24:02.000 it. So the engineers built it anyways. And[br]then 0:24:02.000,0:24:06.050 it was used on every single mission. 0:24:06.050,0:24:08.770 It turns out that when you've been in a 0:24:08.770,0:24:13.470 box in space with no showers and you're eating, 0:24:13.470,0:24:16.610 like, frozen, like, dehydrated food for like,[br]up to 0:24:16.610,0:24:20.310 a week, and then there's a button you can 0:24:20.310,0:24:22.430 press so that you just have to sit back 0:24:22.430,0:24:25.450 and relax, and like four minutes later you're[br]in, 0:24:25.450,0:24:27.230 you know, the warm air of the Pacific ocean 0:24:27.230,0:24:28.810 or something like that, you're gonna press[br]those buttons 0:24:28.810,0:24:31.000 every single time, instead of doing one more[br]hard 0:24:31.000,0:24:32.480 thing just to get home, when you've already[br]done 0:24:32.480,0:24:35.470 everything you needed to do. So your users[br]don't 0:24:35.470,0:24:37.160 know what they want. 0:24:37.160,0:24:40.720 Now let's talk about interfaces. Let's imagine[br]you've built 0:24:40.720,0:24:43.370 this computer that can go to the moon, and 0:24:43.370,0:24:45.200 you've got your astronauts ready to go to[br]the 0:24:45.200,0:24:48.710 moon, how do they talk to each other? Keep 0:24:48.710,0:24:50.970 in mind, this is the 60s. The field of 0:24:50.970,0:24:54.830 human computer action, human computer interaction[br]isn't invented until 0:24:54.830,0:24:57.150 1980. 0:24:57.150,0:25:00.100 You can't use a CRT screen, because they're[br]too 0:25:00.100,0:25:04.270 heavy. You can't use an LCD screen, because[br]they 0:25:04.270,0:25:07.810 haven't been invented yet, either. And you[br]can't actually 0:25:07.810,0:25:09.600 use any type of screen at all. It turns 0:25:09.600,0:25:11.170 out the Apollo Guidance Computer doesn't have[br]the power 0:25:11.170,0:25:12.850 for anything like that. So you can use, you 0:25:12.850,0:25:15.660 know, little seven segment LEDs and you can[br]use, 0:25:15.660,0:25:17.000 like, dials and stuff like that. 0:25:17.000,0:25:20.460 So what do you build that astronauts can use? 0:25:20.460,0:25:22.000 It has to be powerful, right. It can't just 0:25:22.000,0:25:23.320 be one button that says take me to the 0:25:23.320,0:25:24.980 moon and maybe another button that says take[br]me 0:25:24.980,0:25:28.750 back, right. There's a little bit more going[br]on. 0:25:28.750,0:25:31.550 And it has to be something that astronauts[br]in 0:25:31.550,0:25:34.140 space suits can, can deal with, right. So[br]I 0:25:34.140,0:25:35.450 don't think an iPhone would have worked even[br]if 0:25:35.450,0:25:39.080 they had it. It has to be something that 0:25:39.080,0:25:41.200 you can operate very quickly, right. There's[br]a little 0:25:41.200,0:25:42.860 bit of time pressure when you're moving at,[br]you 0:25:42.860,0:25:45.490 know, five miles per second. 0:25:45.490,0:25:47.050 So I want to show you what they came 0:25:47.050,0:25:50.580 up with, and it's, it's this thing. And this 0:25:50.580,0:25:53.160 is not a very pretty picture, but it's here 0:25:53.160,0:25:54.600 just as an assurance, because I have a live 0:25:54.600,0:25:58.430 demo of it actually working. So this is the 0:25:58.430,0:26:00.360 display and keyboard unit. So we're gonna[br]switch over 0:26:00.360,0:26:01.090 here. 0:26:01.090,0:26:03.770 So, some very smart people who are not me 0:26:03.770,0:26:07.120 have used ASM and taken an emulator running[br]actually 0:26:07.120,0:26:09.340 Apollo Guidance Computer code. We have all[br]the code, 0:26:09.340,0:26:10.850 by the way, and you can take a look 0:26:10.850,0:26:14.200 at it online. And they build an actual, functional 0:26:14.200,0:26:16.780 interface in your web browser to the guidance[br]computer, 0:26:16.780,0:26:18.290 and I'm gonna show you guys how it works. 0:26:18.290,0:26:19.870 And I'm gonna see what you guys think. 0:26:19.870,0:26:24.330 So, so, you can see here, this thing on 0:26:24.330,0:26:27.970 the, on the left pretty much is the actual 0:26:27.970,0:26:29.250 interface. And then this stuff on the right[br]is 0:26:29.250,0:26:32.130 just for running the, like the emulation.[br]This sort 0:26:32.130,0:26:35.140 of represents like the, the simulated environment.[br]They didn't 0:26:35.140,0:26:35.860 get this thing. 0:26:35.860,0:26:37.510 So, so what do we have here? We've got 0:26:37.510,0:26:40.920 a bunch of lights for, you know, warnings[br]and, 0:26:40.920,0:26:44.260 and status and stuff like that. We've got[br]just 0:26:44.260,0:26:46.710 a couple little bits of display down here.[br]And 0:26:46.710,0:26:48.640 then we've got just a couple buttons. So,[br]so 0:26:48.640,0:26:52.500 let me give you an example of how this 0:26:52.500,0:26:53.500 works. 0:26:53.500,0:26:57.710 So, what you can do, is you hit, you 0:26:57.710,0:27:00.380 pick a verb and then you pick a noun. 0:27:00.380,0:27:04.230 So a verb is something like, show me some 0:27:04.230,0:27:07.230 data. So that's verb zero-six. And then a[br]noun 0:27:07.230,0:27:10.030 is something like, basically the current system[br]up time 0:27:10.030,0:27:12.930 is noun sixty-five. And you hit enter. And[br]it 0:27:12.930,0:27:15.320 shows you. You don't get any decimal points.[br]So 0:27:15.320,0:27:18.430 you have. And you don't get any labels. 0:27:18.430,0:27:19.670 So you have to know what these mean. So 0:27:19.670,0:27:21.980 I'll, I'll tell you. So this means, this computer's 0:27:21.980,0:27:25.480 been running for one hour, thirty-one minutes[br]and forty-nine 0:27:25.480,0:27:29.040 point eight eight seconds. OK, let's try something[br]else. 0:27:29.040,0:27:32.940 Let's hit another verb. That's verb one-six.[br]So that's 0:27:32.940,0:27:35.720 similar to verb six, except what it means[br]is 0:27:35.720,0:27:38.050 show me some data and then keep updating it. 0:27:38.050,0:27:41.280 And then we'll do noun sixty-five again. 0:27:41.280,0:27:43.550 So now, again, one hour thirty-two minutes,[br]and the 0:27:43.550,0:27:45.380 number of seconds are going up, and you can 0:27:45.380,0:27:46.300 see there's some activity. 0:27:46.300,0:27:49.700 So can anyone think of anything that maybe[br]we 0:27:49.700,0:27:52.490 use every single day, some of us, at least, 0:27:52.490,0:27:54.440 that lets you take verbs and nouns and combine 0:27:54.440,0:27:56.430 them in all sorts of interesting and powerful[br]ways? 0:27:56.430,0:27:57.090 Anyone? 0:27:57.090,0:27:58.420 AUDIENCE: Language. 0:27:58.420,0:28:02.130 J.S.: L- well. All right. Someone over there[br]is 0:28:02.130,0:28:05.490 a smart ass. A computer program that we use 0:28:05.490,0:28:07.240 every single day with verbs and nouns. 0:28:07.240,0:28:08.320 AUDIENCE: HTTP. 0:28:08.320,0:28:12.559 J.S.: HTTP is a good one, but no. I 0:28:12.559,0:28:15.220 was thinking of VIM. VIM. Let's hear it for 0:28:15.220,0:28:20.640 VIM. Yes. Exactly. 0:28:20.640,0:28:22.590 I would love to, I would love to find 0:28:22.590,0:28:25.940 out that, that the interface in VI was influenced 0:28:25.940,0:28:27.920 by the Apollo Guidance Computer. I don't think[br]it 0:28:27.920,0:28:29.790 was. If someone happens to know, please let[br]me 0:28:29.790,0:28:32.000 know. That would be awesome. 0:28:32.000,0:28:33.610 But a funny thing, by the way, is that 0:28:33.610,0:28:39.150 this interface was, was intended to be temporary.[br]All 0:28:39.150,0:28:40.960 the, all the engineers said, well, we don't[br]really 0:28:40.960,0:28:43.120 know what to build. But we'll build this thing 0:28:43.120,0:28:44.370 with these verbs and nouns and it's kind of 0:28:44.370,0:28:47.220 clever and, and we'll use that until we build 0:28:47.220,0:28:49.790 something better. And, of course, we now know,[br]like, 0:28:49.790,0:28:52.780 if you want something to stick around forever,[br]just 0:28:52.780,0:28:54.760 say it's temporary. 0:28:54.760,0:28:57.970 But it's cool that the astronauts were, actually[br]became 0:28:57.970,0:29:00.000 very adept at this, and it actually functioned[br]really 0:29:00.000,0:29:01.960 well. And the fact that we still use, you 0:29:01.960,0:29:04.290 know, something similar in VIM today, like.[br]Raise your 0:29:04.290,0:29:06.140 hand if you use VIM as your primary editor 0:29:06.140,0:29:08.180 for all the code you write? Exactly. It's[br]maybe 0:29:08.180,0:29:09.890 twenty-five percent of the people in the room. 0:29:09.890,0:29:13.730 So I just think that's really, really cool.[br]Let's 0:29:13.730,0:29:15.580 see. What else have I got for you? We're 0:29:15.580,0:29:17.750 gonna go back to the slides here, but just 0:29:17.750,0:29:23.250 to say I'm Julian Simioni. I work at 42Floors. 0:29:23.250,0:29:25.360 You can Tweet at me there. I am a 0:29:25.360,0:29:28.809 pilot in real life, and it's really fun. Again, 0:29:28.809,0:29:29.990 another thing I was inspired to do by the 0:29:29.990,0:29:32.730 space program. And I would love to take some 0:29:32.730,0:29:33.090 questions. 0:29:33.090,0:29:34.950 OK guys. Thank you so much.