I'm so excited. We're excited to see you too. Tell us who you are. Tell us your name and what country you're calling from. I'm from Cambodia. And your name? My name is Ron Kuy. Great. Welcome, Ron. Welcome to talk to us. And you know, you're our second caller from Cambodia today. Very unusual. Oh, really? Yes. It's nighttime there, right? Yes. You know what? Actually, I'm working, so I don't have much time, but today is my day off. Good. But I'm still learning English. That's good to do on your day off. Where do you work or what kind of job do you do? I work in Walmart. In where? Walmart? Walmart? Yes. The store. In the store, yes. Did you know you were at Walmart in Cambodia? No, no, no. Right now, I'm living in the United States in Florida. Oh, okay. All right, all right. We thought we had a news story about Walmart. Walmart is the world's largest retail chain, chain of retail stores. And I know that they've got international operations in a lot of countries. But, okay, so you're actually calling us from Florida. Yes, from Florida. I live in Florida, really close with Miami. Oh my goodness. So you have all of the college students coming for spring break, right? Because Motherdale is very happy. Is it crowded? It's not really. But since I got a job, so I quit my school. And which school do you go to? I just, right now, I just like ESL. Oh, ESL, good. I don't have, like, I need to, like, GED, finish GED, but the first time I failed. But now I try again, yes. We should explain a GED is, instead of graduating from high school, it's an equivalency degree.  You take a test and you get your GED, your equivalency. So you get, like, a high school diploma. And also, we should explain what ESL is. It's English as a second language, right? Yes. ESL. Yes, second language. So tell us a little bit about your job. What's it like working in Walmart? And what kind of work do you do there? I work in Delhi, but right now I just got a new position. I am now a manager of Delhi. Congratulations. Thank you so much. So you manage other people and tell them what to do. Yeah, in the department. Great. The Delhi department. The Delhi, the delicatessen. Yes, where you get lunch meat or meat to try. I didn't realize Walmart had that delicatessen. It just opened about maybe a year now. I just got a job about two years ago. This April 14, I worked with them for two years. Congratulations on that. How long have you lived in this country? It's going to be three years and five months. And what brought you to the United States? My husband. Your husband.  He is a Gyanese. Gyanese. Oh my goodness. But he grew up in the United States. Do you know what, before I don't speak English, but I came here, I go to school and take, and he trained me to practice how to pronounce. But I still speak backward. No, you're actually good. You're doing very well. So now your husband is a Gyanese, so English is his first language? Yes. And so I'm assuming he helped you with your... Where did you meet? Do you mind if we ask? Where did you meet? Your husband. A second, please. Where did you meet your husband? It's a long story. You know what? We have time. It's all right. You don't have to answer if it's personal. Okay. I can tell. It's not a big deal. Okay. He has a friend in California. Yes. She always visited Cambodia every year, so he told his friends that he needs a marriage from over there, and she said, like, okay, just give her a time and see. I don't know her too, but she actually know my cousin. Oh. Small world, right?  No? No. Oh, my. So I had the youth to my cousin, and then my cousin told me, now we have the guy in overseas who wants to marry, so she asked me, and I said, okay, let me see. That's interesting. You know, actually I want to be here. Well, that's nice. I mean, so that's... And you've been married now. How many years? I'm going to be... I came over here about, like, 2010, August. Oh. So it's coming up on three years. All right, Ron. You have to tell me August. Okay. Ron, you have to tell me as a woman. When you first saw him, what did you think? I can't imagine seeing my husband for the first time, knowing that I was going to marry him. Oh. It's one more thing. I'm not interesting with him, but I'm an interesting one to be in the United States. Oh. Oops. We won't tell anybody. We're just the world when we post inside. But it sounds like things have worked out. Yes.  Absolutely. And that's... All over the world. And it's good. You're here now. Has he visited Cambodia with you and met your family? Oh, yeah. The first time he came down over there, we just won't be in touch with me. Oh. So you didn't meet him before you came to the United States? Nothing. But after he was like, his friend introduced me with him. We chat, we e-mailed back and forth about six months. Yeah, we had to know each other first. Yeah, and then he said, okay, now everything comes smooth. He said, okay, he's going to come to see me. And so you introduced him to your family. What did your... You have parents? What did they say? Mom and dad? I actually, before I had only mom, I don't have my father. So my mom, she said, okay, up to me because I'm not young. So she left. That's why she said, okay, up to me that I decide. I say, okay, now he come down and want to see my family. And after that, he proposed me, okay, now he want to engage. Wow. Fascinating story. That's a nice one, a nice story. Yeah. So, okay, so tell us a little bit. You're now the manager of the deli section at a Walmart. Really, for people who aren't familiar, it's a very big store that sells like everything. Oh yeah, it sells a lot and a huge store. Yeah. And so, what's a typical day like for you? What do you mean? What kinds of things do you do in your job? I mean, do you mostly manage or do you serve food as well? Do you meet the customers? Yes, yes, so food as well. And we, actually we sell like kind of like, I don't know, because my country, they don't have all stuff like that. Right, the different names of things. They come up with like meat and cheese and we have like some food already cooked. Now, in Fort Lauderdale, do you have a large Cambodian population? Only me. Only you. Only, only probably.  I have one in West Palm Beach. I have one family over there. Last time I just come down here, I went to see them. They say, oh, only that they are family. Oh, that's good. Yeah, but actually I like to, you know, I thought like, I don't know, I always thought like, I'm growing Cambodian language, but now I come to learn English. I have to find people who speak English. Right, to learn English better. Yeah, to learn English better, but sometimes we miss your family or the same native. Yeah, they come, you can practice, but oh, so poor. Yeah, but it's good to practice. You're good. Yeah, it's good to practice, but I, you know what, when I just came, got a job, I don't know English very well. I don't know nothing, but when they called me, I applied by online. Oh, but he helped me to find, put our application by online. Good. Yes, but the first time I failed, maybe three jobs because of my English. Oh, right. I have experience in the store in my country, but you know, it depends, when you move to another country, everything start new, everything over. Yeah. Right, you have to start at the bottom and work out. Well, there's one question I'm interested in. So now your name is spelled R-O-N. Yeah. In that English, right? Ron. Yes. Which is typically, it typically is a male name. Right. And so, I have no idea how to ask my mom. It has to answer, yeah. It's not shortened? Because sometimes they shorten names. Now, the people in my workplace, they call me say Ron, look like my name, but okay, whatever they want to call, they call me Ronny. I said, okay, it's Ron. R-O-N-I. Yes, Ronny, yeah. Yeah, because like, Ronda, people, Ronda is a woman's name and it's often shortened to Ronny or Ron, but people who don't know you, do they assume sometimes that from your name that you're a man and not a woman? Yeah, sometimes they call you want to call Mr. Ron and say, oh, it's not, it's amazing. You know what I love about Iran? I love your love of life. It's really hard. You know what, a good job, you know how I got a job the first time in Walmart, I am a maintenance. Oh, maintenance worker. Yeah, that was a hard one. But I don't, I don't know what is a maintenance mean when they ask me because I got a job, so yes. Because you wanted a job no matter what. Yes, you don't know what how to job, so I said, probably, because you know after I learned probably English, so I can move up. Right. I'm lucky, I said, okay, Ron, right now, want to move the cashier. I said, okay, very well. Right. But I couldn't get for six months. He said, after six months, I can apply for another position. I said, no, and then I have manager, co-manager. He asked me, Ron, want to work with Delhi because Delhi they just open. I'm not smart. I said, yes,


