An interview with Andriy Burkov
00:00
00:00
  • April 3rd, 2019

Andriy Burkov, Author of The Hundred-Page Machine Learning Book

00:00
00:00
1 H 43 MIN
In this Episode

Andriy Burkov is the author of the Leanpub book The Hundred-Page Machine Learning Book: Everything you really need to know in Machine Learning in a hundred pages. In this interview, Leanpub co-founder Len Epp talks with Andriy about his background, what it was like studying computer science in a city with no electricity for three years, a little bit about the recent history and politics of Crimea, what it's like moving from a post-Soviet republic to a country to a country like Canada, game theory, machine learning, AI, his book, and at the end, they talk a little bit about his experience as a self-published author.

This interview was recorded on February 27, 2019.

The full audio for the interview is here. You can subscribe to the Frontmatter podcast in iTunes or add the podcast URL directly.

This interview has been edited for conciseness and clarity.

Transcript

The Hundred-Page Machine Learning Book: Everything you really need to know in Machine Learning in a hundred pages by Andriy Burkov

Len: Hi, I'm Len Epp from Leanpub. And in this Frontmatter Podcast, I'll be interviewing Andriy Burkov.

Based in Quebec City, Andriy is an expert in artificial intelligence and a senior data scientist leading a machine learning team at the global research and advisory firm, Gartner. You can follow him on Twitter at @Burkov, and read his articles by finding his profile on LinkedIn.

Andriy is the author of the bestselling book The Hundred-Page Machine Learning Book: Everything you really need to know in Machine Learning in a hundred pages

Whether you're new to the topic or you’re an expert in the field, the book provides a concise way to learn, and to communicate, and to think about some of the most important aspects of machine learning.

If you're a business executive, or you're working on the management side of things, it gives you the information you need to start asking the right questions, if you're approaching a problem that you think might be machine learnable.

In this interview, we're going to talk about Andriy's background and career, professional interests, machine learning and artificial intelligence generally, and at the end, we'll talk a little bit about his experience as a successful self-published author.

So, thank you for being on the Leanpub Frontmatter Podcast.

Andriy: Thank you Len for inviting me. I was hesitant, as you know at first, but after a couple of podcasts I actually realized that it's quite a pleasant experience. So thanks for inviting me once again.

Len: I always like to start these interviews by asking people for their origin story. Your story has quite a few chapters in it, I think it's fair to say. I was wondering if you could talk a little bit about where you grew up, and how you first became interested in computers and technology generally?

Andriy: Well, I was born in the Soviet Union in 1980, and my first 11 years I spent as a normal Soviet schoolboy. And then, after the collapse of the Soviet Union, my family and I, we became part of Ukraine. Because my parents met in Sevastopol, when they both were students in Sevastopol State University, which is in Crimea, they managed to stay in Crimea.

At the time of the Soviet Union, young engineers could not really decide where they would spend the beginning of their career. Normally, they were sent somewhere to the north, or some small city, small town where there is some kind of factory and they need engineers. But luckily, my mother's father was a member of the Communist Party, a high profile member - so he managed to let my parents stay in Crimea.

So I was lucky to be born there. Because it's like - it's sunny, not so cold, there is a sea, the swimming season is quite long. So I got quite a nice childhood.

But after the collapse of the Soviet Union, of course, it has become near to disaster. Like, nobody got any jobs. My parents tried to make ends meet, and work at everywhere possible - and sometimes the salary was paid in food. So we spent, like three years of my Bachelor's in university, without any electricity in the city - for three years.

I remember doing my homework under candlelight and trying to do some high mathematics. And in the university, there were hours where the computer labs were open. So you have to subscribe to have one hour to do all your programming labs, programming homework. If you don't manage to do it - there is another person waiting, so you should really think fast. I finished my masters in the Sevastopol State University as a computer scientist, with bias towards computer network engineering.

And while I was a student - the last two years, I was also a startup founder. A founder for several, what they call it at the time, portals - online portals, what everybody wanted to build at the time, in the dot com era. The portal that I created contained almost everything, like a typical portal should contain - weather forecasts, online games, horoscopes, forums, chats, and stuff like that. And it went well until the crisis of dot coms.

During the crisis, my investor was still able to support my work for a couple of hours. But then everybody was so disappointed with online markets, he said that nobody actually believes that anything will work out, out of the internet activities. And we closed it, which was, in retrospect, a mistake. Because just several years later, it's all restarted once again. But once I realized that I cannot continue working on my online startups, I quickly figured out that I will not easily find another investor. So I decided to move somewhere where doing online business would be easier.

In the beginning, I looked at France, because - well, we thought it was very romantic - with my ex-wife, to speak French and live somewhere like South of France with typical French music around us and so on. We were young and romantic.

And when we started to learn French, I started to look at the technical side of emigrating from Ukraine to the southwestern part of the country. We quickly realized that emigrating from Ukraine into Europe would be very complicated.

Normally you don't have the right to look for a job until you have the right to be a permanently resident in France. To get this temporary residency was also complicated, because there are so many conditions - like having a job, or being a student. So I started to look elsewhere. And because we were planning to go to somewhere French - I was really lucky to find out that in Canada, there is a province called Quebec, where people speak French and there is a normal immigration program, where you can just fill some forms that describe your profile, prove that you can speak French - and it all become much more easy.

Len: Just to jump in there - thanks a lot for that. That's such an interesting story. And I have a lot of questions to ask about the next part of your journey. I actually lived in Quebec for about six or seven years in Montreal, myself. So I'm a little familiar with life there.

But also, another coincidence is that my grandparents immigrated to Canada from Ukraine - I mean, in the early part of the 20th century. What precipitated their departure was some very well-known political events, in Russia, and particularly in Ukraine.

so before talking about your adventures in Canada - you were born in the Soviet Union, and then you lived in an independent country called Ukraine for a while. But if you went back there now, it would be part of Russia. I wanted to ask you if you can tell us a little bit about what life was like for people during annexation of the Crimean Peninsula by Russia, and whether or not you personally were surprised by the whole thing?

Andriy: I think that the whole question is very - well, the answer will be very different, depending on who you talk to. There are people who really enjoyed what happened, and there were people who really suffered because of this. I know about families being split. Because - for example, my best friend from school was a high-profile Ukraine military officer, and he served in Crimea. And when everything happened, he was one of those who left Crimea and moved to mainland Ukraine, if you will. And now, his parents live in Crimea - they have lots of property there and they actually wanted their son to live there with them. But their son cannot even go to see them, to Crimea, because no military from Ukraine can actually go to Crimea anymore. So there are families broken. It's unavoidable when conflicts like this happen. But as I said, it's one side of the coin.

