Oh, no. All right, that's weird. Come on. Come on. There we go. All right. Welcome back to, all right, welcome back to Computer Fundamentals. Thank you for joining me again today. So today we get to talk about variables and we have to rewind rewind a bit and talk again about how computers work. So programs always access memory and when again when we talk about memory, we're referring to RAM or random access memory also called main memory. Those things all mean the same thing. So we can also access long term storage or long term memory through main memory by asking the OS, but that's not covered in this course, but it's something you will see later after you have the fundamentals. Using files and things like that will be really straightforward. So we get to talk about how computers actually access memory and they again access memory in something called bytes. So recall that one byte is eight bits. You will have this seared into your memory. If you are into computers at all, that is one thing you will just, if you ask anyone in ECE, go up to them and ask how many bits are in a byte, they'll be able to tell you. You'll also be able to tell people. So if there are eight bits, that means there are 256 different representations because while each bit could be a one or zero, there's two options and since I have eight of them, there's two to the eight different possibilities. So we went over last lecture how you can actually write out a number in binary. Same principle as writing it in base 10. There's a hundred column, the tens column and the ones column. Well, with powers of two, each column is a power of two to another exponent. So instead it's the ones column, the tunes column, the fours column, the eighth column and so on and so forth. So if you use that scheme and you have eight bits, the numbers you can represent are zero. So everything is a zero, zero times any exponent and adding them all together is going to be zero. And if they're all one, that's going to be like 128 plus 64 plus 32 all the way to one using powers of two and that number is going to be 255. So in general, if we are using like the whole number representation, so numbers that are zero or positive, then if we have n bits, we can represent the number zero to two to the n minus one and that is inclusive. So that includes both ends. So if we have eight bits, we can represent numbers zero to 255. So in memory, every byte has its own unique address. That is just another word for its location in memory. And we call memory byte addressable. So the smallest unit you can actually access in memory is a byte. You can't access a single bit. You have to access an entire byte at once, which is again eight bits. So this is kind of what it looks like in memory. So each address contains a byte. So here, the blue boxes represent a byte and that is the value of the byte. And I will just write it out in decimal because we're human. So it's easier to understand. So every number in a blue box since it is a byte will be zero to 255. So below each is the address. So computers can store a lot of bytes. So the byte that has the value 50 or 57 might be at address 512,000 or something like that because it can store a lot of bytes. So this is how memory would look. So there might be different values. In this case, we have four bytes across the top and the address would just go up by one. So it's just like having an address of a house, although these just always go up by one instead of odd numbers on some street or something like that. And then we'd have four more bytes at the bottom that just continues along the same way. This one seems to have a bigger value, but it doesn't really matter. Each address stores a single byte. So any questions about that? Very important to know. In fact, for some reason, 30 years still get this wrong. So as long as you remember this, you are good. So your CPU has instructions to access memory. So an instruction can read a byte from memory. That means it retrieves that value that is stored in memory and then the CPU can access it. And another instruction can also write a byte to memory so you can transfer some information from the CPU to memory. Thankfully, in this course, you don't have to deal with that. This is why we use programming languages because that is very, very tricky to get right and very, very tedious. So this is why we use programming languages. C handles this for us, thankfully, but it's still important to understand what's actually going on and how you actually store information. So the number of actual addresses depends on your CPU. You may have heard the term, oh, I have a 64-bit CPU, and that means the CPU can address up to two to the 64 things. So it has 64 bits that is used for that address. And it's easiest just to think of that address as just a whole number. So if I have two to the 64 possible addresses, if I write out what two to the 64 is, it is just a gigantic number, which is like 18 quintillion bytes. So if I have a 64-bit CPU, I could actually access up to 16 quintillion bytes. So that's just to say computers can hold a lot of bytes. And saying 18 quintillion, no one has ever heard that representing some storage size or something like that. So we communicate using prefixes instead. You might be used to this while with normal units. So you have meters, and if you have 1,000 meters, you have a kilometer. In the United States, you have some garbage. All right. So the typical prefixes for computers are kilo, mega, and giga. So whenever we write units, if we're specifying a size of something, we write a byte as a capital B, and then a bit as a lowercase b makes sense. So the upper case is the larger one. A byte is 8 bits, and a bit is only, well, 1 bit. So we write it as a lowercase b. So you might also see this difference when it comes to your internet speed. So when you see something downloading, it'll probably be in megabytes capital B.  It's a lowercase b. So if you want to get the actual theoretical speed, you have to divide by 8 or multiply by 8. Or divide by 8, yeah. So they try and give you the bigger number, and if people don't know the difference between bits and bytes, then they won't know the difference. So we're used to a kilo being 1,000, but because computers are in powers of 2, we use a power of 2 instead of exactly 1,000. So 1 kilobyte is actually 1,024 bytes, which is 2 to the power of 10. That just happens to be a number that's close enough to 1,000. And 2 to the 10 kind of makes more sense to us as humans. And 1 megabyte is going to be 1,024 kilobytes or 2 to the power of 20 bytes. And then 1 gigabyte is 2 or is 1,024 megabytes or 2 to the power of 30 bytes. So old computers that your parents use that I have definitely never used because I'm that young. Well, they had 32-bit CPUs, and that means since memory is byte addressable, that means I can only access up to 2 to the 32 different bytes. So if you want to use our prefixes, we can rewrite whatever 2 to the power of 32 is using something that might be more readable to us. So using that exponent law from math, we can rewrite 2 to the power of 32 as just 2 to the 2 times 2 to the 30. And we now know that 2 to the 30 is 1 gigabyte. So in other words, this would be able to address up to 4 gigabytes of memory, which is just too small for us now. Most of our laptops probably have more than 4 gigabytes of memory. That's why we had to move away from it and have 64-bit CPUs, which as you might notice, computers like powers of 2. 64 is just the next power of 2 after 32. So C uses something called types to describe values. So I had a question of that yesterday of like, well, if like the number 65 is an A, how do you tell the difference? So types are a way for you to tell the difference of what that byte is actually supposed to represent. So a type actually tells you two things. It tells you, most importantly, to us, what it represents. And it also tells you how much memory they use. So for instance, an int is a type that represents an integer. So it's kind of a shorthand. We like shorthands in computing. And you just have to know that it uses 4 bytes because if you read the C standard, that's how big it is when they tell it to you. And this integer can represent positive and negative numbers and without any decimal points behind them or anything like that. Just a straight up number, no decimal points. So how do we actually represent this number? We kind of saw how you can take a binary number and then just convert it to a number. So well, that's kind of true. And if we have 4 bytes, that's 32 bits, so 4 times 8, that gets us to 32 bits. That means there are 2 to the 32 different representations of those bits. So if this was a whole number like we had before, what numbers could it represent? Or what is the range of numbers that it could represent? If we remember from before the generalized form of it, yep, yep, yep. So it would be close, so it would be 0 to 2 to the 32 minus 1. So it can represent any number in that range. So that would be if it was just using that whole number representation, that would mean it could represent 0 to, was that, 4 billion something. But integers can actually represent negative values, so there has to be a way that it actually stores it. So this is how it actually stores an integer. And I just write out every single bit here, so this is like our same idea of having columns to represent the value of each bit. So we have 2 to the power of 0, 2 to the power of 1. And since we have 32 bits in this case, it goes all the way up to 2 to the power of 31. So some terminology here is bit 0, the one that represents the 1's column. We always call the least significant bit because it has the smallest value. And the bit at the very end, so the highest value, in this case it would be bit 31, we call that the most significant bit because it has the largest value. But when we represent integers, that most significant bit, specifically for integers, we interpret that as a signed bit. So that tells us whether the number is positive or negative. So if that number is 0, it means it is a positive number. And then the remaining bits here represent just the whole numbers that we have gone over before. So the range of this, if these were a whole number, so we have 31 bits left over, would mean we have a range of 0 to 2 to the power of 31 minus 1. So those are the positive values we can represent. So any questions about that? Yep. Yeah, so that's a good question. So does that mean we can store negative 0? So there is a way to represent negative 0 in the olden days, but we have learned since then. So you might think of one way to represent negative numbers is, okay, I'll just take that signed bit, one means it's negative, and then I'll just interpret the rest as a number, in which case you would have negative 0 and positive 0, which would be weird. So you'll learn in 243 how we actually represent that. But it's close. It was a good idea. It was used for a time. What actually happens is that signed bit, yeah, 1 means it's negative, but the remaining bits I will not tell you about. So you just have to trust me for now that the remaining bits, well, there is 2 to the power of 31 possibilities, and there's no representation of negative 0. There's just a plain 0. So the range of negative numbers is negative 2 to the power of 31. So our entire range that we can represent with an integer is negative 2 to the 31, all the way to 2 to the 31 minus 1. So any number that is smaller than the minimum and larger than the maximum, we can't represent with an integer. We need something that has more memory. So computers have a finite amount of space, ints have a finite amount of space. In this case, 4 bytes. So we saw how to start AC program later. Some of you may have already started the lab 1 and have started it, but you are way ahead of us. So this is how you always start AC program. There will be something like int main void, curly brackets and a return 0. So now we can actually, I can actually explain this a bit more to you. So what this does is define a function called main that takes no input. So void is actually another type just like int, but it has a special meaning. It means nothing. So this says, if we take that black box model again, it says this function main has no inputs. That's what void means. And its output is an int. So its output is 4 bytes. It's a whole, while it's an integer that will be something between negative 2 to the power of 31 all the way up to 2 to the power of 31 minus 1. So that space right after the main, we can add something called statements there between those curly brackets. We usually call them curly brackets right here and right here. And the computer will run those statements in order.  They will not, they do not have a mind of their own. They will start running those statements and they will always go in order. So whenever you have to reason about your program, just remember computers do exactly what you tell them to. So they only go line by line by line is what we call it. So that return is actually also a statement. So it starts with return. And then it has a value that matches the function's output type. So zero is an integer. So that we're allowed to do that. That is a perfectly valid output to have. And all the return statement does is stop executing the function and produce an output right away. So at that point, this function is something we call, say, it's complete. It has given us an output and it won't execute anymore. And our program is done. So usually just note that usually every statement in C ends with that semicolon. You'll probably get some problems whenever you start programming that you forgot the semicolon. Don't worry about it. Just get in the habit of just putting a semicolon at the end of every line. C is a little bit annoying in that way. But it's just something we'll have to get used to. Yep. Yeah, so that's a good question. Sorry, what's your name? Daniel. Okay, so Daniel had a good question. Why does this main function output an integer instead of just void and do nothing? So that integer is actually read by the operating system to see if your program had an error or not. But in this course, we don't actually use it. So pretty much we'll always just return zero. But that's its actual use. Yep. Yeah, it's a bit weird when you start off, but it's a way to tell the operating system something. So we can actually declare, declare is another word for create our own variables in C. And they're kind of like real variables in math, but they're a little bit different in really annoying ways. So in programming languages, there is something called a syntax. You might hear that word. Syntax is just basically a set of rules you have to follow in order for your compiler to actually know what you mean and actually create a program out of it. So the syntax for declaring variables, so which in other words is the rule for declaring variables is you take, you just have a type and then you create a name and then you end it with a semicolon. So both of those words that are in the angle brackets are something you replace. So you replace that type with the C type. So the only type we know for now is int. We couldn't create a void variable because it doesn't exist, so it doesn't quite make any sense. So for now, the only valid type we could put there is int. And the next thing is just a name. So we get to name variables in C just like you name variables in math. So it has some of its own rules. So it always has to start with a letter. It can be lowercase or uppercase. We'll see what the rules are for them, but the compiler doesn't actually care. And then after you start it with a letter, then it can have letters, digits and underscores and you are not allowed to have spaces in your name. So if we go back to our C program, we can declare a variable called x. So we start int main and then the next line could be int x. So that creates a variable called x and its type is an integer. So that x will consume four bytes and it could have any value from the range we said before. So if we're saying what is going on that point, we say at the first line we declare an integer called x is probably how we would say it in English. So after when you run your program after it executes that int x line, then C sets aside four bytes for you to use for x. And now x just has a value. So instead of saying zero or one, if I want to get the value of x, I just say x. So how would that look in memory? Which is why we thankfully have C. So remember memory is actually like byte addressable. So it only stores in bytes. What C will do is just take a group of four bytes and then use that as a value for x and it will be somewhere in memory. In this case, it's the four addresses at the bottom. But you don't have to worry about it. It is set aside for you by C. So you don't have to worry about it. But it's going to be important especially later on that you understand what it is actually doing. So it's setting aside some memory for you to use for your x variable. The number of bytes it will set aside depends on how what the type is. Because the type, one of the things the type tells you is how many bytes do I need to actually store a value of that type. So if we have a variable, then we must be able to change it or at least assign it something. So we change the value of a variable through something called assignment. The syntax of an assignment statement, so again this is something that ends with a semicolon, is you take a name. So this should be a variable that currently exists at this point in the program. And then you use an equal sign and then a value. So you replace a name by a name you previously declared. And then value by a value that actually is representable by that type of whatever name was originally declared as. So this trips people up. So I will say it slowly. So note, unlike mathematics, that equal sign does not hold true till the end of time. So if you say x equals one, that's only true until you change x again. And you're allowed to change x again and redefine it in programming languages. Unlike in math, where if you say x is two, it's always two. So that might trip you up. Just remember we always have to read a program or whenever we argue about how a program behaves, we start at main and we start reading line by line in order. So computers aren't any smarter than that. If you see x equals one, that only means x is definitely equal to one at that line. So let's put it into practice. So if we have int void main, we have int x. So right after this line, x actually has a random value. So this will also trip you up at one point because if I just declare x, all c does is set aside some memory for you. And it turns out that it's not that picky. It just sets aside some memory for you and it will actually just be what it seemingly looks like just a random value. So only after I execute the next line does x actually have the value of one. So right before that, it has a random value. And then right after I say x equals equals to one, then it has the value one. Everyone good with that? Okay. So you can actually combine those two lines and do a bit of a shortcut if you want. So you can do an assignment as part of the variable declaration and then you don't have to worry about that random value. And I encourage you to always do this because typically if you have random values, it's really, really hard to figure out what is actually going on. So you should probably always use this and set the variable to some value. So it just kind of combines them together. So we can say type name equals value and then have a semicolon which ends our statement. So this statement does those two operations in one. So it creates a variable and then assigns it something we call an initial value. So that's the first value it has. That's what initial value means. So we might also call this initialization. So we might say we initialized x to one if we actually set the value to one. So our next type. So we'll explore some types we'll use in this course and then we're just going to use those types from now on. So this will be more or less the basic types you need to know. So in C there's a type called a char. So we like shortening things because we don't like typing, I guess. So char is short for character and that represents letters, digits, punctuation, something called white space which is a new term you'll probably haven't heard before and also something called control characters. So white space is just a fancy word to kind of group a whole bunch of things together. So white space means spaces, tab characters and return characters. So basically just things that change where characters actually are but are not actual like things we can see per se. They just kind of move things around. And the other thing is control characters, those you definitely can't see but they usually do something. So for instance a tab like the tab key generally moves something a few spaces but we can't see it. It's nothing we could print on the screen. It's called a control character and also your return key or enter key is also another thing that goes to the next line that is also represented by a control character because it's not something we can directly print on the screen. So a char, remember types need to tell you two things.  So they're always that one unit so we only have 256 different representations. So how we define a char value they start and end with just a single quote. So a char is only a single character remember we can't we can only have one at a time. So you could declare something called char C and then set it equal to single quote capital A single quote and then well as we learned in the last lecture well a actually gets a magical number associated with it so that would actually store the bit 65 but you don't really have to know that. So we need to be able to type out those invisible characters so they're called non-printable characters so we need to be able to say that a character is like an enter key or a tab key or something like that but we can't just press enter because it would move to the next line it wouldn't fit just within our single quotes. So in order to represent an enter key or something like that the rule is we need to prefix them with a backslash character and that tells C that well this represents a character that you can't you can't represent and the next character you type after that will tell C what it actually represents and not literally use that character. So this backslash is called an escape character it's basically a word to tell C hey I mean something weird here so just look at the next thing I type that will tell you what I actually mean we're breaking the normal rules here. So Wikipedia has will list all of them the only ones you'll use for this course are you probably will never even use the tab character but to represent a tab character it's this backslash t they generally just start with the letter that they're supposed to represent a new line is backslash n so this is the return character and we saw that that's what ended hello world so it was hello world and then backslash n so the convention is whenever we're done with a line you put a new line at the end of it to go the next line so you can also think of it as hitting return or you know sending a message so if you want to send a message to your friend or something like that or you send a message on discord you type what you meant and that won't send until you hit enter same idea for C you want to always do that enter character whenever you're done if you want you might notice that oh well if backslash is an escape character how do I make the character actually backslash so in order to represent a backslash you do backslash and then backslash so that means well I'm using an escape character but I really meant backslash so it's kind of weird but you'll get used to it and then well if a single quote starts it and I want to represent a single quote if I didn't have an escape character it would be like single quote single quote single quote which wouldn't quite work so to actually represent a single quote it's a single quote then backslash single quote and then a single quote to end that character again it looks a bit ugly but those are just the rules so we can also interpret that charge like we said before as a whole number so remember a byte can represent a whole number in the range 0 to 255 it just depends what that byte actually represents and that's exactly what types are telling us but under the hood in memory they're just being stored as ones and zeros it's only how we interpret them that gives them any meaning so which of those byte numbers corresponds to which character is defined by something called ASCII so it's short for the American Standard Code for Information Exchange it's a very exciting acronym so ASCII you'll probably hear people use that term a lot it only uses seven bits so that most significant bit of that byte is always zero and that would correspond to whole numbers in the range zero to 127 because we only have seven bits to use for our ASCII character but that turns out to be more than planning to represent the number of characters on a standard us keyboard it is a very us centric thing in order to represent characters in other languages that is a much more much more complicated topic so for now you can look up the values if you want on like ASCII table dot com again printing non-english characters out of the scope of this course we've only finally agreed on how to do it there was like 20 different ways to do it before but it's kind of it's more or less standardized now okay our next type is called a double and that represents a number that has a decimal point so if the rule in C should always be if you don't require a decimal point you should use an integer if you do need a decimal point you need a double and a double is eight bytes and the reason why it's called a double is because well there's a less precise version called a float and that's short for floating point it has to do with the way computers actually represent the decimal point so they move it around or they can move it around if that doesn't make sense don't worry you'll learn how they are represented in a later course not this one but just know that well there was something called a float it represents something with the decimal point in this course we won't use a float we're only going to use doubles so a double is just double the size of a float that's why it's called a double we don't really have good names in computing I don't know why so all you need to know though is that a double represents an integer with or sorry a number with a decimal point and it takes up eight bytes so for example if I wanted to create a double I would say like double pi and then equals to three point one four one five nine two so on and so forth so that is how you would define a double so the last type you'll be using in this course is called a bool it is short for boolean and a boolean is just a name for a value that can either be true or false and those are the only options so if it can only be true or false we talked about that before that should be like that light bulb it should only be one bit but in practice since memory the smallest unit of memory is only a byte a bool still takes up one whole byte so there are certain situations where it can lead to a faster program so if what you're trying to represent can only be two different values true or false then you should use a bool otherwise you should use one of the other types so by default you can't use the bool type if you just type it you need to add include std bool again that's short for standard so standard bool dot h to the beginning of your code and then after that you can define a boolean like this so bool is knowing equals true or your other option is equals false and with booleans you only have two options and why you need to do this is apparently booleans didn't exist in the 70s whenever they first came up with the c language they added it after the fact so all of the previous types except for bool are enabled by default so you don't have to do anything special in order to use them so these default built-in types are something called primitive types you might hear that term being used and for now in this course up until probably way after the midterm we're only going to use the types in char double and bool and that's it so after a while there's some other built-in types we'll see some more of those soon but for a good while this will do us for now later in the future we will also create our own types which is a lot of fun but that is something to look forward to later so when we develop software this is our usual development cycle so we start here by editing some code we think we have some great idea we think it's going to work so our next step and you might have already done this if you've started the lab if not don't worry about it so you edit some code and then we compile it and then well that code can either compile or it cannot so we get to a decision here which is that diamond shape so we ask ourselves well was that correct or not if it was not correct that means the compiler gave us an error or in other words it's telling us something is wrong and it actually can't create a program for us so if something bad happens when we're compiling we call that a compile time error or a compile time problem we have some issues when we're compiling if we successfully compile so we follow this decision here we're able to run our program so you might try running your program and then when you run your program then you check if it's correct if it produces the correct output that you expect if it doesn't well then that's something we call a run time error you know it might be something wrong with how you structured your program or how you thought about it or just something weird might be going on in if something is wrong well then you have to go back you have to edit your code change something try again go over the whole cycle again and again and again until eventually you run it it's correct and then you're done that done probably shouldn't exist because software is almost never done so just ask microsoft so compile time errors means you cannot create a program the compiler failed at some point so we can actually introduce an error ourselves to see what happens so if i start off by saying main void and then my first line is x equals one while whenever the computer runs this it will start executing it from line by line from top to bottom so if my first line is x equals one well it doesn't know what x is we haven't created anything called x at this point in the program so it has no idea what it is so we'll probably see something like this where we get an error and we get some weird terminology here that you haven't seen before it says the use of an undeclared identifier x so remember c runs like line by line from the start of main so if we break down this error a little bit this undefined x dot c that's just the name of the c file your c source code file usually they'll always end in dot c that's the extension for c and then it will have a colon followed by a number so that first number after the file name is the line of the error so if you start reading it line by line on visual studio codel also tell you what the line numbers are on the left hand side so that is the line of the error and then the second number here is the column of the error so wherever that error actually is and then it will tell you error in red basically the rule is if you see red you're dead so it did not work so that just means there was a problem at something it couldn't actually compile your program so in this case this error means we cannot assign a value to a name that does not exist so identifier is just a fancy compiler word for a name and in this case it's telling you that the name is x so use of undeclared identifier if i translate that to you in english it means that the variable x does not exist all right any questions about that okay so let us see it for ourselves okay let's not see it for ourselves sometimes visual studio code does silly things why visual studio okay here we go we are back so we can have something like this so this is the same thing we have before we have it main we have x equals to one and if we have something like this this should be a compiler error so your compiler may give you a different result but it will translate to the same thing so i have a little bit of a shortcut here where i just type compile instead of hitting the button because that's a bit more clear to me so it will try to compile it and then give us that error and it points to it says use of undeclared identifier x so we can verify that if we go ahead and we change it around so we put in x above and we go to compile it again it just gives of some warning that x is set but not used so the compiler is actually a fairly smart piece of software and it will give you warnings that you're doing something that is not quite right so what this is saying is that you don't actually use the variable x for anything so why did you create it in the first place but we don't really know how to do anything else uh any questions about what we have so far or want me to do anything silly with this program so something we oh yeah so yeah so it'll just at this point right here where my cursor is like whoops so right here x will just have a random value and we don't know how to print it yet so that's the next lecture we can print it in the next lecture but for now it will just be a mystery so we don't know enough to do anything that exciting yet the only thing we could do is we could get rid of this warning that says x is set but not used because what we can do is well all right we're not done yet so main returns an integer right so x is an integer so instead of returning zero well i could return x if i really wanted to so if i did this i should not have a compiler warning because i created an x i set to one and now i return x so i'm returning one from the value from main which is a bit weird so we should probably set to zero to just go with how we're doing it in this course but this means the same thing except that c is going to go ahead and set aside some storage for x for us all right any questions from today all right so we don't know enough to do anything silly next lecture will be the first fun one where we can do some really silly things so just remember pulling for you we're all in this together yep one second