We love mobile phones. Can everybody hear me? The mic's on. Great. Thank you very much for coming out to our late afternoon session on global growth. We have two great panelists. Eric Schmidt, CEO of Google, a chairman of Google. What's your latest title now? Executive chairman and former CEO. Executive chairman and former CEO and a dear friend. And Christopher Pissarides, who teaches macroeconomics at the London School of Economics. One of the big issues that I've been thinking about a lot and wrestling with, and it's really going to be the subject of our talk today, so I was so eager to be able to moderate this, is really what happens as we enter this era of hyperconnectivity and the merger of globalization and the IT revolution continue to gather speed. And what does it actually do to jobs? What does it actually do to job growth? Well, we know the internet on balance is a wonderful job, an innovation creator. But the jobs it tends to destroy have been historically jobs that a lot of people with out high school or high school degrees have been able to do and lead a decent and middle class lifestyle in their respective countries. And that's changing now is a wonderful cover story in the Atlantic this month about basically what's happening to jobs and Profile as a Young Woman actually works in a fuel auto parts factory in South Carolina. And the author Adam Davidson, he relates a joke in this piece. It's about how factories in America today become so automated. He said, in fact, there's a joke in the south that today's average cotton processing factory has just two employees, a man and a dog. The man is there to feed the dog and the dog is there to keep the man away from the machines. And so Christopher, I think I'm going to begin with that question to you. Is that the future of work? It's the future of some work, but not the vast quantity of jobs. Otherwise we would all be unemployed except for dog owners. I mean, there's no doubt that the digital revolution is a revolution in the labor markets as well as everywhere else. It's one of the big technology revolutions that we can see in the history of western civilization and the history of industrialization. We can see that everywhere. All jobs do use the internet somewhere or another. They all use computers whereas the mere 20 years ago a small number were using it. Those are very big changes. And when we're talking about globalization and how the location of jobs has moved the size of companies that produce the goods and services that we have has changed. All this agglomeration of economic activity, this movement across the world, the opening up of countries that were closed before like China, they have used the digital revolution, they have used digitalization a lot to achieve that. Now you might say that I understand is the focus of your question. What does this do to labor markets? Now the first thing that we should say is that it certainly changes the structure of employment. It reallocates jobs to other countries, the new types of jobs come to our countries. That's always been the feature of technological revolutions in the history of industrialization. The first one was in the United Kingdom and when machines were first invented to do the jobs that people used to do, you had the Luddites, for example, who were breaking up the machines because they felt that their jobs were being taken away. That was repeated again in the middle of the 20th century with the new industrial revolutions. I did find, in fact, a famous quote from President John Kennedy who said that if our citizens are clever enough to invent machines that can do the job of men, then surely men are clever enough to invent new types of jobs for them to do. And that's really spot on because what machines are doing and what the digital revolution has done is to destroy many jobs. Think of all those booksellers in the high street, in Main Street, if you prefer American English, think of those travel agencies in Main Street selling they've all gone. They were replaced by new types of jobs and that's precisely what it is. There is a process where we're destroying many jobs because of the new technology they become outdated. We are creating a new type of jobs. Now, the examples I've used are rather small examples within the country, but they're the more obvious ones within single markets. If we look at it as part of the global economy, I would claim that the fact that we lost so many manufacturing jobs in the Western industrial societies to countries like China, it depends a lot on our ability to carry on trade between at the speed that we do and that depends on digitalization without computers, without the internet. I doubt whether we have been able to do that. Collecting all the information, of course the manufacturing jobs are not going to come back to our countries despite what some very prominent people may have said recently, but they're being replaced by other types of jobs that are mainly non-traded services. Of course we do still need to produce traded goods. What are some examples of those? Of the non-traded services. Can we all be hairdressers and barbers and masseuses? No, you're more likely to be nurses if you're American. If you want a decent job. This sector in America that created more jobs than any other in the last 20 years is the health sector. It's the provision of personal services. Again, I would give a big role, in fact, to the digital revolution for that because what the digital revolution has done is to increase productivity and increase earnings a lot in certain kind of sectors. I think of finance as the main one, but there are other sectors even, you know, software companies. Those jobs are jobs where the top incomes have really increased a lot and when you work such long hours, when you get all those big incomes, then you expect better services at the personal level. There are many things that you used to be at home, you know, maybe you got the vacuum cleaner and you weren't around the carpet. If you had time, you don't have time to do that anymore, you have someone to do it. More importantly, you get childcare services for all elderly parents, you hire top-qualified nursing staff to look after them. That creates a lot of jobs. It also creates a kind of segregation or bifurcation, again, translated into American English, of jobs. I think that's inevitable and that's where our governments could help to make all jobs look good and meet the expectations of people, but it's that type of job that is being created now that we've lost the manufacturing jobs. Eric, how do you see this? You've had just a unique perch of having really presided over the emergence of this. How many employees at Google today? More than 30,000. You sort of literally go from zero to 30,000, basically. I mean, from two to 30,000. What have you learned from that experience and what are you learning today from what Google's doing in the world? The story that Chris has been talking about is one that's been going on for hundreds of years. And it's important not to fear technological innovation and revolution. These kinds of changes are what caused us to have clean water, high quality of life, invention of new law, new legal theories and so forth. And it's natural for people to fear such changes, but most of the arguments that I hear are fear-based arguments rather than fact-based arguments. And at Google, we have a pledge we asked in America, the politicians to give, and we asked them to say, in God we trust, and they say, in God we trust, and then we say, everyone else has to bring some data to the conversation. And the fact of the matter is that what the professor has said is not only correct, but it's true in many, many countries. And the fact of the matter is that McKinsey, for example, released a report today that indicated that in 30 emerging countries, roughly the interesting ones that we like to talk about at Davos, there's roughly 3.5 jobs created for every one lost. So the phenomenon that you're talking about, about job creation from technology innovation, is in fact net positive. There's no question that people who are not as educated, not as disciplined, not exposed to the markets as much are affected negatively. This is no different from the loom when it was invented and the impact that it had. And I don't think any of us would want to go and somehow delete the loom from the world. And furthermore, I think if you look over the next decade or two, this rate of technological innovation is not slowing down. In the article that you talked about in the Atlantic and in many other surveys, what's happening, by the way, is that there's an evidence of a resurgence of manufacturing. Now we thought manufacturing and classic economists say that manufacturing is just declining as a percentage in modern Western societies in the same way that the farm has, because it was automated. Well, it turns out that that's true in aggregate, but there's also a huge labor shortage for highly skilled manufacturing people, because it's simply straightforward to use sophisticated machinery tools and so forth. The next generation in manufacturing is called the Maker Society, where we can actually manufacture a product that's distinctly for you and do that with automated tools. So what I would say is that at first I would not fear this and I would understand that there's sociological and societal dislocations from it, but this is how the world gets better. This is how the way the GDP grows. This is ultimately how we leave the world in a better place for our children. Well, let me push back on that a little for the sake of our discussion. No question, this is the history of the world. Technology, whether it's the cotton gin or the steam engine, so planting. If horses could vote, there never would have been cars. We know that. So this is always going on, but the question I want to ask you both is, is this a difference of degree that's a difference in kind? Let me put this example, and will this difference of degree end up actually being the true crisis of capitalism? I live in Bethesda, Maryland, outside of Washington, D.C., 40, 50 miles from Baltimore. The biggest employer in Baltimore 50 years ago was Bethlehem Steel Company. Now, in those days as a male, I could drop out of high school, join the steel union, get a job at the steel plant, earn an average wage, do an average job, buy an average house with an average yard, have an average number of kids, lead an average lifestyle, go to an average baseball game in the summer, and retire on an average pension. Average was... And have 2.2 children. Right, I said, yeah. Average could actually lead to a decent lifestyle. The biggest employer in Baltimore today is Johns Hopkins University Medical Center. They do not let you cut the grass at Johns Hopkins without a BA. And so the real question I'm asking is what you said, Eric, and I... Of course, I share everything you say. This is a net positive. This is good for the world. But it feels like this time. By the way, when you're living through it, it's always different from the guys before. When the buggy went out, they had the same conversation at the pre-davos. Yeah, I'm going to push back on that. There are two things that are different. The first is that one of the histories in the last 100 years has been that time is compressed. If you go back and you look at what's happened, the amount of... And this has a lot to do with information networks. The amount of time that you have to think and anticipate and so forth. And it's true because of the development of radio and the development of television. There are people who've studied this and have said that with each expansion of network and contraction of time, you have a bubble because of the expectations of an opportunism that it creates. So that's one thing. And the second is the true exposure of markets to globalized forces, which was not true until 20 or 30 years ago. And you go back there to the gold standard and the changes that our predecessors put through. Those make the crisis very real and every day. Right. So the bankers used to be able to bank in the morning, play golf, bank in the afternoon. They can't do it anymore. They're just as stressed as the people in the online world because they're in 24-hour businesses. Now, you say, is that a loss of their lifestyle? They can't play as much golf. On the other hand, it draws a different kind of person. Ultimately, I think the policy answer goes back to governments have to do something which is hard. They actually have to do what they say with respect to investing in human capital. All of us, and I suspect all of you who've looked at this, the core argument here is one of education. Investing in education, especially in needed areas. Because that's ultimately the resource that we have before us to solve these problems. There's no other solution. And that's born up by the statistics. The latest Bureau of Labor Department statistics say if you have not graduated from college, unemployment rate in America is 13%. If you've graduated from high school, if you graduate from high school, the unemployment rate is about 8.7%. If you've graduated from high school and have a little post-secondary education, it's 7.1%. And if you have a four-year post-secondary degree in any realm, it's now 4.1%. There are plenty of companies in the United States and some of the other countries I've visited that are very short, highly skilled workers. That's a public policy failure to have anticipated that. To get those people, we can use them, we can hire them. In America, we further don't let them in the country. And if we do educate in the country, we kick them out. Brilliant strategy. Could I come in? You're saying it's a public policy failure. Why isn't it a failure of the private company that hasn't gone to the university and say what kind of training they really want to see? We do this all the time. We do this every day. So why don't universities respond? Well, first of all, as universities are, we are a huge hire of the top people. I was making a more generic point. Graduation rates in most Western countries are 25% to one third of the eligible population that can go to college. This is a huge issue. There are technological solutions, so you have a curious person who didn't go to college. We can now, through YouTube and Facebook and other technologies, get them the information that they need, but they have to be motivated to do that. And there's evidence that people are. Eric, I want to think of giving up this journalism thing and trying to get a job at Google. And so I want to go back to school. I'm really curious from an HR point of view, what is Google looking for in an employee today? Now, besides the normal metric of being a whiz at computing or math or whatever, is there something new from when you graduated from college and got your first engineering job? It's interesting that the people we hire today are, in many ways, more used to working in teams. So we select for that. There are people who are so bizarrely antisocial that even we won't hire them. Even if they're just like this totally genius. And it's sort of a terrible loss to humanity that we can't get them in, but we just can't really quite work with them. But as a general statement, this set of graduates is more socially concerned, more used to working in teams, and that's good, because virtually all the problems that are going to be facing businesses, politicians and so forth going forward, will be solved by teams. There's relatively few loan practitioners these days. What we look for is the kind of creative intelligence that can allow people to solve a new and unanticipated problem. If you look at the sort of literature about education, the best and deepest education occurs when the student can solve a problem in a new way, and the professor, gifted professors can say, and get them to think about, here's another approach, here's another approach. And one of the results of the fact that there's no time in globalization is you're always pivoting. And much of the complaint that I hear from industries is that they are unable to pivot, either because their shareholders won't let them, or their regulators won't let them, or so forth. And I think the reality is that the globalization forces you to confront changes to your business model every day, and unfortunately or fortunately, that's reality. I think people would be just curious, and I want to follow up with a question on Europe for Christopher. What is the hiring process? That is, do I take a test? Do I take a test online, then do I get it in? How does it actually work? We have many, many thousands of applications every day. We used to interview people for days, and we had to put in a pile, we tested the quality of our interviewing, and we initially restricted it to eight interviews, and now we've actually reduced it to five interviews. We found statistically that five interviews were a pretty accurate predictor of higher success or not. We have essentially no turnover once we're hired, so we're sort of stuck with the people, so we need to make the decision right. And we give everybody a test.   A salesperson has to do a sales job. An executive has to write a little essay about what they're going to do. What we don't tell them, by the way, is that at the end we read the essay and then throw it away, because what we're really looking for is critical thinking. Do they understand the problem at hand? Can they articulate what they might do? We're more interested, as I said, in the ability to think of how the problem is going to, because it's going to change again. And the internet in particular presents new opportunities every day. The internet in my time at Google has gone from relatively a static model of information to this much, much more dynamic model around people and the generation of information. They're various statistics, but over a couple of days now we generate as much information on the internet as we did between the Dawn of Man and the year 2000. So the growth rate of the connectedness and what people are doing is a staggering number. And people are wandering around with these phones and phone equivalents generating an enormous number of things that you're interested in. Christopher, in this kind of world, global, driven by the IT revolution, will all the kind of cultural differences get arbitraged out? That is, will Europe produce a Google now very soon? Or this kind of hyper-competitive, hyper-connected capitalism? Do you see it appear in the Middle East, Africa, Asia? Is this going to become universal now? It's becoming a lot more universal than it used to. I mean, it's not going to produce a Google because we already have one. Europe has produced Skype, that's the equivalent you're saying. And I'm astonished sometimes that I visit countries in Europe and they say, you know, we invented such and such. Skype is the only one I can remember right now, but there are others. And it's true, I mean, there are people working in giving new, innovating solutions to problems that were pointed out. That's correct. Now, what I wanted to ask, though, that you said five interviews and you want them to have certain qualifications, but how many of the 30,000 of your employees have gone through that procedure before being hired? Everyone. Except for the two founders. Except for the man and the dog. Well, the two founders got it right. Because that, I mean, that's correct, but at the very top end of the employment distribution I would claim, you know, when you look at the whole spectrum of jobs being paid. We actually, we review every hire in the company and Larry, now CEO and before us, and just his founder role, personally reviews every hire. That's the level of commitment. If you want to build a company that's built on intelligent people of a particular kind, you have to be ruthless with respect to your adoption of processes that will produce such people. There are plenty of other companies that have done this, not just Google, but ours works well for us. One of the frightening things though, you know, when you think about it, if you take Google, Facebook, Twitter, Zynga, LinkedIn, some of the five of the sort of hottest, even Apple to some extent, I think you could probably fit all their employees in the LA Coliseum. But let's not reason from specific examples. Each of the companies that you're describing has generated enormous platform ecosystems of companies. Trillions of dollars of wealth, commerce and so forth are enabled by these scalable network platforms. They've affected, in my view, mostly positively education, financial markets, distribution of media and so forth. So picking the lever point to make the general point is probably not correct. A reasonable expectation is that the access to the internet, this time pressure I'm discussing, the globalization of markets, will in fact produce some very large and strategic companies, but also a very large number of smaller companies, because the barrier to entry for being an entrepreneur and entering a small company is much lower. Mathematically, if you look at this, they tend to follow something which is known as Zipf's Law, which says that you tend to get, because of network concentration, you tend to get a small number of flagship corporations, such as in this industry, and then a very, very large tail of corporations that build and add value in that. And I think that's probably the true of all networked economies. So Christopher, this is the world we're going into. What are the three most important public policy initiatives any government has to think about? Okay, let me backtrack a little bit. In terms of value added, in terms of GDP, wealth creation, there's no doubt that this is correct, that these companies generated enormous wealth much more than we had before the network revolution has done. In terms of actual jobs, they created high-profile jobs, but whichever way you count them, they don't come up even up to 10% of employment in any country. They don't come up to 10% of jobs that we're creating in any country. The large number of jobs that have been created, that jobs that are created, essentially to serve the demands that the people who are at the top end with the incomes have, the kind of services they described before. So you do get this segregation or bifurcation. In fact, you started, I thought you started wanting to ask that question, but you were sidetracked that the average blah blah blah blah, it doesn't exist. And I agree with you entirely that even though you still have the average to some extent, it's certainly not the way it was when you were doing it in Baltimore when you started there a year ago. Now the kind of jobs that we see and hear about are the highly-paid jobs at one and the mass of labor-intensive kind of activities at the other. So coming back to what are the public policy challenges, I think public policy challenge number one is how do you deal with the inequalities that arise in such a system because we know that inequality, and especially increasing inequality of the kind we've seen in industrialised economies in the end, are not popular. They cost politicians votes. They might lead to demonstrations of riots in the street from the lower-paid people against wealth. They have occupied Wall Street. I think that's the biggest challenge that we're facing, that public policy is facing now. And I leave the other two challenges to you to come up with. Eric, what would be your list? What would you like to see, particularly this election year, but what are the key policy initiatives if you could wave a magic wand in America you'd like to see? Well, each country is different. In the United States, eight or nine percent of the employment was tied to this incredibly inexpensive credit boom which caused overbuilding in both commercial and residential markets. The problem of the private housing market and the collapse there is not a solved problem. I've always assumed that if enough smart people get in the room and argue it out, we could come up with a system which was a shared-paying model. So I agree with the professor that the aggregate employment is not high-tech. High-tech is somewhere between three and five percent by most of the numbers, so that's roughly correct. So the 95 percent are in more traditional industries, but they can be served by innovation as well. So let's hear a new way to solve that problem. In Europe, the issues, as we all know, have to do with have more flexible labor markets, structural reforms, and so forth, which are the core topic of Davos. It's important to remember when I first started coming to Davos almost 20 years ago, there was a perception that there was going to be a permanent 20 percent unemployment level, because France at the time was 13, and heading up, this is in the early to mid-90s, because the system was so rigid and then of course the changes occurred with the euro and now we're facing a similar set of concerns in the southern part of Europe. Ultimately the answer is that governments need to get their act together with respect to supporting the parts of their economy that create jobs. Jobs are created, at least in America, by two groups. Export-oriented large multinationals and small businesses. The export-oriented multinationals tend to have a global footprint, they benefit from globalization, they benefit from scale. This is true by the way in Europe as well. Small businesses benefit from specialization, and there's no better tool for a small business to use than to use the internet to find that market, to find that market and reach their customers, because it's so inexpensive to do one now. We have a few minutes. I want to open it up to the audience for questions. There are some people with microphones that will be circulating, and if you would raise your hand if you'd like the microphone. Our mics are in the rows here, and identify yourself. The lights have gone up. And do we have any takers? There's a question over there. One there, and then one here. Thank you. Right down here. God, I trust, but where did the statistic about 3.5 jobs created for everyone lost come from? It's a McKinsey report released today. You can read the report on the McKinsey.com website. Thank you. You get another question that was so short. It's like the White House. We got a question up right up here on the front row. And somebody back there? Was there somebody over here? I'm sorry. It's a little bright. Back there, we've got some too. So we'll just let you move around. All right. Drew from Dropbox. My question is, what do we do when we have all these BAs and people with advanced degrees who learn about all this stuff but then are confined to cutting grass or different things that maybe don't exercise what they might not feel like it exercises their potential? What do you do with the kind of, what kinds of cultural issues arise from this? I'm sorry. So which PhDs and which subjects? Just asking in general, what happens when you have all these kids. Are you talking about the present now? Are you describing the present? In the future. Why do you assume that's the future? I'm sure. Let me just use your example of the BA cutting grass. I mean the question is, to paraphrase slightly, but I think what is that, now that the structure of employment is changing so rapidly, you have many BAs coming out of university or other certain kind of training that may have been well suited to the employment that we had five or ten years ago but not anymore and there might be disappointment in their expectations. The only solution to that that I would suggest actually is that universities themselves and schools when training they should mold the expectations of their students in such a way that they would be more flexible to face the new realities that we have with globalization. I mean there's no point in the university saying I'm going to teach you this kind of skill and make sure you do it because if you don't it's the fault of those big companies that go off and do other things. I mean universities are there to serve the companies in the sense of giving them solutions of where to go next given the possibilities and constraints that the global economy is giving you. So there shouldn't be any expectations. There should be people thinking that what they are learning is more of a springboard to jump into new types of jobs and enhance their learning in other ways and move forward. And good universities should be doing that. Does that mean should we get rid of the tenure system? For professors? Yeah. Of course not. There's a couple more. A couple over here and there's a cover there. If you see a hand just give them the mic. Hi, thanks very much. Peter Goodman of the Huffington Post. I just want to ask isn't the job retraining argument really just a red herring for lack of progressive taxation I mean particularly in the United States where you could take all of the people who have officially been unemployed for six months or longer and you could magically send them to associate degree programs a lot of those people are never going to get jobs they're not going to get jobs in five years, ten years whereas if you were to address the inequality which you've already addressed in this conversation but address it in an active way and move some of the money around you'd probably create underlying demand that would generate jobs even for people of lower skills. What am I missing? Can I ask you so what you're asking because there is this interesting argument there really is no structural jobs problem it's an aggregate demand problem. There's clearly some people or there are some companies always throughout the history of capitalism who can't find enough high skilled people for the jobs at any given moment but that's not the big picture according to the data and so I'm wondering whether we're just missing the real question which is if we had a taxation structure so we didn't have all this capital that is the result of highly successful wealth creating companies like Google concentrated in too few hands there'd be more consumer power and there'd be more employment, is that wrong? I think you're picking one part of a very complex political argument if I were to follow that argument then the US has a trillion dollar deficit every year which the politicians argue over who gets that they're spending money that they don't have why is that number not two trillion just give the one trillion to the group that you're describing to have them create aggregate demand if you follow the reasoning to me the question without the context is sort of not really well formed there is a problem of demand demand comes from a set of factors including confidence a feeling that my money that I invest in the bank will be secure that my currency is strong and so forth there is not agreement even between for example Europeans in the United States over whether a policy of massive massive stimulation of the economy which might result in inflation at some point in the future is desirable over the contraction that Europe seems to have sort of self done if you will by virtue of its processes in the last few months I don't think you can answer the question you're asking without looking at all those other variables at the end of the day the productivity of the world comes from automating and investing and dealing new products and new services and that's how the lot of the humanity improves so for every job that was sort of lost in manual work replaced by an automated job with somebody operating it their quality if you go to Hawaii they become a tourist industry and they replace pineapple picking jobs well the pineapple picking jobs were much harder than working in the tourism industry and the wages are higher too so there's an example after that I don't think it's just about wealth and concentration and so forth let's go over to this side of the room if we can but please yeah yeah hi it's following on from this line of conversation particularly for Eric Schmidt but I'd like to hear from the other panelists as well we know that there is a growing jobs crisis we're hearing more and more leaders talk about unemployment but we know there's not a work crisis in the sense there's still loads of work to be done and so what's just happened is there's a shrinkage in the amount of money in the economy for people to be working for each other so I was wondering in that context and in the context where governments, some governments don't want to go further into debt could Google create a currency to get the world back to work I think that currency is information I think it's up to you as to how you use that use that information our part in helping is we believe and we're very proud of the many many many businesses that are enabled by the advertising platform that we power and I'm sure other tech companies would say the same thing whoever's got the hand up just feel free to go ahead please yeah can you identify yourself just nice to know who's out there Ron Freeman Atlantic Council Washington DC I wonder if Google database of candidates who have been turned down for a job by Google could be the source of information fed back into the education system about what we need to do more we have pretty strict privacy policies and I would certainly not want to violate the privacy of any of those people not intended but we do in fact talk to our suppliers if you will our human suppliers about the kinds of people we need I was trying to make a more this is not a converse about Google recruiting the way we solve the problems in our society is by having more educated people who don't react with foolishness and lack of data and without analytical thinking the way wars happen is people get upset and they start shooting each other rather than reasoning and conversation it's actually really understand are the universities of the world in particular the leading universities that we source from have done an enormous gift to give us people who can engage in this kind of abstract reasoning and thinking the thing that separates us from for example the middle ages is the development of that and so forth there is some evidence for example in economic theory that there is a sort of a trap that many countries get to it's called the middle income trap and that above that those countries have to have developed the kind of extraordinarily sophisticated governance and educational systems that are exemplified by some of the very fine countries here in Europe, United States and a number in Asia it's dangerous actually to think of someone applying for a job and not getting it that he or she is a failure first of all for each job that is advertised at all levels in the market there are many many more applications people applied to many jobs and that in fact if I might say is the foundation of what's known as the theory of matching in labor markets which was at the beginning I mean people have different kinds of skills which might be differentiated horizontally you might say it's not that one person is better than another but one person is more suited to one type of job than another it doesn't mean that the school or the university has trained the one who succeeded to get a job at Google and the other one that either Google or the person herself decided that they are better suited to some other job and applying some other job it doesn't mean that one is say the university has made a success of one of them and they failure of another it's very very difficult to identify failures in labor markets and since we're talking about jobs what's striking to me is that the jobless problem for whatever we want to call it and this explosion in young people is a problem that's throughout the world so we talk about it in an American context or European context but virtually every government is dealing with this and we should study from some of the success models in particular the German model which did very hard work and people forget that Germany roughly five years ago actually in an agreement with the labor unions lowered wage rates to make things more competitive decided to increase their investment in they have a technical set of training programs for technicians that have produced enormously productive workers who are not suited or choose not to go to college and they took a national identity around becoming an export manufacturer for some categories of exports it's worked remarkably for them so there's every reason to believe that if the political leadership the business leadership in a country deals with this they can do it one way the thing about it is that the disconnect that you're hearing is that the national politicians want to rule the nation hopefully in a democracy but they're being affected by globalization and globalization keeps winning against their theory if globalization didn't occur in our little country say the three of us we could just say well they're the best we have everything we have everything we need but globalization gives you a metric it keeps you competitive it gives you more information but the sum of globalization is the world is better off and for all the people who are globalization critics and I assume almost everybody here agrees that globalization is wonderful the fact that globalization has brought a couple billion people from absolute poverty to what we would define as a lower middle class to middle class existence and what they would argue as a middle class existence to an upper middle class existence is a huge a huge accomplishment in our lifetimes before we close you've just come from Tunisia and Libya and we have a lot of people here from the Middle East and talking about the Arab Spring all of these post Arab awakening societies we now have huge youth unemployment 25 30 40 percent where do countries like that do you think start to tackle this problem what I particularly like about your question is the answer is it's not America's fault okay it's not Europe's fault and all my and there's this tendency for the western world in particular America to say well let's go in we want to fix it and so forth and so on the wonderful thing that's going on in the Arab world is the conversation is within the citizens of the country now the challenge is I was in Libya for a few days and imagine a situation where you had a terrible dictator who imprisoned people and tortured people and so forth and so on you had a civil war you had 85 percent of the people in the country work for essentially one company in the civil industry there's not a lot of local competition they don't trust the judges so they push them to the side they don't trust the police so they push them to the side there's 80 militias running around inside the country it was a leaderless revolution with a transition council and they're trying to decide right now what their constitution looks like oh and I forgot everyone I spoke with owned a gun the great thing about that scenario is you're the nicest people in the world every one of them welcoming friendly I cannot say enough nice things and we should help them the way we help them is let them work on their own problems and help them understand what the best of governance the best strategic approaches and so forth I was going to say and especially with you since you really are an expert and I'm just a tourist in this stuff if you have an opportunity to build a country that's much today because of a bad dictator who was exiled or killed or what have you I think you would conclude that one of the components of your constitution is you would write in a statement about the importance of having an uncensored internet and here's why if your citizens are connected together and if you have a rule for example let's say we have a rule most of these countries have the biggest problem is in fact corruption politicians as part of running have to disclose their assets you know the houses and cars and horses and so forth and so on and furthermore that citizens can keep their eye on the real number and that it's a crime to mislead that you might discover that half the politicians aren't running anymore but the politicians that you get are the ones that are really committed to serving the leaders another thing that you might discover as long as you have a ballot box in fact communicate with each other and discover that their government has gone awry the thing I learned the most about the Arab Spring was that we take the internet for granted here and all of us live in certainly the majority of people here in Davos live in worlds which are not heavily censored when you live in a country where censorship is the norm and you assume the phones are tapped the televisions are completely censored the radios are completely censored and everybody's kind of afraid to say stuff but the internet is your only communications mechanism it's fundamental to your political expression I think we should just to go on we should celebrate the rise of these Arab democracies as democracy moves throughout the globe terrific Chris do you want to say anything in closing just to sum up your thoughts I agree entirely with the big pictures now the smaller picture of how do you deal with mass unemployment in these countries I would begin by completely liberalizing their labour markets and telling everyone that public sector employment has ended because what has really helped these North African and Middle Eastern countries down is that the public sector has always offered the best jobs they're all queuing to get into the public sector that should end just liberalize the labour markets find what you are best at doing and do it and export to Europe or even Africa itself as well that's what they should begin with the job this is a great discussion if I don't close it I will lose my job so thank you all for coming out and thank the two of you thank you Chris