Another side of the coin that there were a lot of families who actually, from the very beginning of the Soviet Union collapse, actually felt betrayed by Yeltsin. Because Yeltsin agreed that Crimea will become part of Ukraine after the collapse. And I, myself - I come from an ethnic Russian family. So for us, speaking Russian, and our Russian identity was very important. I should say that Ukraine wanted to, like, Ukraine-ize, if you will- like convert Russians into Ukrainian culture, into the Ukrainian way of doing things. And not many ethnic Russians who lived in Crimea actually enjoyed this.

I could give you some very simple examples. If you buy drugs in pharmacy, the instructions for the drugs were only in Ukrainian. Even if you were native Russian and you don't speak Ukrainian, you don't read Ukrainian - you have to buy drugs with instructions in Ukrainian, at your own risk. So if you misinterpret the directions, it could be really risky. Or, if you go to the cinema, all movies are in Ukrainian. You have no choice to watch movies in your own language. So from this perspective, I think a lot of people really wanted to become part of Russia.

Whether they're happy now, it's another question. Because according to my parents, it all went very smoothly - no violence. Maybe one person died, or something like this. But what the whole situation created around Crimea is isolation. And this isolation is especially felt by young people. My parents, they are fine. Their retirement allocation has like doubled. So they really enjoy their life there. Russia invests a lot of money to renew the whole infrastructure. I was there twice after the annexation, and I really saw the difference. Russia really invests a lot into Crimea.

But the problem is, that for young people - they feel like they cannot go anywhere. Because if you want to travel, you need a passport. And no country will let you use a Russian passport for travel if you are from Crimea. So you have to go to mainland Ukraine and make a demand for a passport. It's complicated because you are from what they call "temporarily occupied territory." There is specific legislation that governs all those requests.

So it's complicated for people who are mobile like me - for example, who would like to be able to live a normal, comfortable life. All this isolation makes young people question whether they really enjoy all that they have got.

I think that there is no right answer, or right solution to this situation. Because you cannot trade your ethnic identity to get something in return. For example, in Spain, there is - how it's called, the region?

Len: Catalonia?

Andriy: Catalonia, yes. It's a very similar situation. According to the constitution of Spain, Catalonia cannot split without a referendum all over Spain. And they believe that they will never win this kind of referendum. It was exactly the same for Crimea. Ukraine was a unitary state, so Crimea was not a part of some sort of federation, where you can just vote to - like Quebec, for example, can just vote to not be part of Canada anymore, and it's by the constitution. But Crimea couldn't vote itself out, so you cannot solve this kind of problem easily, without long term consequences. And how long those long term consequences will last, it's very hard to say. But it should last generations, I guess.

Len: Thanks very much for that excellent explanation. I spent three weeks in Kiev in the early 2000s at one point, and I remember, I had to choose - would I learn a little bit of Russian, or would I learn a little bit of Ukrainian, before I went there? I chose Russian, because I'm a big fan of Russian literature, and my grandfather spoke the language. But I realized when I got there, how fraught that decision really was - or at least how it came across to people, when I would explain, "Oh yeah, and so I chose Russian." I got different reactions.

So you moved from one place with cultural and linguistic tensions to another. I remember, being in Quebec - every once a while, people would tell me to speak French and things like that.

Andriy: Right.

Len: And so you knew a little bit of French. You moved to Quebec, and as I gather from your story, you looked around for a job, and discovered you needed more time, to learn some more French. And so you decided to become a student at the University of Laval, I think?

Andriy: Yes.

Len: What was that experience like, starting to study in a language that you didn't really speak very well?

Andriy: Well, I wasn't prepared for that. Honestly, we - myself and my ex-wife, we underestimated how hard it can be to move from a post-Soviet republic to some Western country. Because it's such a big difference in mentality, and cultural - and just functional, like how society works. We learned everything the hard way, because we didn't have anyone in place to tell us what is the best thing to do.

For example, like the craziest thing that many immigrants do once they immigrate to Canada, is that they keep all bills from all companies forever, because they think that maybe one day the government will want to verify something, and they will not have this paper with them, so they keep all bills - like for gas, electricity, water and so on. There are so many things that you think is true in Western society, which is not actually true.

For example, my first year I was a student, I used a bike to go to university, with my backpack. And I needed to buy something at the grocery store. It was the first time I went there. I enter the grocery store, and I have a backpack. So I automatically think that I should put it somewhere, because otherwise they will not believe that my backpack was empty, or something like this. So I ask the woman at the cashier, "Where can I put my backpack?" And she looks at me, very surprised, "I don't know. Why do you want to put it somewhere?" And I'm like, "Because otherwise, how would that my backpack was empty when I leave the store?" And she was like, "Ah, okay. You can put it here at cashier." I felt so embarrassed because it was crazy for me to think that they will just believe, like trust everyone who enters the store, that they will actually pay for everything they took.

And lots of things like this. Sometimes when we had evening parties at work, I started telling about all those stories, me in the first years of immigration. And everybody's laughing, because there is so much - things that you think are true, which are not necessarily true. For many immigrants, they never end up actually knowing how the society worked where they live. Because, for example - you saw yourself in Montreal, there are communities where there are Ukrainians, communities where there Russians, Chinese, Indians, and so on.

For example, why we chose to move to Quebec city, is because I didn't want to be part of any ethnic community. I actually wanted to learn the other way of living - and see actually how normal, traditional society in Canada, lives. Their values, how people behave, how people think. I think that, in the long term, I made the right decision. But it was a hard decision, and it was a hard way to learn stuff, because there is no one to actually answer any of your questions.

In 2005 when we immigrated, I think we were among many - maybe 80, maybe 100 Russians - overall living in Quebec City. There was no such thing as a Russian community. So we learned everything the hard way - but now I think that I really enjoy being part of this Quebec, or Canadian society. My children, who were born in Canada, don't feel like they are different from any other kids of their age. And we actually behave and have the lifestyle of a typical Quebec family. We don't forget our Russian roots, of course. We speak Russian at home, we watch movies in Russian, we meet with people from Russia from time to time. But otherwise, we are just a normal Canadian family. So I think that it was worth it.

Len: I've got a very specific question about being an immigrant in Quebec. My understanding of the way the education system works for children is that essentially they get - not ethnically, but linguistically profiled before they enter school. And if you're not determined not to be from an English-speaking background, the government will not permit the parents to send their children to a primarily English language school. Did you encounter that system?

Andriy: Yes, it's exactly like that. This is one part that I'm actually against, and I'm vocally against. I regularly post on LinkedIn about major limitations that Quebec applies to people from other countries who live there.

And not just that, in Quebec there are many other problems. For example, the whole government administration costs much more to the taxpayer than in other provinces.

