“I have only one teaching method: just work” - interview with Ryan Dahl (Node.js, Deno)
May 25, two days before the round date, Ryan will speak in St. Petersburg at our HolyJS conference. In the meantime, HolyJS program committee members Eugene bunopus Kot and Dmitry dmitrymakhnev Makhnev asked him in detail about all of the above. On Medium, we published an English versioninterview, and for Habr made a Russian-language option.
Eugene : Many readers already know you thanks to Node.js, but could you tell us a little about yourself?
Ryan : I come from San Diego, California. I studied mathematics at the university, and my specialty in graduate school at the University of Rochester was algebraic topology. But after three years, I thought: “What am I wasting my life on? These are too strange and abstract things. ”
Therefore, I left graduate school, went to travel, and after some time I was involved in programming. I think many have done a similar path. In the mid-2000s, I became involved in web development. At first, I liked Ruby on Rails and Ruby in general. As for Node, it’s lucky to be in the right place at the right time. Coincidentally, I was thinking about the corresponding issues just when Node became possible.
Eugene : So it was luck? Or did you have a certain vision of this project, and from the very beginning you assumed that it would be super successful?
Eugene : Now you are doing Deno . Can you talk about current work and future plans?
Ryan : My long-time comrade Bert Belder and Itrying to create a startup. Over the past year and a half, we have worked with him on several projects, one of them is Deno. Bert played a big role in the development of Node, he did most of the work of porting Node to Windows. In addition, he is one of the authors of Libuv .
Eugene : Do you think Deno expects major success in the near future? Will you continue to work on it, say, in five years?
Ryan : I have no idea if Deno will exist in five years - most likely not, because most projects end in nothing. But for now, Deno captures me and gives me job satisfaction.
I think at the moment I am not satisfied with the state in which the dynamic languages are. I miss a quick, convenient and fairly versatile tool. Both Node and Python are good, but I find them unreasonably complex or poorly designed in some ways. So in the end, I'm trying to make a tool for my own workflow.
Eugene : While we were preparing questions, we read an interview on the Mapping the Journey website. There you said you were working with machine learning. And soon after that, they took and presented Deno at JSConf EU . So your interests have shifted?
I especially want to connect Deno to WebGL. As you probably know, Deno runs on V8, which in turn is part of the vast world of the Chrome software infrastructure. Chrome has an Angle library that implements WebGL. Connecting to this would allow Deno to program the GPU. And GPUs are necessary for training models of many modern neural networks. I would really like Deno to provide me with the desired process of working with mathematical programming. I believe that a significant part of the tasks in statistics and mathematics as a whole come down to a kind of data games, and this is very convenient to do with dynamic languages.
Dmitry : Is Deno ready for use in production now? Do you know of interesting cases of real use of Deno?
Ryan: It seems to me that different people have different pain thresholds. If you are ready to live with bugs, lack of documentation and changing APIs, then for some tasks Deno can be used even today. But in general, he is not yet ready for production. It is now in version 0.3, and I will designate as 1.0 the version that I consider suitable for use by other people. This is a fairly large-scale project, we are creating a new platform. To do this, a lot of work needs to be done, and we are trying to do it properly. However, if you are a hacker, do not be afraid to get your hands dirty and leave issue or pull request in the event of a problem - then this can be used.
Eugene : What needs to be added to Deno for companies to start using it in production?
Ryan: In the case of Deno, we focus on different situations than with Node.js. We are trying to provide a lower level access to the computer. In particular, we want Deno to be able to be imported as Rust crate and that it can be embedded in other systems.
Eugene : Do you know Dart? Have you ever used it? What do you think of him?
True, Flutter has gained some popularity now, so maybe I lagged behind life here. One way or another, TypeScript managed to achieve the same goal without creating a new language.
When a new language appears, it is easy for him to arouse curiosity, but to get people to use it is much more difficult. The benefits must be very significant. For example, I was very skeptical about Rust. It seemed to me that everything that he can do is already in C ++, which I actively use. Only recently I got to know Rust more closely, and it became clear that for me it can easily replace C ++. In general, for a new language to be successful, it needs to be an order of magnitude better than the old.
Eugene : With languages - like with cars, anyway you will sometimes ride a bus.
Ryan : Exactly.
Ryan : I think that was what caused the popularity of Wasm. On it, you can compile, say, Rust into code that can be executed in a browser.
It sounds awesome, but I wonder how well it works for languages with garbage collection or other runtime tools. Although it may be technically possible to use Python through Wasm to build a site, I suspect the result will be cumbersome and slow. I think only experience will show here.
Dmitry : Since we are talking about different languages, what old or new language do you find interesting for studying in 2019?
Ryan : I really like Rust. It has many interesting finds, for example, the idea of a single mutable object. It has a great compiler that provides extremely optimized code. But understanding Rust is not easy. It took me several months to understand what was going on there. In general, Rust is a very interesting language, but by no means universal.
Rust is a new word in writing low-level code; it has significant advantages over Go. Go has a garbage collector, so it is great for high-performance servers, it is concise, and writing on it is very simple. However, there are times when having a garbage collector can be a minus, not a plus. Deno, for example, has such a case. We wrap a V8 that already has a garbage collector. Two collectors in one process would turn out, and their interaction can appear catastrophic. The V8 is already monstrously complex in itself. In general, Rust is perfect for our purposes. It will be interesting to see what new applications there are for Rust when it can be compiled in Wasm.
Dmitriy: And what do you think of the growing popularity of functional languages? For example, Elm for the frontend, or Idris.
Ryan : I haven’t tried either one, so I can’t say anything about them.
Eugene : What about functional languages in general?
Evgeny: And in what style is Deno written? In object oriented or functional?
Ryan : Used both. It all depends on the specific goal that we are trying to achieve.
Eugene : We have already discussed which languages you prefer, but what about the tools? What is your favorite IDE? Do you write on MacOS or Linux?
Ryan : I write in vim, use iTerm2, and my computer is a small MacBook. I travel a lot and because of this I often work on a laptop. At a certain point, I noticed that after working behind a large monitor, it is very painful for me to switch to a laptop. Therefore, I taught myself to work on a laptop all the time.
At my place is a Linux-based system unit, I am connecting to it via SSH. I'm pretty old-fashioned in choosing tools, mostly these are UNIX-like things. I am using LLDB for debugging.
I worked in Visual Studio Code, but now we are writing our own platform, so there are not many integrations that you get used to expect from the IDE. Usually such things have nothing to do with what I'm working on, and in the end, all this distracts me. I'm used to working with bare code, this is especially convenient when developing low-level software. I think if I wrote a website or application for a popular platform, I would use Visual Studio Code.
Eugene : In general, you are an old-school programmer.
Ryan : Probably yes.
Evgeny: Then the next question will be about school. Apparently, basic programming skills in the near future will be studied at school along with mathematics, English and other subjects. What do you think of it? Perhaps in a somewhat more distant future, machine learning will also enter the school curriculum?
Ryan: I have been programming for the past 15 years, and during this time our community has grown very much. In 2005, it seemed to me that I missed all the most important, although by today's standards we were still few. Now, programmers are everywhere. Obviously, programming has grown to a large audience. It has become an important skill for a large number of people. And with that in mind, yes, programming should be taught in high school. But about machine learning, I think that more fundamental things are more useful for high school students.
It seems to me that in mathematics lessons it is worth more actively studying statistics. In the USA, in high school, students go through algebra, quadratic equations, the beginning of matanalysis, derivatives, and the like. Algebra and matan occupy the bulk of the program, and then a very small part of people regularly use them. But many professionals are required to be able to process statistical data.
As for machine learning, it is still at an experimental stage. It is unlikely that in ten years everything will look the same as it is now - this area is changing too quickly.
Evgeny: Since we were talking about the younger generation, we had an excursion from school in our office about a week ago. I spoke with guys who are 15 years old, and it turned out that one of them tried Python and Rust. You were afraid you were late in 2005, but, in my opinion, the new generation is learning faster than us. My friends have a three-year-old child who already knows how to search for videos on YouTube and play games. I think I'm getting old.
Ryan : Me too.
Eugene : Do not you think that we are already too old and stupid for the new generation?
Ryan: Most likely, each generation at a certain moment thought so. Our parents thought the same way about us when we were children. But YouTube has really changed a lot. If I was suddenly interested in physics, I can see the best lectures on this subject there. The possibilities for self-education are simply endless. When I was little, we had a set of encyclopedias at home, and when I wanted to find out something, I looked for the answer in them. And if there was no answer in the encyclopedia, there was nowhere else to ask. Not so now.
Dmitry : In our industry, it is important to study all the time, read articles, books and so on. How do you deal with this? Can you advise us old people something?
Ryan: It seems to me that you need to constantly study in all the technical sectors that are developing rapidly. I can’t advise anything concrete, just practice constantly. I always say that you can’t get acquainted with the subject abstractly; you need to write a project. If I just tell someone about Rust, this does not mean that they can now write in Rust. I have only one method, and in fact it is not even a method: just work on your projects.
Dmitry : Suppose I have a project that I write in my free time - how do I evaluate my work? I can do something in Rust, but of my colleagues no one else writes on it. What would you recommend?
Ryan : I don’t even know. Meet someone on the net?
Evgeny: This is an option. But suppose I started a project in a completely unfamiliar language, my code will definitely be creepy. How to make it better? Do pull requests and things like that? How to learn to work with technology that you do not know?
Ryan : I can't advise anything here. I myself am not too strong in these things.
Eugene : We are really lucky in the sense that we have so many different ways to learn. We have already discussed YouTube, but there are many other media besides it. Do you use any of them? What do you think of conferences?
Ryan: Conferences are an extremely useful thing. As for YouTube, I don’t watch programming videos there. I read Hacker News and posts on Reddit, but the main source of information for me is still my projects. True, I am sure that because of this, many interesting technologies pass me by. But YouTube programming videos are more likely for beginners. When I need something, I open the documentation. But on topics in which I am not an expert (for example, in physics), I readily watch videos from YouTube.
Eugene : And what do you think is the main thing in conferences?
Dmitry : The first time was in 2016 , that is, three years.
Eugene : In another interviewYou said you wrote NodeJS for four years. This is a very long period of time. How did you manage to combine the project with work? Was that your hobby? Do you have such a hobby now?
Ryan : At first it really was a hobby, but then I was invited to Joyent. By and large, they allowed me to do what I already did, they just started paying money for it. Now I am interested in a lot of things that are not related to programming, but the code I write is only for Deno, this is a very large project. True, I have some kind of subprojects inside Deno.
Eugene : And if it's not a secret, what kind of things outside of programming are you interested in?
Ryan: I’m thinking about getting to know physics better, there are a lot of interesting things there. But in this, of course, I am an amateur, especially I did not study it. I also like to read and watch a video about mechanical engineering, metalworking. Again, I myself have never done this, but it amazes me what powerful machines people manage to create. I think my interest in this is due to the similarities with programming. Of course, everything happens there in the physical world, but engineers have to solve problems in the same way, design, create tools for creating tools, make accurate measurements and so on. We can say that mechanical engineering is the physical embodiment of software ...
Eugene : It seems to put a V8 engine in a Volkswagen Beetle?
Ryan : Exactly!
Evgeny: So we are back to V8 again.
Ryan : In all these things, I'm an amateur, I don’t know anything about them, I just like to read about them. By and large, in the world of machine learning, I am also an amateur. I studied this topic a little, but not as deeply as those who defended their thesis.
Eugene : Let's talk about open source. Does it make sense for a developer to write open source software? More often than not, we write it simply because it is interesting. And yet you always want your project to be successful. Does it make sense for you to do this?
Ryan: Of course have. I have been engaged in open source projects all my career, and I really like this world. In it you can meet and make friends with great people from around the world. This aspect is now often overlooked because our industry has grown exponentially and giants like Facebook and Google have appeared in it, which cause a lot of negative things in people. But I still believe in the ideal of open source, in the ideas in the spirit of Richard Stallman - that we are building a more perfect world. This is free software that anyone can take and use as he wants. This makes complex and interesting technologies available to people, and you do not need to pay huge amounts of money for them. For me, this is still what I want to strive for.
Evgeny: Ten years ago, IT employed significantly fewer people, it was a kind of “closed club” for those who were interested in technology. Now it has turned into an industry, and there are many new people in it. Do you have the feeling that IT has become a regular job from a private club, with marketing and other things?
Ryan : I don’t think it was a “closed club” - it was completely open, everyone was welcome. Now with some projects, I really get the feeling that I'm just working. I am sure you know what I'm talking about. But I just try to avoid such projects, I stop working on them. Therefore, I do interesting things all the time.
Evgeny: Your approach motivates. I agree that programming is an open club, and conferences are the best way to get into it. Even if a person does not program himself, you can always come and listen to the report. What is most important for you at conferences?
Ryan : The technical content of the speeches. I like to go into the details of how new technologies work. And personal conversations after the reports really help.
Eugene : Last question. As I understand it, this will be your first trip to Russia?
Ryan : That's right. I look forward to it.
Eugene : What are your expectations from the country, from the city, from the conference?
Ryan: I have a stereotype that Russian programmers are very hardcore. Perhaps this is due to the fact that one of my friends is a hardcore programmer from Russia. In general, it will be interesting for me to visit you and look at your city - they say it is very beautiful.
Eugene : And we will be glad to listen to your report at the HolyJS 2019 conference in St. Petersburg. Thank you very much for your time!
Ryan : Thank you, that was great.
Due to high demand, we closed ticket sales for personal visits, but Online tickets remain available (they give access to the online broadcast of all reports during the conference and to their videos after it). So, even if you fail to be in St. Petersburg on May 24-25, you can still watch the performances of Ryan and others.