So Ember's birthday was the other day and she got her USB microscope and she learned an important lesson Whenever you get a new piece of hardware for your computer and you open the box and it comes with a CD that has software on there What's the first thing you do? Yeah, throw that software in the garbage because it's crack Anyway, she has been playing with her microscope and she has been loving it and I just wanted to I know I already did a video on it, but I want to do a follow-up video because there were a few things that I quickly mentioned But I want to go over a little more in detail So let's go ahead and jump in and have a look at this So we're real quick to review you can use any webcam software you can use cheese or was it GUCV viewer or something along those lines or I prefer MPV for almost all my media stuff And for that you have to type MPV AV for audio video using video for Linux 2 That's for that's drivers for video inputs on Linux And then you have your device which in my case is video zero because it's the only webcam I have if you have more than one webcam the number might change at the end depending on which number the webcam is I'll go ahead and hit enter and there we go. Don't worry. We won't be looking at my nose again today But here this is my jeans my blue jeans that I'm wearing these are the threads so That's simple enough, but that's kind of a lot to remember of course. It's in your history So it's easy to search through your your bash or whatever shell you use history But of course it'd be easier if you alias it so for example, I could be like alias I call it scope equals and then I can say this We'll just take that command and paste it in there And then at any point after that I can type in scope and it runs that command for me and again Here's my denim jeans. Here is the fabric on my t-shirt great And all you have to do is take this line right here alias scope or whatever you want to call it and put it in Your RC file for bash or be dot bash RC for Z shell It's Z dot Z shell RC or both of them you could use dot Bash or Z shell RC dot local depending on how your your system set up and then anytime you start your shell Now then all you have to do is type scope. I took it a step further for ember though because let's go ahead and run scope again is At any point so like I'm here looking at my denim if I hit s it takes a screenshot and saves it to your current directory Well, we want all her photos taken in one spot. So let me go here. So now This screen here is on embers computer So now I actually wrote her a little script. I'm a user local bin and I called it scope I have a pseudo into it and oh my password does not work. I have to type in her password There we go. So what I actually do here is I set a directory in the home directory called scope So we're saying that as a variable and then I am every time the script runs it if that's I'm not checking if that Directory exists, but I'm trying to create it. It'd be better if I checked if you want to be technical about it But it tries to create that directory and then moves into it and then it starts our MPV command And I also added this dash dash FS so it starts full screen for her And then when it's done when she quits out of MPV by hitting Q She then starts up Thunar, which is her file browser. Really I could replace this with Xdg dash open which would open up and then I think we could do dot or whatever director I actually probably best if I said Durr and that would open it up with ever her default File browsers that'd be a better way to do it, but this is not gonna go anywhere other than her computer So what happens then is since it's creating that directory moving into it every time she takes screenshot by hitting s on the Keyboard it saves that and then it opens up that file browser to view those when she's done So that's what I wrote up for her So real quick, let's look at some Still shots that ember and I took of an ant so the like I said the Camera the microscope came a little cap So you can put things in there and she caught an ant and she put it in there It took us a while for the ant to stop moving and get it in the right spot But we got some good shots and we did let the ant go afterwards and he ran off For those of you who are concerned about the ant. Let's go ahead and look at some of those still shots One of my concerns That I was hoping to achieve is on the microscope here Everything works out of box except for there's two red buttons one on each side one says zoom and one says snap I assume the zoom was for a digital zoom because you zoom with the with the big knob here So I assume and the software came with the zoom button would zoom and the snap would take a snapshot now We just went over with MPV how to take a snapshot like I said with cheese and most other webcam applications There might be a button with MPV you press S So I was hoping to be able to map these buttons to be able to do that So let's go ahead and have a look on how you might go about doing that If you go under your dev folder and then input so dev is where all your devices are so All the hardware on your computer is listed here as files input would be input So I was hoping that not only would this Microscope show up as a webcam a video input But it would show up as a hidden device a master keyboard device For example, you you might have multiple hidden devices keyboard like devices that aren't necessarily keyboards for example I have a USB headset here that have controls for volume play and pause and they show up as A hidden device as a keyboard and they send the same keys as the media keys on my keyboard with but they show up as a Completely different keyboard so under inputs if I list here You can see that we have a bunch of events which most of these are going to be some sort of key keyboard input And then we have some mouse events So for example, if I was to pseudo cat and to cat out the wrong formation from this you need either you need to have Permissions and so I'm just gonna pseudo cat and mouse one should be my main mouse here So I did that and you don't see anything But if I start moving my mouse left and right you can see or up and down it starts printing out raw data and There's not much we can do with this here I actually have plans on doing a whole a couple of videos a series on Input devices enabling them disabling them remapping them using both Python and bash scripts But here's just a quick overview So that's that was that but how do you know which devices which because it's like I can assume that if I just plugged in The camera, it's gonna be the last one probably this one here But how do I know for sure? Well, you notice there's two folders in here by path and by ID Let's go ahead and go inside the by ID folder and we list things out now We get the devices based on their name. You can see I have some Logitech keyboards and mouse events and then My microphone My headset and then this one right here again I only have one camera hooked up to my computer so we can know this is it So what I can do now is theoretically so just like before I should be able to Cat out pseudo cat this and that would be yeah my mouse. So I move my mouse. I get that if I list out now and I cat out again pseudo cat This device and And I hit enter you would think that I would be able to press those buttons and get information Unfortunately, I'm not So now it's gone beyond my skills if it's not getting the raw data when those buttons are pressed And I have the correct device selected and that is that is the correct device because watch if I unplug the camera now It lost connection and if I list things out that device is no longer there If I plug it back in and list the devices out you can see it shows up again So that's the correct device for the camera But it's not seeing the button presses unfortunately. It's not the end of the world again My daughter just you know holds the camera with one hand and presses s on the keyboard to take a screenshot It would be nice to be able to click that little red button, but What can you do? So so far that's the only thing but in many many cases You would be able to access the device that way another way you can test things out is XEV and that opens this up. So now like if I move my mouse over here, you can see in the shell I'm getting output if I click it tells me what button. I'm clicking and Now that I'm in that window I should theoretically if this was showing up as a keyboard or mouse I should be able to click these buttons and something would show up and it doesn't if I take my USB headset and I click the Volume up button you can see that it detects it over there And it gives you information on on what that button is it's being pressed and at that point you can use that to remap it to a script or Or what not some sort of command, but right now the camera isn't showing anything So although it's detecting it as an input device It's just not set up through my Linux kernel through the modules to recognize those key presses unfortunately again very minor Again s will take a screenshot on the keyboard So but s is taking a screenshot now the other side I said a zoom we already zoom in and out Let me go ahead and type scope Full screen there You zoom in and out by turning the big silver knob on The the camera itself so like so and I can zoom out by turning that I assume the zoom I would zoom I would assume the zoom button was for a digital zoom which you can still do An MPV to zoom out its alt minus to zoom in its alt plus So really most keyboards would be all shift plus and again This is a digital zoom so more you zoom in just the more pixelated it's going to be but for some reason You wanted to you can hit alt shift the plus sign or all plus sign if you Depending on your keyboards map, but normally the plus key is the equals key So to get the plus you have to do shift so it's all shift plus which is a little awkward And I don't know if my daughter would be able to do that with her little hands But I don't I'm not a big fan of digital zoom in general anyway Just take the screenshot and zoom in after Because digital zoom is just losing quality But if you want to you do that and if we were able to get a signal from these buttons on the camera We would have been able to remap them to that but That's not happening Try I think if there anything else I want to go over that's pretty much it Again, just a little follow-up to a previous video talking about some things I mentioned that I want to go more into detail about so Thank you for watching and as always please visit my website films by Chris calm That's Chris the K there's a link in the description and as always I hope that you have a great


