Buuuuugs iiiiin Spaaaaace!

Video in TIB AV-Portal: Buuuuugs iiiiin Spaaaaace!

Formal Metadata

Buuuuugs iiiiin Spaaaaace!
Title of Series
Number of Parts
CC Attribution - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
Space is really cool. From precision electronics, to giant rockets, spacecraft can represent the best of engineering. But sometimes things go wrong. Terribly wrong. What do exploding Soviet rockets have to do with Agile development? How did LISP and Forth hacking save part of the Galileo probe? What about that time astronauts added life-saving monkey patches... while orbiting the moon! Exactly how much damage can a little dead code do? (Hint: a lot!) This talk is for anyone whose love of a good space story is rivaled only by their passion for incredibly resilient software.
Satellite Web page Email Slide rule Computer file Multiplication sign Client (computing) Coma Berenices XML Computer programming Number Software bug Twitter Front and back ends Medical imaging Information security Email Software developer Projective plane Twitter Software Personal digital assistant Information security Spacetime Geometry
Pointer (computer programming) Software developer Bit
Satellite Code Multiplication sign Direction (geometry) Source code Zoom lens Execution unit Coroutine Set (mathematics) Insertion loss Mereology Computer programming Usability Software bug Mathematics Different (Kate Ryan album) Semiconductor memory Velocity Set (mathematics) Videoconferencing Flag Exception handling God Physical system Area Floating point Bit Sequence 10 (number) Orbit Arithmetic mean Auditory masking Order (biology) MiniDisc Right angle Whiteboard Procedural programming Arithmetic progression Task (computing) Reading (process) Spacetime Asynchronous Transfer Mode Point (geometry) Game controller Functional (mathematics) Backup Variety (linguistics) Line (geometry) Robot Patch (Unix) Branch (computer science) Mass Computer Rule of inference Number Product (business) Crash (computing) Goodness of fit Ariana TV Causality Profil (magazine) Term (mathematics) String (computer science) Operator (mathematics) Integer Traffic reporting Firmware Hydraulic jump Metropolitan area network Addition Code Total S.A. Line (geometry) Convolution Word Commitment scheme Personal digital assistant Buffer overflow Flag Extension (kinesiology)
Randomization Pay television Code Direction (geometry) Set (mathematics) Focus (optics) Computer Test-driven development Food energy Computer programming Number Software bug Goodness of fit Different (Kate Ryan album) Hacker (term) Software testing Computer-assisted translation Error message Graphics tablet Area Code Sequence Process (computing) Personal digital assistant Right angle
Satellite Process (computing) Software developer Computer-generated imagery Spacetime Orbit Row (database) Physical system Spacetime Orbit
Greatest element Multiplication sign Software developer Computer hardware Metropolitan area network Spacetime
Explosion Point (geometry) Order (biology) Multilateration Perspective (visual) Equivalence relation
Server (computing) Building Service (economics) Observational study Code Closed set Perturbation theory Computer Number Power (physics) Medical imaging Process (computing) Physicist Quantum Right angle Cycle (graph theory) Quicksort Physical system
Computer program Presentation of a group Source code Execution unit Perspective (visual) Computer programming Software bug Medical imaging Array data structure Roundness (object) Office suite Physical system Software developer Interior (topology) Electronic mailing list Drop (liquid) Bit Message passing Data management Process (computing) Series (mathematics) Quicksort Mikrocomputer Figurate number Spacetime Bytecode Web page Patch (Unix) Online help Student's t-test Computer Number Frequency 4 (number) Goodness of fit Acoustic shadow Binary multiplier Metropolitan area network YouTube Information Easter egg <Programm> Code Line (geometry) System call Equivalence relation Compiler Word Integrated development environment Personal digital assistant Thermal radiation Interpreter (computing) Pulse (signal processing) Run time (program lifecycle phase) Code Multiplication sign Parameter (computer programming) Function (mathematics) Mereology Formal language Programmer (hardware) Mathematics Programmierstil Positional notation Bit rate Semiconductor memory Square number Series (mathematics) Source code Programming language Moment (mathematics) Computer Automaton Variable (mathematics) Parsing Self-organization Hill differential equation Remote procedure call Resultant Asynchronous Transfer Mode Functional (mathematics) Game controller Cone penetration test Observational study Virtual machine Coprocessor Field (computer science) Revision control Causality Natural number Integrated development environment Task (computing) Multiplication Validity (statistics) Forcing (mathematics) Projective plane Stack (abstract data type) Blog Object (grammar)
Real number Multiplication sign Moment (mathematics) Tube (container) 1 (number) TDMA Order of magnitude Theory Power (physics) Derivation (linguistics) Term (mathematics) Auditory masking Single-precision floating-point format Spacetime
Coma Berenices
the of the the of the the
the of the the the and I think it's about time to get
started and if people wanna keep filing and there are plenty of seats to go and sit down river narratives and the back so my name is Cullen Fulton I'm a
front-end developer at Duo Security if you wanna reach me on Twitter you can hit me up at your clients and really use Twitter so if you actually wanna reach me personally just e-mail me it just call gmail dot com but if I don't respond just send an e-mail again sometimes I freer to respond the things I and all the slides as well as a number of other resources are going to be up on get hub dot com they're all available now with my get have account just call and in go browse those your which already so many of you may remember the time that NASA send a rocket Tamaz and it crashed in the markets and the reason why it crashed is because they have 1 piece of software they used pounds per 2nd while the rest the software using newtons per 2nd this is very embarrassing for NASA but how many of you have ever done a multi Corp. projects that which takes years if not decades to complete with many people working on specs that are hundreds of hundreds of pages long and not written a single bug in this case the but was pretty bad has lost a multimillion-dollar satellite but still I think we all can relate to this kind of problem but all you may also remember when we initially launched the hubble into space the images that it took initially were really blurry they couldn't do anything with them that's because they actually gotten the geometry of the you're wrong so they just send up a number of astronauts in the space shuttle to go install effectively a pair of glasses to correct it what a lot of people don't know is that they were actually able to measure how blurry the images were in the glass is not only got them just as good as it would have been if they had initially got right they actually were able to correct for a number of other things and get sharper images than they would have gotten if they had had this but this is an expensive way to discover a way to get a sharper image but still it worked so today I wanna tell you for stories about bugs in space programs because there's a lot that we can learn from bugs and space programs are really cool so the bugs are more excited but you tell you
right up front I'm not some guru on top of a mountain you can pass out sage advice I'm going to be editorializing a little bit but I'm not gonna build give you grand lessons in this talk I
this workaday developer like all of you in fact many of you here if not most of you are probably smarter than me and know more about some of the subjects than me but I'm gonna tell you the stories that you can come to reflect on your own experience what you've done I'm and you don't see what you can get out of them and I'll provide a couple little editorializing bits to kind of give you pointers and where I think that's something to think about the stories
but so many of you probably heard the phrase we can send a man to the moon but what is usually said like we can send a man to the moon but we can't get a printer work well I don't have any of you have ever done anything with our printer firmware but it's actually more complicated than you think it would be in going to the moon was not something that we did perfectly there were a number of bugs along the way and this is just 1 of them to civically Apollo 14 and no this is an a type of as an Apollo 13 the famous 1 had the explosion exciting movies no no this is a much more subtle but still almost dangerous but but now in a poll 14 they manage to get to the moon and they're orbiting the moon and was less than 4 hours before there were about to land in the crew on the ground notice that the aboard it was set in the computer that's the bit the Get SET when you push the abort but in which the computer then checks and says God the abort dataset we have to abort whatever were doing get back into lunar orbit no luckily they were and I in 1 of the procedures that actually check you bought that yet and so is ignoring it but what they ended up discovering was that there was probably a little bit a metal or a little bit of salt inside the airport but they're just floating around occasionally randomly shorter which meant the board but was acting as if it was randomly being pushed every so often this is final your orbiting the moon but well you're landing it means that there is a certain percentage chance that you're just gonna have a rocket thruster turn on would be around the other way and send it back into orbit and you only have enough fuel to land on the moon once because it's really expensive again all that feel in this space so this was a major problem for a really serious problem so they contacted the guys who knew about the Apollo Guidance Computer the people actually read the code for and said how can you help us and so they had about 3 to 4 hours to figure out a way to pass the solution by using the Apollo Guidance Computer said it would ignore this particular board but they all seem to make sure there is another way to do it a board I'm the only 3 4 hours to create that patch tested send it over to Houston where they were then tested again and then relay that patch up the ass notes the manually punch in but now the problem is the apologize computer really didn't want to ignore that abort button for and a number of different reasons I have so this is some Apollo Guidance computer source code but if you never looked at assembly this may look a little bit weird tube it's actually very very similar to the assembly of programs that are written today in the 1st column optionally there's all label which you can jump to see a thing this is just like a name that you can put their there is documentation order say elsewhere in your code once you get to this point jump over this other part of the code then the next bit is what's called the operator or sometimes these unit known as Numonics these are little tiny short strings which represent different commands in this case the CEA their means clear register and then add on to it that the operator This is the thing the RE operate on so in this case we are going to clear register and then add in this particular flag to it which is stored and then finally there are comments which look these have come it's just like review that's cool and so what is this line of code do the 1st line clears out a register and then set it to a word that's full of a bunch of different flag bits next these the mass command to mask out all but the let aboard the the bit that actually gets used to know all the other bits will be 0 except if that led aboard Bissett that'll be 1 then there's a little bit of magic they did not enough space at all commonsense therefore call this magic extend command we don't have to go and what that does that finally there's a branch is 0 commitments without usable check is the number that's currently in the register 0 if so it will go ahead and jump to the article then disk there which is another label on the program and if not I'll continue on to do the abort sequence so the bit is set it'll go ahead and continue with the abort sequence if the bit isn't set the go ahead and do it and so there's this aboard flights stored in memory so let us set the leaderboard flag this'll be easy was go ahead and set it and then if we set it to 0 then this code will run and on the board isn't gonna happen the problem is it isn't that simple there are a variety of programs the get run that also change that led aboard flag because you know they wanna set that flag during the landing to say hey were in the middle of a landing and that means we may wanna board and so they would have to us said the leatherboard flag immediatly after the computer said and I would be that there is a gap of time between when the computer said and when they manually set at that theoretically that board but a short out would be a problem of so you also may be thinking that maybe we can just send up a patch for the code that will draw the aboard button but in this case the code itself is woven with a bunch of metal wires by a bunch of women guided by a computer in Massachusetts so if we want a patch the code we would have to actually we've among 2 wires together package adopted epoxy then set it up in a rocket and send it back to the moon and you can't really do that for hours so that's why we can edit this cos it's very very much read only more so than we have to deal with today so the solution that they came up with has to do with the next line of code that we have here is seated immediately after we checked the aboard flag we check that modern right there in that checks if we're in program 71 program 71 is 1 of the 2 aboard programs the others program 70 if again Peter senses that it's already in port sequence it's not going to go into another report sequence because why would you abort abort up and so instead of our setting the abort flag we can set model red if we do that then we're hand trick the computer there were already in a board it'll continue doing whatever is doing this will solve the problem except it's a little bit more complicated than that because there are other programs that check this particular register to see what program the and in order to figure out what to do during the landing so the sequence of the came up with was this 1st you set the modern ready to program 71 that tells the computer that you already given abort sequence so it's going to ignore boards after you set that then you have to wait until the ignition starts which is then automatically set the letter bot flag but we don't care about that because we're a change of the moderate register then Europe push the throttle up to 4 full because the computer isn't going to do that because it thinks it's in the middle of an abort sequence then set the zoom flag which lets the computer know that pay in the future you can go ahead and throttle up the rocket because again it's checking these flags and were kind of really screw with the way to progress post work after that you can reset the leaderboard flag now safe to go up and sent it back to 0 president can be said again that all again cause it to ignore the the abort but then we go and set the mode register back to program 63 the program that it thinks that it really should be and and that way it'll go hand check zoom flag and a throttle the engine as it should for landing then go ahead and turn the throttle back down let the computer control if you're confused don't worry it's a little bit confusing convoluted but all this put together meant that they're able to safely ignore that bought but the end in future flights they actually set up additional register of additional routines to allow them to do this in a slightly less convoluted way has this happened again in the future but not about you but I think monkey patching is really great when you need it you can fix amazing problems like this they didn't have the ability to manually go in and edit all the registers and memory well the program is running on but they would have been screwed B a B they may have aborted midway through the flight up however Monday patching will save you in situations like this but you only should really use it when you need it which is almost never I don't know about you but I'm not lending people on the moon terribly often most the time at more than 4 hours to fix the bugs so yeah I think as you will right next they I won't talk about is how much damage 1 line of code can do but in the line of code was in the area 5 rockets which is 1 of 3 heavy lifting rockets in the world these are rockets which can lift tens of thousands of pounds in the space they're big they're expensive their complicated we don't have that many of them there's not that often that were you know throwing things that begin the space but every so often the needed in Flight 501 was to be the 1st flight of the rocket that the European Space Union had spent pretty much about a decade developing this rocket in total they spent a lot of time carefully testing all the systems and making sure this would work because this product in total cost about 7 billion dollars so something went wrong but the bigger loss these rockets are disposable they don't reuse them every single time but the 1st launch was gonna be an actual mission launching satellites into space so this mission failed not only will they lose the rocket they would also lose all the satellites of they're trying to launch into space so Flight 501 initially the launches going
OK everything is relatively nominal the couple little hiccups that happened but this is normal with a new rocket now less than a minute into the launch the thrusters on the rockets suddenly Gimble to 1 direction that cause the rocket that term really suddenly but now rockets have a point and and you wanna keep that point and going into the way in because that's good because then the wind will just go around it if the wind starts beating against the side the rock is gonna fall apart and so the rocket did start to disintegrate there's a video of this the right you can see bits the rocket coming off from all the wind India at this point the rocket exploded which generally is a bad thing however in this case it's a good thing because whenever a rocket like this is in a dangerous situation it has a self destruct sequence OK just blow up in this case the rocket detected that it was falling apart and so intentionally exploded to prevent even worse things from happening it's not bad when a bunch of bits of rockets fall around from explored rocket it's even worse when a rocket that is flying flies into the ground now the light code that fail as this 1 now there are a couple problems here I don't know the the code and this is written in a year or any of those is relatively easy to read but they didn't use the most intuitive variable or function I assume that if you worked on this rocket this makes perfect sense to you but the line that what went wrong it's this be right here and this that they're taking a 64 bit floating-point number and converting it into a 16 bit integer 64 is bigger than 16 and they were checking whether or not overflow this isn't like ruby reading ad arbitrary larger numbers together it'll magically just figure out how to get those big numbers for you now luckily they actually detected all the possible overflows the system because the rocket engineers were doing actual rocket science so they knew that overflows were possible and they had fixed almost all of the floats and the reason why they couldn't fix all of them is because they had made a rule that their computer could work harder than 80 per cent of its capability because this is a relatively resource-constrained systems so if they work it too hard but it's going to cause problems and crash but now the reason why they didn't put the checks around this bit of code is pretty interesting they actually tested it with real data which is a good thing to they tested with real data from the area for rocket which was a different rocket which had a different flight profile so in the area for rocket this particular bit of code would never overflow it's of Maryam 5 rocket the horizontal velocity which is what this particular number represent was much larger and thus of overflowed no luckily for them they have 2 copies of a computer running this and it was all really the back up that failed 1st with this overflow the problem is they're both getting the same data so immediately after this ms after the backup failed the other system failed and so they had both redundant systems go down but no team was
formed to investigate exactly what happened and what went wrong and they got a number different conclusions out of this but 1 is that the computer itself but was assuming sorry but
what is that what they're protecting against random faults that's why you have to computers if 1 happens to randomly failed you like a bad to pass through a bad solder joint you still have the other computer it can take over they were protecting against design faults they were protecting and the crazy idea that maybe there's a bug in the code and something went wrong but the the the committee those looking notice instructed that they should really just assume that all false where is soft is faulty until this corrected new test-driven development is at hand what you do you assume that your code is bad until you have a test that could prove that it's right so the 1st thing you do is create a test that can prove that that code is rights of energy right you can check that but the other issue is that the computer I had assumed that everything would work and thus when it had this error it just stopped working and sent out an error message of and that error message was sent true the rocket Gimbels which interpreted it as a movement commands and thus it went over and blew lot of the next this set is that you should focus not only on developing good code but good documentation because a lot of the investigation that they did and actually figure out all these bugs and exactly what happened would be possible it was for all the documentation about the process that they provided the final recommendation was to remove dead code this cat Azinger with the story code was to calibrate the gyroscopes inside the rocket to make sure the new which direction was up into that program would run when the rocket was sitting on the launch pads was costly calibrating those gyroscopes so when it launched it new what direction up was but it was still running after the launch happen now this doesn't quite make sense because after the what happens the rockets can be turning so you don't wanna calibrate which way is up well you're actually turning the rocket the reason why they kept it running in the area and for rocket the previous rocket was a very clever but they want to make sure that but if the launch was extended for some reason that the delay when the launch was they were still running calibration sequence they get up and running faster but in this case this dead code caused a rocket to blow up and so they said OK clever hacks are all fine and good but removed dead code it isn't doing anything you're clever hack is very nice because a rocket to explode and a little PostScript the 1st launch of the year in fire rocket was obviously not so good but all along the subscript
watches were quite good in fact even through this year they are currently at a record of 81 successful launches in a row they've had about 4 watches total in the history of almost a hundred What is a really successful rocket they did a really good job with it and after doing this investigation they fixed a lot of the problems in the systems the next thing I
want talked about as agile development and agile development in the Soviet Union now we all know that the U.S. won the space race and we know the U.S. won the space race 1 because were Americans at least most of us we know that America is the best we put the 1st people on the moon and we've got the 1st people orbit the moon prefer that therefore we won the space race the problem with this is that it ignores the rest of the space race will we did accomplish that we we definitely did do that the USSR did a couple of things before us they actually did like all of the things before us they beat us at every step of the space race which is why we did feel so good throughout the question is why is it that the USSR never managed to send a person to the moon we got to the moon and the BS every step away so surely there were better than us the answer is it getting to the moon is hard really hot what the hard problems is you need to launch a tremendously large rockets because not only do you need to get into space you need to get to the moon a rocket big enough to get from a lower orbit to the moon and you need to get that rocket into space which means you need the largest rocket the humanity has ever constructed now the engine powering the rocket for the US was the F. 1 engine this thing is an amazing feat of engineering to give you an idea of how big and powerful this rocket was it took in fuel at a rate such that the pumps that use could drain an average-sized backed up in about 200 ms that's a lot of fuel and not only did they have this engine was sucking in all this fuel they had 5 of them on the 1st stage 5 of these engines look how
big these things that's actually a relatively tall man standing next to them and luggage us how giant enormous this thing it's this is an amazing feat of engineering and the
USSR lacked the industrial capabilities of the United States they were able to produce engines that big and that powerful they just in industry capable of doing it so they decide to go a different tact they designed the NK 33 engine that they knew they couldn't go bigger so instead they went fission they decide to design a rocket engine which have a good thrust to weight ratio as possible and because it was later but still delivered a lot of thrust they could use more of them it wasn't as powerful that's why they had to use more of them and specifically the these 33 of them that's a lot of rocket engines to put on the bottom of your rocket and all of those have to work and work every single time so not only did that to make a very efficient engine this make a relatively simple and reliable engines know in the US was designing the F. 1 engine they did a lot of design they were very careful in their designs that when they launched the rocket they were relatively sure that it was gonna work it did work all the time but they had to be really cautious because the press was closely watching them can any failure was another example of how the US was losing the space race the Soviet Union on the other hand you decide to take a more hardware centered approach they still do lots of design work of course but they're more willing to launch a rocket and just see what happens if it blew up you could learn from that explosion improve the rocket can generate much like we do with agile software development and
so they blew up a lot of rockets I What's OK about this from the Soviet Union's perspective is that they didn't have the free press the United States so a lot of the explosions were hidden because they're doing them out in the middle of I believe Kazahkstan and there weren't really any people watching and so all those explosions could be much better and we can find out about a lot of until much later but now the Yankees 33 engine was designed replace the previous engines use on the N 1 rocket the equivalent of the Saturn 5 rocket the rocket that was the take the USSR to the moon the 1st 4 launches blew up which is OK because they designing and 33 engine to be a more efficient better engine and it was going to be used on at that point in order get them to the moon the problem is the fifth-largest canceled because at this point the US had already gotten to the moon the Soviet Union was an going to the moon anymore and so the Soviet government ordered that all the n k 33 engines which were tested but never actually used on a rocket should be destroyed the engineers didn't do
that though because these were really good engines they knew they were good engine that they had something special here so they just hit them away in a warehouse and they didn't let the government know about this and it was until the 19 nineties there was revealed that they had the stockpile of old engines from the 19 sixties and so they got in contact with but some American rocket engineers from a company it's a hey we this really cool rocket that we think you might be interested in
and they started to tell the US engineers about the numbers the US engineers didn't believe it because this is an engine that a thrust to weight ratio significantly better than anything that they had managed to design in all the subsequent decades not only that use something called a closed cycle technology therefore though the rocket nerds can't really go into the details of what this is but an engineering feat so impressive that the U.S. had deemed it impossible because involves powering those pumps that pump all the fuel powering them by effectively the same explosion that is running your rocket itself which need you really really hot rocket fuel going through a turbine now you can cool it using the liquid oxygen you at which you have which is really cold the promise your turbine is made out of metal and oxygen corrodes metal and he accelerates that so you have a crazy amounts of heat that can melt through about thick of metal like it's a candle a neural so filling with the highly corrosive substance that's why the U.S. being the possible U.S. copper hand while these rocket engines that tested and found that yes in fact in the 19 sixties the Soviet Union did meant to designed this rocket imaginer someone came to you today and said I have a computer I have a whole stockpiled and really good servers the best Soviet servers you've ever see it not only are they more powerful than some of the service that you have there are also more efficient and use less power also using a bunch of quantum technology that your physicists thought was impossible would you like to buy some you would probably think they're crazy but this actually happened and s just sell them for 1 comma decimal 1 million dollars apiece to the U.S. the use them throughout the nineties and the descendants of this and are still used today to this data of only been about 2 or 3 rocket engines ever flown a design that are more efficient than this particular engine and yet the Soviet Union never made it to the moon they at all this amazing engineering they could be as our every step of the way partially because the sort agile process that they didn't being willing to build things but whether it's due to a lack of political will or a number of political problems because there were some political issues within the USSR as well the number right things they never made it and that's really interesting that despite all this really good engineering they never managed to make it to the moon the last story wanna tell you about is about 1 bad byte we see how much damage 1 code can you but what can happen when just 1 little bite goes wrong specifically 1 byte in the Galileo space probe the space probe which was designed and built in the 19 eighties launched the nineties and and I believe the late nineties reached the Jovian system and study Jupiter and its moons and produce some really
beautiful images and really expanded our knowledge of Jupiter and its moons
that Galileo's great did a lot of really amazing science but there were a number or problems along the way if you look up illustrations of Galileo the early 1 show this big antenna dish of that's at full the top and then if you look at later illustrations you'll see is just a little thing that looks like an umbrella just have folded that's because the antenna dish in manage open all the way that's another story for another day when I talk about is the magnetometry that's the thing that measure the magnetic field of Jupiter that man automata broken galileo because there was 1 by just 1 little tiny value in the source code which went back DSpace and especially Jupiter's a really punishing environment there is a lot of radiation going on there and so probably of a gamma-ray something hit 1 of those bytes in this cause it to go back and fry that little bit of a memory so let's put yourself in JPL shoes the people designers of a particular the spacecraft so you have the code you have the code the goes with the magnet under the code that has the bad by is that Good things you know where that by ideas and you also have all the source code see figure out what that code and so you can work around it that code was written for I don't know about you but I was a familiar with 4th not that long ago and it's a relatively obscure programming language though it's not uncommon to see it being used in the space program will get back for it later now it was developed using a development environment of for the Apple to this is a relatively old system of everything I know that is because by the time this spot happened JPL gotten rid of all the amplitudes so OK we have to fix this code we have the code luckily but we don't the computer the code was developed on nor do we have the actual development environment that was used for generating that code and compiling for that particular computer how would you feel upon hearing this you need to fix a bug in this code don't worry we have the code but you don't have a compiler also we don't have any development systems here the bytes good luck enter wrong will the engineers on the magnet hominid team had deem that this would be too expensive and too complicated Avila fixes the how much time would take for them to recreate all the development tools required to fix this right their father little bit differently he thought that he be able will do it in a lot less time and save GPL money or potentially save the magnet 100 is there any give up on this thing yeah couple vendors inside 1 was that the man automata use an 18 O 2 process the relatively simple processor in it's very vaginal it's a very simple in the way that it works and that you know everything kind of works like everything else it's very easy to figure out based on I 1 command works how all the other commands work but unlike modern x 86 processes which are really powerful but the really complicated inconsistent how the implemented so the passes is relatively simple so writing a compiler for it isn't going to be the hardest task in the world another image the at 4th an undertaking among to show the forth programming language this is a valid line of force I don't know about you but to me this looks like someone just took coding just you know sort it's all the numbers are over here and then all of the other things are over here and the reader why looks we're discuss for this 1 of very very few of programming languages use was known as postfix notation and the reason why it does that is because the runtime that actually runs it is a stack-based programming language everything they do is based off a stack sorta like an rating can only pop and push on to you can access in the middle of and so if we run this on a 4th but we 1st get into the number for the number of war isn't just the number for a value it's also come and it's a command that puts the full or on the top of the stack we doing it the number 5 which put the 5 on the top of the stack than a with which the 2 in the parts that pushing all the things before down next get to the plus command the plus command takes the top 2 items on the stack pops them off it add them together and put them back on the top of the stack then we have the multiplication command which takes the top 2 items up the stack pops them off multiply them together and then put them back on the top the SEC by period command takes whatever is on the topless stack and printed out a standard hour what every equivalent of the now this way that I wrote it is a little bit confusing that's intentional the can show what postfix notation looks like you more often you may see for code that looks like this which makes a little bit since as long as you discover flip the way your brain works through a take a 5 minute to wear add them protect the result of that era multiply by 4 the were output that now what about functions here is a function formed specifically a function which squares and number other colon marriages 4th syntax to say hey we have a function definition coming up then we have the word square the name of the function than Shwe have do duple take whatever happens to be on the stack when you are running this particular function and duplicate whatever is on the top of the stack it'll just copy it can push another 1 on the stack then we take the multiply command multiply the student numbers together put them back in the top of stack the colon so the ready and the function no it's really cool about this mode so you may have noticed is here we have a definition of a function and it doesn't have any parameters it doesn't have any return value in 4th you don't have any of that you don't have variables there are direct memory be you don't variables could you don't need that everything this operates on the stack that all it is is make 4th very small it also makes it very easy to write the 4th interpreter is you don't have to deal with all the complicated things with objects and arrays and but having a so having variables in your program or return arguments are lexical scope enough those things are actually needed because of the way that fought words this makes for very easy to implement on a very simple small space confront constrained and also processor constrained microcomputers surround Garrett had these 2 inventors render this was gonna be relatively simple to do he also had another secret which was the he was this program that was programmers are often people who work in shadows and have long years and you know I speak in hushed tones in parentheses but I don't have time to go into how wonderful it is but it is a really amazing language and Ruby is actually pulled some stuff out of it but what are the really great things with of about less and specifically Common
LISP which he used is it's a fantastic language reduce hacking something together because the syntax of the language and the way it's run is relatively simple in the case of a list you can construct programs a construct other programs or modify programs relatively easily metaprogramming also the case of common lest the parser that passes your code before it evaluates it is actually something that you have control over at run time so in common list you can write some LISP code the changes the way that the list passer works so that midway through your code you can start writing everything and ruby syntax and all totally understand that I don't know of almost any other language that has that ability and makes it so simple to do that you should probably never do that but in the case of this you don't have that much time you need a hack something together and so Ron Garrett you know worked really hard on this he did a lot of this work in Nature come up with a solution in I believe about a little more than a month of and he did get some help from the mayor of the magnetometer team at JPL they helped them validate the program was correct and validate that is but a fix was correct but in the end he meant to come up with a patch that could save the Galileo probe in not that much time working on his own despite all of the issues here is the actual pass that he wrote I am not a 4th Programmer and I don't know 18 O 2 byte code if any of you do know anything about 18 O 2 byte code please come up to me afterward because you're probably an innocent person to talk to what I can tell you is that up there 1st we have a function definition then we have the compiled version of that function then we have another function definition which is another 1 the a patch and a compiled burden that I believe looking at the code what he had to do FIL out the space that was in that bad bit memory was some code would never get executed and then take another function and cleared up so is a little more efficient space compacts that they wouldn't take over the extra space and all this code as well as the tools that you use to do it are available on get hub for you to look at if you wanna look at 19 nineties Liskov actually contacted Ron Garrett not that long ago asking about this unfortunate he did remember to many things because this was 25 years ago he worked on a lot of really cool interesting project at JPL but if I did ask him for lessons and he did say there is 1 lesson he could take away from this project that might be were sharing with you and that's that list is really awesome it's really cool they're able to do that I would like to add the amended the 4th is really awesome and that you're probably now the largest audience at any ruby come to know what 4th is so congratulations I now at all you these 4 stories this is where I normally would give you some takeaways but I really wanna like give you too much about what I think about the stories I've already told you most of what I think I want you to come up with sorrow what can you learn about that of your own programming style as your own development what you do work but you can take on this but there is 1 thing that I wanna mention that history is really awesome we have documentation of a lot of these bugs and what happens because of NASA being a public organization they have to share a lot of this stuff but there's a lot that we can learn from in history if we take the time to learn from other people's blogs to learn from things that were study 10 20 even 40 years ago the really cool things that were about computer programming things that we still have explored yet as programmers for doing ourselves a disservice if we don't explore history more so you'd like to learn more about this stuff I have a couple recommendations 1 is to watch the talk the remote region experiment which was a Google tech talk that wrong Garrett gave he goes into more detail about some of the other Lisp programming that he did it JPL as well as a lot of organizational problems that happened office leave it at that I I don't recommend reading the book Digital Apollo unit here up that nerdy about space is a program that is about the Apollo Guidance Computer and the design for it there's a lot of really interesting by information there about you design work and also the politics and philosophy of designing a new why when you're dealing with a situation where you've a bunch people really want control the system directly at a bunch of engineers who say no we want computer to do it is a really fascinating history and it's a really grabbing read what the call Levin's source code which is what I actually pulled from is up on GitHub if you wanna look at it and you can actually go through and I believe it actually is proper cone coloring onto which is quite impressive but you can go through and read it and it's really fun to look at all the little Easter eggs are in there if you're really nerdy you really wanna understand I would recommend the book the Apollo Guidance Computer will digital Apollo's really accessible the Apollo Guidance Computer is a relatively readable book but it's not very accessible it's hundreds of pages explaining how the Apollo guidance computer work how well the bits were arranged inside of it all of the commands it was an invaluable resource and when you get this talk and the very very end of it tell some stories about various things that went wrong in various bug fixes but in the pulse guns computer but he doesn't tell from the perspective of the purse people who worked on it he tells a from the perspective of all the nitty gritty about the bits that actually removed about to do these fixes finally if you know what read on a new budget talks I would recommend looking up the moon machines documentary series they have a number documentaries and available on a line with another Spiegel I don't know but they're available on YouTube if you wanna go and learn more about the F-1 engines the CERN 5 rocket there another 1 the poll guidance computer which is really into your computer programmer also I recommend watching the 1 on space suits you would think spaces are interesting but I won't I won't spoil it but you'd be surprised to actually makes the spacesuits that we still use in the US to go into space a couple special things thank you to Ron Garrett for helping me and sharing the fact that he put up this code on GitHub also makes my friend Rachel Mcguffin she's monitored all the illustrations that you did in this presentation and I think that this talk wouldn't been have been as good as the 1 of regional governed like it is take a moment to please give a round of applause for on Garrett for this amazing fix that he did cause I don't think anyone's ever given a really thorough RAM prize for all the work he did in Ritchie McGovern for all the work that she did communities these illustrations
OK so the the early heavy-lift sod is there really a nerdy for a moment but he asks how did the end as compared to that I talked about the some ones all and I am the spacecraft that you 1 muxes masks is a space X has been developing and Bill I don't know the F. 1 engine is more powerful than the F. 1 and actually is the most powerful rocket engine ever developed it's the most powerful single nozzle liquid propellant rocket engine ever developed theory allows you see those big to be white tubes are on the size of the space shuttle whatever it launched those rocket engines are like stupidly powerful like orders of magnitude more powerful than the 1 that I showed you those of solid rocket fuel and the quite different physical your question but the ANC 33 engine the only once more efficient than this some theoretical engines that were never built some derivatives of it and other engines designed by the Soviet Union and then the Merlin engine which space X developed I don't know about some of the details about and the specific and is that you develop I think they're not more efficient terms the thrust to weight ratio but they have a lot of other really interesting characteristics in because they haven't flown yet they don't really necessarily count as real rocket engines until they get on a rock and flight any other questions alright well it's time to go but if you have any other questions you want this come up and see me I love talking about this stuff and thank you again we really
if the if


  493 ms - page object


AV-Portal 3.20.2 (36f6df173ce4850b467c9cb7af359cf1cdaed247)