Nobel-Red Professor Wally Schoencker says despite Nigeria's many problems, he cannot despair. He believes Nigeria's youth may have the energy and know how to get the troubled country back on track. Schoencker credits young Nigerians between 15 and 35 for trying to fundamentally reform the country. He cites the ends as protest a year ago against police brutality. Schoencker won the Nobel Prize for Literature in 1986, the first black African to do so. Now he's published a new novel, his first, in almost 50 years. It's a parody of the real-life Nigeria of today under the leadership of President Mamada Buhari. In 2015, Schoencker endorsed Buhari for president and asked Nigerians to forgive his past as a former dictator in 1980s, now Schoencker is critical of Buhari. Heidegen is reinventing the wheel. Each ruler comes and says, oh yes, I'm listening to people and they want to change, therefore let's meet and tinker with the constitution rather than go in deep inside and creating fashion in a totally different society than what is there. One of them wants to get into power, it's the same result. The author believes Buhari and his administration have been unable to tackle the extremist violence that's led to thousands of death and the mass kidnappings of school children. They refused to take action at the right time. They compromised, they even retorted the danger, the reality. In other words, they felt that just mere rhetoric could make it go away. Our children were kidnapped and that didn't wake us up and we lost our humanity. The extent that we watch human beings being slaughtered for ritual, we lost our moral bearings.