This Adiyogi statue is in the process of getting ready. The idea is not to build Adiyogi fan club. The idea is to bring back spiritual process as a science, not as a philosophy, not as a belief system, not as a religion, but as a science. As there is a science and technology for external well-being, there is a science and technology for inner well-being. Did Adiyogi look like that? That's not the point. Is he an inspiration for you to turn inward? That's all the point. 112 because he offered 112 ways in which a human being can attain to his ultimate way. 112 ways, 112 chakras which manifest in the physical body. To make subjective sciences part of everybody's life, that yoga is not an instruction. It is something that you live with. This has to become part of the world because in search of human well-being, we've done all kinds of insane things on this planet. But human well-being is one thing that's not happened. Everything else has happened because if well-being is what you seek, in is the only way out. There is no other way.


They're monitoring the marketplace. They want to see if there's a star player that's available that they would go all in for. They have eight first-run draft picks that they can trade Michelle for their own, for from other teams. So they've kept a lot of their assets. They have a ton of tradable contracts as well. They have a couple of young players. We think of guys like Quentin Grimes, Emmanuel Quickly. So they've got pieces. If they want to go make an aggressive bid for a superstar player, I think they have what it takes. The question is, do they find the guy out there that they would want to do it for? Would you put all your chips in the middle?  Like, to what capacity do they go all in for? I think these are all questions that they have to answer, but I think they're keeping an open mind with the marketplace, and I think they are monitoring which star they want to go all in for.


