Home Java “I’m just a project enthusiast and Dart language user” – interview with Ari Lerner, author of the famous ng-book

“I’m just a project enthusiast and Dart language user” – interview with Ari Lerner, author of the famous ng-book

by admin

"I'm just a project enthusiast and Dart language user" - interview with Ari Lerner, author of the famous ng-book
How do you write nine books on completely different technologies, including Angular, Vue, React, React Native, and others? What’s the most important thing in training, what is hallway chat, and what do Dart and Flutter have to do with it anyway?
Today we have as our guest the author of numerous books and articles on programming, including ng-book Ari Lerner . What will be the next book, what does the author think about such a… controversial language as Dart, and why is it so important to communicate at conferences, ask the folks on the program committee of the HolyJS conference ( Dmitry DmitryMakhnev Makhnev and Eugene bunopus Cat ).
– Hello. There will be three sections in our interview, the first one we’ll talk about you, the second one about Flutter, and the third one will be the final one. Let’s start with you telling us a little bit about yourself, shall we?
– First, I’d like to thank you for the invitation – I’m very excited about the opportunity to speak at HolyJS. As for me, I live in Brooklyn, New York and have been programming for as long as I can remember – my first language was assembler in the early 1990s. At the moment I’m doing blockchain and deep learning, separately for now. For the most part, I work with clients, helping them get into ICOs (Initial Coin Offerings), helping them work with "token economics". I also have an adorable dog named Ginger, a cross between a Chihuahua and a corgi – I could talk about her endlessly.
– What does she look like? About the size of a chihuahua, but shaggy like a corgi?
– Yes, it’s a shrunken corgi with a chihuahua snout. Very cute.

Here is the much better version of #ginger from https://t.co/PKsDdJBnYE Jessie Novik’s art pic.twitter.com/oSmaJNBlRe

— Ari Lerner (@auser) November 8, 2018