A lot of our roles as physicians is informed by, you know, kind of the previous history of the profession and of course there was a time in which doctors routinely lied to their patients that was viewed as part of our professional responsibility and of course I think we've all been socialized in reaction to that. So you know, I think that that is a prohibition again, at least with patients who retain decisional capacity that I think we would all respect as a matter of professional responsibility. As I alluded to before, you know, sometimes where things get complicated are, you know, particularly with patients who are sort of borderline capacity and we may be asked by a patient's family members to collude in certain ways or it may be a simple as, hey, you know, I get phone messages or voicemails from caregivers, let's say, you know, we have an appointment coming up. I want to tell you some things about what's been going on at home so you know, but I don't want you to tell, you know, the patient that we had this conversation, right? And that's a tricky one when we're communicating about someone's clinical status without their knowledge, right? So ordinarily we wouldn't be permitted to participate in this omission at least if not outright fiction. And so that's a tricky kind of situation or, you know, if we're asked by family members, you know, like, we don't use the term Alzheimer's disease or dementia and we say you're just going to go see the doctor, you know, when you go to the memory clinic. And so I think those are sometimes the trickier situations where it's not that we are creating the fiction or the omission but we're being asked, you know, to participate in it. I think my responses do often depend on, you know, my judgment of the patient's capacity. So I've had cases where I've had to tell family members, you know, I don't feel comfortable withholding that information at this state, you know, or, you know, I may need to ask permission to have this conversation with you.  So it is a bit situational and in my mind, you know, and this is my understanding of my professional and legal responsibilities, it does, it is framed around the concept of decisional capacity.