But talking about this language question. As an immigrant from a non-English speaking country, I don't have rights to send my kids to a non-French speaking public school. However, I could send them to a private school. So it just concerns public school. Because they say that if the schools are financed from public money, then the French language should be taught as the primary language.

However, I should say that in the last year of primary school - so it's the 6th year - children spend almost a half of the year in a fully English-speaking environment. They have ten days, or like five days of classes in French, and then another five days of classes only in English. And it's forbidden, actually, to speak French, during those five English days.

My children, I think they have started speaking English very well, despite all the legislation, for example. Like, there is a law that interdicts using languages other than French in working environments. However, most of the companies today - you speak both languages, English and French.

There is no discrimination that you would feel. But there are still laws that are active. And sometimes the government decides to enforce those laws, and it creates a lot of friction in the society. So there is no universal support of this French language domination.

All young generation - I count myself as a young generation - and especially people who are still in college or university, everybody understands that you cannot live in Canada and only speak French, because you isolate yourself from the rest of the country and the rest of the world. I think that at some point it was important to preserve French as the primary language. But in modern society, you cannot just isolate yourself from the rest of the world and say, "We will lose our identity if we forbid other languages to be used." I think it's not true, because I didn't lose my Russian identity - I speak Russian with my kids and with my parents regularly.

I still feel myself as Russian, even if I speak French most of the time at work, or English. So the identity is not necessarily related to language. And nothing forces you to really forget French. Take Europe for example - Sweden. In Sweden, English, it's like the seconnd primary language. They speak English as well as Swedish. But they don't forget Swedish, they use it all the time in their normal, daily life. It's just that when you work with people from all over the world, English is the language that lets you communicate effectively. So I think English, it's a universally - a universal inter-culture, inter-country language - and you have to know it.

There are some laws that still exist. I think that it will take time before those laws will be relaxed, and I think that we have to solve the immigration part, before we start solving the language part. Because immigration - where people come to Canada and stay in the ghettos or in some local communities forever, I don't think it's very beneficial for the culture. So first of all, we have to find ways to make immigrants actually integrate into society, and make this experience pleasant, and not force people to move somewhere, or something like this. It's not an easy question, but yeah, I agree that there are some restrictions that I don't really find appropriate in the 21st century.

Len: Thank you for that very nuanced explanation of things. I mean, there is a distinction between what the formal laws are, and what the day-to-day lived life is like.

Andriy: Yeah. I can give you an example. In Quebec, you cannot drink alcohol on the street. But if you are sitting on a terrace in the downtown, and you drink wine or beer - it's okay. Even if children will see you drinking wine, you are part of an environment in which it's okay. There are public places like parks, where there are wooden tables. And any family can gp to the park, cover the table, and put some food and a bottle of wine on it. You can drink it, and no police officer will tell you anything about this. But everybody knows that it's against the law. If you have very strict laws, but you apply them with moderation and with thought, it's okay. I think to protect French language, it's okay.

But if you force - for example, there is a big network of grocery stores in Quebec called Metro. And the government actually wanted to force them to put the accent over the "e" to make it look French-looking. I think it's ridiculous. We have to apply laws by thinking about consequences.

Len: People might - when Quebec kind of comes up in the headlines, it's often because of hardliners, and there is an institution that can be appropriately referred to [as the "language police." They will go around and try to make you put the accent on the letter - or, not use an English name like McDonald's or something like that, with the apostrophe.

But the day to day lived life - people have their ways of getting along with each other. For example,it's a little bit different in Montreal, because there's so many tourists there, I think - although Quebec City gets its fair share of tourists as well - but if you just barge into a place that's obviously a primarily French-speaking business, and you just start speaking in English - it's a little bit rude. You learn very quickly - try French first, pretty quickly just to get it over with. Whoever you're speaking with will probably start speaking to you in English. But these little signals that you give, that you understand the overall tension, actually are things that people have more or less worked out.

Andriy: I think it depends a lot on your education, as well. For example, I work with very highly-educated people. And we all believe that English, or French or whatever - is just a way of expressing yourself. So when we talk during the lunch - we have people who speak English, and other people reply in French. We have bilingual conversations easily. I prefer speaking French, and some people at work prefer to speak English. We just use two languages when we speak, and it's very fluent. There's not any clash in this. Educated people understand that language is just a way of communication.

People with less education and more, I don't know how it's called - prejudice. Well, they could maybe judge you for not speaking French. But I will be completely honest. I have lived in Quebec City from 2005 and never, ever experienced any negative perception by people from Quebec. Normally people are very friendly. and they ask you where your accent is from, where are you from yourself? "Oh, you are Russian?" "Oh, this and that." Sometimes, when I was not as good in French as now, and I started to try to speak French to people, they would switch it easily to English, and try to talk to me in English - just to simplify the communication.

Of course, there are still people who believe in some nationalistic idea, that Quebec City, or Quebec in general, should be 100% French. But it's very highly exaggerated if you look from the outside. If you live inside, people are just people. And there are no good people or bad people; there are just people. There are sometimes people with wrong opinion, from the perspective of my stance. But there is no violence or something like this, against immigrants.

Len: I'm sure we could talk about this at length. It's such a deep and interesting experience, especially to move into as an outsider.

But getting back to your career. You decided in the mid 2000s to study artificial intelligence. It wasn't the prominent field at that time that it has become since. What led you to study artificial intelligence for your Master's and your Ph.D.?

Andriy: Every time everyone looks at their path in life - a lot in this path is an accident or chance. People either use those chances or not, it depends. But very few depends really on our choice.

When I moved to Canada, I tried to find a job in IT. I realized that my French level was not enough to be effective at work, so I decided to go to study once again, even if I told myself back in Ukraine, "University - never again." I changed my mind.

I went to university, because it was the only environment which I knew well. And in my opinion, it should be similar to any university in any other country.

So I went to university, and I subscribed to the program of what they call, "Second Cycle," it's like a graded program. But it wasn't a Master's - it was just a graded program in IT, in computer science.

During the first semester, it was really hard. As I said, my language was really not so good. And all classes at the University of Laval are given in French. I was one of few students whose language wasn't French. There was another girl from Iran, and another guy from Belarus - so we could speak Russian and explain to one another what we managed to understand during the class.

While I was a first trimester student, I started to look around and see if there are possibilities to start a Master's, and to have some kind of internship. I met with several of my professors, and they all told me that they could find money but not right away, so I would have to wait. But one of them sent me to a director of the multi-agent systems laboratory. And they told me that he might have money, to pay internships , from the day one. He has become me director for masters and Ph.D., Brahim Chaib-draa.

