We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

How I helped fly a helicopter on Mars

00:00

Formal Metadata

Title
How I helped fly a helicopter on Mars
Title of Series
Number of Parts
115
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 4.0 International:
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
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Open source code is the foundation for a lot of my own work, but of course also the work of others. And the beauty of open source is you never know where your contributions end up. This story begins in the summer of 2019 when I wanted to see if I could contribute to the python project I’ve been using so much. In this talk I’ll walk you through the challenges I faced making my first contribution to cpython, picking a bug and squashing it. I’ll end the talk explaining the title: after viewing the 2020 mars helicopter fly on the red planet I realized I have a new badge on my github page. I never started out thinking I could have my code flying in space, let alone flying on mars. But it does. I hope to inspire others to step over the hurdle and contribute back to the open source tools they use.
19
Thumbnail
43:26
ACIDGoogolGamma functionVideo gameOpen sourceBitProcess (computing)MathematicsChemical equationBuildingAreaAutomatic differentiationObservational studyTask (computing)Multiplication signPhysical systemFormal languageSystem callWordMobile appCodeSoftware maintenanceLatent heatCoefficient of determinationPhase transitionSpacetimeRight angleComputerYouTubeLink (knot theory)InternetworkingSoftwareProjective planeElectronic mailing listPresentation of a groupPolar coordinate systemSocial classThread (computing)Connectivity (graph theory)Endliche ModelltheorieEmailInstance (computer science)WebsiteComputer programmingSoftware testingRandomizationSoftware bugPoint (geometry)TrailGraph coloringLine (geometry)Limit (category theory)Control flowJava appletModule (mathematics)Electronic signatureWeb 2.0Shooting methodRobotMiniDiscQuicksortSet (mathematics)Electronic data processingControl systemGroup actionKritischer Punkt <Mathematik>InternettelefonieComputer configurationLattice (order)RoboticsScaling (geometry)Software developerComputer scienceUltraviolet photoelectron spectroscopyTerm (mathematics)Cartesian coordinate systemSystem administratorMetreCASE <Informatik>Web pageInheritance (object-oriented programming)Library (computing)BefehlsprozessorGame controllerMicrocontrollerProfil (magazine)Dependent and independent variablesOperator (mathematics)Arithmetic meanWave packetSpeech synthesisIntegrated development environmentClient (computing)Information technology consultingProgrammer (hardware)String (computer science)LaptopMoment (mathematics)DivisorField (computer science)Online helpCategory of being1 (number)Different (Kate Ryan album)Computing platformMeeting/Interview
Information securityData conversionBitWordMultiplication signAutomatic differentiationMeeting/Interview
Level (video gaming)SpacetimeProcess (computing)Video gameBuildingAreaComputer animationDiagram
SpacetimeBitComputerProcess (computing)YouTubeMultiplication signPolar coordinate systemComputer animation
Set (mathematics)Multiplication signComputerTrailComputer scienceCodeMiniDiscGraph coloringDensity of statesGoogolComputer animation
Client (computing)Formal languageRight angleMultiplication signPhysical systemTask (computing)CodeComputer programmingSoftwareProcess (computing)Java appletCartesian coordinate systemComputer configurationScaling (geometry)Software developerOperator (mathematics)Line (geometry)InternettelefonieKritischer Punkt <Mathematik>Programmer (hardware)Group actionDot productMobile appInformation technology consultingComputing platformGraph (mathematics)ComputerGoodness of fitEndliche ModelltheorieComputer animation
Physical systemMultiplication signSoftware bugFormal languageDependent and independent variablesModule (mathematics)Computer animation
Read-only memoryBinary filePortable communications deviceFunction (mathematics)Run time (program lifecycle phase)Computer configurationSoftware developerElectronic program guideState of matterEntire functionPointer (computer programming)Linear regressionSoftware testingElectronic mailing listError messageParsingComa BerenicesLibrary (computing)Process (computing)Patch (Unix)Normal (geometry)Uniform resource locatorImage resolutionImplementationLevel (video gaming)Data typeComputer clusterThread (computing)EmailCodeRepository (publishing)Software bugNP-hardProcess (computing)Electronic mailing listMultiplication signDifferent (Kate Ryan album)Module (mathematics)Social classSoftware testingQuicksortCategory of beingOpen sourceCodeRobotLatent heatBit1 (number)Electronic signatureEmailLibrary (computing)RandomizationComputerComputer programmingSoftware maintenanceAreaDivisorLink (knot theory)Field (computer science)Computer animation
Multiplication signMetreCASE <Informatik>
Control flowSoftwareOpen sourceDistribution (mathematics)Process modelingProcess (computing)Ideal (ethics)Multiplication signLattice (order)Set (mathematics)SoftwareRoboticsGame controllerProjective planeCodeOpen sourceElectronic data processing
Moving averageMultitier architectureMathematicsBuildingChemical equationProfil (magazine)Multiplication signVideo gameBitProjective planeMicrocontrollerOpen sourceCodeElectronic mailing listRing (mathematics)Connectivity (graph theory)Process (computing)Meeting/Interview
Transcript: English(auto-generated)
Greetings everybody and welcome back to EuroPython. We just finished our lunch break. For the next two hours I will be the session chair for this room and then we will have another brief break. The first talk of this session will be with Joost Leck.
Have I pronounced your name correctly? Hey Alan, so I can hear the ads but I can't hear you and I'm not sure you can hear me. I can hear you. Oh dear. This is odd.
Can you hear either of us? So you can hear the both of us? Yeah both. That is very unusual. Hopefully everyone else here can hear us.
I'm not actually sure what you're asking. This is horrible. Well Christian, thank you for confirming that you can hear us both. It is unusual that Joost cannot hear me.
If he asks, I've said incredibly nice and fantastic things about him. Joost, how is your full name pronounced? Ah, this is a very good question. You start off with yogurt and you end with toast.
So it's Joost. Joost. Okay, that makes a lot of sense. That is good to know. I think it's always important to ask people how their names are pronounced because you never want to make assumptions and it's the most important word in any language. Before you begin your talk, is there anything you'd like to share about yourself that wouldn't be obvious from your bio?
No, well maybe that you can potentially hear that I have a bit of a cold. I tested, it's not COVID. I'm really happy that it's not. But I did spend a bit of time in bed this week to try and be as ready as possible for today.
But if my voice sounds a bit odd, then that's the explanation. All right, good to know. Thank you very much. If you're ready, you can begin your talk. That's cool. I am. So welcome everybody. My name is Joost Leck and I'm not a programmer, but we'll get into that.
So I started my life in 1982. I grew up here, just south of Amsterdam in a village called Langaraer. Even though the Netherlands isn't very big, there's a lot of agriculture going on. And especially in this area known as the Green Heart. Nearly all of the bigger
buildings you see here are greenhouses for growing flowers and produce. And my dad worked in one of these growing flowers. And the very first answer to the question, the very first answer I remember giving to the question, what do you want to do when you grow up?
Was to be like my dad, even before I knew what a job really was. After a few years had passed, and I too went through my fireman phase, I started turning my eyes to the sky. And at the end of the 80s, space was quite huge.
Also in the Netherlands, we actually had an astronaut in space. And after a visit to the Space Expo where this picture was taken, I decided I would become an astronaut. I hung a poster of Ariane 5, one of the main European rockets of the time over my bed. And I dreamt
of flying out to space one day. Now, the fact that I'm here at EuroPython giving you this talk instead of giving a TED talk and you watching it on YouTube probably gives it away. It didn't really happen. I got into computers instead. And computing was,
you know, a bit different back then in the 80s. My parents, neither of them worked desk jobs. And I had pretty little exposure to computers at the time. It took me a while to get acquainted with PCs. By the time I was in my teens, I could connect to the internet from
school occasionally, but that was still in its infancy. At 15 years old, however, I bought my first computer. And it would take me another year or so before I could surf the web on it.
After reading about it in a magazine, I managed to get started on Linux at the time. I bought Red Hat 5.2, which is actually code named Apollo. And I bought that as a set of a hefty instruction manual and some installation disks. It was a huge challenge
to keep it running on my little PC as I had really no mentor and no idea to fix any issues that occurred as Googling wasn't really a thing at that time. None of my friends cared for it too much either. They thought I was fiddling around with a useless DOS with a bunch
of added colors. But it sparked an interest in me. And though I wanted more after finishing high school, I lost track of my space ambitions. And I started my bachelor's in computer science at the very ripe age of 17. The year was 1999. And in that industry,
the sky was quite literally limit. Dot com bubble hadn't popped just yet. As you can see from this graph. And if you could so much as write a line of code, you were practically guaranteed to get a
job. I learned to program in Python or in Java and in C. But I didn't find a ton of joy in doing that. Because there's something you need to know about me. I'm very lazy. I just had a hard time finishing tasks. And this this unfortunately materialized in my studies as well.
I finished the first 90% of my bachelor's in the allotted four years, and the last 10% take me another five. In the meantime, I started working in what we would now call startup.
We worked on voice over IP systems and a banking app that would immediately be surpassed by PayPal. Actually, while we were launching it. Let's just say PHP was involved. And I'd like to keep it at that. I did discover something
about myself, which is, I'm not really a programmer. I like the puzzling aspect of it. But it's just not the thing I can do for months and months on end. I did figure out that I'm good at fixing things. And I still like computers. And I also
got pretty good at fixing things that are broken and need to get fixed fast. And that led me into more operational territories. After my final internship at a Unix consultancy company, I stayed there to work for their clients. It was mostly about keeping Unix systems and some
networking stuff operational. This is also the time when I started learning Python. This was an excellent platform and a language for me to get things done quickly without exerting too much effort, which was a critical point for me. So fast forward another couple of years, and I'm settled into a career that's very lucrative,
but doesn't challenge me too much. And the work just wasn't keeping me engaged at all times. I had amassed tons of knowledge on Linux systems, on network design, on administration, and also actually on Python programming. But I was coming up on 30. And I realized I hadn't
become all I could be yet. I was slightly skeptical, but intrigued when a recruiter for Optover approached me. I knew exactly nothing about trading options or finance in general even.
And I applied there and I started working as an application engineer. It's mostly an operational role. And when I started, there was a very sturdy wall between ops on one end and developers on the other end. A while after joining, it became apparent that this way of working
wouldn't scale. We went through a DevOps reorg. This was a great time for me because as one of the more programming and Python-oriented engineers, it fit me very well. And I actually started teaching an internal Python course for a while, which I enjoyed a lot. Since then, we've actually
made our first steps to transition for an SRE model. And people on the operational side of things are spending more and more time writing code. Right now, as we're speaking, I'm coming up on 10 years now, which also tells you a lot about my age. And I haven't been bored
a single day over there. This is actually where I work. As an SRE, I sit on the training floor, and it's my main responsibility to ensure that we keep trading at all times. It's work where
I get to collaborate with traders, with C++ developers, with infrastructure engineers, and also fellow SREs. Python and C++ are the main languages for our company, and Python is the one I'm most familiar with. And it's also the one where most of our operational tooling is built in. Think about monitoring systems, deployment systems,
managing hundreds of the bare-metal systems that we use and optimize for latency. One day working there, I spent some time under the hood of Python 3.6,
actually in the threading.py module to fix a bug in one of my tools. And in the course of doing that, I came across the Python bug tracker. Of course, the bug wind up being in my code, and actually the bug itself isn't relevant to today's presentation. But that's how I wound up browsing this page, which I really hadn't come across previously.
Now in my spare time, I'll occasionally program a little bit on sites, for instance, like Exorcism, which I really enjoy a lot. But I've always felt this slight discomfort from using all of
these open source tools in our work, but never really contributing back to them. And so it dawned on me, and that evening I started browsing the Python bug tracker and I thought, you know what, maybe I can help. After clicking through these thousands and thousands of issues listed,
I was very impressed at all of the work going on that I really hadn't ever considered. Actually, there was more of this work pending to be worked on, right? Because these are all open issues that still needed some attention. Clicking the random issue link a few times was
fun, but it wasn't really my forte. And my eye fell on the issue issues link. A lot of these did not seem super easy to me, or I expected them to be very tedious. There's also a lot of them on the C side of CPython, which is fair, but it's just
also not my area of expertise. Then I spotted this one, which is a simple class missing from threading library that I had been looking at for the bug that I encountered in my code. The issue had been there for a couple of days, and so I had a chance of being the first guy to
work on it. It couldn't be too hard to help out and fix it, right? And you know what? It wasn't even that hard. I checked out the code from GitHub, and actually I think I spent about 30 minutes, maybe an hour, hacking away at it until I had built a class that satisfied all of
the tests and essentially fixed the bug. I'm not going to walk you through the code. It's not terribly interesting for this presentation, but it's essentially a simple lock for a module that doesn't even really use threading. After writing a code, I made a pull request on GitHub on
April 24th of 2019, and there was immediately a bot commenting on it saying that I needed to sign a contributor agreement. I didn't expect to be signing documents in the course of this little quest, but here we are. So of course I read through it in detail, as everyone should
with a document that requires a signature, right? It's basically an agreement between a new or a past contributor to the Python Software Foundation, and for all sorts of complicated reasons they feel
a need to be able to redistribute whatever code you share with them, and your signature on this specific document grants them that right, forcing you to either use the academic free license or the Apache license for your software. The document itself is actually really nice and short. It fits on this single page, which is impressive for any document with a legal standing.
I don't think it's unreasonable, and after signing it and sending the document back, I went about my business and patiently waited. Some two weeks later, one of the maintainers provided a few helpful comments on what were obviously missing docstrings.
What do you know, you know? Rookies make rookie mistakes, right? I quickly went in and I fixed those that evening, and I pushed my code, and another month went by. I sort of forgot about the whole endeavor, to be honest.
Until the 70s of June, when I got an email saying that my PR had been merged. At that moment, I got this email, I was sitting on my couch at home. I was reading the email on my laptop, while my better half, Mirta, was watching TV. Now I was quite pleased with myself, and I immediately informed her about my significant
accomplishment. Her not caring about anything relating to computers and working in an entirely different field was probably a big factor in her rather unimpressed reaction.
But I guess that's fine, right? I certainly didn't do it for fame or fortune, but I did reflect back on the whole process. It was very smooth, and I'm happy I took the time to contribute something back, however small that might have been. If you've never done that, I would really recommend browsing through these bug lists on bugs.python.org, and if you have some
spare time, see if you can contribute back. There's a lot of different categories of issues there, including ones that simply are documentation fixes, or like this, missing tests or small bits of missing code. It's a great introduction to what's under the hood of the Python engine.
Now that would have been the end of the story, and when I first talked to my colleague Nicola De Marchi about giving this specific talk, it was going to be titled It's Very Easy
to Contribute to Python. The thing is, even though I hardly use GitHub for work reasons, I very occasionally do log into it from home, and one day this year I spotted this badge.
I was again sitting on my couch, again actually my partner was sitting next to me watching TV, and I remember telling Myrthe next to me on the couch, saying apparently some of my code was used for the Mars helicopter, and she said no way, that's really cool, and I couldn't help
but agree. I felt a sense of joy and pride to be connected to a small little helicopter that hoovered over the red planet. Unless you've been living under a rock, you must be familiar
with this copter, right? It launched from the much bigger Perseverance Mars rover, and it's fairly small, but still its rotors are 1.2 meters wide. It's been performing very, very well. After its first flight on April 19th, the mission was already deemed a success,
but it kept going beyond that, and earlier this week it actually completed its 10th flight. Ingenuity seems to have paved the way for future Mars exploration by unmanned craft, even craft that can fly. What an exciting time to be alive.
Now it would of course be really cool to say that I contributed to that specific helicopter. That's not really the case. The GitHub badge we saw earlier was assigned to all contributors for a set of open source projects selected by Ingenuity's engineers as having powered this flying robot.
While all the code running on Mars is C++ based, the ground control systems, the flight modeling, and the data processing used Python as a base. So however small my contribution was to the overall project, it was really exciting for me to see how a tiny contribution can provide for
such an inspiring story. I hope you too will remember to build the shoulders that future giants will stand on by contributing back to open source software. And that's actually all I had for you today. I'd like to thank you very much for listening to me, for providing a great community here at EuroPython, and I very much look forward to meeting you in person at a future
conference. If you have any questions, now's the time. I actually have a question for you. There you go. Out of curiosity, just because I weirdly a lot of what you've mentioned actually
rings very true for me. Not only in terms of like your educational background, but also your experiences getting into development. Do you have any advice for people who are not only looking
to get into contributing to open source, but also balancing a desire to contribute to open source with the balance of the general work and life? Because as many people who work in tech are aware, it would be optimal to leave work at work. And it's difficult to explain to your non-tech colleagues sometimes why you're spending maybe an hour or two on an evening you're not
interesting balance to strike. I think, you know, if you're asking me for advice, one of the very best things to do is the example of my colleague Joel, actually,
he presented earlier this week on Wednesday. A project that he worked on within our company called Vulcan. It's a build tool for Python, where we had a very specific need that wasn't being met. And, you know, this is the textbook way of contributing open source software, right,
where he saw that need, he built a tool that is very functional for us, it works very well. But it's not competitive in any way. It's not something that we have any value for keeping to ourselves. So we release it back to the open source community. And I think if you want to
take, assess your environment, see what kind of tools you're using. And if you're building those tools in house, and you say this is providing value to me, but it's not unique, it's not it's not unique to my business, it's not unique to,
it's not proprietary in any way, then by all means, contribute it back to the community. That's that's a first step you can take. When it comes to balancing things, you know, working on things in your in your in your own private life. That's really, you know, finding where your passion is. For me, the other open source, well, contributions, if you may,
if you may call them that have been in the embedded space, I really like working on small, like I use a ESP 8266 controllers, and I write some Lua code for that. And so
my GitHub profile has some Lua code for for these these small embedded microcontrollers. And that's, you know, I like the home automation component out of it. And I find that that's an easy way to balance still contributing something back still, you know, publishing something in that sense. And getting some, some, some gratification out of it in my,
in my private life. Does that answer your question? It does. It does actually, because certainly it's something I've thought a lot about.
I, I would, I do kind of have a follow up question, but I'll ask, I'll maybe DM it to you, because we do have an audience question. I, my apologies if I'm pronouncing your name wrong. Hannah C. Devanam asks, why have you only contributed to Python once? Now that you've done it, are you likely to pick up another issue at some point?
That's, that's a really good question. I am likely to, however, life has gotten a little bit in the way. Since the, since the commit I made, my second child was born. Life has been a little bit hectic, balancing Corona, working from home,
changes and all of that. It's certainly something that I find, it brings me some joy. And I'll, I'll be looking forward to doing that more often. Yes, that's true. On the other end, I'll also be realistic. There've been changes to my job, which pushed me
doing less technical things at work. And so that that avenue is, is somewhat closed for me as well. That makes a lot of sense. I think we probably have time for one more question.
And this seems like it was partially tongue in cheek. Why Lua and not MicroPython on the ESP8266? I, I, you know, while I was answering that question, I could almost, I could almost predict this one coming. To be honest, the work I did on Lua predates even this commit. And
I think even some of the work on MicroPython. I have yet to take MicroPython for a spin in that in that realm. I've heard really, really good things about it. I've actually watched, watched the conference talk a couple of months ago on MicroPython.
And it's somewhat to do list, but list is a bit long. All right. That makes a lot of sense. I've always insisted that the, the best tool for a given job is the one that you'll actually use.
Yeah. Thank you for your talk. It was very inspiring. And I think we all hope to see more of your contributions to the ecosystem in the future. Thank you very much, Alan. Thank you for having me. I had a great time and thanks for the conference because it's been lovely.