Hello and welcome to the session in which we would look at the definition of gross income and look at basic concepts when it comes to the IRC the internal revenue code definition. Well, here's the definition pretty straightforward The taxpayer gross income includes all income from whatever source derived unless specifically Execluded. So here's what they're telling us Congress and the IRS says based on our internal revenue code Everything that you receive is income Unless we tell you it's not income So you don't look in the code to determine whether this amount is taxable or not you look to see if it's executed So the definition is all inclusive definition all income Show me it's executed if you can show me in the code. It's executed. It's executed. Otherwise. It's included in this concept Of gross income applies to individual Corporations partnership or a state it's very Inclusive definition so I can give you for example of an income that's executed just to make sure kind of you understand what executed is For example interest on municipal bonds. It's executed if you buy a bond from a local or state municipality You earn interest from that bond the interest on that bond is Execluded as far as the IRS. It's a specifically stated that municipal bond are Execluded now why they're executed when we talk about interest I will discuss why but the point is if it's not explicitly Excluded it's included now the definition is very broad but bear in mind not every amount you receive in cash To be included in your gross income. For example, if you borrowed money from the bank, that's cash But that's not income. Why it's a liability you have to pay it back as it comes do also Income may not be in cash So sometimes you might have income considered income for tax purposes, but it's not cash an example will be bartering Exchange of services. For example, I am a teacher. Well, guess what? I will give you two hours of tutoring in return. You will give me something else. Well, that's an exchange of services I did receive for example, let's assume my hourly rate is one hundred and fifty dollars. Well, I gave you two hours of tutoring That's three hundred dollars. Well, you don't have you don't have three hundred dollars. You gave me your old iPhone I said, okay, that's fine. Well, guess what? I did not receive any cash, but I do have Income under those circumstances I'm sorry exchange of services means let's assume you You painted my house instead or you gave me your phone, which is the fair value of property received So both of these situation no cash exchange hand. Nevertheless, I do have to include the value in my gross income Before we proceed any further. I have a public announcement about my company farhat lectures comm Farhat accounting lectures is a supplemental educational tool That's gonna help you with your CPA exam preparation as well as your accounting courses My CPA material is aligned with your CPA review course such as Becker, Roger, Wiley, Gleam, Miles My accounting courses are aligned with your accounting courses broken down by chapter and topics. My resources consist of Lectures, multiple choice questions, true-false questions, as well as exercises. Go ahead start your free trial today No obligation, no credit card required We need to be aware of something called recovery of capital doctrine or ROC return or return of capital ROC Well, the amount received is not taxable until the taxpayer recovered their original amount their basis How is that applied? For example, when you sell an item if you're in the business of selling product? Well, guess what? You sell an item for ten dollars. You paid for its sex. That's your cost So you are taxed only on the additional four dollars. So first you have to recover your basis So the profit is taxable the four dollar is taxable This concept will see it later on when we deal with sale of capital asset where you have a basis and you only pay Prof you only pay taxes on the gain. Let's actually take a look at an example in year one Celine acquired 1,000 shares of XYZ company for ten dollars per share. Well She paid $10,000 in year four in order to make a down payment on a on a new home Celine sold the 1,000 shares at 22. Well, she sold them when she sold them. She sold them for $22,000. That's good. So amount realized 22 cost basis is 12 or adjusted basis is 12 Celine will have a gain of 12,000 okay, so she took this money. Celine paid the collected 22,000 to her bank. How does this transaction affect her gross income? Only 12,000 is included in gross income because that's the gain realized From the sale and that's the gain. That's that's taxable as well It's worth noting that had Celine borrowed the money She needed to make the down payment. She wouldn't have to report any gain on her gross income So she could have borrowed this money then that that's not taxable. Okay She sold her asset and paid taxes on the difference Recognition of income. What does that mean? It means when do we? record Recognize income you should be familiar with this concept from Financial accounting in general the timing of income depend on the basis. We have cash basis We have a cruel basis and we also have other hybrid basis under the cash basis Well, the receipt of cash triggered the recognition of income. It's cash basis. I receive the cash I have income. Well, if I pay the cash, I have a deduction. I have an expense under the cruel basis of accounting revenue is reported when earned and Expenses are deducted when incurred for income tax purposes tax payer will have to choose their accounting method Usually for it most individuals and small businesses. It's we use the cash method now We're not gonna stop about this topic. But for now, we're gonna stop discussing this Which accounting method that that's gonna have one future lesson later on? Also when talking about income, we have to differentiate What's economic income and what's accounting income because if you understand the difference between economic and accounting income? It's gonna help you understand how the IRS comes up with this income. You have a gross income You have income so let's start with economic income. How is economic income measured? Well, it's the difference between it's the difference between the fair value of your net asset, which is assets not asserts assets Minus liabilities at the beginning of the period as compared at the end of the period Plus value of consumption. So let's assume for the sake of simplicity. I purchased a home for $300,000 At the beginning of the at the beginning of year one at the end of the year. My home is worth $370,000. Well, I have an increase Let's assume home has no more get just simply put to keep it simple So the value of my doesn't have to be a home the value of my net assets started at 300 end up at 370 I have an increase in my wealth of 70,000. That's an increase increase in my wealth That's economic income and let's assume for the sake of illustration. I spent $30,000 in consumption. So My my assets went up in 70. I consumed 30 basically am overall $100,000 better off. Well, we don't use this economic income Just think about it from a practical perspective You have to keep track of your assets your liabilities the difference between them and the value of your consumption It's a big headache. So what do we do? We use accounting income. How do you use accounting income? Well, the income must be realized. So to have an income There's there must be an exchange between two parties and we're assuming those two parties are external parties They're not related party and the amount it is objectively measured think about trying to Measure the fair value of your assets at the beginning of the period versus the end of the period now if you have stocks That's easy Assuming they are publicly traded because you know the price. Let's assume you have car a boat a motorcycle several homes Computers printers. Those are your assets. How are you gonna measure the fair value of those at the end of the period? And this is why it's a big headache Therefore we use the accounting income simply put the accounting income if you realize the income It doesn't matter how it's realized and it can be objectively measured. For example, if an employee embezzles money That's income to the employee. Why because there's an exchange the the exchange of what the employee took the money The income is realized took the money from the other party, of course That's an external party, right and the amount is measured because we know how much the employee embezzled Let's assume you grow a garden and consume the product. That's not taxable. Yes, you grow the garden Now you are better off, but you consume the product. Let's assume you sold Those fruits and vegetables from the garden then the amount is taxable notice once if you consumed it with your family Let's assume you grew it for the sake of illustration 700 worth of fruits and vegetables in your garden and you consume the whole thing So if you went to the market, you'd have to pay 700 you did not you grow it Well, that's fine if you consumed it not taxable if you take that fruit and vegetables and you sell it Let's assume you sell it for 700 you might you know deduct expenses. Whatever is left is Taxable, let's assume you had no expenses for the sake of illustration the whole amount is taxable So if you sold it to a third party, it's taxable Also, we need to be aware of advanced payment because every time we receive cash It doesn't have to be income for now, but the rules are a little bit different advanced payment Is when you receive money for services to be performed later. So what we're talking about here is unearned revenue Or the third revenue. How does it work from tax perspective? Individual taxpayers Receiving advanced payment for future delivery of goods or services again What we are talking about unearned or the third revenue are required to recognize the income in the year in which the cash is received So a little bit different than gap now why The concept is this if you receive the cash It means you have the ability to pay We have something called the ability the ability to pay concept the ability to pay concept means if you have the cash in your hand The irs wants their share you have the money to pay Therefore it's taxable. However, there's small shifting you can defer or shift your income a little bit Taxpayer using a cruel basis of accounting may elect to the third recognition of income up to one year following the tax year So if you're using a cruel basis, you can defer the income but a little bit more Up to the following tax year. Okay, so they give you some leeway Okay, right. He is a guitar instructor. She uses the cruel basis of accounting. Okay, there's some room for deferring income And is a calendar year taxpayer. It means December 31st They elected to defer advanced payment receipt for you for future services to the extent possible So here's the deal on august 15 20x1 she collected five thousand two hundred and fifty 50 for a contract consisting of 100 lessons So the 52 50 If we divide this by 100 each lesson will earn Rod he 52 dollars and 50 cent The lessons are expected to start november year x1 14 less 14 lessons will be held in year one So this is year one And the remaining lessons will be eventually split between year two And year three so What can we do? We receive the money here? Well, since we are Using a cruel if we're not using a cruel if you're using cash basis The whole amount will be taxable here if we're using a cruel the first year what you're going to do You're going to spread that money Over the 14 lessons. Those are the 14 lessons then the remaining They cannot go over year two then the remaining will be which is 100 minus 14 100 minus 14 86 lessons will be in year two now, although some of them in actuality will not deliver them in year three It doesn't matter. Yes, you can defer them but up to one year So make sure you're aware of this and we'll talk about that later We'll we'll have when we talk about accounting method. So should so rod he should report 735 of income which is 14 lessons times 52 dollars and 50 cent The remaining will be reported in year X2 although some of the service will not be provided to x3 You got the money we give you we gave you a little bit of time to defer Up to one year or being very generous. Thank you very much Also, we need to be aware of something called constructive receipt of income Okay, so sometimes what happens is you may not have the money physically but you have access to it This is what the constructive receipt of income is you have to recognize It means include income and your taxes in the period in which the right of the property is obtained If you have the right to the money You you obtained that right as long as there's no substantial restriction It's taxable. Okay restriction means let's let's assume someone gave you a check But the funds are not available in the bank account of the person that gave you the check Well, that's a restriction, but let's let's assume The amount is readily available Well, guess what it's income Let's assume Your favorite company send you a dividend check you invest in a company and they send you a dividend check The check is in the mailbox on December 31st The check in the mailbox and you decided not to walk to the mailbox pick it up and deposit it in the bank Well, guess what that's income Let's assume you have a bank account and interest earned in that bank account You never touched the money the money stayed at the bank It does not matter as long as you can get it. It's called constructive income Also, we need to be aware of a concept called assignment of income Simply put the concept is this The fruit and the three are connected together So the fruit that the the fruit that comes out of the tree belongs to that tree Simply put you cannot assign your income to another individual So the person that earned is the person that paid the taxes Why well If you could assign your income what you will do is you will shift your wages to someone in the family That has a lower tax bracket For example, you will shift your wages to your kid or to your father who who you claim is helping you Well, you can give them the money, but you cannot tell your employer to cut the check to them So you cannot have this shifting of income Also, we need to be aware of something called the tax benefit rule What does that mean? It means if you pay an amount in year one and that amount was deducted in year one a good example will be medical expense So let's assume in year one And we'll talk about medical expenses later. You paid $800 in a particular medical expense now.  In other words, this was a deduction on your taxes Well, guess what in year two You paid this amount and you took the deduction in year two the insurance company reimbursed you the $800 Is the amount $800 taxable? Well, it is taxable if the benefit was realized in year one So if you deducted if this amount was deducted And and you realized a tax deduction you realized a saving because of this $800 Well, let's make it $8000 or $80,000. It doesn't really matter That's made at eight. Let's make it $8000 Well, if you deducted $8000 from those medical expenses and in year two you receive the money Well, guess what it's taxable So if the amount was deducted to the extent that it benefited you it's taxable If the amount was not deducted in year one, then it's not taxable in year two So if you did not take an advantage of that Payment and they gave you the money they basically giving you back your money that you paid The IRS has nothing to do with it because you did not take advantage of that Now about the tax benefit rule, we're going to have a separate session because we need to talk about State and local taxes and sometimes you you may get an advantage You may get advantage means a tax deduction in one year Then you get a refund in year to what do we have to do? So but this is the general idea So all in all here's a list of sources of income that you need to be aware of Income sources include but are not limited to why because unless it's executed, it's included what could be it Compensation for services here. We're talking about w2 business income gain on disposition of property royalty income rental income interest income dividend income elimony payment And we'll talk about those later received under a divorce agreement executed on or before December 31st 2018 annuities Distributive shares of flow through entities seek or partnership bartering in the list is unlimited Now in the next session, I'm going to focus on one thing only and start with w2 Then I'm going to talk about each one of these income separately in a separate session because that's important Now we get we get the big idea now. We need to talk about each income separately What should you do now go to far hat lectures? Whether you are a CPA candidate or an enrolled agent or an accounting student And look at true false multiple choice additional exercises additional lectures. That's going to help you do better Study hard your accounting certification is worth it. Good luck. Study hard