So let's just summarise what we know about certificates. What's the important information contained inside a certificate? Inside my certificate is my what? My public key. We use certificates to distribute public keys. Our problem is, when I receive someone's public key, I want to be sure that it is theirs, not someone else's. So remember, your certificate contains your public key. Who has a public key? Hands up. Who has a public key? Right now, on your computer, in your head, you do where? Somewhere in the computer. Somewhere in the computer. Okay, your homework. Generate your own. Okay, so your homework task. Task one, generate a public key. Or more specifically, generate a pair of keys. A public and private key pair. So in fact, that's the first homework task. You generate, just make note, we'll see it in the homework description. You generate your own key pair. P-U-A and P-R-A. How do you generate your own key pair? What algorithm may you use to generate a key pair? Again? What algorithm may you use? Don't you answer, because you've done the homework. Someone else. What algorithm may you... again? A-E-S. A-E-S, no. A-E-S is a symmetric key algorithm. Key pairs, public key cryptography. What algorithm have we... we've gone through two. One of them, the first one we went through was RSA. RSA is the most common algorithm used for public key cryptography. There are others, but we will use RSA. So when I say generate a key pair, you use the RSA algorithm to generate those values. And you've studied the algorithm. Remember, you go through those steps. Choose two prime numbers, P and Q. Multiply them together to get N, the totion of N and so on. There's some steps for generating the key pair. So in fact, you do that. But in your homework, you don't have to do that manually. We'll use some software to do it for us. You generate your key pair. But we want to use the certificates so that someone else knows that that public key is yours. So what do you do next? Once you have your key pair, how do you get a certificate? And as a hint, let's say you trust me. You send a request to me. What are you going to send to me?  You send me your identity and your public key. Okay, that's the idea. A certificate is a signed public key. So your certificate contains your public key. So what you do once you've generated your key pair and you can use some software to do that, you come to me and say, here's my public key and here's my identity to prove who I am. Your ID card or your name or something. So I can confirm it's you. So the more formal way we describe that is you create a certificate signing request. You want a certificate and you want a trustworthy person, a certificate authority to sign it for you. A certificate signing request, CSR. That's the name it's used in the homework, in the software that you'll use in the homework. It's called a certificate signing request which really is just your public key, your identity and really a message that's sent to an authority saying, please sign this for me. And it's up to the authority to confirm that this is you. So it's the role of the authority to confirm that this certificate signing request is a valid one. So you'll send a CSR to a certificate authority. In your homework, I have some software acting as the certificate authority. So what you'll do in your homework, is generate your key pair, generate a certificate signing request and you'll use some software that would do that for you which is create some message in a particular format such that when you send it to the CA, the CA gets the request and checks. Make sure it's from you. So that's the important part. The CA should confirm this is from you, it's not for someone pretending to be you. What does the CA do? If it confirms it's you, what do they do? What am I going to do? I send back your certificate. I issue you a certificate. And that certificate is your public key signed by me, signed by the authority. So the next step, the CA issues a certificate. Let's say we'll call it C of A. The certificate of user A, U. And it's signed using the authority's private key. Remember, we signed something by taking the contents, taking the hash of the contents and encrypting with the signer's private key. And the authority sends that to you. Or in general, sends back to A. What happens next? If you're user A, what do you do next? I have a guess. What are you going to do next? Sorry? Send to B. Before you send to B, you're one step ahead. Decrypt using the public key of authority. Verify. If someone sends you a certificate, including the authority, confirm, is this really the certificate? Verify. If it was signed by the authority, then when we decrypt with the authority's public key, we can verify. So the next step, before we use this certificate, we should verify. Even though it's from the authority, we should verify. And any certificate we receive, we should verify. And to verify, we need the public key of the authority. Remember, if it was signed by the authority, to verify, we need the public key of the authority. Signing is encrypting with the private key. Verifying is decrypting with the public key. And this comes back to this assumption that user A trusts the authority. Which means the user A has the public key of the authority and knows that it is the authority's public key. It's not someone else's. Now, the next step, when A wants to communicate with B, A sends their certificate to B. Assuming B has done the same thing, they send their certificate back. A sends their certificate to B. B sends its certificate back to A. That is, we exchange certificates. This assumes that B has also been issued a certificate in the previous steps. Prior to this. We're issued certificates by an authority. Once everyone's issued certificates, then they exchange them if they want to communicate. Then what? When you receive B certificate, what are you going to do? You just receive B certificate. What do you do? When someone sends you a certificate, what do you do with that? You verify. So always verify what you receive. Don't trust what someone sends you. In the homework, if someone sends you something, maybe someone intercepted midway between the sender and you and they modified. So don't trust what you receive. Verify. So verify B certificate. How do you verify B certificate? What do you need? Again, you need the public key of who signed that. In our simple case, we're assuming it's the same authority. There's just one authority in the system. The authority signed A certificate and Bs. So we verify using the same public key. In a more complex system, there may be a hierarchy of authorities. So we need to obtain the public key of the authority that issued this certificate. If someone else issued CB for A to verify, we need to find that other person's public key and be sure it's the correct public key. So in terms of exchanging certificates, we're done. Once they're issued, we exchange them and verify. But then if we want to communicate securely, now I want to send B encrypted file, then the most common application of public key cryptography is now to not encrypt using public keys, don't encrypt the data using public keys, actually choose a secret key, encrypt that, and then encrypt the data with the secret key using something like AES or some symmetric key cipher. So the next steps depend upon what you want to do. I will not list them here. They're the general ways for exchanging certificates. And that's what you need to do in your homework. So you'll read through this, but we're going to use OpenSSL to do all this for us. Instead of having to generate the keys ourselves, we'll use some software to do it. So create your own key pair, in this case using RSA as the algorithm, a 2048-bit key in this case. And here's the command to do it. So I give you the command using OpenSSL. Create a certificate signing request. So this creates a message which is structured such that the authority, when it receives it, can sign it easily. So how to create a signing request. Send that to the authority. When you create a signing request, it usually contains a set of fields like the country. This is something that identifies you, the country, state, organization. The common name it's called, for example, your student ID in the homework specifically. Use your ID. Send the CSR to the authority. And in the homework, you send that by uploading it to the server. So you need to check the instructions for how to send that. When the authority receives your request, they will issue a certificate. They'll create one for you and send it back to you. And again in the homework, they're sending back to you is that they put the certificate on a website and you can download it. And then you verify the certificate. And again, to verify the certificate, you need the public key of the authority and the public key of the authority is stored in the certificate of the authority. And the command to verify is given. So you can run the command to verify the certificate you received. In the homework then, okay, your A, who's B? In the homework, you're allocated a partner. So that's the B that you're going to communicate with. So once you're issued a certificate, there'll be a file that tells you who your partner is. So you need to communicate with your partner. So you download your partner's certificate and verify. That's like B sending them, sending to you their certificate. And then use a secret key to encrypt some data to send to your partner. Generate a random secret key and use AES. And the later instructions explain how to use AES. But that's what you've used in the first homework. You've used AES already. So some of this is repeated from before. So, and then it goes up to step eight, and then you're done, I think. So do this homework because it gives you some practice of using certificates and also gives you some examples of the specific formats and the commands that you can use to generate key pairs, generate certificates, and encrypt using those certificates and keys. When's it due? Next Tuesday, okay? Try it. Once you've tried it a few times, you get a chance to try again if you do something wrong. The software of the authority and of your partner will return some error if you do something wrong. It's a little bit cryptic, but if you read through the instructions, you'll eventually get there, eventually. Some people have finished already, okay? So it's possible to do it in a short amount of time if you go through those steps and follow them clearly, accurately. Any questions about certificates? Remember the basic concepts. A certificate contains your, your certificate contains your public key. The purpose is so that someone who receives your public key can verify it's yours. It's not someone else's. It's not someone pretending to be you. To do that, we issue the certificate from some trusted authority. What did we see last week? These few slides summarise, summarise those steps that we just wrote on the screen. These two slides, or two or three slides I'm about to go through, are from that printed handout on firewalls, I think, towards the back there. So there are just a few extra slides. Just let me check. So if you've got your firewalls hand out, these are towards the end. So in summary, this, this specific example was with respect to a web server. We saw last week an example when you access a website, the server sends you its certificate. How does that work? The server creates their key pair. They confirm their identity with the authority. The authority issues a certificate by signing it. So the general concept is, we have the identity of the server, the public key, a timestamp, indicating how long this certificate is valid for, and the signature component. All of that information hashed and encrypted with the private key of the authority. That's the concept. The format that you're using in the homework, and is commonly used in the internet, is called X509. That specifies the format of the certificate. So step one, the server or a user obtains a certificate, and then with respect to web browsing, the server sends the certificate to the browser. You visit HTTPS, colon slash slash www.abc.com. That server sends you their certificate, and the browser verifies using the public key of the authority. So when the browser receives the certificate, it verifies, and to verify it needs to know the public key of the authority, which is normally stored in a certificate as well. And that's where we get to a self-signed certificate. A self-signed certificate is one where the public key is signed by the same person as the owner of the public key. In this example, the self-signed certificate of CA includes the public key of CA signed with the private key of CA. So they signed it themselves. We need that at the top of the hierarchy if we have a chain of certificates. So we've saw some examples last week when we visited a website, and you get those warnings if it's a self-signed certificate. If it's signed by an authority, then it passes clearly. Any questions on certificates for your quiz? We'll ask some questions about certificates, the concepts in the quiz. When you access some games, if you want to download games from an Android market, then often they may be signed. So you can verify that it is the correct game, or that it's approved by someone, then again, certificates are used when accessing websites, but downloading software. So different applications will use certificates for authentication. Any questions before we move on? Last two slides, X509, again, the format. We saw some examples last week of the fields in that certificate. In practice, in the internet, when we access a secure website, they send your browser the certificate. What are some issues? How did the server obtain a certificate in practice? Well, what the server did, or the owner of the web server, they went to an authority and said, I own this website. So there's some validation of the domain. So if you are running the server for www.abc.com, then to get a certificate, you must prove that you own that domain, or the administrator of the server that runs on that domain. So there's some validation steps. There are some free and commercial services that act as authorities that will issue a certificate. Some you have to pay, some will do it for free. What about your browser? When your browser receives a service certificate, it needs to verify using a certificate of an authority. Where does the certificate of the authority come from? Most browsers have them preloaded. When you install Firefox, when you downloaded Firefox and installed it, it comes with a list of authority certificates already. So the browser developer has created a list already and preloads it into your browser. So you implicitly trust all of those authorities which are preloaded. We saw the example last week. We can have a hierarchy. The server certificate is signed by one authority, which is in turn signed by another authority in the hierarchy, one hierarchy. If you visit a website and receive a certificate and the authority that issued that certificate doesn't have one preloaded in your browser, then usually your browser presents some warning. And we saw that last week where we visit that website and it says are you sure you want to continue? And then it's up to the user. In summary regarding the security of digital certificates, some of the issues that can go wrong. When the server is issued a certificate, the authority must verify their identity. How do they do that? Well, there are different levels of verification or validation. So one thing that can go wrong is that I go to an authority and I say I own www.facebook.com if the authority believes me, because I don't own that, if they believe me, they'll issue me a certificate for that domain and now I can do man in the middle attacks on Facebook's access to their web server. So this verification of the identity of the server and the server owner is one thing that needs to be done correctly. The authority signs a certificate using the authority's private key. Whoever has the authority's private key can sign certificates. So the private key of the authority must be kept secret. If someone discovers the private key, then they can issue fake certificates and therefore perform attacks. So that's another issue that we must make sure that the authority's private key is kept private. If it's not, then the system can fail. Your browser, the developer of your browser preloads a set of certificates into it. So they choose a set of authorities that they trust. If they preload a certificate in there that is not trustworthy, then that presents problems for the end user. So you must trust that the browser publisher has adequately checked those preloaded certificates. If you look at your browser and see you can usually see the set of certificates that are available. So we'll not go through if we look at the tab authorities. We'll see that preloaded into my browser tens of possibly 100 plus authority certificates from many different organisations. So these must be trustworthy. The publisher of the browser must make sure that these are coming from trustworthy organisations. If not, then it's possible for websites to or attackers to do man in the middle attacks on your web communications. We saw an example. What happens when you visit a website and the certificate is invalid? Well, it normally presents a warning saying untrusted connection. Then, well, I suspect some users normally say let's trust it anyway. But that could be a sign of a man in the middle attack and may mean that someone's intercepting your data even using HTTPS. Of course, the algorithms used inside the certificate should be strong. That's normally the case today. And that finishes on our topic of key distribution, key management and closing with digital certificates. How do we distribute public keys? Well, we have them signed by an authority. Any questions before we move on to our next topic? Everyone okay for the quiz on public key management? Yes, okay. You can't use your laptop in the quiz. Okay, let's close this one.