His lab was specialized in multiagent systems, but they also were interested in machine learning and in reinforcement learning - how to make agents behave in a collaborative or in a competitive way, effectively. So my topic for Master's and Ph.D. was in game theory.

For example, if you watched A Beautiful Mind, about a famous mathematician, John Nash - my biggest contribution in my Ph.D. was an algorithm that computes a Nash equilibrium in repeated games.

A repeated game is when the same players play the same game over and over again, and the solution is how you have to behave - the solution depends a lot whether it's a one-time interaction or it's a repeated interaction. Because in a one-time interaction, you can assume that there will be no consequences if you don't collaborate with other peers. But if the interaction is repeated, you can assume that if you don't collaborate, then your peers will be able to punish you in the long-term. So the solution to repeated games is very different to the solution to what we call one-shot games.

I'm very proud about my contribution, and I see that my paper that I published in 38:56 AAAI, which is one of the best AI associations. It's very cited, and every year I have about a dozen citations of my paper. So from this point of view, I'm proud of my achievement as a Masters and Ph.D. student.

But I think I'm much more proud about my achievement with the book, because the impact that my Ph.D. had is very local. Maybe a dozen people in the world will actually read my paper and appreciate the contribution. But I already estimate that my book has been read more than 10,000 times, in just the first month after its release. So I think this achievement is much more satisfying than Ph.D..

Len: I've got quite a few questions to ask you about your book in a little bit. But I think this actually gives me an opportunity to segue into a question I often ask of people I interview on this podcast - which is, if you were starting out now as a young person looking for a career in tech generally - being a software engineer or a computer engineer - would you go to university again for an undergraduate degree?

Andriy: As of today, yes, I would still go this route. Because online education is in the very early stage. Even if it was a huge success - like for example, Coursera and places like this - it's still not sure whether these diplomas, in the long-term, actually mean that the person will become a very qualified worker. I think that it's too early to say, "Okay, the traditional education is no longer relevant." It's more relevant in IT, in computer science, but [online education is?] much less relevant, let's say, if you want to become an architect to be able to construct buildings. Or if you want to become a physician. There is not an easy way to become one of those very complex professions.

While, computer science becomes more and more accessible. It's easy to teach computer science by distance. But there are professions where you actually have to have direct contact with a professor, direct contact with your peers. You have to have lots of interactions individually and as a group. This is what online education could not offer. But if you ask me, I consider myself as a progressivist. I actually believe that traditional education, which has roots in the early 20th century, today is less relevant.

It's not just doing bachelors or not. It starts from primary school, to high school, to the Bachelors, to the Master's. This whole system was designed to prepare factory workers. And today, we are seeing, the things we do are so different. Trying to teach everyone to do exactly the same, it might be the wrong way. But there is no "the right way". Nobody actually revolutionized education by offering something that will replace this system, that'll teach everyone the same thing, by something more individual.

For example, I would appreciate if in school, they could look at my children's talents, and adapt education to develop those talents. That would be great. But the cost of such individual education would be much higher as well. Because you lived in Quebec, you know that in Quebec already taxes are over the roof. So I'm not sure that many parents would be able to pay even more for some kind of different education. So there is no like right answer. I think that in some cases, maybe the degree is not necessary, like in computer science. But there are many other directions of education which you cannot just teach the same way.

Len: It's interesting you bring up the taxes in Quebec. That leads me to my next question. So there you are - you graduate with this hotshot Ph.D. in artificial intelligence. And you're in Quebec City - where the taxes are high, and where there are these restrictions on how children can be educated. And it's kind of remote, and it's very cold - and you decided to stay. I would like to ask you about why you decided to stay, and what you then did?

Andriy: First of all, I think that there is no optimal place on this planet. Wherever you go, what do they say? You'll bring yourself with you.

I think our biggest challenge is within ourselves and not outside. Quebec is a good place to live. Of course it has its own problems, as you mentioned and we discussed earlier. But you cannot find any place where there are no problems. I thought many times to move to California, because there is so many hot startups there and lots of opportunities. But California has its own challenges, that I might underestimate before moving there.

I thought about maybe retiring somewhere in the south of France, because I speak French. I don't say no to these plans - but at the same time, my children most likely will stay in Canada - or maybe not? But if they stay in Canada, I would like to stay close to my children. Moving, as I said, it's a challenge, and we already survived one move from one country to another. So thinking about moving somewhere else - it's not as easy as it might seem. And I'm already almost 39 years old. At some point you have to decide whether you want to move all your life, or you want to settle down and just like try to get the best of where you are now. I think that compared to where I came from - Canada and Quebec, in particular - it's a nice place to be.

Len: And so you found a job there, initially working for Fujitsu, I think?

Andriy: Yes.

Len: And what did you do for them?

Andriy: When I was still a Ph.D. student, one of the ex-Ph.D. students of my director, he was a project manager at Fujitsu. And artificial intelligence at the time, in 2007, was not as hot as it is today. Everybody spoke about it in California, and maybe it was one of the reasons why I thought about moving there at some point. But in Quebec, it was still like, "AI, who needs that? It's for scientists only. It will never work." And he was a manager there, and he invited me to join him. Because at the time, Fujitsu wanted to build an emulation center in Quebec city. And they actually managed to get government support, and support from main Fujitsu, from Japan.

It was about to start. So he said, "It would be a good opportunity for you if you join us now. And then when we become big, it will play well for your career." So I accepted, because I was interested to work with Japanese technologies and to innovate and so on.

But unfortunately, the whole process of building the innovation center took much more time than everybody thought. So after two years - they still were in the very beginning, and people started to lose patience. Many people left the innovation center initiative. And I also felt like I spent two years not doing exactly what I wanted to do.

So I started to look around, and I found a small Quebec company, called WANTED Analytics, who specialized in getting automated talent marketplace analytics. They downloaded job descriptions from the internet, and tried to extract information from the job description. For example, what domain it is, what kind of skills are requested, what kind of salary offered, how long this specific job offering career remains online. They built all kind of models for big enterprises to help them orient their talent planning, where they have to look for this specific profile, how long it will take to find this specific profile, how much should I pay to this specific profile?

There were a lot of interesting questions that we could squeeze out of job descriptions. I actually felt like it's an interesting product, and there is so many things where machine learning could be applied. As soon as I saw that they looked for a data analyst, I sent them a link to my LinkedIn Profile, and they called me for an interview, and I passed. It was in 2013, I guess?

Since then, WANTED Analytics was bought by a big American consulting company called CEB. And one year later, Gartner acquired CEB. So this is how I found myself working for Gartner. So I switched between three different companies without leaving my office.

Len: Just before moving on, to talk about your book, I have one question about that. For people in the tech sector, most of them are familiar with Gartner, because Gartner issues these quadrants, ranking companies and startups and things like.