Hey y'all it's Tammy with Colored Valley Cooks and today we're making homemade blueberry and strawberry muffins for Easter morning breakfast. We're making our streusel. I use a quarter cup of pack brown sugar, an eighth cup of flour, and then we're gonna put in some pecans, three tablespoons of butter, needs to be room temperature of course so that you can blend it well. We're gonna blend this before I throw in the pecans.  So I'm just taking the blending fork and getting this all blended together for our streusel. If you don't have a blending fork, they're well worth a little bit of money. You have to pay for them on our website. It takes you to Amazon, but if you'll go through our website it helps us support our show. Now we're gonna throw in some pecans, a little bit of flour y'all, to make it a little bit more crumbly. I want it to be crumbly so you can get on your muffins. I'm gonna use my hands. Once you put the pecans in there, it's just easier to use your fingers to do your streusel at that point so you can get it separated. Alright the next thing we're gonna do is mix up our muffins and I'm gonna go ahead and mix up enough base batter and then add my fruit last so that I can do half blueberry, half strawberry. Okay we're gonna start by melting three tablespoons of butter in our bowl. So just microwave that until it's melted. Now we're gonna add our sugar. It calls for a half a cup of granulated sugar, a granulated sugar and two eggs. One and two. So we're gonna mix this up. Now with muffins you don't have to mix it up with a whisk because they're actually the batter is actually supposed to be a little lumpy. So mix this up first. We're gonna put in some vanilla. It calls for buttermilk but I don't have any. Three quarters of a cup of milk. So that's going in. So easy y'all. And now all we got to do is put in our flour. It's two cups of self-rising flour. Then we'll fold in our fruit and we'll be done. And we're gonna, I'm gonna strain these strawberries because I put them in syrup and so they're pretty dog on runny. So we're going to drain a little bit before we add them in and I don't need to really use them all. So I'm just getting some of the water out of these y'all for our muffins. These are big old pieces of strawberry. These are gonna be really good muffins. So we're gonna put about half the batter in here and just fold in your strawberries. Alright there's that one. Now we can throw in the blueberries. These are blueberries from last year that we picked. I like a lot.  I love blueberry muffins Chris likes strawberries better. Alright we're gonna get over here and put them in the muffin tin. I like to use a scooper. It just works better when you're putting in muffins. I should have the first time but this recipe makes quite a few muffins. So I think I'll have enough batter at least for six more. Now we're gonna put our streusel on them. We're gonna do strawberry first because it doesn't have the cinnamon in it. And then I'm gonna come back and sprinkle a little cinnamon on the blueberry. In my second cookbook I have banana nut muffins but now it is a lot lower in sugar. So if you like really sweet muffins you have to add more sugar to that recipe. You really only have enough streusel if you do a really good job with your streusel for 12 muffins. We're just gonna put cinnamon on the tops of the blueberry. Alright I put a little cinnamon on the blueberry. Now I love nutmeg. I'm quite the exception me and Chris than our families because nobody in our families really like nutmeg on either side. But if you want some nutmeg of course sprinkle it on there too. I don't think the strawberry would be very good with anything on it except just the plain streusel. So we're gonna get these in the oven and we'll see you in a few minutes. You're gonna cook them into their nice and golden brown and I don't give you a time on my recipe book because you should watch them and set them for about 25 minutes and then check on them. They've been in there 25 minutes and they are beautiful. Perfectly golden brown, raised up a little over the top like I like from DeVee. So the first thing I do when I get them out of the oven y'all quickly because I want them to be crunchy around the outside soft on the inside. These are the blueberry. I'm gonna cut one for you while it's hot too. And these are the strawberry. You might ought to make sure it's you know released around the edge. Good like these strawberry ones had really big pieces of strawberry so I'm gonna make sure that they're loose before I try to pick them up so I don't tear them up. All I do is I take my fork, I put it inside the muffin, lift it up and slowly bring it over to my cooling rack so that they can cool down and get crunchy on the outside. This is the blueberry. Yummy. This is the strawberry. I'll already tell you that's toasted. When you cook them at 375 those pecans get toasty. Oh my gosh. You cannot beat this muffin. Period. All right let's taste the blueberry. My fave. Look at that. It's gorgeous. Now the blueberries is not as sweet because I don't sweeten the blueberries but they're delicious. Thanks for watching Colored Valley Cooks and Happy Easter. We love y'all. If you want to know about the strawberries they were sweetened. I cut them up. I put about a half cup of sugar over a whole container of them and then I put them in the freezer and they make their own syrup and so they were sweetened strawberries. If you've got fresh strawberries cut them up, put a half cup of sugar in those, make sure you get the whole larger container full and then put them in the microwave for about two minutes. Stir them up, pour them out on a pie plate, put them in the refrigerator and let them cool down.


