I’m excited to share this talk that Jeena and I gave at Donut.js on Tuesday. Video is below, as well as the script with slides!

In addition to the all-around good vibes we got while presenting to the Donut.js audience, I got a lot of value out of the experience because I learned about what makes a presentation good (note to self: don’t mumble) and how to summarize content. Many many kudos go to Jeena, who drew many of the cute images and came up with the direction we took with the talk. :v:

The Slides:

donutjs-jam-1 M: Hi Everyone! Welcome to our talk, Team JaM in Systems Wonderland.

J: We will talk about how we got into systems programming through Rails Girls Summer of Code. Our team name over the summer was Team JaM, and I’m the J in JaM, Jeena.

M: And I’m the M in JaM, Malisa.

donutjs-jam-2 J: We are students in bioinformatics, which is the child of programming, biology, and statistics. We knew some Python when this strange bunny appeared in front of us this spring.

donutjs-jam-3 M: in bunny voice I’m Rails Girls Summer of Code. Join us for summer of code and fun!

J: During the application process, we had to choose a project that we wanted to work on over the summer, and one caught our attention.

donutjs-jam-4 M: Servo, which is a web browser engine!

J: We later learned that a web browser engine is the heart of a web browser. We didn’t fully understand what that meant, but it sounded cool! Plus, the logo is very doge, much cuteness.

donutjs-jam-5 M: So we chose Servo! And we followed the bunny down the rabbit hole…

donutjs-jam-6 J: And we landed in Systems Wonderland! We were so confused! Why are we here? We thought we’re going to work on a web browser engine? What is systems programming anyway??

donutjs-jam-7 M: In order to learn what a system is, it helped us to think about it in the context of something like a donut tower. If you want to build a donut tower, you have to build the bottom layer first. That is the system. And on top of that, you can build the other donut layers. So we learned that systems programming is about building a foundation on top of which you can build other applications. In that sense, a web browser engine is a system, on top of which you can build web apps.

donutjs-jam-8 J: The open source project we worked on is Servo, which is a web browser engine: the heart of a web browser. It is written in Rust, which is a new systems programming language. It aims to be safe, fast, and secure - all the good things you want from a browser. It’s really cool because it’s getting written completely from scratch. Servo is like the new kid in the block!

donutjs-jam-9 M: For our project, our mentor jdm told us to “Make Fetch happen”.

donutjs-jam-10 J: And we were like, what is fetch?

donutjs-jam-11 M: This is how we understand fetch. Say you’re JavaScript who lives in Web Browser engine in the web world.

donutjs-jam-12 J: Sometimes you get data that you want that’s far away. You can go get it yourself by leaving your home, but there’s a small problem: who is going to take care of the house while you’re gone? You don’t want to leave the web browser engine unattended, because that would mean that nobody will be able to scroll, click, or drag. Everything will just stop.

donutjs-jam-13 M: Luckily, you have a loyal servant, who’ll get the data for you!

donutjs-jam-14 J: So, you send off your loyal servant to get the data.

donutjs-jam-15 M: What are you going to do while your servant is getting the data? One thing you can do is stop everything and just wait. Or…

donutjs-jam-16 J: You can go back to your home, and make yourself a cup of coffee.

M: Or fry some eggs.

J: Or eat a donut.

M: Or write a todo list.

J: In the web world, this means that your web browser engine keeps working, and people can still scroll, drag, and click.

donutjs-jam-17 M: And when the data is available for you, the loyal servant will let you know!

donutjs-jam-18 J: Then you can pick up where you left off and consume the data.

donutjs-jam-19 M: One of the good things about the loyal servant is that it’s clever and can process the data according to its format so it’s easier for you to consume it.

donutjs-jam-20 J: In summary, in the web world, say you’re JavaScript. You live in a house that is a web browser engine. Sometimes you get data that is far away, and you have a loyal sevant who can retrieve the data for you. It turns out the loyal servant comes in two kinds.

donutjs-jam-21 M: One is XML Http Request, and while it is functional, it’s not pleasant to work with.

donutjs-jam-22 J: The other is Fetch, which is much nicer and cleaner to interact with. It’s just pleasant all around.

donutjs-jam-23 M: So our goal for the summer was to implement the JS Fetch API for Servo.

donutjs-jam-24 J: So far we learned that Servo, a web browser engine, is the heart of web browser. FFetch is a way to get data. We kinda knew what we had to do. So we were like, ok, what are our tools??

donutjs-jam-25 M: We opened our tool box, and there was Rust!