Great. Well, welcome everybody. Thank you for joining us. I have to thank you very much for for submitting to this I'm very excited about The chance to talk with you about your book house of debt for those of you who have not read it It's available on Amazon with one click. So Everything else in the world exactly and you know, I found in in thinking about it is is You know, it was about a debt crisis in 2008 that seems a history and that Seemed like everything had been written about it But in fact, I think if you hear at this argument and his co-author and think through Their solution not only do you learn something about 2008? But I think it has a lot of application for how we think about other problems going forward So after just to begin give us the short brief summary of the book for those here who haven't had a chance to read it Yes, thanks Tom. So actually thank you for introducing the book that way because actually it's in the subtitle as well because but one of the Rational for writing this book was not as much to describe what happened But really to look forward and say look there is some there is one very important lesson that we need to take away from the crisis of 2008 2009 Which applies looking forward and it applies not just to the US But also for Europe and for the global economy in general and I'll try to kind of explain that as as we go along The starting point of the book is really sort of the comparison of 2009 versus 2006 And this is kind of also gives you a sense of how economists like to think so if you compare 2009 Let's say in 2009 versus the end of 2006 you see that the US economy is hit very hard Loss of jobs 8.9 million people lose their jobs That's like the entire country of Switzerland getting fired or the entire workforce of Netherlands getting fired I mean, that's how big this loss was in terms of output or income US GDP declined by 10 percentage points relative to what it should have been In 2009 that's like a 1.4 trillion dollars loss In a different way it's a loss equivalent To $12,000 per household in the US and that's a loss They are bating every year relative to the counterfactual world of no recession taking place So the natural question or obvious next question is why did this happen? Why did it take place? Now from one perspective and that is kind of the way economists like to think from one perspective It's actually a big puzzle Because nothing really happened between 2006 and 2009 we had this huge Loss, but nothing really happened. What do I mean by that? Think of what it takes to Produce stuff in an economy apples oranges iPhones automobiles on the two main ingredients Human beings their skills their human capital and the physical capital that Marries that human capital and produces the goods and services that all of us then use in terms of those ingredients Nothing changed people had the same skills We had the same factories the same cities the same infrastructure and yet we could not produce as much in 2009 as we were Producing in 2006 so something kind of Strange happened and what is it? What is it? What is it really that's responsible for that big decline in output? The core argument in the book is and we give it away in the title that it's all about debt that the cause of This precipitous fall in output and employment Is the way we choose and that's an important word? It's a choice the way we choose to write financial contracts among ourselves in particular between the borrower and the lender It's the predominant contract is debt and that choice was actually responsible for the decline in output and employment Now once you hear me say it was a choice the next natural conclusion is what Tom started off with which is Because it is a choice. We can change it and we can avoid Falling falling into a similar trap the next time And not just us in the US, but also Europe also Japan. It's actually a global problem Okay, so I have so far just Asserted that debt was responsible for this big decline in output and employment Both Hamid and I my co-author we are Empiricist at heart and so anyone makes a statement. We don't believe it. We say, okay Where is the evidence? Where is the proof? So that's one of the distinguishes is distinguishing features of our work if I can kind of out my own horn Is that we use data? It's everything, you know We get micro level data from the US to paint a picture that proves that debt was actually responsible for this big decline in output and Employment so what's the what's the argument based on this on this evidence the? Key factor that the key characteristic of debt, which makes it so destructive at times for the macroeconomy is the inability of a debt contract to share risk between the borrower and The lender and in particular when I say share risk, this is really the downside risk that we are talking about So just take a standard debt contract say I Want to buy a house hundred thousand dollars is the value of the house. I only have twenty thousand dollars I go to Tom say give me a loan of eighty thousand dollars. He gives me a loan It's a standard 30 year fixed rate mortgage I buy the house and now I start living in the house now imagine that for some reason You know the animal spirit sentiments go up and down Imagine that for some reason the value of my house falls by twenty thousand dollars Okay, what happens in this relationship between Tom and myself in this example Tom is the creditor I am the borrower what happened in this relationship is that the entire Loss of in the house is twenty thousand dollars twenty percent is born by me My equity is wiped out if I'm a typical homeowner in the US It basically means the home home is also pretty much my entire asset base. So my net world. I'm basically wiped out What has happened to Tom in this example? Actually, he has lost nothing because the value of his mortgage was eighty thousand to begin with the value of my house is still eighty thousand So if I don't pay he can grab my house sell it take his eighty thousand put his put the eighty thousand in his pocket And so he actually in this example has not lost anything. I have borne the entire loss Now there is nothing immoral about this by the way, don't get me wrong if we knew what we were getting into We I voluntarily borrowed from so there's this it's not about ethics. It's about economics The problem really is if it were just me that's the end of it and you know who cares The problem really is that when the shock is Systemic when the shock is at the macro level. It's not just me. We are talking about It's millions of people like me who whose net worth has been wiped out and That loss has not been shared by people like Tom in this example who are going to be the creditors Now you can already see that there is this tension here from the social perspective Because by definition the borrowers are borrowers because they don't have the money So they tend to be poorer Less well off in the economy the lenders are going to be you know have the excess savings And so they're lending to be so they are going to be richer So what we are really talking about is that we have chosen again To have a financial system That imposes tends to impose losses on the borrower side that actually has the least capacity to bear those losses to absorb those losses And that's the fundamental problem that lack of risk-sharing is the fundamental problem So let me not take a move a step forward and sort of explain how that lack of risk-sharing actually Translates into what I started off with which is the loss of jobs the loss of output The key problem with the lack of risk-sharing is that because people the borrowers which is myself in this example They tend to be poorer they also tend to be very sensitive to these shocks to their income and wealth And so when I have this huge shock to my net wealth, what am I going? I'm going to get really scared I've lost my savings. My children's education is potentially in in question. What will I try to do? I'll try to start saving again as much as possible and The flip side of that is I'll stop spending to the extent possible So you're and if there are millions of people like me, that's going to be a huge Cutback in on on spending on aggregate demand in the economy Now imagine for a second a counterfactual where we somehow had devised a financial system that had shared this risk differently Okay, which we knew up front I'm not talking about bailouts or anything like that like up front people knew that in the event of a downturn It would have been shared differently and imagine for the sake of argument that instead of Imposing the losses on me. We shared the risk so that people like Bill Gates absorbed most of this risk you know The point is that if they had to absorb this risk they already have a lot So it's not like they are not going to buy that extra car because you know They have two million instead of three million in the bank And the economy as a result would suffer less So that's the first key argument and if you really look at the logic of this argument I'm talking about a macro externality here, which Which is kind of like secondhand smoke argument right that other people are suffering as a result of the actions that Tom and I Decide to take which is borrow or an end to each other, right? and And so the spending decline is much worse in the presence of a highly levered economy Which which has a lot of debt or borrowing on on on behalf of households That's the first step the next step is that once I cut back on spending and remember other people like me are also cutting back on spending The stuff that we used to buy other people are producing it They may not have borrowed at all right that second hand smoke effect They may not have borrowed at all but because now I'm not buying as much stuff They get fired as well and now that they get fired. They also stop but so you have this knock-on effect Start to reverberate in the economy and the process and the the the the Depression becomes deeper the recession becomes a deeper there is a second important effect which is that when I Can't when my net wealth is wiped out. It's also likely in many cases that I'll stop paying my Mortgage, which means now the asset is taken away from me and is thrown into foreclosure Because millions of people are actually going into foreclosure that actually worsens the fall in house prices And again further amplifies the the kind of effects that I'm talking about So this is very quickly in the case of the US and you know specific with the housing example is the key problem But debt which is its lack of risk sharing on the downside. So that's a great summary But there's several things that flow from that one is Mean it wasn't all the bankers Because really in fact if you read the president the State of the Union last night he Could barely spit out the word bankers. I mean it was like he you know I know I know I know we know don't like bankers in this country But you know so what you're saying a couple things jump out of me one is that a lot of people responsible For taking on debt. They shouldn't have taken that said It seems me one of the problems of this crisis. By the way, it's a real parallel I think with the climate crisis is that we massively underpriced the risk We allowed people who did it to privatize the gains and then we socialized the losses over the whole economy We do the exact same thing in nature. So Talk about what is that the role of the consumer in this? But then your idea if the problem was that we focused all the risk onto one party How do we basically spread out the risk? in a way that actually cushions the fall and Puts us with a much better trampoline to go forward in the future. Yes I got many questions for you and I we only got 20 more minutes. I don't want to miss anything Yeah, I'll try to catch up on some others first of all regarding the banks, right? So even there's a subtitle of the book which says how they and you Caused the financial crisis, right? So we deliberately put in you Some of the some people were saying look you should not say you cuz they're your buyer Why do you want to blame them? But we deliberately put the you in there to make the point that this is really about the system as a whole You know this finger pointing that this is the banker's problem or this is the borrower's problem in the example I gave between Tom and I nobody forced us yet both mature adults Entirely entering into this arrangement and so the point is that look it's not about all the excesses were done And though I don't want to belittle that point But that's not the core problem the core problem is that they're the system is not built properly And I want to push more on that in in a bit Let me address the other Part of your question which is looking forward. How do we build something alternative? How do we build something that has better capacity to absorb the downside risks? Fundamentally what that means is that we Want to move away from a world where debt is the predominant contract now? What do I really mean by that we need to define it a little bit more what I really mean by debt is a Contract which is non contingent there is no contingency in the contract in terms of what else is happening in the world That's really kind of a silly way to write a financial contract given the problems that I just talked about So what we want to move towards is we want to move towards a world where the financial contracts allow for these kinds of important Contingencies in the macro environment in particular In the book we have one specific example because mortgage is one huge asset class In the world and so we give one specific example of how we can do this in the space of mortgages The specific example is and we try to minimize the deviation from what exists in the world right now So that it is more feasible than it otherwise would have been and so the proposal that we have and it really is the philosophy That's important. So you can you can tweak the details. That's not that important But the precise proposal we have is the following it has two features So the first is you want to introduce that contingency into the standard of a 30-year mortgage and that contingency is that we link the required payments that the borrower has to make we link those payments to what is happening to the price of houses in my city and so you index the Repayment to the house price index of the city that you live in number one So if average house costs in Minnesota or Minneapolis are going down by 10% my mortgage will go down by 10% Exactly so I'm much more resilient then Against what's happening in the market exactly? So if you were making a thousand dollars a month now You will make nine hundred dollars a month, right? So there is this automatic absorption of loss for the From the borrower it goes lost goes to the creditor If that's that's the first important feature if that's all you add to this contract the lender Of course will know that up front and they know that now I'm taking in less in the event of her of a downturn So they want to jack up the price of the loan the interest rate of the loan So we want to write Introduce this product in a way that is it's neutral up front and so we introduce a second component which gives something to the lender in return for providing this insurance and What we propose is so we work out the numbers a little bit of math here, which you can work out It's quite simple But once you work out the math it turns out that I have to give very little to Tom on the upside to make him Whole in terms of the insurance that he's providing me and the idea is that basically home house prices don't go down as you know That frequently so it's not he's not really giving up much But it's really important in the sense that we can avoid 2008 kind of crises And so the upside that I want to give Tom is just five percentage points So just five cents out of every dollar of capital gains that I have at that at the time of Sale of the house not otherwise house makes a hundred thousand dollar profit for me The bank gets five thousand the bank gets five thousand This insurance premium on having insured the downside exactly, but what you know, it's interesting about your proposal Out of is it you're really saying let's take the experience of a mortgage Which is really I'm gonna put it in terms of nature a monoculture. It's a single Fixed thing and let's turn it into a polyculture ecosystem. That is so much more resilient to whatever nature whatever Storms come or whether the sun shines more You are my next co-author so next book. I'm writing with you But that's really it's really very into there's a real parallel with yes, I think and again to continue your nature example I mean, it's really I always like to think of the the macroeconomic system as a as an ecosystem And I think all of us lose if you don't think of the macro environment as an ecosystem for every buyer There is a seller of every seller there has to be a buyer So you know the supply and demand things need to equate each other in the aggregate and we currently have a system where we we kind of pretend that The contract may not be efficient But whenever the crisis comes its house prices or the Euro crisis or whatever that somebody from the outside Will come and fix it for us and we have technical names for that we call it monetary policy We call it fiscal policy right that whenever and the shock is big enough You know what we can and today we saw big bazooka right the druggy They're doing a bit big quantity easing and and and and the idea and people still believe that you know They're monetaries will say look this is this stuff works just do enough of it You know you just never did enough of quantitative easing or on the fiscal side You know just just have enough government spending and you can get out of this problem now theoretically I agree those arguments make sense on the margin, but I don't think and certainly the proof suggests that they are not sufficient They weren't sufficient in the u.s. They were not sufficient in the in the case of Japan and Europe So we really need to go back to the financial system as it is supposed to work without any outside intervention and Try to make it as resilient to these outside shocks as possible And what I think is the beauty of your proposal it's and this is another way of describing resiliency itself sustaining As you said I you know one approach is to say we wait for druggy to do the right We hope we hope he gets the numbers right or whether druggy or you know our Fed But that's all external And and we hope that that all these external rules and rule makers will do the right thing your system is What to me are the two most important words in economics and foreign policy itself sustained. It's all about internal logic and behavior That's that's that's that's exactly right. I mean the other problem in terms of Betting on an outside player is that you get into the politics a lot more often which is a different kind of contingency which is Exactly on board to economics exactly exactly.  If we had you know, you can put it in the words of the coast theorem and things like that It's and that's true. So, you know, so mathematically it is true that you know that we can we can work around this problem in other ways but practically You know just think of the the polarization in the US, but it's really there at every place These things become impractical from from a realist. What are the chances of a banks? Has anyone taken you up? Is anyone adopting this? Is anyone studying it? What are the chances we we get buying on this? very important question so I have a few observations on that First of all actually it's in the book as well the the first time I actually proposed that this was in a Senate hearing and The senator in question. It was senator Corker. I've already public In the book he said to me after I make this proposal and I say okay now he'll say, you know, yeah Let's go ahead and do it. He says to me. This is the oddest proposal.  So, you know, that was kind of Deflated us a little bit, but we continued we persisted we wrote the book nonetheless I think they had so we I went again actually to second time the Senate to give testimony in the Senate and the second time Actually, they were more amenable to these kind of ideas both on the right and on the left So there is some recognition that we need to do things differently, but it's not it's it's not a done deal by any stretch of imagination. What is interesting in terms of response is that There I have gotten calls from venture capitalists to give you an example where they have come in and says look We really like this idea and we are actually willing to put in a lot of money behind it In fact, they they say you are too conservative in your proposal. They are willing to do full equity mortgages And the reason they give this kind of makes sense is that look we have long-term capital from pension funds and so on They want exposure to house price risk and effectively what I'm saying is I'm giving creators a direct exposure to house price risk They said to me look We don't want to kind of buy rental properties and get exposed that way its management and all that Doing it through the homeowner is like a very cheap way of doing it because you know, they will take care of the house themselves So there is there is a lot of private sector interest in it as well, but why doesn't does it not happen? I think that is a very important question. I Think it does not happen Because of our own fault, so let me try to specify the first of all if you go back to the logic of the argument that I made in The beginning in terms of the problems them associated with debt. I use the term macro externalities, right? It's kind of second-hand smoke kind of a thing When we grow externalization when we talk about externalities That's like another example would be we mandate insurance for a reason because if I'm driving on the road and I don't have insurance I may not care about it, but you know if I hit Tom and he is injured or his car gets destroyed I better have the capacity to compensate him for for the loss that he has borne So you mandate the insurance or it's the same logic again because there are these macro externalities So first the government is a logical argument for the government to be involved in this process in terms of Facilitating us moving in that direction. That's point number one point number two is the realization that we live in a world Where the situation is actually much worse? Not only is the government not helping or encouraging the system to move in the right direction It is actually putting big obstacles in the way of moving away from debt and I'll give you two specific examples The first one is just taxation and as soon as I say that like you know what I'm talking about in the US There is Actability of interest when you file your taxes both on the corporate side as well as on the household side That is Incentivizing me as a borrower, you know Suppose I have two options have the 30 year fixed rate mortgage and the proposal that we make I will not Take on the mortgage even though it is good for me or and the economy because the standard mortgage allows me to deduct interest payments At the time I file my taxes so that tilts the system in favor of debt another factor again coming from the regulatory side is The way we do bank capitalization So if you go to the basics of the Basel system that we have it puts risk weights in terms of telling banks How much capital they need to have on their balance sheet for the loans that they issue for the assets that they have on the balance sheet? It is tilted in a way that if I'm a bank and I want to think I'm deciding Should I issue a standard mortgage or should I issue this what we call the shared responsibility mortgage with this loss absorption feature? When the bank is Contemplating that question the Basel rules tell them look if you issue a standard mortgage You don't have to have much capital against because it's considered triple a very safe You don't have to have much capital against it But if you choose to issue this loss absorbing sting Guess what the capital requirements are going to be much higher. Interesting. So what is the bank going to do? I mean, it is not a coincidence that we live in an extremely levered world And this is a really dangerous trend coming now at that at the global level This is by by no means just about the US if you look at the growth of credit or you know Two sides of the same coin whether we talk about credit or debt The growth in debt or credit globally has been going up since the 80s There was you know since this deregulation and the loosening of controls capital controls and so on since the 80s Credit-to-GDP ratio has been Continuously going up so much so that even this crisis, you know We hear these terms deleveraging and so on at the global level. There has been no deleveraging We have levered up even more since 2008 2009 to give you one quick example of that it is true that the homeowners reduce the amount of debt that they have in the US but China started borrowing like crazy both their homeowners as well as their local governments and so on there is something wrong This is beyond the books. I don't want to go there too much But there's some there's something fundamentally wrong about how the system is trying to equilibrate itself It's it's the self-sustaining pieces is something the beauty and it's related to your point again There's an analogy from nature, but your system prevents contagion. There's or there's much less contagion possibility When you have this kind of internally driven system, it's much more resilient to contagion much more resilient to disease Then one that where everybody's basically playing the same game and and then our banks are interconnected And so on my banks topple from my mortgages. We help topple your banks And we really saw that you know, we we're such a short part. I want to make sure we get a few questions from the floor So anyone please But Shared services and assets in cities so that you know, for example, your car is idle 23 hours a day. Let's Use that much more efficiently optimized resources. Now. We are talking about shared responsibilities What does that mean for theory? What does that mean for policymaking and how close are you to Islamic financing? Let me answer the second question first, which is that I stay away from all such questions That the reason is that I strictly believe in the separation of religion and state and also believe Believe in the separation of religion and science and so I like to be a social scientist From those conversations in terms of the shared economy and all that kind of things I think the really interesting piece here for us to think about and my example is just a little tiny piece of it is That the technological Innovations especially on the information side because you know finance is really about information right information gathering and then making sure People are doing what they're supposed to do monitoring information and so on the technology is now really allowing us to do that much more efficiently than we ever could and as a result of that it is giving us the Capacity to do things like this sharing of the kind that I was talking about to give you one specific example You mentioned time-sharing on maybe car until then things like that In the proposal that I have remember I was giving a five percentage upside to to Tom Tom does not have to wait for me to sell my house to exercise that five percent He can guess what securitize And sell it, you know, that's a beautiful system So there's nothing wrong with securitization actually if the system works even better So technology is we should adopt it We should embrace it But we should think about the fundamentals of what we need to do with the technology to make it work for us Please Go ahead Sorry a bit of a technical point. Where are you from South Africa, okay? Banks finance the books the mortgage books with depositors money. So if the Property price drops by ten percent. How do you adjust the depositors? Right good question. I mean who's gonna accept that absolutely a very good question And the the answer is the second piece of it, which I didn't ever talked about but it's obvious The banks as they exist Don't have them Banks need to have more capital much more equity much more capacity to absorb some of these losses Themselves, and I really don't understand why we cannot think so let me give you this idea Think of where the big development on the economic side has been new technology, right? Microsoft Apple new tech and so on did they need banks to do what they did? It is all equity financed and they can raise more if they want to buy more stuff I would give them money Why are we willing to give as much money to Ellen musk as as he wants the reason is that he has developed this Credibility this reputation that I'm smart. I know what works. I know what doesn't work and people are willing to this is the kind Of banks that we want You know if they have more equity they will be forced to act like Ellen more like Ellen musk and and less like What we know them to do so there is again. There's something fundamental I know I'm making you know when you really think through that what we are we are talking about a Reformation of the financial system of the arcade the financial architecture as we as we have it and the argument is that you know It needs to work for us not not the other way around because you do adjust deposit I mean we anyone who's got their money in the bank knows. Well, I'm not getting the return. I used to get Right. Yeah, not going to market. Yeah. Yeah behind you was a question. Oh Yes Peter Holmes a court one of the reasons for your proposal is that come a shock dropping of housing prices for example There'd be less impact on the economy Isn't your proposal just spreading the risk such that the other side the bankers will be down as well There'll be less bonuses will be less BMWs bought. There'll be less Wealth spread around at that end of the society the net drop of the society will be the same That's kind of related this earlier question of you know, how do how do we deal with these the banks being able to absorb more losses? but you know banks are just an abstraction they are just intermediary between the Savers and the and the borrowers and at the end of the day somebody has to absorb those losses That's another way of thinking about it if house prices go down by trillion dollars. Well, somebody has to you know There is no way around it. You can't send it to Mars. The question is who has the highest capacity to absorb it So this is where the research comes in when you actually measure the marginal propensity to consume with respect to these wealth shocks and Income shocks it turns out that the people getting those million dollar bonuses They have close to zero marginal propensity to consume with respect to these shocks Which means at least on the margin if you take away a dollar from them. They're still going to buy the BMW so you really want to take the losses away from the people who are the most sensitive to these kind of shocks and share the risk that way which is you know the premise of Proposal that we are making after this is really fascinating and I could talk to you all afternoon about this unfortunately we have to share this room and So we're gonna have to bring it to a close, but thank you very much. Thank you really wonderful


