We're ready to start. Welcome. Thank you very much, all of you, for coming. We have the pleasure here of having Dr. Kashik Basu, who has had a fascinating career, is having a fascinating career. He's been leading academic, extremely interesting work in economics and social philosophy, too, I think, in a way, blending the two things. He has been a policymaker in the Indian government and is now the chief economist and senior vice president at the World Bank of Position, which has had a long heritage. So welcome, Dr. Basu. And I thought it started out by just asking, you were in academics most of your career. And then, I don't know, 30 years, something like that. And then suddenly, in 2009, I think you accepted to be chief economic advisor to the Indian government. What was that like changing from being an academic to going into the government in that way? And first of all, thank you very much. Pleasure being here and talking to you. This change was dramatic. I mean, there are no other way of putting it. When I was asked, it was the summer of 2009, I was taking my standard academic three months away from university. I was in Delhi, where I get a phone call from the prime minister's office saying, would you consider being a chief economist of India? I really, there was no hint before that, so I fell back. And I said, minimally, I'll have to see the prime minister to know what he expects me to do. And the next evening, I was going back to Cornell. So the prime minister agreed just before I took off. I would be able to go and see him. So did you get on the plane? I did get on the plane. But after a 40-minute conversation about his expectations, and I was also a bit worried, would I be able to live up to the task? Having four months later, December that year, 2009, there I was, very different setting. And I have to say, the first two, three months, if there was a way of backing out without causing embarrassment, I might have left and gone back to teaching and research. But there was no way of doing that without a lot of attention. So there I was. The change in lifestyle was dramatic. I read somewhere that a good way to lead life is 80% of the time you think, cogitate, 20% of the time you act. And for me, that ratio I've done by the first 30 years, nothing but think and cogitate as a researcher. And these last four years, nothing but take action, no time to think and cogitate. So I've kept the ratio, but with very different division of my time. What came as a surprise initially, and that's some of the naivety of an academic. I remember soon after joining, within a couple of weeks, I get a note from the finance minister about futures markets. If you allow them, what will that do to prices trade in the long run? I got this question and I was settling down, I sent it to some of my colleagues at Cornell for references, immediately came a bunch of papers in econometric and jet, which would take me three, four months to digest. I sent a note back saying, when does the finance minister want a response to this? I was told two days. Two days ago. Two days ago. So you scramble, you put together and you realize that it can't be that you try to understand it fully, but that's the way the world is. It's no one's doing it deliberately. You need to take decisions. So whatever knowledge you have, scramble a little bit more, put it in place to respond. This change, of course, for me, was very different from the life I had led, and it was really with a break that I broke into this altogether. What kept me going is also another side to it, which is a bit of an anthropologist side which I enjoy. In the beginning, I remember telling myself repeatedly that look, first two months, after that I got into it and I was enjoying it. First two months, I told myself that there are anthropologists who go to remote islands and spend a full year, Malinowski in Trobriand Island. I can be in the Ministry of Finance and view it as an anthropologist landed over there. Observe what's happening around me. So first two, three months I did. They probably thought you were from another planet. They probably thought it's someone from another planet who's come because of my difference in style. But after that, I have to say, once you get into the rhythm of that, and there are moments when you know that it's a decision being taken. I vividly remember the petrol, decontrol evening, 25th of June, 2010, intense meeting, and you know you're going to go out and make an announcement, and that's going to immediately send waves of reaction through the economy. There is a sudden adrenaline rush that comes with that, makes it very exciting, so I've enjoyed this world as well. You've had similar experience, Ken, if I may ask you. What's funny, you were telling me about writing, about futures markets. When I was right out of graduate school, I worked at the Federal Reserve as a very junior economist. I was working for Paul Volcker, but he never saw me, of course. But one time, I don't know why, they asked me to do something for him.  So they said, please explain about intervening in the futures markets. I won't go into detail for the audience.  This is way too complicated. I mean, you're trying, I wouldn't go into the philosophical points that I was trying to make, but I certainly learned a lesson from that. First of all, never be more than one page. That was one lesson I learned, and you know, keep it incredibly simple because you're only able to strike at very broad themes, and you can't, you know, always explain every aspect of why you're doing something. Right. So, you know, working in India is often thought of as very insular, you know, closed, relatively close to trade, and capital closed. I know it's not, and there are many people here who represent that, but how did you find that in your thinking? Were you, you know, looking every day at the data on the Indian economy, and what was going on in the Indian stock market? What did you sort of get up in the morning and do, and you know, how did you approach that? That's interesting, getting up in the morning and doing. By the time, of course, I came onto the Indian scene, 2009, India had been interacting with the world a lot. The big change, as you know, 1991 to 1993, the Indian reforms opened up India's economy. The opening up, if I may go back to that date, how dramatic it was. I remember from one sentence of the then finance minister saying that India needs to bring down its tariff ceiling to 150%. You know, bringing down to 150 is not too many countries could do that. So it shows where the country had gone, but from 1991 it was a very rapid process of integrating. You could also see that from the foreign exchange reserves, which up to 1991 for the previous 15 years, hovered around $5 billion. It would go up to seven, go down to three, that was a crisis, $5 billion. What are they today, by the way? Just short of $300 billion, and it reached that actually over 15 years, then it's plateaued off. So from five to $300 billion in 15 years, when it had been five for 15 years, big changes. So the economy that I was coming into India is very different from what it was 15 years ago. And it's a sign of globalization that getting up in the morning, one of the first things that I would always check up is what's happening in the United States, what's happening in the Eurozone, because you'd know that the effect of that would be felt within days, and not even days. By evening the stock market could react, the exchange rate could react. And one of my predecessors in my job as chief economic advisor told me that 15 years ago, you get up in the morning, you check the price of potato, price of onions, the domestic... Yeah, exactly. That's what I was thinking. And of course I would check that, usually pick it up just from the local vendors. But the international scene, I had to watch every day. One very memorable day is... Did the people around you understand that? I mean, when you were... You know, they did understand that because they could feel that. One concrete example of that, S&Ps, downgrading of United States long-term. This was, I think, August 2011. I hope I'm getting this right. Evening, after my day's work had ended, I was in the fish market in Delhi, and my cell phone kept ringing, and so many times that I suspected that something had happened. I called back one of them, and they said that the US has been downgraded, and so we need to meet straight away. This wouldn't have happened in India 10 years earlier, 15 years earlier, because yes, this has happened in the United States. That's amazing. Why did he want to meet straight away? What, why would that matter? It was a worry about the exchange rate, but no one really quite anticipated after that what would happen. The rupee began depreciating, because as we now know, the money rushed to United States, despite the US downgrading. That the interest rate might go up or something. That interest rate might go up, and also if the whole world economy is disturbed, at least the US would not default. You put in money there, you'll get, even if you get low interest, it's secure, so money started exiting, and actually the rupee did depreciate over the next couple of days. So the concerns had changed, and you could also sense that in, this subsequently also in my current job, when I go to West Africa, when I go to small places, you see that in a sort of small, elite group of policy makers, actually the concerns are very similar. The reason is they're all going to the same universities, or they've got advisors going to the same places. But is that bad or good? I mean. It's a good question, because it does isolate you a little bit, because as soon as you go outside of that small group, the thinking is very different. So that small group conversation is very similar, so easy for the international group of economists, but there is a downside to it. It doesn't always relate well to the larger context, even the media and already often have very different perceptions of reality. Well, I certainly notice the media is very driven by what's going in the financial markets, the stock market, the bond market, and I sort of suspect it has something to do, partly with where demand comes, not just people's interest. And so I can imagine their biases in everyone's thinking. Yeah, I mean, you can see that stock markets, we get reported every couple of minutes, but there are other important dimensions of indicators where we have such poor statistics and numbers. In India, a good example is inflation and unemployment. Inflation is tracked very well. Every week we would get it. We would not release it every month we released. Every week we'd get, we'd know what's happening on the inflation scene. Unemployment data did not come. It would come with a lag. So if you're doing a Phillips curve analysis, you're doing it on one axis. You're just getting data on inflation, not getting on the employment. It handicaps you. And that shows where the main interests are and the data response to that. Let me just wrap up this period by saying what achievement did you have or the government have during this period where you felt you participated that you're most proud of from this period?  But there are some minor contributions and some very textbookish contributions which actually do please me. One I'll tell you is not a big contribution but still it affected the action. When food prices rose, India would release food from its granary. The government would release food onto the market. The way this was done is a thousand metric ton bunch was auctioned. So a whole lot of people will bid and someone will get a thousand metric tons. Another person will get a thousand metric tons. Thousand metric tons, you can't give away too many. So you'd create an oligopoly of people controlling this. And I remember a very early meeting feeling very self-conscious that I was bringing Kurno into a practical policy-making decision. I never mentioned Kurno, but I suggested that if the government could... He studied oligopolies and monopolies. Yeah. If you could release in smaller bundles so that there are more people who buy and then they compete with one another, you'll keep the prices low. And that decision was actually taken, that the release would take place in smaller bunches. That's one. The other on which there hasn't been action enough but I think there is sensitivity now and there may be action. Food grain subsidy to the poor is given in the following way in India. There are some 500,000 food stores called ration shops run by the government. Government gives cheap food to these stores and tells these store owners that when the poor people come with their cards, you sell them below market price, the price is given. Scope for leakage is huge. The incentive to sell off this grain at the market price is very high and estimates show... Does somebody keep track of where the... Our estimate was, internal estimate was that 44% of the grain was leaking out. Wow. I kept arguing that, look, on this let's be a more traditional economist, give the subsidy directly to the poor as buying power, let them buy it at market price, you'll cut out this leakage. Action hasn't been taken but there's enough indication now that this is going to be acted upon. So this was a slow build up, small move but this one can be actually very big for the country to help the fiscal and it will help targeted benefits and the hope is that this is going to eventually come about. So let's transition to now you're at the World Bank which is first of all a much more diverse position, I guess in a way, it's probably a little less instantly political than the job you had before so it probably gives you a little more space. What are you thinking in terms of what directions to take the initiatives the bank is doing, where do you think changes are, we're in China so how might it impact China or India of course? Yeah. The focus suddenly shifted when I came into the bank, it's a global focus so at one level it's more thinly spread out over the global economy. The way to organize that was very early when I joined, the World Bank president was very keen that the World Bank enshrines a couple of targets, very few so that we are organized around that. The poverty target is something the World Bank has dealt with for a very long time. In addition we brought in something where I did play a role which we called the shared prosperity goal which simply means that for every society you pay some special attention to the performance of the bottom 40%. Why 40, why not 30, one can debate endlessly but we thought of it. Okay why 40%? I shouldn't have said that, I shouldn't have prompted that question. In the end we settled on that, is a couple of big countries, poverty at that time, the poverty by the standard $1.25 a day was close to 40%. India was just a little bit below 40%, Ghana was 40% so it was matching with that. 20% we know the bottom segment, the data gets weaker, the tracking is bad and we didn't want to go too high and World Bank usually the World Bank data if you look at tables, it's 20, 40, 60, 80.  This however having this engages us with a whole host of countries. Looking at even Greece when Greece is talking in terms of fiscal policy, you can talk in terms of how will it impact the bottom segment. Coming to a country like China or India this has an interesting engagement with a slightly political matter which did concern us. Both India and China, the bottom 40% does worse than the top 60% or the average. And there is, World Bank is a political body and there is always a bit of concern that look, these are big countries that will be upset by this goal because this will be a bit critical of these countries. But on the other hand, both China and India can- You're saying they haven't grown as well as the other 60%- They haven't grown as well, let me clarify. Haven't grown as well. But the bottom 40% in China is growing faster than the bottom 40% virtually anywhere else. So China could come in and say, yes it is true that our bottom 40% is not doing as well as the top 60% but our bottom 40% is doing better than elsewhere. And India would say something very similar. And to me this is an interesting debate and actually if you need to have the top segment grow faster to attend to the bottom, so be it, we'll have to live with that but maybe that is not the case. You can have some special policies intervening over there. And I'm glad actually again that in today's world I think there is a bit of a convergence of ideology. What I mean by this is there's an increasing recognition that you have to have a lot of space for the market to function. You can't have the government strangle that. But also there is a space for regulation, intelligent regulation and this convergence of ideology not a total convergence but some convergence I think is making for a very healthy policy debate that it's a more finer points you're debating rather than trying to pull in completely extreme directions. And this broad thinking I and the World Bank we are trying to take into the world and engage with countries saying that look you have to pay a bit of attention to the distribution. You'll have long run political trouble if you don't pay attention. And even if you didn't have political trouble, a country that is growing and doing so well should attend to its poor. India is growing very well but India has a mass of poverty. It is only right that the World Bank brings some pressure to India. I would have done it even when I was sitting in India that pay special attention to this bottom segment. So this is an instrument that we are trying to take to the entire world. So I'm gonna come back in a second to what the World Bank can do to have leverage in India and China but I can't help but note that when I left the IMF as Chief Economist, the person who replaced me, that was in 2003, Raghur Rajan came in and he was the first Chief Economist from an emerging marketer developing country at either the IMF and the World Bank. Now there's also you and Justin Lin at the World Bank and it's just amazing that this didn't happen before. But a question I have for you is something I certainly say irritates me is that there's been this truce between America and Europe that it's always an American as president of the World Bank. It's always a European as head of the IMF even though the world has changed. Can we be optimistic that that is gonna end soon? I know it's a tough question to ask you. Yeah, I was checking whether there's chat-to-mouse rules on this. Well, no, you're on record here, I think. And I'm going to answer it. First of all, whether it should be open, my answer is yes, it should be open. Yeah, of course. The world should be treated as a level playing field and it is true that thanks to the long history of higher education in Western countries, Europe and United States, there are the East Asian belt earlier. If I can intervene. I could say more than that. I think when the financial crisis hit the advanced countries, they didn't listen enough to leaders and policymakers from emerging markets who'd been through it. And the advice they would have gotten would have been great and they just didn't listen. And I think there's two-way direction here and that's another reason that I think it's important. So I'm glad because I think I'm on the same page. So one would see that maybe there would be the dominant players would still be from the United States and Europe but to have it closed through an implicit understanding just doesn't sound right. It's very unattractive. It is extremely unattractive. And in the end something is lost out through that. And as you rightly say, there are ideas and opinions which come if you have a freer interaction, freer choice, which would just be useful for these and these would be more effective bodies. When that will happen, I don't know. But I'm glad you are saying this. There are people sitting in the United States. Several people are speaking exactly. A lot of people are saying. So I think this is going to change sooner rather than later because there is a buildup now even within the United States. And I would like to believe it's the same in Europe but I don't have my antennas as clearly on that. So I want to transition back to China and India and the World Bank. So they have countries with huge reserves. You just said India has 300 billion. China I think the number is like 4 trillion. World Bank has money, can borrow money but not like that. So how do you have leverage in a country like India or China, where does it come from? Sorry, leverage of what kind of? Over policy. How do you influence policy when, if you say something they don't like, well, just take your money, we don't really care. So it is, yeah, sorry I didn't understand. It's the leverage from where I'm sitting vis-a-vis these countries. You don't have too much. This has to be recognized precisely for the reason that you're talking about is that if you go and try to push these countries in directions different from where they are going.  And the money that comes in since I used to sit in the Ministry of Finance and look at India's budget, the budget has become enormous. So this money that comes in is relatively small from international sources. For China that would be even miniscule. That being so, the leverage is much less but I don't think that's actually too bad. That forces the kind of partnership that we are talking about. So when you're going in for a reform, say the 1991, the Indian reform, it was very much in conversation with the International Monetary Fund that what India was made to do, the conditionalities because India took money from the IMF was through a conversation. I wish that was the case with every country because at times the IMF and the World Bank tends to be, I mean you're coming from Washington, you go to a small country and of course you have a lot of expertise and there's a bit of an easy thing to say that we have all the expertise whereas there is something called local knowledge, local understanding. In the case of the big countries, you're forced to listen to them but I hope this would open our eyes and I think if I gauge these organizations now, World Bank and IMF, more modest now than they used to be, I don't know, a couple of decades ago and so the engagement has become a bit more of a bilateral engagement and that's for the better, for the most part. There are countries and regimes where you do want to twist their arm because it's a small oligarchy that's pushing the country in a certain direction but you can't, you don't have the choice everywhere for that. I suppose sometimes there are unpopular things that the government wants to do and they need somebody to blame, there's certainly been a long history of that. That's exactly that, that there are times when what is considered a conditionality imposed by the IMF is actually a conditionality wished by the country and brought back through the IMF in there. I think that's often the case and people don't realize that. If I can change gears again completely and then maybe if there's time, open it up to some questions. You did some, a lot of very widely cited research as a scholar and one that caught my eye partly because it's interesting and partly because it's very widely cited to your work on child labor and do you want to talk a little bit, maybe not about the technical aspects of the work. I think it's kind of mathematical but philosophically how it influences you and of course, since you're chief economist at the World Bank today, what ideas that gives you in your role today? Very happy to talk about it. I got into this, I don't know, you probably don't know this just after I moved to the US as professor to Cornell. So we inspired you to do that. It was the Harkins bill that was being discussed and that's the first time and the last time actually I wrote an op-ed for New York Times and I argued that the position that has been taken in the United States that you immediately go out and ban any product that has a child labor input is not a desirable move because I argued that child labor occurs for two reasons. Yes, it's the greed of the entrepreneurs who may try to get the cheapest labor and that you want to block but it is not the laziness of the parents that send those children out. It's the poverty which drives the children out. If you suddenly bring a legislative move and say from tomorrow the children don't work, you will probably cause, maybe you'll put an end to child labor but by exacerbating child starvation because that was their earning to fight against poverty. I wrote this article which I thought was an innocent article in New York Times. How they got a lot of hate mail for that. And a huge amount of mail, including hate mail I got from that. Actually one very nice mail was someone we both know, Albert Hirschman, a handwritten very thinking. He's a great man in development. Yeah, one of the foremost thinkers of development economics. But a huge amount of hate mail as well. That got me thinking and with my Vietnamese American student, Pham Hoang Van, we wrote this paper in American Economic Review that Ken is referring to. Where we, in a nutshell, it is a complicated argument where we argue that there are certain circumstances where a legislative ban can be desirable because a ban on child labor could cause adult wages to rise. So if you can, through the ban in child labor, cause the adult wage to rise so much that those parents would not want to send their children out any way to work at that wage, then that legislative intervention is a worthwhile intervention. That was the gist of that paper and probably it came at the right time so it did capture a lot of attention and subsequent papers and empirical studies. Just out of, since we picked up on it, how do you think about that now? I mean, it's certainly an issue still in some countries in Asia and there are certainly a lot of groups in the United States who are very incensed about it. How do you think about it now? I think very similarly to when I wrote that paper. I believe that there are some countries where those conditions of that paper are not satisfied. There you can't go in suddenly one day and say no more child labor because you'll cause child starvation and parental starvation. There you have to attend to poverty, attend to adult labor conditions before you can rule out child labor. But there are other countries more on the margin where you can go with a legislative ban, expect very quickly adult wage to rise. So broadly I remain the same position on that but this paper also influenced my thought in some other ways that there are many domains in life where you have multiple equilibria. A country can be caught in a bad situation where through a nudge, often a legislative nudge, you can put it into a much better situation where you don't need the law anymore subsequently. So I can think of examples but I'm not going to inflict those here. I'm being told we don't have much time. I maybe have time for one question from the audience. A third group that say that what we should be interested in is financial inclusion through access to digital work through effective broadband rollout so you should be measuring things like internet penetration. So if first is what is the real situation and then if you can rank these GDP growth, exchange rate, inflation, interest rate and unemployment and access to digital, how will you rank them? I do believe that GDP is a very powerful concept. So to that extent I don't want to take away the primacy of GDP contrary to what people often think. GDP is a very multi-dimensional measure because you're adding apples, oranges, leisure, a variety of things together and you've created the concept of GDP. So GDP, real GDP is very important so it should be there as a central measure that you're doing. But you have to supplement it with other things. Inflation on its own is not much use in relative terms because you do want to know, for instance, I'll tell you, there was a period when India was inflating at 10% per annum when I was there doing my work and people were fretting about it. What was being misunderstood then is real GDP was growing by 9% per annum. Inflation was 10% on top of that so it wasn't taking away from the apples and oranges. Those are increasing in the country. Inflation even more. Interest rates, exchange rates, of course you need all this and the World Bank has now brought in that you also take some distributional measures like how the bottom 40% is doing and track those. So you need all that but GDP has a conceptual foundation which is quite deep in economics and I feel it does, it's a single measure that captures a lot. Not everything, again I'm stressed. I have to apologize for not being able to wrap up with red but I want to thank very much Dr. Kaushik Basu and to the audience for coming here today. Thank you very much. Thank you.