Greetings and welcome to the Introduction to Astronomy. In this week's special topic in astronomy, we are going to talk about the celestial sphere and how that can be used in astronomy. So what is the celestial sphere? Well, the celestial sphere is an apparent sphere around Earth which contains the celestial objects. Which that means is that it's a geocentric construction. So Earth is at the center, and we see everything in the sky as attached to this great celestial sphere and moves around it. So it looks like the celestial sphere rotates causing objects to rise in the east and set in the west. Whereas in reality we know of course that it is the Earth doing the rotating, and that is what causes things to rise and set. However, for the purposes of observations from Earth this is very convenient and a great way to be able to locate objects in the sky. So when we look at the celestial sphere we see a number of different points including the zenith, which is the point straight overhead. So the zenith is here, is wherever you are located, if you look straight up that is what you will see. So an object straight overhead is said to be at your zenith. Your horizon is right around the edge and we see the horizon down here in the pink circle here. That is the horizon so for a person standing at this location that would be the edge of what they could see. Anything below that would be invisible to them being blocked by the Earth. So they would not be able to see objects down below the Earth would be blocking them, the Earth would be in their way. Now we also have things like the poles and the equator. These are related to similar objects on Earth. So the celestial pole, let's look at the north celestial pole here is really just the extension of Earth's north pole out to the sky and that is where it intersects the sky. That would be the north celestial pole. It happens to be close to the star Polaris. The celestial equator is the blue line here which would again just be the Earth's equator. Imagine that stretched out to the sky and that would then give us the celestial equator on the sky. Now the celestial equator, much like Earth's equator divides the sphere into two parts, into two hemispheres. The northern hemisphere in the sky and the southern hemisphere in the sky just as the equator on Earth divides Earth into a northern and southern hemisphere. So let's look at a couple of other terms here. First of all let's look at the ecliptic. Now the ecliptic shown here in the pink is the path of the Sun in the sky. Now we know it is the Earth that is actually doing the moving but from our perspective here on Earth it looks like the Sun is moving and we would watch the Sun follow this path over the course of the year and you would see it in March it would be located here and then in June it would be over in this direction in September over here and then in December. So we can see that the Sun will change its path. This will also affect how high the Sun appears in the sky. So during the summer time here the Sun is well above the celestial equator and will be very high in the sky. In the winter time the Sun is far below the celestial equator and will be very low in the sky at noon time. Now the points where it intersects are what we call the equinoxes and we have the spring equinox that occurs here in March and the fall equinox that occurs in September. So as the Sun moves along this path it will appear higher or lower in the sky because of this tilt. Now that tilt is the 23.5 degree tilt of Earth's axis and that is what causes the seasons to occur. Now the last term I want to mention here is the meridian. The meridian is the line going from the north pole through the zenith and straight down over. So it goes straight around the edges here and that would show us where the Sun is at its highest point. So an object would rise in the east would reach its highest point when it reaches the meridian which is due south and then would reach its lowest point as it sets in the west. So the meridian for the Sun when the Sun crosses the meridian that is when it is at its highest point in the sky. So let's go ahead and finish up with our summary and what we've looked at for the celestial equator is that it is an imaginary sphere around Earth that seems to carry the celestial objects. It is really an extension of locations on Earth into the sky and we looked at some of the different locations on the celestial sphere and have discussed those. So that concludes this special topic on the celestial sphere. We'll be back again next week for another special topic in astronomy. So until then, have a great day everyone and I will see you in class.