Andriy: Yes.

Len: So for those of us who mostly understand Gartner from the, "I'd love to be in the quadrant" side of things, what interest does Gartner have in acquiring a company like WANTED?

Andriy: Actually when Gartner acquired CEB, we were told that actually Gartner looked at WANTED before CEB bought WANTED. But for Gartner, WANTED was too small as an acquisition. So they didn't decide to make an offer. But for CEB, we were okay - and for CEB, we fitted in their list of services that they offered to different companies. So CEB was a kind of best practices company. We hd multiple clients, and we analyzed how different clients worked. And then we would write a best practices document, that we sell to all clients. It's a subscription model. All clients are happy about this - they are happy to share their best practices, because they get good advice in return.

So for CEB, this acquisition was part of their desire to also offer consulting in the talent space. And before buying WANTED, they also bought a company in India called TalentNeuron. It was similar in \spirit to WANTED. But WANTED was much more automated. So what we did, we actually did come mostly automatically. But TalentNeuron was more manual. They actually look at data online, built some kind of models to fill databases manually. And we did similar stuff, but automatically.

So for them, acquiring us, the idea was that they will learn from us how to automate different data acquisition, data processing modeling tasks, that we learnt to do over decades. So for CEB, it was quite a planned acquisition. But Gartner bought CEB without actually thinking about us. They actually discovered that TalentNeuron and WANTED Analytics were a part of CEB post-acquisition.

And now TalentNeuron and WANTED are merged all under one roof, called TalentNeuron. It's one of the biggest priorities in the advisory services of Gartner, mostly because the reams of data that we have accumulated for the last 15 years, or 19 years - it's amazing how much data we have. And we know who hired for what kind of skills in 2002, 2005, 2019. We actually can build models that span years, and we can predict how different occupations would evolve by looking at how they did the roles in the past.

So this kind of data - very few company on the market have it. Like Google, for example, just started to download and index job postings. So they don't have the amount of data that we do. We have several competitors, but data-wise, it's hard to beat what we have.

Len: Speaking of modeling and data - that gives us a good segue into the next part of the interview, where we talk about your book. What was the inspiration for the book?

Andriy: It was kind of funny, because I never actually planned to write any book. I knew that it's a very time-consuming and energy-consuming activity. I already worked on my Ph.D. thesis, so I could say that it's not easy to write something readable - and especially useful and interesting to read. So I always considered this as not a good investment of the time, because I knew also that authors often get maybe 10% if they are lucky, from each book sale. So for me, it was like, the effort wasn't worth the outcome.

As you know, I have a quite an active community on LinkedIn - I have about 80K followers now. At some point in September or October 2018, I wake up in my bedroom and I looked at the books that I have in my bedroom, and I had maybe about half a dozen books on machine learning - and I realized that I bought those books, but I never finished any one of those. I read some chapters that were of interest for me at the time - but never was able to like start a book from first page and go through the whole text till the last page. I asked myself, "Why? Why is this?" And the answer that I got, is that those books are too thick for the busy life that we currently have. We never have time to actually sit down, make a cup of tea and read for some long period of time. We're always running, we're always working on something - like children, our job, sport and so on. So we try to do everything at the same time. So most of the time, if we need information, we Google it, instead of buying the book and then read it through.

So I wrote a post on LinkedIn by saying that modern books on machine learning are too thick, and they are too technical for an average person, even an engineer or a scientist from another domain, to actually be able to buy this book and read it from A to Z. I wrote that if I was to write a machine learning book, it would be a 100-page book. It was just a post like this, without really - I had never planned to prove anything, that I would actually be able to write this book.

But somehow the post has become very popular, it has got about 1,000 likes and several hundred comments. And there were two kinds of comments. The most frequent ones, the first kind, was people saying, "It's impossible. Machine learning books are so thick for the reason you cannot just kind of like squeeze it without losing in clarity or in some important detail. So if there is some detail in the book, it's because it's needed." This was the first reaction.

The second reaction was like, "Oh my God, if you are able to write this book, I will buy it, because I'm so afraid of those 1,000 page books, which are typical in machine learning. I will never be able to read the 1,000 pages in my life, especially on such a complex subject full of maths and some difficult-to-get ideas."

I thought about this for a week or so. I talked to my parents, and they said, "Well you have nothing to lose, try to write several chapters and you will see if it goes well." So I wrote the first three chapters, and it was about 30 pages total. The first three chapters included the introduction, basic math and statistics, and the description of the most important machine learning algorithms, like support vector machines, logistic review action, decision trees, linear regression, and getting your nearest neighbors.

Once I like finished the third chapter, I actually felt like there is not so much remaining to describe. There are neural networks, there are some assemble methods, and there is also unsupervised learning. But unsupervised learning usually has much less algorithms, and it's used not as much as supervised learning. I didn't expect to write a lot about unsupervised. So I decided to put these three chapters online and say that I will continue putting new chapters online on the go, as soon as they are ready, I will put them online.

I created the website, with a subscription, and people started to subscribe. At the time when I finished writing the book - it took me about three months - the mailing list already contained about 10,000 people. When I published the book on Amazon, I just sent an announcement that, "The book is now ready. You can buy it if you want." And also, I think, a good idea was to put the book online under the principle of read first, buy later. Which means that you can read the book in full, and only if you feel like the book actually was useful for you, you enjoyed the read, you can now apply the knowledge, for example, in your study or your business, or your work - only then you should buy it. If you for some reason feel like it wasn't worth the time, then it's okay.

I think that people really liked this whole idea from day one. I received a lot of comments from people who read the book while I was working on it. I received a lot of like corrections - suggestions, how to improve the text. How to change sentences, so that it sounds more natural, and so on. In my list of contributors, I had about 60 people, and many of them actually read almost all chapters. So the contributions were not like sporadic, but in many cases were systematic. So I was quite sure that the quality of the book was good - but if I knew how big this success would be, I would probably pay a professional copy editor to like pass over the whole text and maybe find some places where the text could be slightly improved. But I'm quite sure that the quality is still very good.

Len: I've got a couple of questions about the mechanics of how you wrote and published the book, and how it became such a success. But just before moving on, for those listening - what is machine learning? You have a good description right off the bat in your book, about where the term comes from.

Andriy: As I say in my book, there are two definitions of machine learning. One definition is - it's a part of computer science, which wants to build computer programs that do some work for us, without us explicitly defining how this work should be done. So machine learning, it's about giving examples - and the algorithm is being constructed automatically, which is based on those examples you give. This is one definition of machine learning.