Cool. Good morning, everyone. I miss being here with you. That's cool. So I hope you had a good class on Monday. You can tell me about it after. And then I hope you watched the lecture because we're done with kind of basic types. And now we're going to go into more complex and interesting type inference. So specifically today, we're going to talk about a Hindley-Millner type inference, which is essentially a much more advanced, or there's two ways to think about it. Either you can think about what you're doing is a smaller, scaled-down version of Hindley-Millner type inference. Or you can think of Hindley-Millner type inference as much more expressive and does more things than what your project floor is doing. But either way, they're related, so that's cool. Can we ask questions about the project? We'll save it for after. Let me make sure we cover this. Questions on types? Any questions? Okay. So we looked at the type systems, right? So all the type systems that we've seen so far, how do we know the type of a variable? Everything we've looked at in the type systems that we studied, how do we know the type of a variable? It's given. What was it? It's given. Who gives it? Me? Well, kind of. Yeah, the programmer, right? So exactly. So the programmer is explicitly declaring the types of the variables, right? They say, I want a variable foo and it has this type bar, right? So we've seen that with all kinds of examples. So we've seen examples of the arrays where we give the range of the array and the elements of the array, what type they are. So, well, what's the name of this type of a? Int square root. The name of it? What's the name of the type of it? Yeah, what's the name of the type of a? Integer. So let's think about this separately. So what is the type of a? Int. It's an array of ints. It is an array of six elements of int of integers. But what's the name of that type? If I say it's a foo a or something, where foo is some programmer defined type, then what would be the name of that type? Exactly. So does this type have a name? No, right? This is an anonymous type. This is a type with no name. We are not declaring that there is a type called array zero to five of int, right? In our type declaration. This is a variable declaration, right? So that whole statement isn't our type. Correct. Okay, because this is a type constructor, right? We're constructing a new type of array based on some of our basic types. You could say that the array has a type because the array is of type int. The specific array that we're talking about here has range zero to five and hold ints. Yes, you could say that. But specifically about the name, right? So why is that important? Why are the names of the types important? Type equivalency. Name equivalence, internal name equivalence, and structural equivalence, right? Okay. So here we're just having int i, right? And then we know that now, once the programmer has defined these types, now we see their usage in the program, we can say whether they're correct or not. So is this, would this type check and why? Yes. Yes, why? Because i is an int. Because i is an int, so why does i have to be an int? Because it's being used in the index of an array which is, is to be an int. Which must be an integer, yeah. And at the output of any index of an array of zero through five of type int defined as or named a is the output of an int. So setting it equal to an int is correct. Right. So you have this array operator essentially, think about the type system returning something, right? Returns this type int. You're checking that this int here is the same as this type here which is an int, right? You're saying yes, that type checks. Cool. And so now we know, right? So if we have a different program where i is declared as a string type, right? If we were to do this, would this type check? No, why not? Because the index i is not the string isn't going to return something valid most likely. Right. So the reason is the types, right? So the type of the bracket operator means that to do an array access, we access arrays based on their element, right? Not on strings. Yeah. If you switched i to a char, would it try and convert it to the integer value of it or would it just crash out? I don't know, what do I imagine? Definitely depends on the language. Right here we're talking a little bit more, not like concretely in C but kind of more in this language we've been talking about. Where the type system, we kind of, I mean we want it to be very strict, right? So you could actually maybe, so let's see, if you knew the range of the array, right? And you saw a character in here. If the range is bigger than a character then you could say that that doesn't type check, right? Because a character can't describe all possible indices. That would be interesting. That's what you can do when you know the size of every array. So you could do some cool tricks like that. Okay. So can we do something like this? Int a and int i and do ai equals the string testing? No. Why not? Because you're trying to load a type string into an array that contains ints. Exactly. So here we have, we have a string so we're trying to set a string equal to the return of the array access operation, right? So in all these types what's the return of the array access operation of a? A memory location for int. Int types. So something about memory locations, so just give her that an int, right? What is inside of this array, right? The array access is giving us one of the elements of this array. So it's essentially peeling back all that other type. So we're checking that is int equal to a string? Well no, of course not. So at this point in your careers I think you're familiar with some more expressive type systems than what we've seen here, right? So what are parameterized types? What does that mean? Right? So in some language, so like generics in Java or templates in C++, right? What does that actually allow you to do? Yeah, exactly. So you can actually use, this allows you, so the parameterized, right? So it's essentially like the type is a parameter to either a function or a class. So instead of defining a function on two integers, right? You can define a function on two types that are the same, right? Which is actually more generic and that means that function can be used in more scenarios, right? And it allows the programmer a lot more abstraction and power in defining these more generic types of functions. And so the idea is the type, the type is given as a parameter to either the function or the class. So Java and C sharp will have generics, templates in C++ both do this. And so let's look at an example. So you can write a function in Java. So here we're going to create a static random variable. We're going to have a static method called choose that is going to take in two parameters first or second. And the idea is this function will randomly return one of those values, either the first or the second. So you can think of this as a handy function where if you just want to randomly choose one of these two elements, this function will allow you to do that. So without parameterized types, you would have to specify the exact types of each of the arguments, right?  But really, from what this function does, we just want it to return one of the two. We don't care what the types of those arguments are, right? We only want to just return one of them. In fact, in this, the types are completely irrelevant, right? As long as they're the same, right? So why do they have to be the same? Exactly, we're only outputting one, so the function that calls us, right, needs to know the type of whatever we're returning so it can properly manage the types, right? So if these were two different types, then we just returned some random type safety would go to heck. So we can do this very easily. We can have a little function that calls random dot next int. It gets an integer, it mods it with two. So mod two is going to return either zero or one, depending on if it's odd or even. And if it's zero, it'll return first. If it's one, it'll return second. So now we have this generic method that we can apply to any types, any parameters. So we can, in our function, we can have variables x and y, right? Which are integers. And then we can print out chooser dot choose x or y. Didn't I say that the parameters here to, the types have to be past as parameters? So did I specify any of the types here? No. So how does the, how does Java type check this? It would look at the angle bracket. So from the invocation of this function, right? If I wanted to specify exactly the parameter of the type, could I do that? I think you had brackets. I can't remember here, here. I think you had brackets here. I think the parentheses. Yeah. You had brackets here to specify exactly which type you want to do. Or does it know because both of them are of the same type. Exactly. It just figures it out. It can look here, right? And it can say, okay, I'm calling a parameterized function. Both the first parameter and the second parameter are of the same type. So r, x and y of the same type. Yeah. Yeah. And what is that type? Int. So it knows to invoke this with past using int as the argument. Yes. Is that true for all generics in Java that they'll figure, it'll figure it out. It'll figure it out. Part of the problem. That's why it's not as smart. So we're building up. So we're going to see that Hindley Milner is much more powerful than this. But this is kind of what you can use in Java, which Java is kind of getting there. These other languages are getting there. So you have strings. So I can call the exact same method with strings, right? And Java has enough information at this function invocation to know exactly which type to. Okay. Go ahead and do that. From the choose method, what type am I returning? You're returning int. T. I'm returning a t. Whatever t. What is t? Whatever you pass it. Whatever is that parameter of this method. Whatever the type of that parameter of this method is. Right? So in this invocation, this type parameter is int. So it's going to return an int. T is going to be an int. When we invoke it here, it's going to be a string. And it's going to return a type of string. Yeah. Do we return type every different than the parameters? No. That's exactly what this constraint here says. This constraint of this method says that the return type is always the same as the arguments. So you can think about, essentially one way to think about it is every time this function is invoked, it looks and sees, well not exactly why it's invoked even beforehand. It can see that, okay, this is on int. So I know t is an int. So I can make a whole new copy of this method replacing t with int everywhere. It's just a regular Java function. And then with this, the same thing, I know here t is a string. So I can create the exact same thing, a brand new copy of this method replacing all t's with strings. So then that makes the parameters have to be the same type also. Yes. It can never be different. And that's defined here. So you can use generics to have as many types as you want. You can have t, u, v, whatever in this list. This defines the parameters. But where those are used, that defines the relation between the types. You have to use this when you use an array list or... This is exactly what's happening. So because an array list or any kind of list, you don't really care what types you're putting in. It doesn't affect anything. But you want that class to be specialized on that type because you want to be able to put in, let's say, strings in one array list and ints in another array list. Not a great example because of the primitive example, but the head of the list is the same. Okay. So in this case, we have what's known as explicit polymorphism. T is the programmer is declaring the parameterized types explicitly. The programmer is explicitly saying, here's a function, and here are the types to that function. It's going to take in a type t in this example, so one type. So it's important that this is a little bit of different polymorphism than what you're used to thinking about in the object orientation. Here we're thinking kind of on functions and types so that I can use the same function in different places just like with object polymorphism. I can use, I can call a parent class and depending on the specialization of that class, it may call a different method. And so this is great because it allows, you can call a function or a class with different types while still checking type compatibility. So you still get all the guarantees of the type system. The type system will ensure that everything is still good. We still had to say this type t, right? Just like in the previous things we looked at, we have to explicitly declare the types of variables here. But let's say if I got rid of this t and didn't specify any types of this function, could you come up with the types that this function should have, that the type insurance here, that each of the parameters have the same type and the return value has the same type? Let's think about that. And so this leads us into where we want to go, which is even more powerful and very cool, where we as the programmer don't even want to specify the type parameters. So we want to be able to not even specify any of the type parameters, and we want the system to essentially infer the types that we want and create the program accordingly. So dynamic language is right. In a lot of dynamic languages, do we have to specify the types, so in Python or JavaScript or Ruby? Do you have to specify the types of the variables? No. I think we talked about this a little bit before, right? But do you think it's better or worse? Worse. It's more complicated for sure. Worse. Yeah, it can be worse in the sense that you don't know when you run the program if it's correctly typed or not. You could be trying to add strings with lists or something, right? Whereas with a compile time language like Java, you don't have that. But there can be a lot of cases where have you ever tried to make changes to your program? So like, oh man, I was using this string, but now I want to, instead of using a string, I want to change that with a struct or an object, right? So you have to go through in every place you use that variable in every single parameter, every single function, you need to change that to now use this new type. Otherwise the compiler won't let you, won't let it work.  So rather than, so basically the idea is if it walks like a duck, swims like a duck, and quacks like a duck, then it's a duck. What this means is I don't care about object hierarchy, parent children, whatever. If I get an object, and I call a function on that object, if it has that function, then I'm happy, right? I don't break the type system. And if it takes the same parameters and everything. So this is nice because you can write very generic functions. You can have a function that, let's say sorts elements, and as long as it knows how to compare things and pass them to some kind of compare function, then it can properly do the sorting, right? So in that sense, you can have functions that are a little bit more generic, but you have to give up the fact that you have this nice safety net of static type checking. So what's super cool about what we're learning is with implicit polymorphism and with Hindley-Millner type inference, you kind of get the best of both worlds. So the type system is going to actually statically check and verify that the types of your program are correct while at the same time the program does not have to specify any of the types. So the program is going to automatically try to infer the most general type for every single construct, function, function invocation, everything in the program, expression in the program. So if it can't solve this, if there are no types that solve this, then it will say there's a type error. Otherwise it will figure it out. And it's actually very nice because you as the programmer, you don't have to specify the types. You can trust the compiler to figure it out what you meant that things are in search strings. And then later on, if you want to change that, it makes it a lot easier. We'll also see it allows you to write functions that are a lot more general than what we're used to. Let's look at an example. So before I get started on this, this is the principles of programming languages class. Programming languages is one of those words, or two of those four words, I guess. So we've been talking about a lot of different kinds of programming languages. So here I'm going to introduce some kind of new, it's more of a functional programming language syntax. It should be fairly clear. I don't think it's not meant to be tricky. It's just meant to be easy to look at and discuss because this is the way that a lot of, a lot of these languages that do implicit polymorphism how they look. So it's just easier to kind of, and we can talk about some of the differences there. So for instance, when we do have function definitions, we're going to use fun because functions are fun, right? So we're defining a function foo, foo takes one parameter x, and so what does foo return? Yeah, it returns the first parameter, right, x. So that's the definition here. So foo x equals x. So now, what is the type of foo? So do we specify any types here? No. But what can you tell me about the types here? Whatever x's type is. Because it has to return x. So whatever the type of x is. Right, okay, so let's talk about, think about this first. How many different types are there in this little function definition? Infinite. How many things do we need to... That's completely out of the spectrum there. Go bring everything. It's actually negative infinity. Damn. So how many things do we need to be able to say what the type is? Like, for instance, do we need to know the type of x? No. Well, the program's going to statically determine that, right? It needs to determine types for every variable to do type checking, right? So the programmer doesn't have to specify, but the type system needs to figure out a type of x, right? What else does it need to figure out types of? What was that? Foo. Yeah, we also have a function that we're defining foo, right? So we also need to know the type of foo. Actually, one of the coolest things about programming in a language like this is you can actually, while you're programming, you can ask the type system what exactly is the type of x or foo. And it will tell you what it thinks the type is. And if it thinks it's something really weird, that means your program is wrong. And so actually, oftentimes, so I've done some programming in OCaml, which is based on this. And it's crazy because, like, the type system, but then when your types all work, your program actually works, because it's actually what you meant for it to do. So if we were to do a type of foo, what's the type of function foo? Using kind of the type syntax that we've talked about before. So what could we give? The type of foo. Right, so what is the type of x? Anonymous. Is it undefined? Anonymous. Anonymous. Generic. Unspecified. Yeah, I think these are all the same things. We can basically say it's any type, right? So we can just make up a new name for it, right? We can make up some name t, right? So we say it's some type t. So the type of x is some type t. So then what does that mean about the type of foo? In x is type of t, then foo is type of t. But foo is a function. Is x a function? It's a return of type of t. Exactly, right? So foo is a function. And what do we know about types of functions? What do we have to say about the type of a function? Just return type? Input types? Is that the word for that? Parameters. Parameters, yeah. So the types of the parameters and the return type, right? Exactly. So if we're to use this, foo is a function that takes in what? Type t. Type t and returns what? Type t. Type t. We can know this just by looking at that. So basically this means, right, whatever we invoke foo with as the type, whatever the type of the thing that we invoke foo as, the return type is going to be that same thing. So if we call foo with a string, we're going to get back a string. If we call foo with a list, we're going to get back a list. If we call foo with a function that takes in another function, that takes in another function that returns an int, it's going to return that same thing. So it doesn't matter what we pass in. We know that the type that gets returned is always the same thing. So we're also going to change the way we write functions, types of functions. So what we're going to do is we're going to put all of the parameters of t in, sorry, the types of the parameters of a function in parentheses, separated by commas, and then we're going to have an arrow with the return type of t. So this means a function that takes in type t and returns type t. And this is just to, we can keep doing it like this. This is a little more succinct, is exactly the format that most languages that use this use. So it'll also help you use any of these languages. Okay. So let's say we have some function foo x that returns x. So our same function above. And let's say we have another function bar y that returns foo of y. So now what's the type of bar in foo? Can we determine it? So what's the type of foo? Does the type of foo change? So foo is a function of t that takes in one parameter type t and returns a parameter type t. We're going to write it as t, t. And what about bar? Yeah, so we can, we actually reuse the same terminology because what this means is that in this function bar, these types have to be the same. The input to t must be the output of t. But the relation between these two t's has no relation. They could just as easily be some other random value. So let's say we have a function max. So we're going to say if x is less than y then if we're writing a correct max function what should we return? So more things to notice about this function, this language. We don't have explicit returns. So we're not saying return y or return x. What we're actually doing is we're saying an if statement actually returns something implicitly. So the result of a value, so an if is just an expression that if its condition is true it will return whatever its true block returns. Otherwise it'll return whatever its false block returns. So now what's the type of max? Or maybe put it another way. Do you have enough information to decide the type of max? Why not? Because x and y may not necessarily I would say for this to work x and y have to work. Why? Because they have to be comparable. Okay, yes. So there's actually two separate issues here. So just like your homework we have x less than y I guess your project. What does that mean about the types of x and y? They must be comparable. They must be the same type. Comparable, yeah, that's part of the problem. We actually don't know if they have to be the same type. It depends on the language. But it really depends on what this... So is this less than operator? Can you think of that as a function? So if it's a function, what does it take in? What would its type be? Oh, a Boolean. How many parameters does it take in? Two parameters. We'll say it's the same type t and t. And returns what? So... But let's say this is a less than symbol that's only defined on integers. So it's int int Boolean. So what does that say about the types of x and y? They have to be ints. Okay, let's think about this from another perspective. Let's say this was some random function. We don't really care. When we first look at this, x and y could be arbitrarily different types. We don't have enough information to say that they're the same type or different types. But looking at this program, depending on which branch we go down, if we go down this branch, we return y. If we go down this branch, we're going to return x. So what does that tell us about the types of y and x? They have to be the same. They have to be the same, exactly. So these types must be the same because they're used in two different if branches. So another way to think about this, if you have an if branch, each of the types of the branches are the same. Because no matter which branch you go down, you have to return the same thing, yeah. So what about if you have an int? You mean for the less than? Yeah, I mean like if you said 5 is greater than 4.2. Yes, so it depends on the specification. So if we're assuming that the less than symbol is only defined on ints, then we're going to say that max is a function that takes in an integer and an integer There's nothing more general we can say about this. We can't say it's an arbitrarily type t because we see from the usage in the function of this less than symbol that they have to be ints. This is the most general. And so the other way we'll write that is int comma int arrow int. Let's change it a little bit. Is this really general for the programmer? No. No, it's kind of crappy, right? We've written this, what should be this max function, but because we, the programmer used this less than symbol we are inherently forcing this function to only work on integers, which is what they're less than symbol type. So we have to start thinking a little bit more higher level. So what, really what we want, so do we want to specify if we're writing a function for max? Do we, the programmer who writes this function for max, the comparator operator? Right, we want some logic to use a comparator function in order to decide which of the two values is larger. But this isn't very general. So why don't we let the programmer tell us what comparator function they want us to use? So how can we do that? By using it as an argument, right? So let's extend our function to have the programmer pass in a function to be called. So those of you that have used vectors or sets, right, in C++ you can tell it specifically what function to use to compare two elements of your set. Right. So this is extending this. So the idea here is functions are essentially what they call first class, right, we can pass functions as arguments, we can return functions from functions. We can treat functions, functions from any other variable type, right? They're just the same as strings or ints, just that we can invoke them, right, we can call that function. So now how do we rewrite that function that we just saw? Right, so what's the type of max? Or it's, let's see here. It's a function, right, so it's not going to just have one type. So it's... How many parameters is this type of max? H is of type T. The type of max is the type of compare. Type of max is the type of compare? How many variables... So, okay, let's think about this. So there's a couple of different layers in here, right? So we know just from looking at this the types of max and the types of compare can't be the same. Why? Two, compare takes two parameters, max takes three parameters. So max is a function that takes in, as its first parameter, a function that takes in how many parameters? Two. Two parameters and returns what? A boolean. What do we know about those two parameters? They have to be equal. Why do they have to be equal? Does anything about this function and vocation here say that they have to be equal? They have to be the type of x and the type of y, right? Because the programmer specifies the comparison function somewhere down the chain. Exactly, but let's look at this. Remember what I said about if statements? So what do we know about the types of y and the type of x? They have to be the same. And they have to be the same as the return type of max, which means that the types of the compare function must also be the same. So this is actually a function of... functions of t, t, which returns boolean and it takes in a t and a t and returns a t. So if we were to write this in our simplified format, we have a function that takes in at its first argument a function two types of that function and returns a type t. Do you know when you say in a function the parameter is they need to be the same type and the function should return the parameters, right? So do you know how that doesn't hold on the comparison function? You're passing in t and t, but you're returning a boolean. Sorry, I said that again. So you know how max well okay, a function, the parameters need to be the same. So t and t, for instance, and it returns a t. That has to hold for max. So for comparison, the parameters is t and t, but you're returning a boolean. Yes, so why? Where is the cmp function used? Where inside max, specifically? In the if statement. In the condition of the if statement. So what do we know that the condition of the if statement has to return boolean? Boolean, right? I guess we didn't explicitly specify that, but we'll see that. We need that to be a boolean. So that's what we're saying is, if it wasn't used here, then there would be no constraint on the return type. The most general type would be some new type w that we haven't seen before. But because specifically of its usage right here, we know that it has to be a boolean. And if the function usage, if we use compare somewhere else, the return type of compare is not a boolean, then we know we have a type error. So you can think of we treat some really generic types, and then based on the usage, we restrict them to more specific types. So now we can do cool things, right? Now we have actually a very general function. We can call max and we can pass in the less than operator and then pass in 10 and 200, right? So we can call this function max with the less than operator. And we can also call it with the strain compare function to compare strings. Right? So the less than function takes in two integers, right, and returns a boolean, which now means that this function invocation here, these must be integers, right? These T's must be the same. And then we know that this function invocation must return an integer. Here we know strain comp is a function that takes in two strings and returns a boolean. So we know that the types of these two parameters must be a strings, and then the return type here must be a string. And we got all of this without specifying any types. So we got a lot of fun with this. So now we have a function foo. How many parameters does it take in? Three. And then it returns the result of calling C passing in to C's first argument the result of A bracket B. Right? So based on the usage here what do we know about the types of C? At a high level. C would have to be a function. C is a function, yes. How many parameters? One. What else? A is an array. And B must be an int. Right? We know from this usage, we can see here from this array access B must be an int. We can only access arrays with ints. So there's other things implicitly that we know here. So we know that the return type of C is also going to be the return type of foo. Right? We know those have to be the same. We also know that whatever A is an array of let's say it's an array of W's that must be the same type that C accepts as its first parameter. So we're going to have A is going to be some array of type T. B is going to be an int. And then C is going to be a function that takes in a T and returns a U, some new type U. And foo returns U. Actually even just from this type system we can kind of see a little bit what's going on. We can see that like okay we have some array of some type T's, we have some index into there and we have a function to translate from that type T which is the return value here. So we have some way to it's essentially translating like C is translating from T's to... So does this mean that T and U can't be the same? Not necessarily. Not necessarily, exactly. They can be the same. It doesn't prevent that. Cool. So this is in our simpler format. New function. So now we say A is 10. So usually we're not going to do it like this with the statements. We're very clear to read here. So A is a 10. We're calling A passing in B bracket C. So what's the type of foo here? So what's the type of... let's go in reverse order. What's the type of C? Int type of B an array of something type of A an int Oh I see. A is a function that returns an array of something in returns. So what does this function say that A is? Is it A? Sorry, a function. What does this line say? What does this line say that A is? A function. Can something be a function and an int? If you believe. If you believe hard enough? No. Type error. You cannot do that. Sure question. Yes. So Hindley Milner type checking is a general algorithm to do this for a program to automatically infer what the types are at all points in the program and for all variables. And this is amazing because you as the programmer don't have to specify any of the types. The type system will help you and decide the types for you. And the key idea is that it leverages it uses kind of like you think of it as like base knowledge, right? It uses these things that we were doing, right? Means that the argument to the array access returns some type I and that means the array that you're accessing must be a type array. It uses function calls so it knows that function calls, the types have to be based on the invocation. It knows how many parameters need to be in that function. And then it builds up on that and it builds these together to try to infer the types. And if it can't, if it ever gets to a point where it tries to say, oh, an int is the same as a function or an int is the same as a string that throws a type error. And so this full the full Hindley Miller type checking is used in OCaml, F sharp, Pascal, a lot of actually really cool languages that are fun to play with. So the key idea here is you first need the type constraints of your language, right? If you have no constraints then everything always type checks, right? So we first have constant integers, right? So we know what are the types of constant integers and we're going to call them ints. They're going to be type int. Constant real numbers. So when we have floating point numbers what's the type of those? Reals. We have constant Boolean. So we have true or false. Almost like you're doing a homework assignment on this. Right? Types Boolean and we have strings. Right? Where the types are strings. So constants, all the constants are specified types. We have our operators. So we have relational operators. So we have some operator which has some type t1. I'm going to draw in tree syntax which is going to be clear when we go through the algorithm. So we have our operator and we have the first the left side which is a, the right side which is b. So the way we like to think about these is these are elements of the tree, we have a child which is another node. It has a right child and it has all these types t1, t2, and t3. So our type and operator in this case is all these different types of operators. So what we have here is we have constraints. Our type system is going to enforce constraints. So it knows when it sees a relational operator what does it know about the types here? From your project. Type t2 and t3 have to be equal. Yes, what else? Type t1 is a Boolean. Type t1 must be a Boolean. Type t3 must be equal. And you can also say maybe they have to be numeric types or like in our language you can just say they have to be the same type. Tech operators work very similarly. They have plus, minus, multiply, divide. So the constraints could be that now here they all have to be the same type. Because when you add two numbers, two n's together, what do you get? An int. Yes. So we're saying that they're all the same and then this constraint says that they have to be a numeric type. So this would restrict us even further by saying maybe it can't be a string. We have our array access operator. On the left side we have the array that's being accessed and on the right side we have the parameter that's inside that array access. So this would be a bracket b. We can see that. Can you tell us about the types T1, T2 and T3? T1 and T2 must be equal. T1 and T2 must be equal? No. Because you have an array of whatever type. So you have an array of ints. What happens when you access an element to that array? What type returns an int? What's the type of an a in that situation? An array of ints. Same thing as an ints? It is not. Very close though. T2 is an array of type T1. Yes. So T2 must be an array of type T1. So we know that A must be an array and we know that whatever that array is composed of must be the same as whatever it returns. So what do we know about T3 here? It's got to be an int. Function applications. So we're going to use this to represent apply. Function applications. And on the left most we're going to have the definition of the function. So it's going to be f. Then we're going to have all of the parameters. So applications. This is not function definitions. This is when we're calling a function. So what does this tell us about the types here? When we call this function. So what do we know about the constraints here? What does this tell us about f? F is the return type. F is? We're going to use this. F is the type of variable foo. The return type is going to be r. So what does this tell us about f? It's a function with types T through T0. T1 through Tk? Yeah. What does it return? It returns r. Yeah. So f. This tells us that f must be some function. It's a function that takes in these arguments and it returns whatever type that that returns. We will stop here. We will finish this on Friday.