Are you curious about maker spaces and what they are and why they're so important in municipalities like Longmont? More specifically, are you curious about Longmont Public Media, Longmont's newest maker space and all of the opportunities it presents to you and everybody in this community? If you are, join me 6 p.m. Monday, September 26 in the Longmont Public Studios in beautiful downtown Longmont where the panel of experts, the staff from Longmont Public Media will cover everything there is to know about LPM from soup to nuts. Join us 6 p.m. in the Longmont Public Media Studios, September 26.


I am Matteo Collina at Matteo Collina on Twitter. So please follow me just so that you know. And I'm trying to hit 10,000 followers by the end of the year, so please help me to reach that milestone. So I'm here today to talk about Node.js streams and the future of Node streams and how you can help or maybe what you can provide feedback on. So a couple of things first. I work for a company called NearForm. We have a nice booth in the booth crawl. We are also doing some raffle thing with some smart watches and AirPods, so come by. We've donated some money out of the auto-acharity after the booth, after that. So please come by, swing by, it would be interesting. So we are a professional services company that do all things JavaScript. So if you have some problems with your JavaScript and you need some help, and your team needs some help, please pass by. We have a lot of things to talk about, so probably worthwhile, a bigger conversation. So let's go into streams. How many of you have used Node streams? How many of you have liked Node streams? OK, a few maybe. I mean, do a few understand Node streams? OK, I'm not sure I trust you. So a stream is like an array, but over time. Essentially, instead of having a big chunk of data and of memory which we're rating upon, you're receiving data along the way, and you're processing them over time. This is fantastic because it enables us to crunch an insanely high amount of data with a limited amount of memory, which is fantastic. That's why we are using them for file processing and a lot of other things. So they are a key part. The problem is that Node streams are really complicated. And most people don't really understand Node streams at all, like even some Node core contributors struggle a little bit into when it comes to reviewing those Cree's PPRs. It's a really complicated code base that evolved a lot over time. And that's it. In fact, it emits a number of events. So Node streams are based on event emitter emitter, and they emit a lot of events. You can have the data event you probably have used. You have used that it's a readable event, which probably you haven't used much because that's not very popular. There is close. There is some meaning. There's end. There's some other meaning, different from close, by the way. There is finish, which close and finish. They kind of mean the same thing. I know they're three completely different, three completely different meaning on streams. And then there is destroy to turn the full thing down. And I have not mentioned error because you probably have known that emitting every node is a really big thing. So there is also that to take into consideration. Just to recap, data and readable are for reading data. And the close and finish are emitted when streams are ending to some extent. The meaning of end, it's on the readable side. The meaning of finish on the writable side. So when a readable stream is done or the writable stream is done successfully, successfully only. So if there's an error or an abrupt operation that's not emitted, close is emitted when the underlying resource is brought down. And it will be emitted also in the case of errors. So once upon a time, the only way to interact with a stream was by using the data on data event. You will find a lot of these examples everywhere. These I call these the wild horse example. Because essentially you are receiving as much data as fast as the source can provide you. Which turns out to be a very bad idea because you cannot really, you know, it's really hard to pose the source. To some extent, enter the A please, low down, because this is too much data. I don't know what to do with that here. Also taking into account that this is posted the source of one of the worst bugs ever. So if you put a sink here, you are making a lot of popcorn, so don't put a sink there. James has a talk tomorrow about broken promises. Go to his broken promises talk because it's a really good talk to go. And the pressure with that on data model is really hard because how do you stop? There's a pose method on streams. But pose is only advisory. So what? So at some point, it was introduced in another API called the readable event to actually provide a pool based model. So instead of having these five rows of data, OK, let me just call you and notify me when there is data available, and then let me read that data from you. So instead of a five rows of information is more a pool model. So streams can have a push model and a pool model implemented in the same code base. Does that sound? That's horrible to maintain. But this is actually probably the best way to interact with a stream because you actually can pull data from it. So you use the internal buffer in the most optimal way. Still, again, this is not really readable, to be honest. It's also more performant because in this way, you only read the data that you need. So it's a little bit more gentle in the buffering of the streams. Error handling is still super complex, though, on streams. And it's probably one of the source number one of memory leaks and file descriptor leaks. File descriptor leaks are really fun to diagnose. So this is how to not stream a file over HTTP. Don't do this. OK, how many of you have done this? OK, a few people. Don't do this at all. These will create a memory leak. Immediately. Why? Can you see? Why can this create a memory leak? Can't you see it? It's super obvious, right? It's such a simple API of what can write bad here. Anyway, so if you look at this, you see this pipe press. So if the response errors or quits and the other side close the connection, the read stream is not closed or teared down or destroyed. So it stays alive and stays alive forever because then there is nobody to consume that stream. And that's a big problem. So essentially, if in your code are using pipe without having some special error handling magic, you probably have a memory leak somewhere in your application. So don't use dot pipe. What you need to use is pipeline, which is a new operator that we have added in Nodecore, I think, 10 or something, or 8, maybe even 8. I don't know. 10. Anyway, it's available as an open source model under the name pump. And it's also released inside the readable stream module. Anyway, there is pipeline. And pipeline is actually really cool because it actually teared down the streams. So if one of those errors, it closed all the others. So basically, it makes sure that there's no memory leaks and no leaks of any sort. So please use pipeline. Don't use pipe. You might want to ask, why can't you change the behavior of pipe to actually do the right thing? Well, backward compatibility. We cannot break everybody. There's a lot of code that relies on that behavior out there. So we can't really change that. That's bad. You can also use a framework, by the way, to serve files. Probably the best option is actually to use a framework because there are a bunch of things to be done. So don't serve manually. You just use a framework. It will do it for you. It will do the right thing, actually. So use a framework. Note that all the best features of Node.js are based on streams. So as good as best that it sounds, it's an aging code base that has a lot of history. And all Node.js depends on this. FS depends on this. HTTP depends on this. HTTP, too, of course.  So standard input and standard output depend on these things. So it's really important to understand and evolve this code base in the best way without breaking everybody, because there will be biggest problem with developing Node Stream in Node Core, and somebody of you who is a Node Core collaborator, you can probably ask, probably ask. We'll tell you, if you touch those, you can really break everybody. So don't break everybody. There is a one big problem, though. Because the JavaScript community uses a sync await everywhere now. How many of you use a sync await? Good, everybody. Is there somebody that do not use any sync await at all? We can probably have a beer afterwards, right? Anyway, so everybody has moved to a sync await. The biggest problem with streams and a sync await is that the two things do not really mix well together. And if you try to do that, you probably have seen some new promise. And then doing some shenanigans to get actually the thing to do what you want to do. I don't know. You probably, somebody is nodding. I hope, I'm eating some nerves here. But how to do it is not clear. It's not easy. And it's not straightforward. So essentially, we are not doing a good way of serving you folks as node core contributors into this. By the way, I'm part of the team that maintains the node streams, so also node core collaborator and TSC member. Anyway, so we cannot really change the things that are already there without breaking everybody. Because everybody depends on these things. So for example, we cannot really change how the streams work because then it will break whatever web framework that you are using. Those used streams. Or you can change them if you break some of the file processing that you do. So we can do some surgical changes, but we can't really do much. So then the question comes, how can you improve the usability of this? Usability of streams, considering the fact that people love a sync await. So the number one mistake that people do with streams is on data sync. Don't do that right now. I'm working on a fix. Go to this. But I'm working on a fix. I did a PR to help with that, but to actually provide some safety net. But the net result would be, you will have a memory leak if you try to do that, and you have a memory leak. So the thing that I've been working on for the last few years has been to provide a sync iterator support on streams. How many of you knows about a sync iterator? Hey! Fantastic, guys. They're the best feature that has been put inside one of the recent versions of Node. They came into Node inside Node 10. So they're basically after December, by the way, Node 8 goes out of maintenance at the 31st of December this year. So stop using Node 8. So since January 1st, all supported version of Node.js will have a sync iterator sync, which is fantastic. So we can use them everywhere, depending on whichever Node version we are using. How does this look like?  So first one up is you can have a sync generator. This is actually a very specific way to write a function that can spit out things that you can iterate on, like this, with for a weight. And you pass an iterator. Now, what you probably don't know is that there is a full protocol under that thing to power that. So you can write your own sync iterators without using the function syntax, for example.  So if you want to use for off on an object, on any object, you can actually provide that type of capability. Because there is a protocol. So your object need to implement certain methods to do things. So this is pretty interesting. Can we use this with streams? Well, maybe. When this was being standardized, we were working with TC39 to actually validate that we could actually use them with streams. And we could. So things are compatible. And compatible right now. So you can use this code right now. So you don't need to write any, turn on any flag and so on. This code is just works. So you can create your stream, and then you can for a weight and iterate over that stream. Pretty cool, right? And you can just process those chunks. And that's it. And when the for loop ends, it ends. Hey. I don't need to use any crazy events. I don't need to do any shenanigans. I don't need to do anything crazy. I just can't just do my thing and be done with it. And note that if I use break from my for loop, it just tears down the streams automatically. Again, I don't have to do anything about it. So it just end of the very 80% basic use cases that you need and use the other APIs as low level components. Also in node 12, but also node 10 now. These are shipped on node 10 as well. I need to update these slides. In node 10, in all version of node, but it was just recently ported to node 12, so like the last release of node 10, we have added readable dot from, which essentially you can pass an iterator or an async iterator to readable dot from. And it will automatically convert you to a stream, which is pretty fantastic. So you don't have to do anything now. I can just use this to convert to a function or an object or an array to a stream. So it simplifies a lot of testing, for example, because you need to test your streams. I hope all of you write unit tests. If you don't write unit tests, go start writing unit tests. So you can then use pipeline, always use pipeline. Now, you can also go and write some crazy concept of inception. So you can start with an async generator on function, converting to a stream, and then iterate over the stream.  One of the key concept of streams is data buffering. In order to stream, in order to be perform, I need to will buffer data. And so your async generator will get cold a little bit more up to fill the stream's buffer. So it has a slightly different behavior than these will be ever slightly different behavior that are normal if you just iterate over the async generator. Steel is doable, and you can use these things to actually level the field up. It's pretty nice, because then you can just accept a parameter if it's async iterable and just async iterate over that. And you can use a pass-in async iterator or any other objects that implement that protocol. And your code will actually be the same. So it's pretty powerful. It's pretty powerful. OK, so it's demo time. So hopefully the demo gods will be with me, because that's an important piece. So I have seven examples. I'm not sure if I can go through all of them. We'll see. So this is the first example. So this is old school streams.  This is how you would do implement these things a long time ago.  Now this was how you would do this thing. I changed this, and this will not run on Node 6. In Node 6, this won't work. By the way, we have fixed some stuff. Node 6, this won't work, whatever. Don't try that on Node 6. Of course, that is long gone, so we don't have to worry about it anymore. So now let's go and look at another version of the same code. So this is just using readable from. Now that we still use onData to process the data, however, in this case, we just pass the array through and we just get a stream back. This is really powerful for testing, for example, because in this way, we can be compatible and so on without breaking a sweat. So we can run this code, and you will still see, you can still work the exact same. Now, what you can do is you can also go into the fully inception mode to some extent, and you can pass in a generator, a generator function. Note that this is all synchronous. A generator is synchronous. A sync generator is asynchronous. It says in the name, but anyway, you can do this and you can still run it, and you still get the exact same output as before, but now you're generating it from a function instead. This is pretty useful, again. We can, of course, use those with, we can go from an iterator to an async iterator using this API. So we can pass, we have our generator here, we pass it to readable from, and then we async iterate over it. Why? Because it's all pretty much generic. So we can still run the code and still spitting out 1,024 numbers. I have a lot of fantasy. So as I said, we can also go fully inception mode and do the async iterator to a sync iterator thing. Note that if I do, let's show this. So this still runs. Note that if I do instead, it will still do exact same thing. We still work the exact same. There is, as I said, there is a little bit of difference related to how much data is fetched from the sync iterator function. So there is that thing to take into consideration. But that's it. So now you can also, given that, so those are streams, though, so you can also call all the full APIs. So for example, if you have a file, if you want to read it from a file, and you want to read as text, as strings, you need to set the encoding. And you set the encoding to a UTF-8. And it will still work. Now let's run six. It spits out the same file. A lot of hard magic here. And note that when you do this, then you can do whatever processing you want in here. So for example, if you do, by the way, always use promissify if you want to get a promised version of anything, don't do it manually. The chances if you make a mistake doing manually, or some of your colleague will make a mistake after you've done it correctly, six months later, it's very high. So don't. Use promissify. It's there for a reason. And it's also really fast. So we generate our sleep function with setTimeOut. There are a lot of nasty things that you can just forget. If you just forget our return in your new promise thing, you will just create a lot of popcars, and memory leaks, and very bad things. So avoid. Again, broken promises. And we can do a quick await here of this. So you see, now it's taking some time. And note that this is interesting. Do you know why it's a single chunk? Yes, because it's read as a full chunk from the disk. Interesting, right? So if you do the same thing in here, if you do the same thing in here, you will see that now it does what says on the tin. Note that if you do it in this two, this was the one, correct one. Note that, yeah, it's fine. I'm going forward. So anyway, last thing is that I want to show you. It's an example on the server. Note that when you're using a sync await on the server, you always need to put a catch handler in there. Make sure of that. If you don't put a catch handler, you're going to create a memory leak. Every single module called make promises safe, the name implies the name is exactly what it implies, or you crash on an handle rejection. This is a big conversation, and it's not the focus on this talk.  Very likely. Anyway, just always put a catch handler when you are moving from a non-async function to a promise-based function or a sync function. So what we do here, we just count the chunks and count the length. And then we just here, we just use the request module to pipe things. So I'm just running this up. And you see, this is all working fine. And it's actually really fast. Note that using a sync iterator is actually really fast, probably faster than using other things in Node. It's as fast as any other way of processing streams in Node. So use that. That doesn't have a big performance over it. We have optimized async iterators to the bone probably. So the code is really nasty in there. I've wrote the things. Anyway. So let's talk a little bit on what is missing. So the first one that is missing is how to write a transform stream using async iterators. So that is, for example, something that you could use to actually process the data along the way. This is actually a very nice idea because we can have transform by. And you just pass in a sync iterator, a sync generator function that accept a sync iterator as an input. So it has this homomorphic input and output. And then you can just forward await the thing and just yield the results. So it's a pretty nice pattern to write a transform, a way to transform data. Pretty cool, right? I love this. So and then if you convert it to a transform stream, then you can use it with pipeline and interact all the streams ecosystem modules. Note that this is currently being worked on. So hopefully this PR will land again. It's been got stuck at the beginning of October. So I'm hoping to unstuck it this weekend. We have the collaborator summit in two days. So hopefully I can get that unstuck and you can get that landed. Eventually, I would love to be able to create, to avoid creating a transform completely. So you can just pass in a sync function, a sync generator function, that essentially implement that pattern for you. So in this way, you avoid creating another stream. You can just compose function as much as you like. It's pretty interesting. This is not implemented yet. This is fantastic code. I'm living in Wonderland now. Hopefully this will hit your screen maybe on node 14. Hopefully. We'll back port it though. Now I've talked about readable. I've talked about transform. Now I'm talking about writable. You know. I haven't talked about writable at all at this point. Well, I don't know what to do with writable. That's the end story. And if you want to write something, you need to consume a sync iterator. However, you want to have an operation that actually returns a freaking promise. The problem, the fact that our current write thing does not return a promise. And it's very hard to create the behavior to return a promise. Why? Well, in this code, I would like to be able to write this code. Look at this. This is we have write, we have build write, and then we do a way to write chunk. Now, this code is correct. However, all the magic is in build write. The problem is in the error-ending model of promises versus streams. Streams emit an error event as soon as it happens. Promise is like quantum physics. So they will error only when you look at it. That's the core part of the problem. And this is why using promises with streams is really hard. Because one thing is error straight away. The other thing, error only when you look at it. So those two things are really, really hard to mix and match. And you can see this code that does this kind of shenanigans to make this happen. So essentially, we are registering an error event and caching the error. I'm caching the error so that whenever you and we return with this write function, we return a promise that when you look at it, will error. It's really bad. It's really bad code. So I don't have anything better than this. So if you have any ideas, any promise expert that wants to give it a shot, I am really welcome to brainstorm things. This is still open. So how does it all work? Well, all of this is implemented in JavaScript. So you can use all of this stuff in your code, learn the pattern, and use it for other things. So asyncIterator, as I said, I'm running a little bit out of time. So whatever. Hope you don't kick me out. So this is an extract from Nodecore. So essentially, we had implemented the symbol, a dot, asyncIterator primitive that returns a function. And essentially, we just call our generator for that, our builder for that, and we get it on an asyncIterator. So essentially, in order to build something, you just need to provide that. Note that if you want to build an asyncIterator, you should use this type of pattern. If you don't want to use an async generator function, that is nice and really cool to use. But if you want to do some of the hard stuff that we are doing or providing the mapping that we do in Nodecore, what you need to do is that you need to create an object which has the prototype of the asyncIterator and implements a method, like next and return. When next is called to get the next element, when the return is called, when you exit. That's it. There are some other few, but they are less important. These are the key two ones. So internally, in Nodecore, we wrap the readable event. These are some consequences, and one of those things that is there, it's really performant. So that's a good site. Also, it handles well buffering and all the things. This is a long link, sorry, it's very small, is the source of the implementation. Now, I'm going to open it up for you. And I'm going to open it up and just do a quick scroll. It's 200 lines of code. Not that much, but really a lot of very ugly stuff in here. Sorry. A lot of other cases. So there is no performance penalty in using asyncIterators over the other methods. So that's the key part. Which if you talk about a promise-based API saying there is no performance penalty, this is pretty big. And I'm trying to undersell it a little bit. Typically, promise-based stuff is lower than call-back-based stuff. This thing is on par. Just so that you know. One last thing before I finish, there is what would you streams. Now, what would you streams as what you're using in NodeFetch? Sorry, not in NodeFetch. I'm using in Fetch in the browser. Not in NodeFetch. Node does not have what would you streams. Now, this creates a bit of a miscompatibility between the two things. This is how what would you streams work, which has this pipe-to-method. It's really complex again. The key part there is streaming is really streams-based API are really complex. And if you want to implement those, you need to implement this thing, which has an upper controller and a lot of other stuff, which is really complicated again. So not really easy. And I just want to skip through this. But we would like to have those in Nodecore. And to make it more consistent, you've probably seen my stock. So it makes some sense to have this in Nodecore. However, we want to be compatible with the node ecosystem, which only use node streams. At what time are you here, the next one? OK, so I came. Sorry. However, what would you streams are going to be a sync API iterable? So that's cool. They implement the same pattern. So I hope one day to be able to do this type of thing, which we start from a what would you readable, and then consume is just using an async generator function passed to a node writable. And it will all work fine. So where all the interaction is being managed via the async iterator protocol, which will be pretty fantastic. Do you want to get involved? Please reach out. I will be at the booth. So reach out to me the next few days if you're interested in any of the stuff and any of those questions. Again, we are near form. Again, there's a raffle, blah, blah, blah. And thank you.