Another definition is - it is an activity that you do to actually build those algorithms. So we can say, "I do some machine learning." Or you can say, "I use machine learning to do something." So in both cases, it involves gathering a data set, which contains of examples and you give some labels to those examples. The easiest example is building a spam detector. And you gather a data set of emails, and to every email you associate a label, like spam or not spam. And the machine learns automatically to distinguish spam messages from non-spam messages.

Len: And what is the difference between machine learning and artificial intelligence?

Andriy: Well, again - depending on how you view artificial intelligence, it could be an activity, or it could be a long-term dream. So when we build something - for example, a solution for business, a solution for business may be based on some machine learning model. But the solution is much more complex than just this model. Because it's also how the input from the user is converted into something that machine can receive, and then the machine makes some sort of prediction - and then you have to show to the user, the result of this prediction - so that the user can interpret it, and use it somehow in their daily life or business. So this whole solution with input preparation, output - was for us, I think, what we call an "artificial intelligence system."

Machine learning is just some integral part, like a core of it - but it's not all. Artificial intelligence - usually it's a machine-learning based product. But also artificial intelligence, its a long term goal and long term research - a dream of people to build a machine that eventually will be able to interact with us, just like we interact with one another.

This is where I think that there artificial intelligence is over-hyped right now. Because people often mix these two definitions in one. They think that when we say that I've built an artificial intelligence system, that we actually built some kind of thinking machine, that we can actually interact with and talk about anything and so on. We are very, very, very far from this dream. I would say that today there is no clear idea, even how to get to the result that we dream about.

Len: Another thing around the subject of artificial intelligence, is very famous and well-known people warning us about impending doom, if we don't do something now. What do you think about that? Whether it's really a thinking thing or not, are you worried about what we refer to as "artificial intelligence," taking over?

Andriy: Well again, as a practitioner, I think that we are nowhere even close to a machine that will realize that it exists, realize that it is some sort of intelligence, and understands its place on this planet - and then look at us around it, and decide whether the machine needs us around it, or maybe we are just like some kind of noise. I think we are nowhere close to it.

But I think there is a fear, and I wouldn't say that I really think about this every day. But sometimes, especially when I'm asked this kind of question, yes, I think that what people are really afraid of, what they call the "singularity" - when we create something and it's based on a very simple idea, and we don't think that it will be able to become something more than this simple algorithm - but this algorithm is just a little bit more intelligent, than everything we have built before, and it's sufficiently intelligent to be able to improve itself - if this algorithm is able to improve itself, it will become more and more and more intelligent. And this loop of improvement can be quite fast, especially if you ran this algorithm on an infrastructure - like Google, for example, has tens of thousands of GPUs and interconnected computers. If you look at this, as say a science fiction writer, and a scientist at the same time - there is a small chance that someone somewhere will run some kind of algorithm that will be able to improve itself so quickly that we don't even realize how powerful it will become.

But again, as I said - today, the level of technology is so below this threshold of self-awareness and self-improvement. There are examples, like AlphaZero or AlphaGo, where the machine plays against itself, and learns to actually become a better player than the best human player. And then people say that, "There is nothing that prevents us to build a killing machine that will train on itself to kill the best, the most effective way possible." But again, it all was tested in a very, very restricted environment. A game with very simple rules.

The environment in which we live is much more complex. It's not chess or checkers or a Go board. It's a massive, big world, with a lot of noise, uncertainty and unpredictable events that can happen all the time. We don't have anything even close to replicate the same result as we have got with AlphaGo or AlphaZero.

Len: I think, particularly with respect to AlphaGo, people who aren't experts, but follow the tech news and feel that they're somewhat part of that world - were quite surprised. Because Go was considered by amateurs, and probably by quite a few experts, as something that would take a really long time - even given our current pace of change - for a computer to be able to beat grandmasters at. And then suddenly it happened, and people were like, "Wow." It was like - if we were that wrong about this and how long that would take, what else are we potentially wrong about?

Just as someone sort of just who reads the headlines, one of the things I find really interesting about the prospect of these very sophisticated programs, is that sooner than we think, we might be in a world where we're being presented with very complex policies, like, "Do this to cure the person's cancer," from machines - where we don't have any idea at all how it arrived at that conclusion, or why it's right.

This is going to put us as humans in a relationship with machines that we're all accustomed to having towards human experts, right? When the doctor says, "Take this pill, it'll cure your problem," most of us, we believe the doctor's right, an even though we have no idea why, we just carry on without feeling like anything uncanny or problematic happened. But if it were a machine doing that, it seems to change the dynamic in the way we respond.

Andriy: Yes. I agree that some machines will be - they already are more effective in some kind of work, where humans dominated. For example, people who make diagnoses for different kind of sicknesses, looking at x-ray pictures or other kinds of MRI and so on, they have to learn for 10 years or so to actually look at the picture and to decide whether it might be cancer or not, whether it might be this kind of sickness or not. And now, we can just train in a deep neural network and it will look at the same picture and make even better predictions than humans do.

People might think that, now the machine will be able to replace us everywhere. But it's actually a very limited range of applications where the machine could easily replace a human. And most of the time, it's activities where it's based on reflex, like human reflex.

For example, self-driving cars. If you think about how complex the whole public transportation is - we make so many decisions when we are driving, to not get into any kind of accident. But when you drive, you quickly realize that you can think about something else, you can talk with people, about something. And you still keep driving without any accident, because your brain learned to adjust, react to the car that you follow, or red color of the lights on the intersection. And you just automatically make decisions.

So when you can replace actual decision making with user reflexes, this is where machine learning can replace you quite easily. This person who learned for 10 years to see different kinds of cancer on pictures, they don't use any advanced thinking. It's just, they looked at so many different kind of pictures and they read about so many different kinds of sicknesses, that they rank; this decides. It doesn't take the person like a day and different multiple calculations to make this decision. They just look at it, and decide, "Yes, I think there is something here, we have to make additional analysis."

A machine can replace this kind of decision-making quite easily. But if it takes any kind of thinking, logic, asking different people for additional information, making calculations - this is where the machine is not even near, not near close to replace us.

So I'm not afraid about humankind being replaced by machines everywhere. There is a lot of places where, for example, it's important - human touch, human contact. Like in hospitals, where people really need personal care, really need affection, conversation - and empathy. This is where machines will never replace us. And as I said, everything that takes additional thinking, manipulating different objects, different kinds of information - in some non-reflex like way, we don't have any theory in AI that could bring us there anytime soon.

Len: It's really interesting, your description of how we actually drive - it reminded me of a joke a friend of my brother's has, about how the car knows the way. And we often have this experience where we're kind of like, as you described - we don't think about it at all, and just suddenly we're at our destination. You can even not remember the last 10 minutes of what you were actually doing.

Moving onto the last part of the interview, where we go into the weeds a little bit about self-publishing.