Let's say that there's a project you have been putting off. Maybe you've put it off once, maybe twice, maybe multiple times. And let's say now that you've been savvy enough to put a time in your calendar, in your schedule to work on that project. And the time comes to work on that project, and you are still finding some resistance internally about it. You are still wanting to put it off and do something else. What do you do? And you know that that project is important for you to work on and you can't put it off forever or if you only accomplish that project it could bring you, move your business forward, your life forward significantly. So what do you do to overcome that internal block? Well, actually I would love to know if you have any techniques that works for you. Please comment below. I will share with you my technique and see if it works for you as well. I basically set a timer for five minutes. I make an agreement with myself to say, listen, I can work on anything for five minutes, just five minutes. It's any progress. It doesn't have to be brilliant, it doesn't have to be a perfect step forward. It just needs to be any step, any step. And as I move forward I know that I will see more clearly about what to do next and the landscape keeps changing with every step. That's one of the learnings I've gotten from life. So five minutes. Now let me share with you what I actually do to prepare right before those five minutes. I take a few moments before the five minute timer starts and I get myself into a more positive emotional state. The way I do that is I remind myself, take a few moments, remind myself that all will turn out perfectly well. For me, for you, that we are truly safe in this universe, that we are cared for and taken care of, and here's Buddy, for those of you who are fans of him, we are cared for and taken care of by a force that is much more powerful than our ignorance, our failings, our mistakes. So as I take a few moments to remind myself of that, I can then move forward. Now if I'm doing something for an audience, like if I'm writing something or if I'm planning a talk, planning a program or offering, I will close my eyes also and bring to mind a picture of an ideal audience member. I can even use, think of their Facebook profile photo, you know, someone who has been so supportive of so much of my content that I just, I can basically do no wrong in their eyes. Everything I create, they pretty much enjoy like. So bring that person's picture to mind so that I can speak for that person, to that person, because if I work for that person, I'm in a much more state of optimism and joy as I do my work and my work will probably touch many others like her or like him. And then I set the timer for five minutes. I do whatever progress I can, like I said, doesn't have to be perfect or brilliant, just any step forward so I can see more clearly and make any kind of progress. When the timer goes off, I do a quick celebration. I, you know, just take a quick walk down the hallway or get a drink of water or something. Or if I'm on a roll, I just keep going. That's the thing. If I'm on a roll, I've gotten out of that resistance, I'm on a roll, I just keep going. If not, I take a break and then I can come back and do another five minutes if I want or if not, at least I have seeded my subconscious mind to work on that project even when I'm not consciously working on it. That's how the subconscious mind works. So I hope this has been helpful for you, always open to your comments and questions. And until the next video, me and buddy wish you well.