donutjs-jam-26 J: Rust is a new systems programming language such as C or C++. It aims to be fast and memory-safe, which is unheard of! Plus, the syntax is much nicer and it reads like a high level language. We knew that we had to learn Rust because Servo is written in Rust, and learning this language over the summer was really really fun. But during our summer, we also learned two unexpected things.

donutjs-jam-27 M: One of the concepts that we had to wrap our heads around is that even though Fetch is a JavaScript API, it is implemented in Rust or C++. As you might imagine, this requires a whole lot of “glue” code which allows the two languages to work smoothly together. Luckily for us we mostly just had to worry about the Rust side of things, but we’ve realized that there’s a whole lot of code that went into making this possible.

donutjs-jam-28 J: Another thing is that web browsers should be predictable. If you call new Headers, you should get a new Headers no matter which browser you’re using, including Servo. It turns out there are standards that ensure consistency in the web world. So when we were implementing the Fetch API for Servo, we followed the Fetch standard defined by WHATWG, so that Servo’s Fetch will behave the same as other browsers’ Fetch. Before we never knew about the standards!

So it was interesting to learn about these organizations, people, and their effort in making sure that the web works consistently and predictably. They care so that developers don’t have to worry about weird behaviors such as you call new Headers, and you get a new Body. It’s almost as if they’re invisible, because their work happens behind the scene.

donutjs-jam-29 M: As our summer went on, we noticed that our mentor, jdm, kept using the phrase “Just Work” with capital letters. We learned that this phrase means that there are a lot of things that we take for granted and “Just Work”. But behind the scenes there’s actually been a lot of work done so that those things can “just work”.

J: For example, when you click a cat gif link, you expect it to Just Work and you can watch a gif of a cat eating a donut or whatever. It seems simple, but when you think about it, there were people writing the standards, and the discussion they had when deciding certain approaches. There were people who wrote the glue code so that the JS API can interact with lower level languages. There were people who implemented the details. And the layers just go on and on.

donutjs-jam-30 M: On that note, Fetch Works! After our summer, we were able to implement the bulk of the Fetch API. These are snippets from the weekly servo blog.

J: As you can see, Fetch Just Works. In order to implement the Fetch API, we had to implement and use other foundational APIs too.

donutjs-jam-31 M: We worked hard to get to this point, but we got a lot of help too.

donutjs-jam-32 J: And honestly, sometimes, it felt like we were jumping off a cliff. We didn’t know where we’re going or what we’re doing.

donutjs-jam-33 M: But we learned that whenever we admitted that we didn’t know something, people helped us out!

donutjs-jam-34 J: This is a cliché, but it’s so true. So we’re going to say it.

M: We learned that unknown does not have to be scary.

J: We’ve heard of this phrase many times, and it clicked with us when we tried something completely new to us. So maybe it won’t make sense to you until you try something out of your comfort zone.

donutjs-jam-35 M: So with that in mind, in the wise words of Shia LaBeouf: just do it!!

donutjs-jam-36 J: Because we just did it, we knew a little about python before the summer. And now…

donutjs-jam-37 M: We learned so much about what else is out there!!!!

donutjs-jam-38 J: Confucius once said that “I hear and I forget. I see and I remember. I do and I understand.” We think what he meant is that if you want to understand something, doing is the fastest way to get there.

donutjs-jam-39 M: By doing, we got to understand what was inside the black box called the web, and we also got to appreciate it more.

donutjs-jam-40 J: We got to appreciate the web once we understood the foundation a little more. We believe you are the people who are interested in the web, and make it fun and useful. So if you’re curious about the bottom layer of that donut tower, just dig in! See how the donuts are arranged! Just try it out! We think you’ll appreciate your work from a whole different perspective, and understand it better too. Because you know the bottom layer, you’ll know how to build more donuts on top of it better. Plus, it’s fun to learn new things!

donutjs-jam-41 JaM: So just do it!

donutjs-jam-42 J: To continue this trend, you can do it yourself. Luckily most web browser engines are open source, meaning you can read the raw code and contribute some lines too! One great thing about Servo is that because it’s so new, there are so many easy tasks waiting for new contributors. Even the standards are open source! So join the discussion and shape the future of the web.

M: Or you can help others try new things by becoming a mentor. Over the summer we had a mentor, two coaches, a supervisor, and the github and IRC communities. Without their help, we couldn’t have done this. We want to note that you don’t need to be an expert on the specific project you’re coaching for. For instance, our coach Stefan taught us a lot of general knowledge about git and how Fetch differs from XML Http Request.

donutjs-jam-43 J: Thank you again for coming! Follow our journey of learning on twitter.

M: We’d like to thank our Rails Girls Summer of Code crew, the Rust and Servo communities, and Donut.js for having us.