While people are coming in, this talk is called Making it Fast, the Power of Benchmarking. My name's Cameron. I'm Cameron Pee on Twitter and most other services including the Elixir Slack and GitHub, things like that. I come from New York and I just really want to thank the organizers actually for having me here because it gave me the excuse to come to Bangalore, which I just think has been fantastic, the first time in India and you might think that it's very different to New York, but there are similarities and I have to say I feel very comfortable right at home walking across the street in this town. It all makes a lot of sense. I write software. I've been writing software since 93 working at Microsoft and Real Networks and various other companies. I'm a little bit lazy and Java later and then Ruby and then more recently an Elixir. If I'm perfectly honest, the last eight or 10 years I'm more managing people who write software and not writing so much in production myself, but I try to at least keep my hand in it and write things as much as possible. Three years ago I started looking into Elixir and learning about it and I got really, really excited about it and started focusing on it. In fact, I helped a few people put together a conference in New York which is called MPEX, which was the first regional Elixir conference in the United States and has now actually expanded. We're doing it in New York in May and then we're also doing one in LA. Desmond Bowie was the original founder of MPEX and he's moved to LA and we're going to do a conference there. If anyone is interested in speaking at MPEX LA in February, their RFP is open and you should hit them up. With that I end the self-promotion. Making it fast. When you talk about making something fast and improving performance and things of that nature, you could be talking about a lot of different things and you could be talking about optimizing the garbage collector and little tricks that are dependent on your language and your framework or whatever else. Hacks in the compiler. If you've built any Java code, there's lots of stuff that you can do in the compiler. I'm not going to talk about any of that stuff. The stuff that I want to talk about is applicable, I think, more or less no matter what you're doing. What I mean by that is I want to talk about the process of optimization and how we build that kind of thing into sort of a continuous process instead of being reactive instead of saying, oh, I've done this thing and like, oh, crap, it's slow in production and now let's fix it. Can we build something into the process in the same way that we have done with unit testing, continuous development and stuff like that? Specifically I'm going to be talking about benchmarking and how we can build that in. A lot of what I'm going to say I think is applicable into different frameworks and languages, but I am going to be a little bit elixir specific later as you'll see. What do I mean by benchmarking? Benchmarking is not profiling. Profiling in my opinion is something you tend to do reactively. You tend to say, okay, this application is slow and I need to find out why it's slow. You hook a profiler up to it and depending on your language or your framework, that might be quite a big job, but you start looking at it and you're doing it kind of reactively. Once you've done it and you say, okay, problem solved, application is fast enough now, you probably put the profiler back on the shelf and don't touch it again for a while. Benchmarking is more like unit testing in that I feel that it's something that you can do early in the process, not first, we're not talking about benchmark first development here, but early enough in the process and continuously enough that it can kind of continue to hopefully yield dividends over time. Has certain characteristics, right, so benchmarking is granular. Benchmarking is not something you necessarily do at the very top level of code. You try to find, just like with unit tests, you try to find small pieces of code that you can benchmark. It's repeatable. If I've got a benchmark test written, I can run that benchmark test again and again and again and as I make changes to the code, I'm going to be able to see how those changes have affected my benchmarks. And it's relative, whereas if you take something like a unit test, I mean it either passed or it failed. You just described an expected behavior, you either got it or you didn't, and it's true or false. Yes, absolutely, exactly the kind of thing I'm not going to talk about. Because yeah, depending on your framework, there may be really specific details exactly like that where you need to make sure that you're actually benchmarking something that's relevant. And so yeah, for sure, I'll touch on something like that, but yeah, I'm not going to get into the weeds too much there. It's also relative. So the question of relativity is that there's no such thing as a successful run in terms of the benchmarks. You don't ever say like, oh yeah, that was fast enough. Because whether it is fast enough is totally dependent on your problem domain. But if you'd make some change and something unexpectedly just got five times slower, that's actually pretty interesting maybe. So to illustrate this, I'm going to tell a short and slightly contrived story about performance. And so here it goes. So when I learn a new language, any language, I have a tendency to, a lot of people do like a big project and spend a couple of weeks on it. And I don't do that really. I like to do small problems. I do like to do small things that take me a couple of hours. And maybe a half a day or something, but not something that takes weeks. And I like to do kind of lots of them. And I find that I learn a lot faster that way. So that's my approach. But I don't just sort of do the small problem. And once I've successfully solved it, call it a day. I try to treat it sort of professionally. I try to treat it seriously as I would if I was doing the problem in a professional context. So I do the small problem, and then I refactor the small problem, and then maybe I optimize the problem if it's relevant. And maybe I do the documentation. And by doing that, I find that you learn about lots of bits and pieces of the language that you might not necessarily delve into otherwise. So where to get small problems? There's lots of places, but I have a personal favorite which I advocate to everybody who'll listen to me. And that's a site called adventofcode.com. They've got loads of great problems on there. And it's essentially an advent calendar, which is like a thing we use for kids at Christmas time, starting on December 1st. You get a new puzzle every day from the 1st to the 25th. And they get harder and harder. So the first few are easier, then they get really, really hard at the end. And so this story is about Advent of Code 2015. And this is what it looked like. And the problem that we're talking about is right there. And that is December 6th, 2015, when I received the following problem. And there's lots of background to the problem.  But I'll just break it down simply. The problem is you have 1,000 by 1,000 grid of lights that are addressable from the top left corner, 0,0 to 999999 in the bottom right corner. And they're controllable using special commands, so they give you an input file to parse. And you're supposed to process the commands and figure out how many lights are to lit at the end. So this is a million lights. And the commands look kind of like this. So the commands are just kind of turn off, and these are supposed to be rectangles. So turn off the lights from 660, 55, through to 986, 97. And that's supposed to be like a grid. And it's supposed to turn off all those lights. And then it can turn them off, it can turn them on, and it can toggle them. And what you're supposed to do is you're supposed to process all of these commands. And there's like 25 or 30 of them. And at the end of it, you're supposed to count how many lights remain lit. And then you can enter that into the website, and it'll tell you whether you got it right or not. Now, to be honest, this is really not an ideal problem for Elixir. If you were actually solving this problem in a professional setting, you probably would not reach for Elixir to solve this. You would also maybe ask yourself some questions about your job. But the reason why it's not great for Elixir is, first of all, it's a 2D array, and we don't got 2D arrays. And second of all, it's mutating this giant data structure over and over and over again, which is not something that we do as efficiently in Elixir as you might do in C or even Java or Ruby or something. By the nature of the problem, you're not going to get any wins from concurrency by doing this. But we're not doing this to solve a real problem. We're doing this to learn. So we're doing it anyway. So the title of this talk comes from a mantra that I did not invent, but I've been saying it for years without knowing where it came from, or it turns out exactly what it means. But it's make it work, make it right, make it fast in that order. And in the course of researching it for this talk, which is weird because I've been saying it forever and I never looked it up, but it turns out that it's maybe Kent Beck, not sure, probably Kent Beck. Seems like. Let's say it was Kent Beck. It wasn't Einstein. So first of all, make it work. What does that mean? Well, make it work just means, OK, you've been given the problem space. Do what you've got to do to solve the problem as quickly as possible. And maybe not as quickly as possible, but don't spend a lot of time thinking about performance. Don't spend a lot of time thinking about architecture. So you might have to throw it all away. But if that's the case, why do that? Why go through that process of possibly throwing away code? And my feeling is what we're trying to gain from that is understanding. And so if you go through that exercise and you do the make it work exercise, at a minimum, you're going to understand the problem space a little bit better than you did before. And maybe you'll have something that's worthwhile, and maybe you won't. But even if you don't, you're going to at least personally understand a little bit better. So given the problem that I just showed you, let's take a look at the code that I initially wrote to do this. So I have to do a little bit of a jumping around here. OK. So this is the code. This is the code for the thing that I originally did. Is that big enough everybody can see? Yep. You want it bigger? Nope, you're good. All right, so there's not much to this. I usually break problems down like this. Load just loads the input file with all those commands. Process is the part that is probably going to take up the most time. And then compute is just count how many lights at the end. And so when I thought about it, I was like, God, how am I going to do this? But I don't have 2D arrays. I don't have anything like 2D arrays, really. And I just don't really know what to do. And so I definitely don't know it's not a list of lists. That's not a good idea. But the only thing I could come up with was a map where I've got tuples representing the points, x, y. And then the value of the map is a true or false or a one or a zero or something like that. It doesn't feel right to me. Because a map is not a 2D array. But I didn't have any ideas other than that. So we went with it. So I implemented this. This is what I did. So I implemented this map. And if you look at process, well, actually, let's look at load first real quick. So load, I'm not going to really delve into load too much, because it's not that important. But it just parses the file.  And then we've got this function parse range that pulls out. It parses the integers, and it produces, it runs a reg x. And it parses the integers, and it pulls out what our range looks like in terms of two points. So that's really all that does. So process, it just takes those commands that have been created by load, and it reduces them into a map. And then exec, it picks the appropriate function based on the command. And if you look at what those functions do, all they do is they find out all the points in the range that literally takes the two corners and produces a list of points. And then it turns in these onlight and offlight things, they just mutate the map. So that's all that's going on here. It's not terribly elegant, but maybe it works. And so I thought, OK, well, maybe that's pretty good. So now, are you kidding me? Oh, there we go. You can't help me with anything. Well, we're just going to have to do this hard way. So now that we've done it, now that we've come through basically the code, the working code, and it worked. It ran, and it took a while. It took like 45 seconds or something like that, or a minute, so maybe not as good as it could be. But it worked. So I've kind of got it OK. So now it's about making it right. When I looked into it, the concept of making it right was another thing that was open for debate about this mantra. Some people thought make it right meant handle all the edge cases and corner cases. And some people thought it meant refactor the code and make it architecturally sound, which is what I always thought it meant. So I'm just going to say it's make it refactored. So it's make it work, make it refactored, make it fast. So let's go ahead and look at the refactored code. So the refactored code looks like this. So all I've done here, really, I did some small refactorings to remove a bit of duplicated code, which I won't really go into, nothing really major. But the main thing that I've done here is I've separated the file into three parts. And this is going to turn out to be important. So I'm still happy with load process compute. But I've moved everything that relates to the map into one section of the file. And I've basically said, OK, this here could potentially be extracted from this file. You could potentially move this into another module. I'm just holding off doing that for the time being because I tend to like to push that back. But now I've taken the piece of code that I'm most suspicious about that I think I'm now preparing effectively to make it fast. And I'm also preparing to benchmark it. And so that's really all I've done. I've removed some duplication in the way that command processing work. But that's all. And so what to do next? So next thing to do is make it fast. Now years ago, there was a product called FoxBase, which most of you are probably too young to remember. But FoxBase was like a version of another product called Debase, which most of you are definitely too young to remember. But it was exactly like Debase. But it was like 10 times faster, like literally 10 times faster at everything. And the guy who wrote it was interviewed and asked, how did you make it 10 times faster? So I just took out the slow parts, which is, yeah, that's great, man. So yeah, just take out the slow parts, and you're going to have a much faster program. So this is where benchmarking turns out to be a big win, because it allows us to identify what the slow parts are. So I use something called Benchfella. There are many benchmarking toolkits out there. This one I like, mainly because it's simple. It's not super feature rich, but it's got enough. But you can get going with it really quickly. And it's really analogous to the way test unit works. So it sort of feels right in terms of my whole benchmarking unit testing dichotomy.  And you have to create a folder called Bench underneath the root of your project, inside of which your benchmarking tests are going to go. Now, I wanted to make one more change, which is we had this big list of inputs with all of these commands. And I don't want something that's going to take 45 seconds when I'm doing my benchmarking, any more than you want your unit tests to take that long. I want my benchmarks to happen a little quicker than that. So I've made a simplified version of this. It has smaller numbers and it has fewer commands. And so hopefully my benchmarks are going to run a little quicker. So let's see how it goes. All right, we'll load another thing. So what we have here is I've added the Bench directory. And we have this lightsbench exs. And so as you can see, we're just touching the top level. So you could get really granular with this and benchmark loads of things. But just for now, I'm just going to benchmark the top level and we're going to see which part is slow. So we've got load, which we probably think is not going to be very slow. We've got process, which we suspect is going to be very slow indeed. And we've got compute, which is the adding up at the end, which is also potentially slow. You don't know. And so now once we run this, we're going to be able to see which one's slow, which one's not slow. So all you do is just type mixbench and it runs the three things. And it's basically running these functions as many times as it can in the kind of allowable time frame. And sure enough, to no one's surprise, load is very fast at 100 microseconds per op. Compute is also very fast, a little quick, a little slower, but still 267 mics an op. And process is the slowest by far. So process is the slow part. And process is the thing that's dealing with that giant map where we really want a 2D array. So well, that's great. But what now, right? It's not like I suddenly have 2D arrays. So I thought about this for quite some time. And mostly I think I just googled this one. And once again, Erlang OTP just has all the things. And here in the Erlang library is a module called array. I don't know how many of you have delved into the Erlang standard lib, but you just should. Just go into this Erlang standard lib and look at all of the things that are available in there. And you'll be amazed at some of the stuff that they've got like directed graphs, they've got stuff you wouldn't believe is in the standard lib. One of the things I have is this array. And I see this and I'm like, oh, this is the business. It's going to be functional extendable arrays. It's going to be fast. It's optimized. Here it is. And there was a couple of problems with it. One is that it only supports one dimensional arrays. But I said, all right, well, I'll just have a one dimensional array of arrays. And then I'll just have two lookups. And maybe it'll be quicker. So let's see how that looks. So now I've done a bunch of things here. One thing that I've done is I've moved the persistence layer actually into its own module so that I can have a map grid and an array grid, map grid being the original one and array grid being the one that's implemented using the Erlang array. And the Erlang array is just exactly the same. It's just exactly, wow, can I make it a little smaller? It basically just implements exactly the same methods that we implemented for the map of before. But it just calls this colon array module. And it calls get to get the rows. And it calls set to set the things. And we've had to turn a bunch of stuff around because it's Erlang and the object goes at the end. But basically this is exactly the same implementation as we had before. It's just a different underlying persistence model. And so the other thing that I've done, actually, I should show you, is I've changed these benchmarks so that they can either use a map or they can use the array grid optionally. So now I'm going to be able to have benchmarks that compare and contrast what's going on. And so I've got process using an Erlang array, process using compute, using map, et cetera. So what happens when we run mixedbench here is it now goes through all of this process and is running all of these things. And at this point, I am super optimistic. I'm like, this is going to be awesome, right? Like I can't wait to see how much faster it's going to be when I've used the Erlang built-in array thing instead of the map. And I don't know if you can see that. But it's substantially slower with the array than it was with the map. And the level of disappointment here, I can't even begin to convey, because I was so excited about how this was going to work. And I was like, wow, Erlang has everything. And then it's slower. But I was like, well, since I've come this far, let me show you. So yeah, that was me. I'm like, no. But since I've come this far, let me at least just try to run the problem with the two things. Now, this first line up here is 35 seconds. That's the original way with the map. But then the second line is 18 seconds using the array. So despite what the benchmarks were just telling me, it's faster. It is faster, right? It's 100% faster. So I'm like, well, what's wrong? Why did my benchmarks just come up with nonsense right there? So how to think about that? And if you remember, no, I don't have the preview here. So things are surprising me. If you remember, I kind of simplified this by shrinking the number of lines. But it also shrunk the number of numbers. So the effect of it was that I wasn't just doing fewer operations. My map was smaller by a lot. And so that small map was having a substantial impact on the performance, which shouldn't really be a huge surprise, but it didn't occur to me. So let's change this so that we can have a sort of real map. And so that is OK. So in this case, what I've done is I've added a new input, which is a bit more realistic, which is big numbers, four things. But big numbers should create a big map. And I put that in bench about two. And then I also need to make a change to the bench file to make sure that it loads that one. So if we go down here and bench about two. Now we're going to run this benchmark with a little bit better realistic data, maybe. And we'll see what happens now. And lo and behold, now Erlang Array is substantially quicker. It's interestingly, it's a little slower for compute. But that slowness for compute is more than made up for by how much faster it is for the process part. So the mutation is, for whatever reason, a lot quicker. But the important thing to realize is somewhere in between these two sizes of maps was a sweet spot. And so whether or not the right thing to use for you for this kind of problem is a map or an Erlang Array is entirely dependent on your program and only really something like benchmarking with realistic data can tell you that. So in this case, this is explaining why I was seeing the behavior I was seeing or I was working. So actually, I want to show you a couple other things. I can't demo this live because it actually requires the internet. And I don't trust it. But there's a few other little features of bench fella that are worth looking at. So one thing is that bench fella puts snapshots. Every time you run a benchmark, it creates these snapshots of the last time you ran it. And you can compare this snapshot to the previous snapshot. And I think you can make it generate warnings when things in the snapshots get significantly slower, which is really useful. And the other thing that it can create is graphs. And this is the thing that requires the internet. But you can just say mix. I'm not going to do it because it'll break things. But you can just say mix bench graph. And it will either produce the last snapshot, or you can make it compare the last two snapshots. And it'll show all of your stuff. Pretty neat. And I did it earlier. So hopefully you can see it. So this is what the graph of the first run looked like, where we were just using the map. And we've got compute. And you can see it's very clear that process is the issue. And then this was the one where we had all five. We're computing using an Erlang array. And you can see this is compute using map. And you can see that it's slower. It's faster, rather, than the Erlang array. But this is process using Erlang array. And it's considerably quicker. No, it's not. I'm not sure what the hell's going on. That shouldn't be that way. In any event, you can generate graphs. So back to the slides. So yeah, like I said, the important thing is the size of your data matters to some extent. So you want to simplify maybe, but don't oversimplify. So my tips for benchmarking and the importance of benchmarking is that you should be writing your benchmarks early, but not first. So first get it working. First get it into a state where it's where you would be comfortable maintaining it, or your team would be comfortable maintaining it. Then build your benchmarks. Simplify the inputs sufficiently that you've got benchmarks that you're not afraid to run all the time, that you might maybe be willing to automate or make part of a continuous integration process. But not too, simply. And if you're seeing weird behaviors where the benchmarks are just not agreeing with the production behavior, well, then you need to think about what's wrong with my benchmarks. Something is clearly not representative in my benchmarks. And keep running them all the time. And yeah, that's pretty much what I have to say. Like I said, I'm Cameron P on all the various services. And are there any questions? Nope. Thank you very much.