A good exchange starts from the establishment of a youth group which is interested in participating in such a project. The project should be built around the needs and interests of the participating young people. It may be that you have already been working with a youth group for some time. You see that a youth exchange could be a new learning opportunity for them. So, talk to them, get to know their opinions and get started. If you did want to establish a new youth group for a youth exchange, there are a number of areas to consider. You could put up a notice announcing the exchange or hold a meeting inviting prospective participants and their parents or guardians to attend. In your invitation, you should clearly state the need for commitment to the project as well as the workload to be undertaken by the whole group. If there are more young people interested in the exchange than you have places for, you may need to carry out a written or verbal application process. You may need to set out the appropriate criteria. For example, the age range of the participants may be important or participants might need to have a good record of attending your organization's activities. You should also consider which participants will benefit most from the experience. Another important consideration is whether the young people will need to make a financial contribution and how this may determine their participation. Bear in mind that a financial contribution should not be an obstacle for the young people to take part in a youth exchange. Once you have identified the young people who are interested in a youth exchange, this is a good time to agree a broad outline contract with the group, highlighting what they are buying into. Everything should be clearly stated so that participants and leaders have a chance to change their minds about being involved. In order to ensure that everyone participates in all phases of the preparation and that individuals get the opportunity to develop new skills, many groups organize themselves into task groups. Task groups should be clear about what they are responsible for and about the completion date set for each task. Throughout the planning stage, you should remember that there are times when the youth exchange project will move quickly and other times when it will be particularly slow. Consider how often the group should get together. Is this sufficient to carry out the planned preparation or will you need to meet more often? Some exchange groups have chosen to write up a group contract or agreement. Such a document can make it very clear to the whole group what level of commitment is required. For example, the number of meetings that will be held to prepare for the exchange, the type of activities that the group will undertake, the financial contribution required from individuals, if any, the commitment to fundraising, the rules agreed by the group, for example, decisions on smoking, drinking and permissions to leave the exchange place. Who makes decisions about the exchange and where the final authority lies? The role of the leaders. These agreements should be revisited on a regular basis and adjusted if necessary to make the group work more efficiently.