You've already described some of your process for writing your book. When I was researching for this interview, as someone who works in particularly in this area, in progress publishing - it struck me how familiar so much of it was to me - how you did it all totally independently.

One of the things that we've seen happen - and it always seems a little bit surprising, no matter how many times you see it - is that people will pay for books that they can get for free, and also that people will help you improve your book.

Andriy: Yes.

Len: Authors love it, but as you've experienced - readers love it too. People like being able to help each other improve the things that they're doing. It's sort of funny that we often - the thing I reflect on most now is, why is it something we find surprising, and where does that suprise comes from?

One specific question I have for you is around pricing. Pricing is a very tricky thing. Not just in book publishing, but in all sorts of areas. You've got a Kindle edition on Amazon, you've got a paperback and a hardback on Amazon. You've got it up on Leanpub, using our variable pricing model in your book format. And I believe you have also got an agreement to have a South Asian print version published?

Andriy: It's also self-published.

Len: But for a lower price, for the obvious reasons that purchasing power parity and things like that. Do you have an overall strategy for how you're pricing all these different products?

Andriy: Well, the pricing question was hard at some point, because you don't know what your work is worth before you actually try to sell it. I tried to ask my subscribers opinion about what would be the most like reasonable price for the hardcover book. I actually created a poll, where people could put their own opinion, for the price. I got about 400 participants in this poll, and the average was about $35, $34, $35. But this is only if you exclude people who suggested a price of something like $3, $5, $9.

Why I decided to exclude those - because on Amazon, my paperback book - just to print it, costs $12. So you cannot sell your book for less than $12, otherwise you will have to pay from your pocket for every purchase. So I excluded from the poll all suggestions that are below the print cost. And this gave me $33, $35. So I decided to sell my book for more than this - the $33, $35 - because of the condition under which Amazon puts books on their store when you self-publish.

If you price your book at, let's say $35 - so 60% of $35 - it's about $18 or $20. Then you subtract $12 for print. So what's left, it's about $6 or $8. So I decided that if I sell my book in electronic format for $15, it would make sense to expect that I would earn $15 from paperback and hardcover as well. All this printing and distribution, it's not directly related to the content. So if I price the pure content in the PDF or EPUB format for $15, then I don't see any reason to get a smaller fraction of this by selling a paperback and hardcover. So I calculated that for a $45 paperback, when Amazon will take it's part and I subtract the printing cost, what will remain is $15.

So I price it - all formats, in all countries where I self-published, based on the same principle. However, I understood that - in India, for example - I couldn't price it in a similar way. Because otherwise the price would be way higher than $30, $35. It will be still lower than in the US - but for an Indian reader, it would be very, very hard as a price. So I decided to reduce my own share in the price of Indian edition. And for India, I get about $5 from every sale. I decided to get a lower fraction, just to make the book affordable for a typical Indian reader. But even with this, people still find that the price of $25 is still too high for India.

Unfortunately if I put the price below that, there are two problems. One problem is that my fraction will become really tiny. And the second one is that if you sell your book in the South Asian market for too low price, many of those books got resold back to Europe and United States - because the content is the same, the quality is high. I didn't want to sacrifice quality in India. Because for me, building a quality product is one of the reasons why I do things. I never do something half-baked. If I work on something, I really expect a good quality result.

So I couldn't reduce the price by reducing the quality. And I'm not ready to reduce my own share even more, because it becomes not fair for people who pay $15 - for example, on Leanpub, when they buy the book for the minimum of $20 - so that people in other countries will pay less for the same amount of content they receive. So it's not an easy answer, how to choose a better price.

I understand that for example, I will get much more sales in India if I price my book about $5 to $10. But it would be what they call "garbage quality books" - very thin paper, very bad quality binding, all in black and white - because my book is in color.

I actually wanted to preserve all those good qualities of the book on Indian market, but still try to somehow reduce the price, without losing too much money from my pocket - and without sacrificing quality. So do I think $25 is what I can really offer without thinking that people in other countries pay much more for the same content? I think it's not fair.

Len: And so you had this email list of people interested in the book, and when you published the book on Amazon, it shot to the top of one or two categories as a bestseller. I believe machine learning, presumably, was one of those categories. And then, not very long after that - you were approached by enterprising publishers, looking to translate the book.

Andriy: Yes.

[lenepp]

Len: I'm curious to ask you about that. I think a lot of people can find - when suddenly they start encountering contracts and publishing companies and things like that - it's very exciting, but it's also a little bit daunting. You don't want to get screwed by bad clauses and stuff like that. So when you started signing contracts, how did you approach that? Did you get a lawyer, did you read some self-publishing blogs, or use your common sense?

Andriy: No, I was quite surprised that the agreement that you sign is actually, at most, four or five pages. There are two main parts in this agreement. All other parts are the same. The two main parts is how the royalty is calculated, based on what kind of price and what kind of percentage they apply, to calculate the royalty. And the second point is regarding the duration of the agreement. I was contacted quite quickly by Chinese, Russian, and South Korean publishers. I saw that the duration that most of them proposed was five years.

I thought that was reasonable, I didn't try to negotiate anything below that. I think five years would include this edition and the second edition. I think it's fair.

For the royalty part, I was quite surprised that the European model is very different from all the rest of the world, especially from let's say the Chinese or US or South Korean markets. In the rest of the world, excluding Europe - the royalty is calculated based on the list price. So the publisher decides how much the book will cost in stores.

For example, let's say they decided in South Korea that their list price will be $20. Then they calculate the royalty based on this. And you can negotiate if your book is a bestseller, if it's already known in the world. If you are a bestselling author, everybody knows your name. You can negotiate something higher than usual.

But usually the royalty is - they try to offer you something between 8 and 12%. Most of the time, people agree on something in between - say 10% royalty for someone who is not very popular as an author, and it may be their first book. I usually tried to negotiate something close to 12, and in many cases I actually succeeded and got this level of royalty.

But I was really surprised that in Europe, they apply the royalty to their book price - the price at which they sell books to retailers. It's about half of the list price usually. But they apply exactly the same percent of royalty to the book price. So you can imagine that authors in Europe get like half of what authors get in other countries. And when I saw that the first time in Russia, I was really surprised that they actually proposed these kind of conditions - and especially in Russia, the market is much smaller and the prices are much, much lower.

So you can imagine - half of 10% applied to $6, it gives you quite a funny amount of money. I was interested in publishing in Russia, basically because I am Russian. And I want my parents to be able to buy a book with my name on it. So it was my only reason. I actually insisted a lot on the quality of edition. But in China, in Russia, in Turkey - it's hard to sell books for something more than $10. And most publishers will really try to pressure you a lot to agree on the list price of about $6, $7.