A very good evening aspirants welcome to Hindu newspaper analysis brought to you by Shankarae's Academy for the date 19th of August 2022. Displayed here are the list of articles that we are going to discuss today. Without any delay let's get into the article discussion. See this article here it says that the website of video land client has been banned in India. See in this discussion we are not going to discuss the issue instead we are going to see two aspects. One is in which situations can online content be blocked to the public and the second aspect is what is the procedure for blocking access to content which is available online. Now let us see the first aspect. See there are two routes through which content can be blocked online. The first route is through executive action and the second route is through judicial order. First of all let us see about the executive action. See governments across the world they have the power to monitor and issue directions for regulation of the content that are available online in their jurisdictions. See this is because there is vast outreach of the internet and it has large potential to cause significant harm to online users. See this is because there is vast outreach of internet and it has large potential to cause significant harm to the online users. Now coming to Indian specific information. See the government of India gets its power to monitor and issue directions from the section 69A of the Information Technology Act 2000. See the section allows the government to direct an intermediary to block the access to the content available online. See according to the definition under section 2 of the IT Act an intermediary includes telecom service providers, network service providers, internet service providers, web hosting service providers, search engines, online payment sites, online auction sites, online marketplaces, cyber cafes etc. So the government can ask them to block the data available for access by the public. And also know that according to section 69A government can block access to any information generated, transmitted, received, stored or hosted in any computer resource. See it can be done if it is necessary in the interest of sovereignty and integrity of India, defence of India, security of the state, friendly relations with foreign states or public order or for preventing incitement to the commission of any cognisable offence. So if the government feels that it is necessary to protect these conditions then it can block access to content available online. Now what is the basis behind this? See section 69A draws its power from Article 19 Clause 2 of the Constitution. See Article 19 Clause 2 allows the government to place reasonable restrictions on the fundamental right to freedom of speech and expression. See because of this provision only government has this power to monitor and issue directions regarding the content that are available online. So this is about the executive route. Now let us see the second route which is the judicial order. See courts in India also have the power to direct intermediaries to make content unavailable. See this is done to provide effective remedy to the victim. For example courts may order internet service providers to block websites which provide access to pirated content which violate the copyrights of plaintiff. So this is the second route and with this let us see the second aspect of the discussion. What is the second aspect? The procedure for blocking access to content online. See a detailed procedure for blocking content is provided by Information Technology Rules 2009 and this is formulated under section 69A of the IT Act 2000. See an important point to note is that only the central government can exercise this power of directing intermediaries to block access to online content directly and this cannot be done by the state governments. So if a statement comes in problems saying that state government can direct intermediaries to block access to online content then it is incorrect. Only central government has this power. See the procedure under the IT rules 2009 provides that central agencies should appoint a nodal officer who will forward the blocking order to the designated officer of the central government. And this designated officer examined the request of the nodal officer and he is a part of a committee and this committee comprises of representatives from ministries of law and justice, information and broadcasting, home affairs and certain and the committee while examining the request of the nodal officer gives a notice to the creator of the content in question and he is asked to submit clarifications and replies. And the committee then makes a recommendation on whether the request of the nodal officer should be accepted or not and if this recommendation of the committee is approved by the ministry of electronics and information technology then the designated officer of the central government can direct the intermediary to remove the content. So this is the procedure. Let me tell you again, state or the central agencies will appoint a nodal officer who will forward the blocking order to the designated officer of central government and the designated officer who is a part of the committee examines the request of the nodal officer and the committee comprises of representatives from ministries of law and justice, information broadcasting, home affairs and certain apart from the designated officer. Now committee while examining the request they will give a notice to the creator of the content and the creator will be asked to submit the clarifications and then the committee makes recommendation whether to accept the request of the nodal officer or not. If the recommendation is approved by the ministry of electronics and information technology then the designated officer can direct the intermediary to remove the content and that's all about this article discussion. With these key takeaway points let us move on to the next article discussion. Look at this editorial article here, this article is written by a former member of planning commission and this article gives insights about labour laws and its reforms. So in this article discussion we are going to see them in detail but before that the syllabus relevant to the article is highlighted here for your reference just go through it. Firstly know that labour laws are a set of laws that govern the rights and liabilities of persons employed in an organization and it also governs the rights and liabilities of organization as well. So in simple words they act as a medium between workers, organizations and trade unions. Now let's see how labour law in India evolved. See the history of labour laws in India goes back to pre-independence British era. At that time the labour and industrial laws were enacted by British administration to protect the interests of British employers and industrialists. See in the year 1983 the British Parliament introduced Factories Act 1883. See as a result of this act Indian labour got a stipulated 8 hours work a day and introduction to overtime wages, abolition of child labour and restriction of women working at night. And later in the year 1929 the Trade Disputes Act 1929 was enacted and this act was passed to regulate the relations between employer, employee and union of employees. Under this act only the rights of unions to conduct strikes and the rights of employers to declare a lockout was curbed. See this measure it was done to make sure industrial progress is not halted. And then as you know after a long struggle India got its independence on August 15 1947. Our leaders envisioned a country in which all Indians whether rich or poor would hold their heads high in dignity. See India's goal at that time was to provide Purnas Varaj to all of its citizens. This includes political freedom, social freedom and economic freedom. So to be specific independent India was formed on the idea of social justice. But during this period a majority of citizens had difficulty in earning good livelihoods. And this became India's gravest socio-economic problem. Here the problem is not just the employment but also the poor quality of employment. Wherever they are employed they had insufficient and uncertain incomes and poor working conditions. See this made India to pass many labour laws like Factories Act 1948, Minimum Wages Act 1948, Industrial Disputes Act 1947 and Child Labour Prohibition Act 1986. But the issue here is the labour laws come under the concurrent list of the constitution. This means both state and centre can draft and implement laws regarding labour. So there were as many as 200 state laws and 40 central laws, all the laws focused mainly on increasing the employment by improving the ease of doing business. See it was expected that investments in business will improve the citizens ease of earning good livelihoods. So what is the assumption in this theory? The assumption is if investment is increased then citizens will get good jobs and then this will improve their livelihoods. But for this to happen labour laws must be flexible, right? Then only it will attract investments. But in reality the investors felt that the laws protect the labour too much. Besides the n number of laws created lots of difficulty. And finally the government repealed all the non-useful labour laws and they codified most important 29 labour laws into 4 labour codes. And these codes include code on wages, industrial relations code, social security code, occupational safety, health and working conditions code. See all these codes came into force in the year 2020. Since labour is a concurrent subject it also encouraged states to implement the changes. Now with this information let us see about the report by the V. V. Giri National Labour Institute. See the report is named as impact assessment study of labour reforms undertaken by the states. See this report provides insights into the impacts of reforms so far. See the report spans the period 2004, 5 to 2018, 19 and it focuses on six states which have implemented the reforms. What are those six states? It includes Rajasthan, Maharashtra, Andhra Pradesh, Tamil Nadu, Jharkhand and Uttar Pradesh. Now let us see about the findings of the report. Firstly the report stated that there is no greater increase in employment as a result of labour law reforms. In fact employment informal enterprises started to become more informal. See large investors they are starting to employ increased number of people on short term contracts and they strangely demand for more flexibility in loss. Here what you must notice that if a firm formally employs a person then the firm must grant paid leave, a written contract and some social security. Under industrial disputes act not all firms need to be complied with these standards. Only an enterprise which employs more than 300 people should comply this. So here also the report said that increasing the threshold of loss will dilute the rights of association and representation of workers in small enterprises and this is one finding. Secondly the report stated that the effects of labour reforms would not be revealed immediately and it would take some time. Now these are the important findings of the report. To conclude the article says that we should reduce the gap between where our economy is standing and where it needs to be increased and for that to happen fundamental reform is required in the ways that policies are made. See the workers who are the ultimate beneficiaries should also be heard before the policy making and this is about the editorial article discussion. With these points in mind let us move on to the next article discussion. See yesterday the Reserve Bank of India released the August 2022 issue of its monthly bulletin. The bulletin consists of analytical points based on data collected by Reserve Bank. See these two Hindu articles here are written with respect to this bulletin points only. See the bulletin has six points in total and we are going to see all of the six points in this discussion. See the first point is regarding privatization. See privatization of public sector banks is a widely discussed topic in India. See the point highlights that privatization of public sector banks can do more harm than good. See the private sector banks are more efficient in profit maximization. It means that they work towards increasing the profit of the bank. But public sector banks have done better in promoting financial inclusion. So the public sector banks helps to fulfill the social objective which is financial inclusion. And this is the first analytical point. The second point says that Reserve Bank of India likes to deploy robust statistical data and machine learning techniques. Now you may ask why RBI is doing this? See these techniques they will strengthen the real-time tracking of economic activity to effectively deal with the impact caused by COVID pandemic. And in this regard RBI has developed two different indices to forecast IIP which is the index of industrial production and GDP growth. Now let us see these two indices. One is 7 indicator weekly activity index and the other one is 15 indicator weekly diffusion index. See the first indice which is the 7 indicator weekly activity index reflects the changes in economic activity on a year on year basis. And the second indice which is the 15 indicator weekly diffusion index it reflects directional movements on a sequential basis. See directional movements highlights the direction in which the price of a commodity is moving. So it shows whether the price of commodity is increasing or decreasing. And this is the second point. Now thoroughly the bulletin highlights that global growth prospects was dull over the month which is August month. It also says that easing of supply chain pressures and the recent decrease in commodity prices are providing some breather from record high inflation. See the bulletin says that the supply conditions are improving in India also and there is hope that the onset of festival season will boost the consumer demand. Now this is the third point. And after this the bulletin evaluates the performance of non banking financial company sector in the year 2021-22. See the consolidated balance sheet of the NBFC sector exhibited double digit growth in the last quarter of 2021. And NBFCs continued to provide maximum credit to the industrial sector followed by retail, services and agriculture. See the profitability of NBFC sector improved and its capital position also reminds strong. And this is about the performance of NBFC sector. And after this the bulletin article highlights that capital expenditure of private corporate sector plays a significant role in driving the overall investment climate in the economy. The announcement of new projects increased significantly during the year 2021 and 22. And after the impact of COVID pandemic the business activities and the demand for goods and services improved. And it also says that infrastructure sector continued to attract maximum capital expenditure. And this is about the capital expenditure. And finally the bulletin article analyzes exchange rate volatility in select emerging market economies and it is with respect to US dollar since 2007. See it covered major episodes of high volatility such as global financial crisis, Eurozone, sovereign debt crisis, taper tantrum, COVID-19 outbreak, the recent Russia-Ukraine conflict and the Federal Reserve's tightening of monetary policy. It is found that even in this high volatility episodes the emerging market economic currencies have performed better and also the number of days of high volatility during each of the subsequent episodes have declined. See Indian rupee volatility have also come down during the period 2007 to 2021. See this is about the analytical points discussed in the RBI bulletin August 2022. See all these points can be used in your main's answer. The first point discussed about the disadvantage of privatization of public sector banks because it will be a hindrance to fulfill the social objective of financial inclusion, right? We saw that private sector banks are more efficient in increasing the profit of the banks. Their goal is not to achieve financial inclusion rather it is to achieve maximum profit. And the second point it is about deploying robust statistical data and machine learning techniques. You can use this point in your main's answer by saying that RBI has taken steps to track economic activity and keep the inflation within the target levels. And there is a point that evaluates the performance of non-banking financial company. So you can use this point by saying that according to RBI the profitability of NBFC has improved and its capital position is strong. See all these points are data that can be used in your main's answer. And with these points in mind let us move on to the next article discussion. Now have a look at this news article. This news article talks about the BRI projects. We all know what is BRI, right? It is the Belt and Road Initiative of China. See the article here says that China's investment in infrastructure projects under BRI have declined. But at the same time Beijing's short term and medium term assistance to partner countries is increasing. The article says that in some of the short and medium term assistance the countries are dealing with the rising debt levels. See three clear trends in the BRI were noted according to a report from the Green Finance and Development Centre at Shanghai's Fudan University. The trends are a growing role for the Chinese state-owned enterprises and then the average size of the project deals are falling. It is falling from $558 million in 2021 to $325 million this year. And the third trend is an increasingly uneven spread of engagement. So this is the crux of the news article given here. In this context let us learn a few facts about the Belt and Road Initiative. First of all what is BRI? See it is an investment program that aims at infrastructure development and economic integration of countries along the route of historic Silk Road. See here the keywords are infrastructure development and economic integration. You should remember these keywords. See this BRI it is transcontinental in its approach and it aims at accelerating infrastructure development. See the initiative was announced in the year 2013 by China's President Xi Jinping and it is also known as One Belt One Road Initiative. Now take a look at this map. See the Belt Road Initiative aims to connect Asia, Europe and Africa. The belt refers to the Silk Road Economic Belt which comprises three overland routes. The first one here connects China, Central Asia, Russia and Europe. And then this will link China with the Persian Gulf and Mediterranean Sea through Central Asia and West Asia. And then it connects China with Southeast Asia, South Asia and Indian Ocean. Meanwhile the road refers to the 21st century Maritime Silk Road. What does this do? See it provides an impetus to trade. Here China is concentrated on trade happening between China and Europe through the South China Sea and Indian Ocean in one route. And then the other route is concentrated on connecting China to South Pacific Ocean through South China Sea. So what did we see so far? We saw that belt refers to the Road Economic Belt. It consists of overland route that connects China, Central Asia, Russia and Europe and we saw two sublinks which connects China with Persian Gulf and Mediterranean Sea through Central Asia and West Asia. And then the second sublink is it connects China with the Southeast Asia, South Asia and Indian Ocean. And then the Road in the Belt and Road Initiative refers to the Maritime Silk Road. Here it provides for connection between China and Europe via South China Sea and Indian Ocean in one route and it provides connection between China and South Pacific through South China Sea. Know that under this project the Chinese government helped in providing loans for the infrastructure projects to various countries and in many cases Chinese companies were awarded contracts for carrying out the work. And this helped China mark its footprints at a global level. So this is the significance of Belt and Road Initiative of China. And with this we have come to the end of the discussion. With these key takeaway points let us move on to the next article discussion. See recently due to increased defeat in the monsoon season the great Indian Busted in Desert National Park in Jaisalmer is formed to give two eggs in a clutch. See this is a new record because for more than a century all experts had been reporting a clutch of single egg only. And this is why this news article has made news today. So in this context let us see in brief about the great Indian Busted and why such an event is happening. Firstly know that the great Indian Busted are birds. See they can be easily distinguished by its black crown on the forehead contrasting with the pale neck and head. The body is brownish and the wings are marked with black, brown and gray. See males and females generally grow to the same height and weight but males have larger black crowns and a black band across the breast. And they breed mostly during the monsoon season where the females usually lay a single egg on open ground. But recently the great Indian Busted in the Jaisalmer district desert national park are found to give two eggs in a clutch. Here clutch is the total eggs a bird lays per each nesting attempt. Scientists believe that because this is not something which happens all of a sudden today. So scientists began to celebrate this because such an event is happening after a century. See they are also working on XI2 breeding of these birds. We all know what is XI2 breeding right? It is the breeding of flora or fauna in captivity not an outside environment. They are working on the XI2 breeding to conserve the species. Now moving on to the reason for the event. See the event happened because of the recent excessive rains in western Rajasthan. The rains exceeded 20 mm by mid-August in Jaisalmer district and the production of natural feed for birds increased in places with abundant rainfall. And this added additional protein to the diet of the birds. And as a result they began to give two eggs in a clutch. And as I already said scientists say that this is a sign of evolution. So here what is evolution? Evolution is a change in the heritable characteristics of biological populations over successive generations. See bustards generally favor flat open landscapes with minimal visual obstruction and disturbance. And because of this they adapt well in grasslands. See they avoid grasses taller than themselves and then scrub like tickets. See since monsoon is the breeding season for the birds and plenty of food stock is available due to excessive rain the species might have evolved in this way. I'll give you one more example for evolution. See have you heard about Mexican cave fish? They once had eyes but in the caves eyes were no longer necessary because caves will be very dark right? They have also lost their pigmentation because they no longer need to camouflage from predators. And this kind of change in the heritable characteristics happened due to the conditions in which they live. And this is what happened in the great Indian bustards also. And that's all about this article discussion. With these points in mind let us move on to the next part of the discussion that is practice prelims question discussion. Today we have three prelims questions. I'll solve two of them and one of them is a quiz question for you. Now let us take this previous question which was asked in the year 2021. See in India the central banks function as the lender of last resort usually refers to which of the following? Statement 1. Lending to trade and industrial bodies when they fail to borrow from other sources. Statement 2. Providing liquidity to the banks having a temporary crisis. And statement 3. Lending to governments to finance budgetary deficits. Select the correct answer using the code given below. See you have to carefully read the statements given here. See the major functions of RBI include issuance of bank notes, banker to the government, custodian of cash reserves of the commercial banks, custodian of countries foreign exchange reserves, banker to banks and controller of credit. So these are the functions or roles of RBI. Now let us take this particular role which is banker to banks. See as banker to banks the reserve bank focuses on enabling smooth, swift and seamless clearing and settlement of inter-bank obligations. Providing an efficient means of fund transfer for banks. Enabling the banks to maintain their accounts with the reserve bank for statutory reserve requirements and maintenance of transaction balances and acting as lender of last resort. So from this it is very clear that the function as lender of last resort is regarding providing liquidity to the banks having a temporary crisis. It has nothing to do about lending to trade and industrial bodies and lending to government. So the correct answer here is option B 2 only. Now let us take the second question, consider the following statements. Belt and road initiative connects China with Persian Gulf and Mediterranean Sea. This statement is correct. This we saw in the discussion itself. The belt component of the BRI initiative refers to the Silk Road Economic Belt and through this overland route China is connected with Persian Gulf and Mediterranean Sea through Central Asia and West Asia. Now coming to second statement, partnership for global infrastructure and investment GII is a similar initiative like the BRI which is planned by China. See this statement it is incorrect. It is a new infrastructure funding program initiative by US and other members of G7 countries including Canada, Germany and Japan. See this statement is incorrect. This is because it is not a similar initiative like the BRI which is planned by China. See US and other members of the G7 including Canada, Germany and Japan formally launched the partnership for global infrastructure and investment. They launched this so that it could act as rival for China's Belt and Road initiative. So statement one is correct and statement two is incorrect. So the correct answer here is option A 1 only. Now coming to the final question this is the quiz question for you. Consider the following statements about busters. The IUCN status of great Indian buster is least concerned and four members of the busted family are found in India. Think and attempt this question and post your answer in the comment section. I have given a main question here for your practice so interested aspirants write it and post it in the comment section and if you have any queries related to the articles that we discussed today post that also in the comment section. And with this we have come to the end. If you find the video useful like share and comment and do subscribe to Shankar Iyer's Academy's YouTube channel for further updates. Thank you.