In the next decade or so, 60% of North America's job force will disappear. Now that is shocking. The question then becomes is, how can you protect your future? How can you protect your kids' future? So let's first investigate this job force. What is disappearing? Out of the 60% of jobs disappearing, majority of these jobs in general are robotic jobs They are aggregate and apply. Meaning the individual in this job is doing data research. That's the first step. So they gather data. The second step is with that data, they now apply that data to a procedure that is aggregate and apply. If you think about this, any robot can do that. Any software can do that.  You see it. You know, more and more jobs are being replaced just the other day. I think I was reading TechCrunch or one of these big media websites and I saw McDonald's has hologram cashiers in Hong Kong. Hologram cashiers, okay? Think about that for a second. Hologram cashiers. So what can you do to protect yourself and your kids' future? You've got to be educated. Not being educated, but being educated if you get my drift. There's a two big difference right there. You've got to look at the trends. You can't be passive in life. You can't just say, oh, the government's going to help me or the school system's going to help me. No, you have to be aggressive. Not passive but aggressive. You've got to push yourself. You've got to go out there and figure out what's going on. They ask Abraham Lincoln, Abraham Lincoln, how are you so good at predicting the future? He's like, I don't predict the future. I make my future.  They read. They research. They get mentored. They educate themselves on a daily basis. They understand the trends. What's happening on a global economic scale. So let's go deeper into that 60%. If we're talking about replacement, that means new industries are being born. Robotics is going to be huge. That's going to be a trillion dollar industry. So there's a perfect example for you. Maybe you can get into robotics. Maybe you can learn program. I always tell everybody, if you want your kids to have a brighter future, teach them programming. What's that? It's front-end programming, back-end programming, blockchain programming. Whatever types of programming, they'll lead down the same rabbit hole. If you learn one, you learn many. Learn programming. Forget English or Mandarin language. So verbal language. It's all about the mathematical heuristic language that's going to be the future. So programming. Number two, hardware. So if we're talking about robotics, obviously we need to develop these robots. That equals industries. So get into robotics. Now where robots become security. I just finished reading Alec Ross or Alec Ross' book, Industries of the Future, and he talks about securities. This is going to be a trillion dollar industry. That's why I'm a big fan of blockchain coming up. Not Bitcoin or anything, but blockchain from transfer of information from point A to point B. So maybe you can get into securities. What I mean by securities is software securities, hardware securities. Securities in general. People always need to be secure. Technology needs to be secure. Programs need to be secured. Robots as personal property need to be secured. Next industry that's going to be disrupted is medicine. Huge disruption going on over there. Most of these big venture catalyst firm, including Sequoia, they are doubling down on genomics. So gene science. Maybe you can get into that. This is where sometimes post-secondary school comes in handy. But this is specific. Now generally you're not going to get a Bachelor of Arts or just even Bachelor of Science. You're progressing your field. So you're learning maybe molecular biology. Or you're learning, for example, maybe get your PhD in some genetic manipulation, etc. So it's very specific and just for that field. And you know for a fact that you're going to be focusing on that and you become a specialist at that. And we always need health and genomics. There's a fine mixture of industries over there because with genomics you have biotech, biotech, you have robotics. Robotics you have more into B2B play and also B2C play. Now let's look around us. What are some immediate industries that you and I are going to be affected within the first five years or the next five years? I was just with a councilman over here in Toronto and we're talking about plans for the new automated self-driving cars. Within five years Toronto will have self-driving cars. Self-driving cars. Self-driving cars. So what does that mean? All these taxi drivers complaining, see you later. Even the Uber drivers, see you later. So what's going to happen? Well, trucking in the street, goodbye.  You don't have a job.  How many truckers are there in North America? Hundreds of thousands. Maybe there's two million truckers in North America. What do you do with two million truckers? Well, hey, let's look at what they do currently in their job. They sit down anywhere from, like I say, minimum of 15 hours to the maximum of 40 hours. I hear some crazy stories of truckers. So they're used to sitting and they're used to paying attention on the road. Great. Perfect job for programming. Get them a crash course six months in the basics of programming and get that workforce up. We have a shortage of real good programmers because most majority of them that go to San Francisco or Israel or even now Russia, Russia is paying for a lot of them to go over, which I don't blame them.  So all the power to them. But here in Canada, we need a better job force or a bigger, you know, coder job force. We need more coders over here. So this is a great opportunity for private corporations and governments to team up together and create maybe like a small six month crash course for these truckers. What's another industry to disturb the cashiers? You know, I know a lot of people hate me on this, but I'm telling you right now. Forget about hate. Forget about what you like. It's about reality. It's about what's happening today right now. Cashiers are going to go bye-bye. See you later. So what do you do? Well, you're standing around already. You like customer service. You like helping people. There's many other jobs out there or other industries opening up. Hospitality is big. Look at other hospitality items or maybe this is a great opportunity for you to say, Hey, I'm not really cut out to be cashier. I'm meant for so much more than just standing behind a desk and scanning items. I think human beings are worth so much more and human beings can do so much more than take an item. Go tick, tick, tick. Well, you know, do you want your receipt with that? No. That's a perfect job for a robot. Instead, we got to figure out what your gift is, what your talent is. And like I said, I think it's a fiduciary responsibilities of some corporations and some municipal governments. Forget federal. I believe in more or less your municipality, your local MPs, your local area helping you out as opposed to asking for the federal or even provincial, okay? So it's a scary fact for a lot of people to take in that 60% of the job force will disappear within the next decade or so. But I think it's fantastic. This is evolution. There's no such thing as bad evolution or good evolution. I personally believe this is great. I believe the quality of living is increasing. People are living longer. There is less war out there. The means of communication for information is blink of a button, you know, or blink of an eye or touch of a button. It's right there. I'm going to snapchat. Boom. I'm on Yahoo News. Boom. I want to talk to some people in China. Boom. I'm right there. The amount of knowledge and information is so rapid, it's connecting the whole world together. And the possibilities of doing business like, for example, me, 99% of my businesses online, all the businesses I have is online. Whether that is, you know, the membership sites I have, whether that is software I have, whether that is all these other different businesses I have, it's 100% online. That being said, this opens up possibilities. If you're looking at trends in 2017, they're predicting $2 trillion in sales and e-commerce. alone. You know, probably SaaS, SaaS must be up there in the $10 trillion area for SaaS, the software as a service globally, both B2B and B2C. So those possibilities are here, but it's up to you to carve your future. It's up to you to push forward, to become educated, not being educated, but become educated, know everything, become a connoisseur, a wisdom in life. Don't sit back and pretend everything is going to be okay. Being passive is the definition of dying a slow death.  I'm not against government. I love government. I believe, I believe we give too much power to the government because at the end of the day, if you look at the word government, government literally means the power of the people. We give the government the power as a democratic society and as our voting dollar and our voting rights. So it's up to us as a collective, as a government to strengthen the bonds of what's happening in society today as opposed to being passive. Who cares if it's just politics?  You better know what's happening. You better know everything what's going on. There's that saying, if you walk in a room and if you don't know who the schmuck is, well, guess what?  So get to it. Educate yourself. Learn about the trends. Learn about robotics. Learn about genomics. Learn about programming. Learn about securities. Learn about everything. Everything to do with online. I think it was. By 2020, not too long for now, four years, five years, they're saying another billion people will be plugged in online. I'm doubling down my businesses in China and India and South Africa. These are emerging marketplaces around the world. I'll give you an example. In Kenya, they have a hundred million dollar marketplace for buying and selling cell phone minutes. They can buy bread with cell phone minutes. They can buy bus tickets with cell phone minutes. They can buy anything. It's a currency. What does currency trust? Great market opportunity. In fact, if you want to study a great African who kind of revolutionized the telecom industry, study Mo Ibrahim. He sold his company. I think I believe to a Saudi company, but study Mo Ibrahim, he pretty much brought the telecom industry to Africa and he's doing amazing philanthropy work right now. But once again, you know, Mo saw the trends. Mo educated himself. Mo took a risk and Mo put everything on the line to better himself and better his fellow man in Africa. So what are you doing today to better yourself? What are you doing today to educate yourself? Now being educated once again, educate yourself. An educated individual is not an educated individual to different things. Okay. So that's it. You know, I just want to quickly talk about this whole job forcing because I believe it's gonna we're gonna see some crazy disruptions in the future right now coming and a lot of people won't be ready for it. I didn't mention VR. That's a whole different video. I'll get to VR in the next video. I believe that's an exciting industry. It's going to be a monster industry. But there's also the dark side to that. All right, guys, I want to hear your comments and opinions about the job force, about being educated and about bettering yourself. Leave a comment below this video. Adios.