– What do you do for a living now? Do you write books, or work for a company?
– Both. I’m writing a book, but it doesn’t take up all my time anymore. Until I decide what to do next, I work for myself.
– I understand you founded Fullstack.io 5 or 6 years ago?
– Yes, that was in 2012.
– Tell us about him.
– Fullstack has two parts, it’s a programming textbook publisher as well as an educational platform. In terms of textbook publishing, our main audience is professional developers, but we also provide textbooks to universities, schools, and continuing education programs. In addition, we do online and live training, usually as part of continuing education. We work with companies like General Electric, Walmart, the military, and so on.
– Great. Do you compete with O’Reilly, or do you have a completely different field?
– We do a lot of similar things to what O’Reilly does, but we don’t compete with them directly because we’re on a different scale-we’re not a threat to O’Reilly’s world domination of programming books. Also, we have a slightly different approach. Usually books are not updated after publication, so as soon as you read it, it’s already out of date. If you buy a book from us, however, we provide constant updates along with it.
– Do you publish paper books, or only e-books?
– Both. We sell paper books through Amazon, but they can’t be updated. E-books bought on Fullstack are automatically updated. You can’t update through Amazon – they have too strict controls.
– I understand you’ve co-authored many books on Fullstack.io – Fullstack React, Fullstack React Native, and of course the famous ng-book. To write a book, you have to be very familiar with the subject area you’re writing about – whether it’s Angular, React, Vue, or anything else. What does your preparation for writing a book look like?
– Good question. Let me first tell you how I started writing books in the first place, and why I enjoy it. And then let’s move on to how each individual book goes.
– Yes, of course.
– In 2012, I reached my ceiling at the company where I was working and decided it was time to leave. I created my own startup – believe it or not, it was a scheduling company. I wrote a very elegant backend for it in Erlang and Python, with a bit of Ruby I think. But I didn’t have a good frontend, so I started to explore different frameworks and came across Angular. This was a long time ago, before version 1.0. I started writing a frontend for my startup, and I liked Angular a lot, but the documentation was terrible. To figure out how it worked, I started reading the source code and understanding how it worked – that was how I came to know Angular intimately.
Around the same time I was asked to give a talk on JavaScript at a developer boot camp in San Francisco, and that’s when I realized I really enjoyed teaching. So I decided to combine the two interests and started writing a mini tutorial on Angular for beginners. At first I thought it would be two or three pages of text, but it ended up being 650 pages, which I kept updating over the years. Eventually I authored or co-authored nine books. I’ve taught as a volunteer at every major developer boot camp in San Francisco. I also volunteer with organizations like Women Who Code and Bridge Foundry projects, and teach ElixirBridge. I’ve even given classes at a general population prison in the San Francisco Bay Area, and I still teach here in New York City.
Teaching is very important to me, it motivates me to learn more myself. By teaching, I not only help others, I force myself to rise to the next level to be able to explain how this or that technology works. I usually prepare myself by reading the source code, especially JavaScript. A year or a year and a half ago we were introduced to Vue, and just starting to learn the source code, our work with Vue has been a lot of fun. As we work, I write down all the problems I encounter, all the Google searches, all the documentation questions. As a result, we compile a huge and very detailed table of contents, which we then update along with the entire book whenever we make any changes.
– Does this happen automatically, with handlers that keep track of all this information in the documentation?
– We have handlers that track release cycles, but unfortunately, almost everything else – editing content and images – is done manually. We have hooks on React, and we have automatic code updates performed, but the content has to be updated manually.
– I see. As far as I know, you’ve co-authored a lot of books. Is it harder to write a book alone or with someone else? How do you organize your work, how do you synchronize chapters?
– Just like with collaborative application development, we use Git to unify content, so we have versions and branches. Writing a co-authored book can be hard, although I think it’s somewhat easier in the case of technical books than non-technical books. I think the hardest part is ensuring a uniform tone for all sections, and determining which demos to use. But, overall, it’s not too difficult a task. All the attention is absorbed in the writing and editing, and we’re constantly in touch with each other, which makes the process much easier. Over the years, we’ve developed writing patterns that provide a unified style to all of our many writers. And we make every effort to have our contributors write with us, not for us. We position ourselves as a team in which everyone works with each other, not as a publishing company for which authors work. In addition, we are all co-editors for the books we write. Having an editor or editors helps ensure a uniform style throughout the book. Each author edits a section written by another author.
In terms of tools, we use Git and also simple text editors and Markdown. I usually work in Visual Studio Code or Spacemacs – a combination of Emacs and Vim, I highly recommend it if you haven’t tried it yet. We also have a lot of our own software that we’ve written for compiling, styling, and previewing books in real time. We use it before we publish a new release or book update. Most of our tools are written in JavaScript, TypeScript, or Python.
– Do you use agile methodologies like Scrum when writing books?
– Yes, but not too actively. We have sort of modified stand-up meetings, but not every day, but every week, or every other week, depending on the pace of the book. If I’m working alone, my whole stand-up consists of opening my word processor, but if I’m working with someone, we’re constantly in touch with each other via Slack and Google Hangouts.
– How long does it take you to write a book?
– Depends on what kind of book it is, whether I’m working with co-authors, the speed of the framework. Let’s say I wrote ng-book in four months, working nights and weekends. But for me that is absolutely unimaginable speed, I still don’t understand how I managed to do so much. It usually takes me six to twelve months to finish one book.
– Interesting. You spend a lot of time working with interesting tools and processes, perhaps co-authored with someone else, then give the book to a publisher. When a publisher tries to translate the fruit of your labors into another language, how do you check the quality of the translation? I ask because when I started programming, I could not read technical documentation in English, so I read many books in Russian, such as the translations of Good Parts of JavaScript and O’Reilly’s most famous books. As far as I know, those translations were terrible. I’m thinking about how the authors of the books should have felt about this, and what they might have had a way to check the translations. What is your overall opinion of the translations?
– I can only talk about my personal experience here and how Fullstack works. We have a lot of situations where we don’t know the language the book is translated into – for example, most of our books are translated into Chinese, and I don’t speak Chinese. It’s true that over time I’ve learned a few words, I have a special app for that, Babbel, with which I learn foreign languages. But in the case of Chinese, the best translations we did were when our translator was also a programmer. This made it easier for the translator to ask us questions in English and then translate the answer correctly into Chinese. Unfortunately, I do not speak Russian either. I can say "bicycle" – but no, as you can hear, I can’t even say that. Of course, it’s hard not to know the language in which the software is written. I understand this particularly well when I look at the documentation of Chinese open-source projects – I have to dig through the source code to understand anything at all.
– It was a similar situation with Vue. As far as I know, its first releases had pretty poor documentation, and many issues were described in Chinese. As far as I know, English is now a requirement.
– Yes, it is. I’m lucky that English is my native language. Even though I don’t speak it flawlessly, I have no problem with documentation. I think that translations are very important. Also, we live in a time where machine translation is becoming better and better, especially with deep learning, which is one of the reasons why I got interested in deep learning. However, I don’t think there is one panacea for all these problems.
– Recently I came across a heated discussion in the Russian-speaking part of Twitter. One side of the argument argued that translations are, by definition, evil because programmers must know English, it’s the international language for everyone. Others have said that for juniors and those who don’t speak English very well, the documentation should be translated. Do you have an opinion on this controversial issue?
– I am close to the arguments on both sides. What I am about to say is just my initial reaction, I have not thought about this problem long. Perhaps when we meet in person we can discuss the subject in more depth. It seems to me that there is so much code written in English nowadays that it would be extremely difficult to get rid of English. There are international languages – for example, JavaScript is an international language, if you speak it, you can communicate with anybody anywhere in the world. Having an international language – English – makes it easier for us to communicate and collaborate with developers all over the world; for example, I’ve talked to developers in India, France, England, China, and Australia. Of course, this doesn’t really do justice to people who don’t speak English – I’m sure if I didn’t speak English, I’d have a different opinion on the matter. Besides, like I said – these are just my initial thoughts, I haven’t thought about this issue long enough, and perhaps my opinion will change tomorrow.
– Yes, we can discuss this in person. Now let’s talk about books-they’re becoming less popular than they used to be because of the emergence of platforms like Media, Twitter, and so on. Do you think books are disappearing?
– I am not convinced that books are becoming less popular. I believe that everyone works and learns differently. Online services are similar in function to classroom instruction. And I think online learning is appropriate for developers who want to learn different languages and frameworks in a different way. Some find it easier to work with documentation, others with source code, some work better in groups, others work better alone by trial and error, or by reading books on trains and planes and then putting what they read into practice. On the other hand, I have taught in classrooms where it was exactly the opposite and where students simply could not sit down to a book, it did nothing for them. It’s not that they couldn’t read at all, they just got less out of reading than they got out of working with other people. I think one of the very important achievements of the Internet for the programming community is that it has made learning more accessible and success more attainable. Websites and services like Medium or Coursera help spread knowledge and make a variety of ways to learn possible. I’m proud to be a part of this evolution of education. Perhaps in the future our books will become interactive and we can combine them with online courses.
– I remember books used to be sold with a CD or DVD with examples. Now that format has gone out of fashion.
– Yes, these days they prefer to send everything in zip archives – for example, we combine all our demos into one zip archive. One of the most useful tools we’ve developed allows us to record all the source code used in the book in one place, and then we have tools that automatically update it from the original sources. Suppose we need to highlight a line, class, object, or function that we discuss in the book. We have tools that make it possible to make direct references to the source code. This is useful, in part, because every time you download the book, the source code is updated. So we don’t write the source code directly into the text, but into a separate file.
– My next question will be related to the previous one. You said that everyone learns differently and I, as a developer, can read books, watch videos on YouTube, read articles on some platform to learn. But why would I want to attend conferences?
– This is a good question. At a glance, I can think of two reasons why it’s worth doing. The first is the most obvious: Presentations and papers at conferences are usually well-designed and specifically designed for viewing. As a rule, such a report is devoted to a clearly defined problem, such as refactoring. When you sit in the audience listening to a good report on refactoring, it is as if you are refactoring yourself, you are involved in the presentation, in the process. And for me, the personality of the speaker, his emotions are always interesting.
The second reason is less obvious. I call it "hallway chat" – in addition to the actual reports, you meet and chat with people who are doing the same thing as you. Our activities as developers are by definition individual – but when you start chatting with lots of other people who are in the same space as you and doing the same things as you, those activities automatically become social. Another benefit of "communicating in the hall" is that you meet people who need your services, your technical expertise, or your teaching experience. In my experience, we find more clients than anywhere else–and that goes for even our books and our videos.
– You’ve already written a lot of books – tell me what you’re working on now? Maybe some spoilers?
– Right now, I’m mostly working on blockchains. If we talk about blockchains, augmented reality, deep learning, the great thing about these areas is that they are very popular right now, so at almost every conference I have attended in the last few years, I have had very lively discussions with people interested in these subjects. Often it could be a frontend developer at Google, who in his spare time is working on other topics.
As for me personally, the projects I do are mostly economics-related – and the amazing thing is that it’s a very entertaining subject. Also, I’m currently working on a book called "C++ for JavaScript developers, " which is still in the early stages of being written. I’d be very happy to discuss this topic if I meet anyone at a JavaScript conference who has worked with C++.
– Will this book have anything to do with WebAssembly? You name it, C++ and JavaScript…
– The book is mostly about EOS, which is a fairly new blockchain. It is similar to Etherium, but created with LLVM, and this allows you to write a contract in anything that compiles in LLVM, including C++.
– Great. Let’s move on to the next section, which will be more closely related to your talk on HolyJS. You’ve worked with Angular, Vue, React, JavaScript before – and now you’re doing a talk on Flutter, a mobile platform from Google written in Dart. What drove you to do this?
– It does sound funny in this formulation. Here is a similar story to how I came to Angular, as I mentioned above. I wanted to write some apps for myself and my friends who use who’s Android, who’s iPhone. We already published a book about ReactNative, and I had experience with this platform, but I wanted to try something else. I can write in Java, Kotlin, and Swift, so I started writing an app in Swift. As far as I know, there are currently attempts to adapt Swift for Android, but the ones I’m familiar with are still in very early stages, you can’t count on them. Besides, it seems to me that many of them are hacks. That is, the developer is used to iOS and is just trying to transfer his experience to Java, or, conversely, is very familiar with Java and gets into iOS with it. In addition, I did not want to part with the JavaScript community – I had a very close relationship with it, I could use great tools like Redux, there were many libraries, in the absence of which I would have to reinvent the wheel. As a result, I decided to look for another cross-compilable framework and found Flutter.
Flutter is written in Dart, which is a compiled language much like TypeScript. It provides easy integration with JavaScript libraries, so I could build on my experience with, say, Redux. Another advantage of Flutter is that everything in it is a widget, which makes the process of writing applications faster and clearer. And the immutability of the data makes applications more secure; bugs are detected very quickly. In addition, Flutter has AOT compilation and JIT compilation, and the many built-in widgets make it very easy to create an app using a familiar UI. By seeing how the widgets in Flutter work, you begin to have a better understanding of how Flutter works.
Flutter has many other strengths – testing, package management, distribution, compilation. One of the coolest features of Flutter is hot reloading, which we are so used to in the web. For example, when you build an application in Swift, you compile, then run the application, then you might need to press a few keys to go back to the screen you were working on, solve problems, then the whole cycle repeats. Further, with Flutter, your UI will always be localized in the same language your business logic is written in. As for my experience with Flutter, I’ve written several applications on it, and I just love the process. I should also say that Dart is quite similar to TypeScript, which in turn is similar to JavaScript, so all my experience with JavaScript has directly benefited me with Dart.
– But Dart is a strongly typified language, so you can’t write programs in it the way you write in JavaScript. What do you think about Dart in general, as a language? What are its advantages?
– To be perfectly honest, I think Dart is great. I like languages with static typing – although I have nothing against dynamic languages, I like Clojure best of all. But static typing has a lot of advantages, and I think that’s why a lot of developers switched from JavaScript to TypeScript – although the latter has an option to remove typing and let the compiler define the types itself. Dart also has something similar; it does type inference, so it’s not strictly typed. However the advantage of languages with static typing, even with type inference, is that you can translate them very quickly and errors can be detected before the application runs. As I said before, TypeScript and Flow have all this. Compiling provides predictability and speed, in Flutter it’s in native code. Also, like I said, Flutter has JIT compilation, which makes the development cycle much faster and easier, and because of that you have a very quick restart when developing an application in Flutter.
There are many other attractive things in Dart – for example, the scope works much easier than in JavaScript, you don’t need to "bind" functions. Classes are first-order objects, they have explicit interfaces, constructors are named – if you’ve worked in Java, you probably like them. I think that’s super cool, it makes it easier for us to write in Dart and then compile it into JavaScript and then use that JavaScript. By the way, I don’t think I mentioned, yes, Dart compiles to JS. Isolates within Dart allow you to use Web workers along with Dart. In my opinion, Dart makes the hardest aspects of development much easier. On top of that Dart has a lot of great tools, great libraries for Flutter, and very short startup time because the code in Dart compiles directly to native code, not like React Native, which creates an extra layer of JavaScript.
– Deserialization and the like.
– Yes. In my opinion, the React Native community has created a lot of good libraries, but there are still a lot of difficulties – for example, you can’t pass JavaString objects, they have to be serialized into string objects. With Flutter, you don’t have to do any of that, because it compiles directly into native code. Finally, because Dart is similar to Java, C#, ActionScript, and JavaScript, the environment in which you write is generally familiar, and you can draw on all your experience with these languages.
– Whereas Clojure, for example, is something completely different. And with Dart, it’s as cozy as under a blanket.
– Yes, I wrote in Clojure – everything is upside down there.
– What applications do you think can – or should – be written in Flutter? Can you write a banking client, a financial application, or an application that requires many screens? Or is it only good for writing "Hello World" on it?
– So far, I’m pretty impressed with both the speed of development and the speed of the interfaces I’ve created with Flutter. If you’re choosing between native development or a cross-compilable framework like Flutter or React Native, a lot depends on your team. In a properly designed application, I don’t think there’s a limit to the number of screens you can write – here Flutter is just as good as the other options. If you have a small team and need to get your app to as many users as possible, regardless of platform, without sacrificing the performance of your app in early time – definitely use Flutter. If you have a lot of employees and a lot of developers with a lot of experience writing native code, it’s more of a question of how you’ll recruit your team – will you recruit people who write Java or Swift perfectly, or people who can write code for your web application frontend, server backend, and mobile application as well. And here again, the advantage of Flutter for me is that it allows me to write in a language with which I am very familiar.
To answer your question more directly, Flutter is great for apps that display some content – for example, it would work for Twitter. That’s not the case when you need performance that only a native app can give, such as in the case of AR and VR apps. My only AR app is written in Swift, and I haven’t translated it into Flutter yet. This is partly because both iOS and Android have very handy frameworks for virtual reality and augmented reality.
– You mentioned that Flutter would be suitable for writing Twitter – but Twitter is now written in PWA. Can Flutter be compared to PWA apps? They’re cross-platform, too, and they have a lot of other similarities.
– As far as I know, in the future it will be possible to compile Flutter apps into web apps, for now you can’t do that. But if you’ve written the business logic of your web app in Dart, you can quite well use it in a mobile app. And Dart is very fast. Often Dart compiled JavaScript code will be faster than code written directly in JavaScript.
– I think this is a somewhat controversial statement.
– Okay, let me put it another way. Quite often, compiling code in Flutter is faster than code you would write directly in JavaScript.
– I see. If we’re talking about languages in general, there are many that can be compiled into languages on other platforms. One of them, of course, is JavaScript – nowadays you can write anything for any platform in JavaScript. There are frameworks of this kind – for Angular it’s Ionic, for cross-platform mobile development it’s Cordova PhoneGap. Is there one language that can meet all needs? Perhaps it’s JavaScript?
– Interesting question. I think the point is that JavaScript is easy to learn, so its community grows quickly, which allows you to generate a lot of ideas-it’s what gave rise to React Native, Node.js, and, in part, Dart. Of all the languages out there, I think JavaScript is the closest to the universal language model for all platforms. But personally, I’m drawn to languages based on a certain idea – for example, I really like functional languages. I don’t think they will ever go out of use. Nevertheless, if you’ve decided in 2018 to learn to write in a language, and you don’t know what you’ll be doing yet – web, mobile apps, backend – you won’t regret it by choosing JavaScript.
– But if JavaScript is so great, why are there new languages like Go, ClojureScript, Dart? Why do we need other languages when we have JavaScript?
– And if I like apples, why eat other fruits? I’m going to say a phrase that is very often repeated in training camps, and not only there – it is very important that the tool is appropriate for the work being done. I write a lot of code in Go because I do everything related to blockchains in Go or C++ – speed is very important there. And I write all the interfaces in JavaScript or Dart, and sometimes I use ClojureScript. The point is, C is not going anywhere in the near future, even though it’s pretty old. It’s geared for applications that especially need speed and good memory management. Anyway, you have to put up with the peculiarities of the language you work with. For example, garbage collection will always be an issue for JavaScript, and you will always have to deal with it when writing large applications. Inevitably, you have to sacrifice performance in the runtime for simplicity in the development cycle. My talk is by no means against Swift or Java – as I said before, my AR application is written in Swift because, on the one hand, I haven’t yet ported it to Flutter, but, on the other hand, Swift is perfectly suited to the task.
– There seemed to be a lot of excitement around Dart when it was announced in 2013, but then many people forgot about it, and now you can hear in many communities that Dart is dead and there’s nothing more to come from it. What do you think about the future of Dart and Flutter, and the future of Dart separate from Flutter? After all, there is both AngularDart and Dart for the backend.
– That’s a good question. If I knew the answer to it, I’d be sitting on a warm beach somewhere, or on my own yacht with a helipad. If I were to make any assumptions, the first thing to say is that I’m not part of the Flutter team – I’m just a project enthusiast and Dart language user. I think the Cupertino library, the Flutter interface for iOS, will grow. And I think the Flutter team wants to add the ability to write native desktop apps in Flutter – but I’m not sure exactly.
As for the creation of Dart, I think it was announced too early, and that led to over-excitement and premature hopes. It was the year of EcmaScript in 2013 and I think it was clearly overkill on Google’s part to try to influence the ECMAScript team. And by the same token, Flow and TypeScript, in terms of typing in the language, have become more popular. I wish Dart and Flutter all the best, especially with the upcoming release of version 1.0 in Flutter.
There’s a project that works the same way as Flutter, called Fuse, but it’s based on C#. I really have my doubts about its future. In the meantime, the JavaScript community is growing very fast, and since Dart is close to JavaScript, this will encourage developers to be interested in Dart and Flutter.
– That’s great, thank you. I’d like to talk more about conferences. What’s the most important thing about them for you?
– As I mentioned before, for me the most valuable thing in conferences is the "hallway chat". And here a lot depends on the conference participants themselves. Interesting content, memorable speakers, and conference-related activities help create and strengthen a community of like-minded people. Anything that helps that community thrive is important. And, as I said, I like going to conferences because they make my work social rather than individual.
– As far as I know, this will be your first trip to Russia?
– Yes.
– What are your expectations of Russia, of Moscow, and of HolyJS?
– Since I won’t see anything in Russia other than Moscow, the first two parts of the question would essentially be the same thing. As mentioned, I’ve never been to Russia – I’ve mostly traveled to China and countries in that region, i.e. Taiwan, South Korea. As I understand from what I’ve read about Russia, you have a different culture, you do things a bit differently than we do, and I’d be very interested to see what that looks like in practice. That’s one of the reasons I like to travel – I’m always curious about how other people live, what their priorities are. New York has its own culture, and all my exposure to Russian culture comes down to getting a visa and visiting a local restaurant. So I have a new and fascinating experience ahead of me, but I can’t predict what it will be.
As for HolyJS, as far as I know, developers in Russia are very dedicated, smart and precise. I don’t want to offend anyone in France or England, but there rigor is more to be found in communication, so I look forward to serious technical conversations with serious technicians. The developers in Russia are, in my opinion, very cool, and I’d really like to talk to you personally and your community as well.
Well, and of course, I’m expecting cold weather in Moscow.
– Come on, what cold, -10 or -15 Celsius, it’s nothing.
"That’s all?" Then I’ll be wearing shorts.
– And sunglasses. In all seriousness, we have the cool Dart and Flutter communities – although, of course, they’re a far cry from the JavaScript community. And both have notable events coming up : HolyJS will be held Nov. 24-25, and on Dec. 1 there will be a conference on Dart and Flutter.
– Great. Flutter will be out of beta by this time.

Although in the case of Flutter the code is written in Dart, report Ari at HolyJS will be aimed at people with JavaScript experience: no prior familiarity with Dart will be required. Also the discussion zones at the conference means that after the talk there will be a possibility to discuss everything you’re interested in: even ask a question about Angular, or give him a ng-book to sign. All in all, I’ll see you there. November 24-25 on Holi. !

You may also like