Which I always rejected, because I thought that you cannot produce a good quality book that will be in stores, for the price of $6. So the production costs should be around maybe $2 or $3. It cannot be of good quality. I always insisted that the price will be at least $10, $11. Even in Russia and China and Turkey. And usually publishers agreed, but they want to keep prices as low as possible, because they can forecast higher sales. And for them, sales is the only thing that matters. For me, sales are much less of importance.

What's important is quality and the legacy that I will leave with this book. Maybe this book will survive several editions, I don't know? So I would not like that my first ever published book in my life would be seen like a cheap, badly made and not worth like touching even because it's so low quality. For me, it's important to project an image of being a quality author, and someone who can build quality products.

Len: Thank you for that very excellent and comprehensive explanation of how all these different parts intersect, and how they're different in different parts of the world.

Particularly with respect to royalties, I think people are often very surprised to find out that the publisher's take is say half of the sale price of a new book in a bookstore. And then the author's royalty percentage is applied to that half. So if you buy a book for $20, the author's getting $1.

Andriy: Yeah.

Len: And so people hear about, "Oh it's a bestselling book, it's sold 100,000 copies." And you think, "Well, the author must be rich now." And it's like - well, that's a healthy amount of money to make. But you're not getting rich, unless you sell many, many, many books based on that model.

Andriy: Yeah, actually every time people ask me, "Is it worth self-publishing?" I definitely say, "Yes." If you can self-publish in as many languages as you know. Like for example, I know French, Russian and English - but I could not self-publish in Russia, because Amazon doesn't support self-publishing in Russia. So I didn't have a choice other than getting an agreement with some Russian publisher. But I selected the most respected and the most quality ones.

But in France - for example, in the French edition of my book - I will self-publish on Amazon myself. Even if I don't do translation myself, because I decided that - again, to find people who will translate the book much better in French than myself. My French is good for day-to-day communication, but for writing books - I don't think I'm as good in French as I would be in Russian or in English. I actually was lucky to find people - a published author from France, who was just interested to work with me, on building the French version of the book.

I offered him to do it for some reward, but he said that he would do it for just his own pleasure, and in exchange for putting his name on the cover as like, "translated from English by -" He actually does a fantastic job. He's already published in data science. His book is very well scored on Amazon in France. So I really believe that the quality will be very, very good.

And I also have another person who will do copy editing for some flat price, not so high. And myself, I know French - so I will be able to do the third layer of quality check, and I really believe that the quality of the French version of the book, self-publishing it, will be no worse than would be published by any editor.

I think that I will use exactly the same approach, if I succeed, for Italian and Spanish. Because on Amazon, you can self-publish in Italy and in Spain. But for Germany and for German, I decided to work with an editor, because German is more different from French and English, for me to actually make sure that the translation is good, that everything is consistent and so on. So German was an exception.

Also, Amazon can self-publish in Japan. But I've decided that I will not try to write anything Japanese myself, because Japan is so different culturally, and their traditions are so different from Westerners. So I will wait for some good Japanese publisher to contact me. I already was contacted by a couple, but we are still in some very slow negotiations. I expect that someone more serious will contact me, or the whole process will go faster.

Len: We're approaching feature length here, as I like to say in our interview. And so I would like to say - before moving onto my final question, if you're interested in more of Andriy's thoughts about publishing, he's got a great post called How you should write books in 2019 that I'll link to in the transcription for this interview.

My last question that I always ask people on this podcast is - if there was one thing we could build for you, or one thing we could fix for you on Leanpub, can you think of anything you would ask us to do?

Andriy: I'm not sure that Leanpub would fix the problem that I have. But the problem that I have with electronic books, is that mathematics and maths in general, in electronic books, is very poorly supported. For example, I cannot publish my book for Android or for Kindle, because EPUB format supports mathematics in form of MathML. And Apple, on IOS and on Mac supports MathML. So my book for IOS and for Mac is - looks as good in ebook format as it looks in PDF format. But on Android and on Kindle, I cannot do it - because Google decided to not support MathML.

I know that you don't produce your own readers yet, but if at some point you decide that you would like to build a reader - you would be the first company in the world which could support MathML completely, without any flaw in the electronic books. I contacted already several companies that sell ebooks. For example, Kobo in Canada. And I described it to them that actually I cannot sell books for Android and for Kindle, because of this limitation. And they said that, there's only so much they can do, it's a problem of Android's, it's a problem of EPUB and MathML - so we cannot do it.

So if someone at some point decides to develop a reader for Android and for Kindle devices, that would support mathematics natively, just like iOS does, it will be the first reader in the world, for which I would adapt my book. But right now, people who write books that contains mathematics, they put equations, in the form of PNG files - images. So when you read an ebook and you try to scale up or scale down the font, the images remain the same size. It becomes super ugly and, I didn't want my book to look like just a bunch of text, mixed with some hard to read equations.

Len: Thakns for that, we love hearing - I mean, we don't like hearing that people have problems, but we like hearing the details of the problems that authors are having, because that helps us address them. If you write a book in Leanpub using our Leanpub flavored Markdown or Markua syntax, you can actually write math in LaTeX, and we produce good looking equations in PDF, EPUB and MOBI, and on our iOS app and on our Android app.

Andriy: If you can send me an example of a book, and I will check it on Android app. If it works for my equations, I would gladly produce a version for Android of my book. But I tested, I actually downloaded all ebook reading applicationss for Android, and I tested them all with my book. And some of them just didn't render LaTeX at all. Some rendered LaTeX, but some characters were replaced by rectangles. So there were lots of problems. I'm really curious to test your system and try to type some equations that are of interest for me, and see how it gets rendered on Android.

Len: Okay, I'll find an example of a Leanpub book, and I will maybe send you a link to where in our manual we talk about it in the Markua spec.

Andriy: It's all really easy to test, I will just put some equations that don't get rendered correctly, and try to read it on my Android phone. And if it looks okay, it will be great.

Len: Okay, fantastic. And if you ever have any questions, I confess I'm not the technical expert on rendering math in our books here, but my colleague Scott is, so if you have any questions about anything, feel free to email us at hello@leanpub.com, and Scott will answer you.

Well, thank you very much for taking the time out of your day to do this interview. We covered a lot of very interesting ground, and I had a lot of fun.

Andriy: And thank you for inviting me, Len. It was really a great pleasure to talk to you.

Len: Thank you very much. And as always, thanks to all of you for listening. If you liked what you heard, please rate and review this episode in iTunes, and subscribe to the podcast if you haven't done so already. Thanks.

Podcast info & credits
  • Published on April 3rd, 2019
  • Interview by Len Epp on February 27th, 2019
  • Transcribed by Alys McDonough