Good morning. My name is Abid Farooqi and I'm also an ophthalmic pathology and research fellow with the Mamelis and Warner Lab. Thank you to my colleagues for giving us such a fascinating talk on intraocular lenses. I hate to break the trend, but I'm going to be talking about another subject that I've become very intimately involved with as a member of the ACS, ASCRS form task force, toxic anterior segment syndrome. So I'll start off with a case presentation and talk about what TAS is. The causes, diagnosis, treatment, and how we can kind of assess the outcomes of... So we have a case, a case report from the VA hospital in Indiana in which five men ages 64 through 81 years underwent a clear corneal incision, fecal emulsification surgery with the insertion of an Alcon SN60WF lens. There was significant past medical history in four out of the five men for hypertension and diabetes. However, none of them had any significant ocular history. All surgeries were similar in respect to the cataract densities, the amount of energy dissipated during the procedures, and the length of the surgery itself. All medications and solutions used were the same for each surgery, and there were no recent changes to any medications or surgical procedures or surgical equipment at the VA facility.  Two of the patients had hypopionic fibrin formation in the anterior chamber, and none of the patients complained of ocular pain. Visual acuity ranged from 2070 to 2400, and all patients had normal intracular pressures. These patients were felt to have a diagnosis of toxic anterior segment syndrome, and were treated accordingly. So I'll refer to toxic anterior segment syndrome as TAS now, and TAS is a sterile inflammation of the anterior segment following any anterior segment surgery. Most commonly, this complication arises after cataract surgery. However, any anterior segment surgery can result in TAS, such as glaucoma surgery or a corneal transplant. Presentation of the symptoms of TAS generally occur within 12 to 48 hours postoperatively, with the majority of the patients presenting within the first 24 hours. The pathophysiology of this process is thought to be an activation of the inflammatory cascade mediated by a toxic insult that enters the anterior segment of the eye, either during or immediately after the surgery. This inflammatory cascade causes the toxic substance is damaging to the corneal endothelium and other sensitive tissues in the anterior segment of the eye, causing corneal edema from the damaged corneal endothelium. Also, the trabecular mesh work and the iris are also sensitive structures in the eye for increasing the risk of glaucoma or other iris effects. The prognosis of the inflammation and this cascade varies depending on the amount and the type of substance that enters the anterior segment, how long that substance is within the anterior segment, and how long before treatment is initiated. Some of the symptoms that patients will come into the clinic presenting with are blurred vision, conjunctival injection, and photophobia. However, pain is usually absent and this will be helpful in distinguishing tasks from another very critical diagnosis, which I will discuss in a few minutes. Some of the signs on slit lamp examination is this characteristic limbis-to-limbis corneal edema. You'll see increased cell and flare in the anterior chamber. You'll also possibly see hypopion formation and fibrin formation and a dilated or irregular pupil and increased intraocular pressure. These last two are more commonly seen with more severe cases of tasks. However, it is also likely that patients will present with some of these findings. Just a quick note on the increased intraocular pressure. Usually most patients will have normal pressures upon presentation, but as the healing process resumes, their pressures will increase. However, some patients will present with a more severe case with damage to the trabecular mesh work already and will have intraocular pressures up to 50 to 60. Here are some of the pictures of the findings that I was just discussing. You'll have a diffuse limbis-to-limbis corneal edema on the left. You see this increased conjunctival injection with the hypopion in the anterior chamber. This last picture is a picture of a severe case of tasks in which there is iris atrophy with a fixed dilated irregularly shaped pupil and iris droma defect allowing for transillumination of the iris. It's difficult to see here, but the haptics are able to be visualized through the iris. One of the distinguishing diagnoses that is very important to rule out when thinking of tasks is infectious endothelmitis. This chart right here is to help distinguish some of the main differences between the two entities. One of the first I want to draw your attention to is the onset of symptoms. In tasks, this generally occurs very acutely within 12 to 48 hours. However, in infectious endothelmitis it takes a little bit longer, usually two to seven days post-operatively. Even the most virulent strains of bacteria won't result in symptoms until a few days after. The corneal edema is limbis-to-limbis, and I hate to sound repetitive, but it's very characteristic in tasks. In infectious endothelmitis, you might have focal edema or none at all. In the anterior segment inflammation, it's generally a little bit more severe in infectious endothelmitis with greater hypopion and fiber information. Also, as I mentioned earlier, the pain usually with infectious endothelmitis will have the majority of patients complaining of pain, whereas the opposite is true of tasks. If there's ever any uncertainty about the diagnosis of tasks, obtaining a gram stain and culture, obtaining aqueous and vitreous fluid for a gram stain and culture, is very important in ruling out infectious endothelmitis. Here are some of the findings characteristic of infectious endothelmitis. The conjunctival injection is much greater. There isn't a diffuse limbo-to-limbo corneal edema. However, there is greater hypopion. Also, the visualization of the posterior pole will be obscured by a classification of the vitreous. Moving on to the causes of tasks. Given that the causes of tasks are numerous and varied, there is an evaluation of all surgical procedures and protocols when a case of task arises. To simplify, I'll categorize the causes of tasks into two of the more common causes. Intracular medications and solutions can commonly cause tasks. Balanced salt solutions, any solutions used in the eye, can cause tasks if there is irregular pH measurements. Ionic composition is off, or if there's some contamination within the solution. More commonly, topical ophthalmic drops that contain preservatives and stabilizing agents are damaging to the corneal endothelium, which is very sensitive to these agents. That's one of the more common causes of tasks. Epinephrine that's added to VSS during the surgery to help with tuple dilation commonly contains stabilizing agents like bisulfites and metasulfites. These are preservatives like benzalconium chloride, and these are very toxic to the corneal endothelium. Also, I just want to bring your attention to OVDs, ophthalmic viscoseurgical devices, which are toxic in and of themselves if they're left in the eyes, but there's also a chance that if the surgical equipment used is not cleaned properly, that they may retain some into lumen, and upon subsequent surgical procedures, these can be released into the anterior chamber of the eye, causing an inflammatory reaction. One of the other major causes of tasks that was noted to be one of the most common causes during a 2006 task outbreak in North America was a cleaning and sterilization of instruments. This includes reusable cannulas and handpieces, and also talks about the enzymes and detergents and ultrasound vats. Like I mentioned earlier, these lumens of these handpieces may have retained cortical material or dried OVD that is not removed sufficiently. Through the sterilization process, these persist and allow for further contamination in subsequent surgeries. The enzymes and detergents are also noted to not be necessary, given that the bio burden accumulated on these equipment during the procedure itself is not so great compared to other general surgical techniques and instruments. Therefore, the toxicity of the enzymes and detergents, if not rinsed away properly, will create more problems than they help. And ultrasound vats similarly are not necessary given the low bio burden during cataract surgeries, and these have a tendency to get contaminated with gram-negative bacteria, producing endoscores that are not denatured during sterilization. And finally, poorly constructed wounds can also allow for substances to enter the anterior segment during surgery and after surgery. So treatment, as I mentioned, prevention is the best form of treatment, so making sure that surgical procedures and protocols are adhered to strictly is the best way to avoid complication of tasks. However, if there is a complication of tasks, you'd want to immediately treat them to reduce the inflammatory response. Removing any residual material that may be causing the toxic insult is necessary, but then the medical treatment is generally a topical prednisolone acetate, 1% every one hour, with close observation and follow-ups to visualize the improvement of the inflammation in the anterior chamber and also to make sure that intraocular pressures are maintained. Then it's also important to analyze the outbreak. ASCRS has created an ad hoc task force that will help analyze any of these outbreaks of tasks. It's readily available on a website that I'll mention soon. And just going to the prognosis and outcomes of tasks, usually most cases of tasks are mild, and there'll be resolution of the anterior segment inflammation and corneal edema within days to weeks, with no residual sequelae. To moderate tasks, there's a little bit longer time for resolution of the corneal edema and the anterior segment inflammation. Some will have mild residual corneal edema, most will resolve completely, and this group is more susceptible to elevated intraocular pressure increases. And in severe tasks, there is permanent damage to the anterior segment of the eye. There's persistent corneal edema, possible assistoid macular edema, iris atrophy like that fixed dilated pupil that we saw in the picture with a thinned iris stroma, and severe glaucoma that is difficult to treat medically and will usually require some surgical intervention. And rarely these severe task cases will require systemic medical treatment. So in summary, if you see a patient with diffuse limbo-to-limbo corneal edema that is normalizing 12 to 48 hours post-anterior segment surgery, think of tasks. However, it's imperative to rule out infectious and ophthalmitis, and also initiate treatment immediately and monitor closely for any progression of the disease. And also it's important to analyze the outbreak. If you have a task outbreak, there's a standardized protocol and survey that is available on the ASCRS website that will allow you to receive advice on an evaluation on what may be causing the task by a task-created task force. That's an awful. Anyways, I will be one of those individuals this year that would help to analyze the outbreak as is our Dr. Mamelis. Here are my references, and thank you for listening. Dr. Mamelis would have a better understanding.


Hey everybody, Dr. O. We just got done talking about your typical basic atom, now we're going to look at isotopes. So here you see three different versions of carbon. The standard isotope or version of carbon is going to be carbon 12 or 12C. It's called that because its mass number is 12. It has six protons, which makes it carbon, and six neutrons. So six plus six is 12 there. That's going to be a very stable version. Then you see carbon 13 in the middle. It is carbon 13 because it has six protons, but seven neutrons. We don't talk about that one as much, but then carbon 14 has six protons and eight neutrons. That's where the carbon 12, 13, and 14 come from. You'll notice that carbon 13 is still pretty stable. Carbon 12 is very stable. Carbon 14 will be called a heavy isotope, and usually when you take an isotope and it has more neutrons, it becomes unstable, which makes them radioactive. The reason they're radioactive is as these unstable isotopes slowly degrade in what's known as their half-life, how long it takes for half of these unstable isotopes to disappear. That can be 12 years or 12 million years. They're going to be releasing subatomic particles and releasing electromagnetic energy, and this energy can be damaging. So exposure to radioactive isotopes like carbon 14 can damage human cells, cause cancer, cause birth defects, these kind of things, but they're still important for many reasons. Now because we know the half-life of carbon 14, we can use that for what's called carbon dating. If you can control the exposure to radioactive isotopes, then it can be useful in medicine. Think about radioactive iodine. That's actually a treatment for hyperthyroidism. We know it's radioactive. We know it's going to damage the cells of the thyroid, but that's the whole point. You're trying to destroy the thyroid gland to make someone hypothyroid and then treat that. So if you control it, you can actually use radioactivity in a good way, and then also you have all the radioactive ways that they can measure things in the body too. You've got tremendous amount to know about isotopes, but you should be familiar with that term and where it comes from. This is Isotopes. I hope this helps. Have a wonderful day. Be blessed.