Work as a production engineer at Mapbox where I build systems that scale and in a very small way sort of lay the technical foundation on which all of Mapbox's services run. Today I'm going to be talking about SpotSwap which is a module that we built in-house. It's also a very interesting architectural concept. We do use AWS across all our services so this talk can be a little heavy on the AWS jargon but I've tried to break this down wherever possible. So we run a host of services at Mapbox and one of these services is our map service called API Maps. Oh yeah one second. Yeah one of these is our mapping service called API Maps and on any given day this service serves about 1.5 million requests per minute served across six origin regions and these servers that serve these requests are sort of housed in autoscaling groups which is an AWS concept without I mean it's a little hard for me to get to the essence of my talk without giving you an abstraction of our architecture. So you can think of our architecture as being composed of three parts. Everything that happens from the time we receive a request until that request reaches a load balancer and then the load balancer which is denoted by an ALB in this diagram roots the request to a server in the autoscaling group and then the server retrieves whatever ingredients that it needs to fulfill that particular request but what is an autoscaling group? So you can think of an autoscaling group as being a group of servers and as the name suggests this group can scale up and down in capacity and you can configure the scaling based on three configuration parameters which is the minimum the desired and the maximum. So the minimum determines the least number of instances that your autoscaling group can have. So the least number of instances that you can scale down to the desired is the optimal number of instances that you would want during periods of normalcy and the maximum is the maximum number of instances that you can scale up to. The other point about the autoscaling groups is that these groups have servers that are very similar in nature so each server in the autoscaling group will have the same amount of CPU and the same amount of memory. Coming back to our architecture the focus of my talk is going to be the central portion or the autoscaling group and I'm going to talk a little bit about how we had to ensure that this autoscaling group was reliable so you know it always had to have a sufficient number of servers in order to fulfill the traffic capacity that we receive and to keep our latency really low currently our latency is about 200 milliseconds and secondly of course the constraint of cost we're a startup so we wanted to work around the several pricing strategies that Amazon gives us in order to ensure that we have the possibility of scale but we're keeping our costs really low. So if you work with Amazon, Amazon allows you to rent server space and the server space is called an EC2 and EC2 is categorized by the resources that they have so on the basis of memory and CPU so you can have instances with a lot of CPU and little memory or you know like various combinations of memory and CPU but further it's also interesting how you pay for the server space so an interesting way to think about the pricing strategies that Amazon offers you is one stability of the instance that you rent and secondly the amount of time you want to use it for so on the basis of these pricing strategies instances can be categorized into three types you have the on-demand instance which is very expensive and you pay for it using a pay as you go model so minimum usage is one hour and you pay for every additional hour of usage and these instances are very very stable so you would have to explicitly you know shut down these instances in order for them to disappear and secondly you have the reserved instances these are medium range and cost so they cost about 50 to 70 percent the cost of the on-demand instance and again these instances are very very stable you pay for these instances by reserving them for a certain number of hours in advance so you do run the risk of reserving an instance for a longer period of time than you need it to be around and luckily you have the spot instance so spot instances come from amazon's unused server space and they're ridiculously cheap in fact they you can have about 90 percent savings as opposed to what you'll be spending on on-demand instances but these instances are very very unstable and their pricing is governed by the spot market which i'll come to in my next slide so the amazon spot market is a very interesting place and it sort of works on similar strategies as to what gambling works on so you have a bid price for an instance type that is depending on how much cpu and memory you want you set a bid price and if your bid price is lesser than the market price your request is fulfilled so the market price of course is constantly going through a flux because the market price changes if the demand for a certain instance type increases so when the demand for a certain instance type increases to an extent where the market price goes higher than your bid price your instance is terminated with a two minute warning that's all you get you just get a two minute warning and your instance is shut down and again when the spot market stabilizes and your bid price goes you know higher than the market price your instance will come back to life so it was winter 2015 and at mapbox our traffic had reached a point where we definitely had to scale and i mean of course the obvious answer would be to scale linearly right but this would also mean that you know there would be a linear increase in cost so we wanted to mitigate this linear increase in cost by designing a system that would be very very available but that could still run on spot instances so this is what spot swap is but before going into the details of spot swap i want to talk about two architectural features at mapbox which made spot swap possible the first of this is that our systems are very very fault tolerant so all our persistent data is actually stored on a hosted resilient and scalable database like the amazon s3 and dynamo db and this persistent data is accessed remotely by each ec2 so the ec2 in itself does not store any persistent data and secondly the ec2s have very very fast boot times so it takes an ec2 under two minutes to become healthy and to be able to serve traffic from the time that it comes back to life so given the potential for turbulence in the spot market you would think that you know you should use the spot market to run staging services or you know to run development environments but we managed to mitigate this risk around critical availability by running a very very available system on the spot market as i mentioned and we call the spot swap so the spot swap ecosystem consists of two auto scaling groups you have a spot auto scaling group that's always scaled up to full capacity and you have an on-demand auto scaling group which does not have any instances usually but when it comes to life it's filled with on-demand instances which will last for as long as you say that you don't want them to be around so how does spot swap work in essence our strategy with designing spot swap the way it is designed was to counter the risk of the spot market or the turbulence of the spot market with the on-demand auto scaling group so every spot instance is actually configured with an upstart script and it's constantly polling a metadata endpoint and it's trying to find out if it is at risk of termination so it's important to note here that this information where you know an instance is able to find out if it is at risk of termination is only available with the instance as amazon provides it so there's no external way for you to find out if an instance is at risk of being shut down so when an instance realizes that you know it's going to be shut down in the next two minutes it immediately requests a replacement to itself in the on-demand auto scaling group and how it does this is that it says that desired configuration parameter in the on-demand auto scaling group it increments it by one as i mentioned there's no external way to figure out if an instance is at risk of being shut down so the first bottleneck that we encountered with race conditions and how this happened was that we i was telling you that the auto scaling group is composed of instances that are similar in nature right they have the same amount of cpu and memory so whenever there's a spot price out or you know your bit price goes below the market price there are several instances that are actually at risk of termination it's not just one instance that's at risk of termination so when there's a scenario where several instances realize that you know they are going to be terminated in the next two minutes they have a race condition where they only increment the on-demand group once so you know in this case there are two instances which realize that they were at risk of termination and they both you know hit this on-demand api and found out that there was only one instance so they both set the desire to two so you run into a scenario where there are three instances that have disappeared in the spot group but your on-demand capacity has not come up to the same extent and our strategy our first strategy to counter this was to aggressively scale up the on-demand auto scaling group at any time that we encountered a spot termination so if there was one instance that was at risk of termination we would still scale up the on-demand group to full capacity similarly when there were more instances that found out that they were at risk of termination they would simply set the desire to 16 and in this case the on-demand comes up to full capacity and your traffic still has enough servers to serve responses but obviously this is not optimal right so we realized that there were two obstacles the first was that we needed an external means to assess the termination state of an EC2 and secondly we needed a resource that could assess like you know in a centralized manner assess both the state of the spot auto scaling group as well as the on-demand auto scaling group so for the former what we decided to use was amazon's tagging feature so amazon has this feature where you can tag your EC2 with a certain metadata and this metadata is accessible by an external resource so any EC2 that was at risk of being terminated would tag itself and the second part which was that we needed a centralized means to assess both the state of the spot group and the on-demand group we decided to go with AWS lambda and AWS lambda is a stateless resource so you can configure it to run at periodic intervals of time and assign it a certain task that you want done so in our case the external lambda would keep track of the number of EC2s in the spot in the spot auto scaling group that were tagged as being shut as being at risk of termination and then it would just send a single API call to the on-demand auto scaling group to increment it so in this manner we were able to optimally scale the on-demand group whenever the spot group was at risk of losing capacity but I was telling you that we mostly run our services on spot instances so how does the service go back to its previous state where it was serving traffic pretty much entirely on spot instances so what happens is that at this point the spot and the on-demand auto scaling group are both serving traffic but at some point the spot market stabilizes and slowly instances that you lost start coming back to life and at this point what happens is that your system is over provision to serve traffic you have more capacity than you need so the CPU utilization on the on-demand group will slowly start to drop so at a certain threshold we've configured an auto scaling policy that will aggressively scale down the on-demand auto scaling group when it hits that threshold so at this point it's funny because that looks like an emoji a sad emoji they all realize they're going to die but yeah so it slow it it realizes that it hits that threshold and it starts to scale down really aggressively and then your system goes back to running entirely on spot instances so we have seen that this takes minutes and you know sometimes even hours for the spot market to stabilize but we have seen that even those brief periods where we run entirely on on-demand instances to sort of weather the storm we haven't really cut into our savings and our savings have actually been up to 50 to 80 percent of cost on our api architecture and even on our caching architecture which we have migrated to spot swap but obviously this system has improvements right and one of the roadblocks that is obvious is that the spot price out affects more than one instance because we are dependent on auto scaling groups so one of the improvements that we made was to use amazon spot fleet so spot fleet comes with a set of diverse instance types so you can have instances that have different memory and cpo resources in the same spot fleet so now your spot price out will not really affect more I mean will not affect most of your spot fleet it'll only affect like a few a small part of your spot fleet and secondly like um since we've migrated to docker in ECS now we've noticed that our boot times have become even faster because now we are deploying containers and this brings me to the end of my talk where I want to tell you that spot swap is actually now open source and I hope all of you can use it and keep the cost benefits that it offers and I'm happy to take any questions now thank you hello so the spot instances are there for to use ideal capacity and your try really trying to do is to use it for in production if everyone start using that there won't be any spot instances right sorry if everyone starts using spot swap yeah there'll be a lot more demand for spot instances and then the whole point of spot instances will go away yeah I mean but I mean it's just like a it's an architectural concept right so I don't know if that happens we'll have to figure out some other ways to go around it I guess okay the other question I have is can you spot instances along with ECS I didn't know could do that uh yeah you can use spot instances with ECS you can use auto scaling groups with ECS so currently our model is a mix of a spot fleet and a non-demand auto scaling group so uh can you do the auto scaling in the spot instances as well yeah yeah we scale our cluster yes okay interesting yeah oh I think like I was just thinking a good answer to your first question could be that not everybody everybody will use the same kind of instance type right so maybe we're still protected by the diversity of instance types that Amazon offers maybe that's a good like reason why it won't affect everyone so when this migration is happening from spot instances to on-demand instances do you did you guys experience any latency in the application not really because um firstly a spot group we have a spot group over provision in the first place so we have like a lot of capacity in the spot group and as soon as the spot group is going down the on-demand comes to life and I was telling you that our EC2s come uh are healthy you know to serve traffic in under two minutes so it doesn't really it doesn't really affect our latency very much okay so what is the average time in terms of hours so the spot instances are available so once I provision uh mentioned in the real world so what is the average which is available the spot instances you mean how long it is available for uh you pay for it per hour so you in the real world you might have seen actually you know how long you know you are actually it's getting down I mean you have at the bidding you have to um I don't have a good sense of the numbers like for the instance types that we use we have seen them it it totally depends on the market demand and you can't really tell it fluctuates wildly and but any number which we can actually know we have to see right so sometimes I know I can get back to you with the numbers but I don't know it off the top of my head no problem yeah I've had that I mean I've had instances that have lasted for weeks and I've also had instances that died in the first hour so it's really hard to tell okay that's what that's what I want to sense actually you know what is actually oh yeah it's totally it it totally depends on the market demand at that point of time and again it also depends on which region you request your spot instance from so you know in Amazon US East 1 in Virginia you have really high demand because several people have services running there so a spot instance in Virginia is more likely to die than something in a region that has lesser demand like Tokyo or something it also depends on time zones right so you know your services people are going to be accessing your services during the day in certain places and at that time there will be a lot of demand for for instance is there okay so depends on a range of factors then would be the one of the techniques we can use it actually where we have actually less usability than we can present then it can be high availability one of the techniques that we use is that we set our bid price to be the same as the on-demand price because your market price so okay wait let me explain this properly so we set a bid price to be the same price as the current on-demand market price and we expect the spot market price to be below that value so whatever is that value is what will be considered as the price for your instance so you can even bid like 50 dollars right for example i mean you shouldn't do that but if you bid 50 dollars and the market price is say 50 cents that is what will be considered so setting like experimenting with the bid price is a good is a good technique i guess yeah hello so you have two auto scaling groups independently of say 16 on one and zero on this right yeah now say it goes 16 on one and four on the other but i don't know the number that 16 is good for me maybe i want that to be scaling also how do you guys manage that the sum of these two should be scaling up and down based on you know the overall latency of the overall cpu usage do you guys do that already so the thing is that we don't want to run on on-demand right like our strategy is to run entirely on spot so the 16 is just an arbitrary number here so it's not we don't run on 16 servers but it would be a fixed number how do you dynamically keep changing that 16 number also so if my cluster i mean you have two clusters one is having 16 instances of which four spot instances are dead and so you're running on four of them on on demand now how does the auto scaling group know that i should scale down from 16 to say 12 right now because it's evening hours and the traffic has gone down oh good question so one of the things that i mentioned was the spot group never scales down so the spot group always has the same amount of capacity we don't have a an auto scaling policy on the spot group so that will always have a set number of servers and we've noticed that even in even with that over provisioning we save a lot of money so we've kept it that way thanks hey i'm here so my question is i can answer already so what i wanted to ask is for the bid price can we set it like can we have dynamic bid price like we said it lower if the spot is going out of the service we can make it higher before going to the on demand i mean you can you cannot do that because your instance like the market price is already determined that your bid price is lower yeah so can we dynamically increase the bid price before going to the on spot like on demand instances it's very hard to estimate as in like when you know you're at risk of losing capacity it's not something that we have but maybe it's possible so currently it does not facilitate this this kind of scenario like increasing the bid price before going to the on demand we haven't implemented it yet thanks yeah hi so we extensively use spot instances spot fleets for this thing so my question is like how do you take care of deployment so my current setup is like we reboot the instance and the upstart script will pull the latest artifact and everything but if we have like more than 20 30 boxes then it takes time to do that like so what will be the good strategy for that okay so we actually use spot fleet on our cluster back in the day when we used to use auto scaling groups we didn't use spot fleet we used to use only auto scaling group in the cluster what we do is we basically allow the user to select five different types of instances and this choice is they can further configure a weight that should be given to each instance and yeah we determine this weight by the memory so every 100 mb of memory is one unit in our case and then we also like give a bid price for each instance and that's how we deploy and then we have a maximum capacity that we want the fleet to have right the maximum weight and depending on the weights that we have configured when we are trying to create the cluster it automatically like provisions the cluster with a choice of instances like I think there are two ways to choose the kind of instances you want one is maximum diversity and the other is low price and we've chosen maximum diversity so we want the instance selection to be as diverse as possible and we give it a weight for each instance and an overall weight and that's how it provisions the instances automatically there's Shubham I wanted to ask when you are showing the spot id auto scaling group and the on-demand auto scaling group since instances are like paid by art can there be something like thrashing where you spin up an on-demand server and your spot instance like comes back before one hour right so you'll move back again and I'll end up increasing the cost is the question clear no can you so yeah so let's say your spot instance goes down you spin up an on-demand server and then your spot instance comes back up again and this between one hour right so you'll end up paying for both for one hours so how do you tackle that problem okay we haven't really tried to so I mean I think for us like we realized that the cost savings was so much even with this system that we didn't really try to iterate even more but it's open source now so I'm happy to like receive feature requests and like full requests you know from you but we haven't we haven't really implemented it hi yeah hi that was a wonderful talk one thing which I want to know is like you said like a spot fleet where there are different types of instances so how do you match the capacity on the on-demand instance like you know I mean there are different type of instances there is some policy check which instance has gone down so that you would bring in the on-demand one yeah good question so one of the things that I didn't mention in that answer was that we also have a weight and a capacity for the on-demand group so you can set a certain weight for an on-demand instance and you can also set an overall weight that you want for the on-demand group so this is something that we configure per cluster in our service in our stacks so my question is around deployments so when you have this kind of open screen groups and on-demand and spot ones right how do you handle your deployments oh okay so at map books we use cloud formation for everything we don't use the amazon console at all and we also have we have one open source tool called cfn config that you can all look up and we use that for deployments so it you it gives you like a set of parameters that you can configure and then based on your cloud formation template the deployment is done no my question was more around the application deployment right so when you once you rebuild your code base right or you have a new artifact to be deployed how do you deploy that how do you upgrade your instances or the software you have on those because they might terminate anytime right um do you really um upgrade the image itself the image for the AWS instance yeah how do you handle that part like your weekly deployments or whatever the deployments you do yeah how do you handle that part the software um so spot swap is currently part of our cluster and the deployment of our services is independent of this so the cluster exists as a separate stack and um spot swap is part of this stack and the service will when you deploy the service it essentially just sits on one of these containers right it's not worrying about provisioning or it's not worrying about whether it has enough servers so the cluster takes care of that so once you have a cluster deploy that's done uh the fluctuations of the market will sort of determine the number of servers that you have whereas your service deployments will not directly impact this does that answer the question was an extent okay i can also like talk to you after the talk yeah all right thank you everyone


You were born a Jew. You may have gone to Hebrew school for some years and had a bat mitzvah, or a bat mitzvah. Whether you had a good education, a poor one, or none at all, you're now a teenager, maybe in your 20s, 30s, or any age, and you have a problem. Your problem is Jesus of Nazareth. For a long time he meant nothing to you. You knew that you were a Jew and Jews didn't believe in Jesus, but at some point that began to change. You may have read something or heard a speaker say that you cannot be saved unless you accept Jesus as your personal savior, and furthermore that you can remain a good Jew and accept Jesus.  Perhaps for the first time in your life you met sincerely religious people who reached out to welcome you and include you into a real fellowship. You were probably told that only through Jesus could your sins be forgiven. You then read portions of the New Testament and you were moved by the personality of Jesus. His love of God, his fellow man, and his compassion for the weak and suffering. And you're now in the process of becoming a Jewish Christian, or maybe you've already become one, or you're just beginning to think of becoming a Jewish Christian. Or, your situation may be different from anything described so far, but you're a Jew and attracted to Jesus and Jewish Christianity. This video is for you. It was produced in the spirit of reverence. Chances are good that if you have begun thinking about becoming a Jewish Christian, you've encountered some hostility from Jewish relatives and friends. Some of them may have had little Jewish commitment until they heard about your Jewish Christianity, at which point they berated you for apostasy, being disloyal to your people, and other nasty things. To you all this sounded very unfair because you didn't think you were being disloyal to anybody, just happy with a newly found faith. So naturally you may be confused. Can I be a Jew and a Christian? Why is Judaism rejected Christianity? These and other questions come to your mind. You've heard these questions answered by your new Christian friends, but since you're a fair person, you want to hear the other side of things.  After you've heard both sides of this story, you'll make up your own mind, and this is as it should be because every person is responsible for his or her own choices with a right or wrong. The purpose of this presentation is to explain the Jewish point of view with respect to Jews becoming Christians or Jewish Christians. Judaism never did, nor does it now wish to discourage Gentiles from becoming or remaining Christians. The reason for this, as you'll see, is that Judaism has never believed that everybody should become Jewish. From the Jewish point of view, good people of all religions have a share in the world to come. Judaism does, however, believe that Jews should be Jews and nothing else. Now the purpose of the presentation is therefore to explain why Jews ought not to become Christians or Jewish Christians, but it's not directed at anyone who is not Jewish. It was produced in a spirit of respect for those to whom it is addressed.  It's necessary to say this because often Jews speak to fellow Jews attracted to Christianity and they find it hard to believe that such Jewish Christians are sincere. The reason for this is simple. For many centuries, most Jews who converted to Christianity did so out of self-interest rather than religious sincerity. Up to very recent times, being a Jew in a Christian world was a social and economic disadvantage. Many occupations were close to Jews as were popular social circles. Many Jews who embraced Christianity therefore acted out of self-interest rather than genuine religious conviction and Jews resented such conversions of convenience as did sincere Christians. Gradually this attitude became deeply ingrained in the Jewish mind and as a result many Jews find it hard to believe that a Jew who embraces Christianity can be sincere. But times do change and while discrimination against Jews has by no means disappeared it has diminished particularly in the United States and Canada. Today in this country, most Jews who move towards Christianity don't do so out of social or economic self-interest. They must therefore be addressed with the respect that any sincere person who seeks truth deserves and that's the spirit in which this video was produced. In addition to respect, the Jews who have been attracted to Christianity also deserves honesty. We're not going to hide our goal. It's to retrieve for Judaism every possible Jew. We will attempt to do so honestly and with love and with the knowledge that in the final analysis each person is responsible only to God for the decisions that he makes. One more word about motivation. Nowadays many Jews who hear about Jews involved with Christianity attribute such involvement to a lack of Jewish education or some kind of psychological problem. Now it's true that many Jews both old and young lack a proper Jewish education. It's also true that many persons today have psychological problems but religious choices can rarely be explained just on psychological grounds. One way or another a person is responding to God and to spiritual realities. The spiritual realm involves man's soul and it's deeper than the mind that the psychologists can understand. There will be no attempt here to explain away your interest in Christianity by reducing it to a psychological or educational problem. If your Jewish education is weak then you want to improve it and hopefully we will play a small role in helping you do that.  There's one more thing, an important point that must be made before we begin to discuss the issues. To a certain extent throughout our discussion we will be proving things or trying to show that the proofs offered by others leave something to be desired. As you listen, especially if you pay careful attention to various proofs offered you might come to the conclusion that we consider religious beliefs to be based purely on rational proofs. That's not our intention. Religious beliefs are to a large extent based on faith and this is true of both the Jewish and the Christian believer. Let's look at some specific examples. Much of the debate between Judaism and Christianity involves the interpretation of passages from the Bible. To the believing Jew, the Hebrew Bible or the Old Testament in Christian terminology is the Word of God. To the believing Christian both the Old and the New Testament are divinely inspired. Now the belief that a particular book is or is not the Word of God cannot be proven objectively. Such a belief is held by faith and Christians speak of faith as something given by God as a gift to some and not to others. The encounter between Judaism and Christianity is to some extent an encounter of different faith positions and honest Jews and Christians should recognize this fact. Now this is true not only with regard to the question of whether or not the New Testament is divinely inspired but also of a number of other questions such as the divinity of Jesus and under what circumstances God forgives sins. Faith plays an important part in both Judaism and Christianity and would be less than forthright for either Jews or Christians to assert that they can prove their case beyond doubt and therefore do not require faith. But what is faith? Is it simply believing things without any evidence? Is anyone entitled to believe anything simply on the grounds of faith without having to give any reason for his beliefs? I mean this is a difficult question to answer and theologians have written a great deal about it. Perhaps the best example of faith is that of Abraham about whom the Bible says when they say Abram put his faith in the Lord and the Lord counted that faith to him as righteousness. It's important to note the context in which the verse appears. The verse appears in connection with Abraham's puzzlement about God's reliability. God promised Abraham that his offspring would be as many as the dust of the earth and then Abraham and Sarah had no children. After Sarah passed her menopause it looked as if God was not going to keep his promise. It's at this point that we're told of Abraham's faith. Abraham believed that God would keep his promise even though from the human point of view I didn't look all that likely. This sort of trusting faith is somewhat different from the believing sword that we have in mind when we speak of faith in God's existence or the divine inspiration of Scripture. Nevertheless it shows that faith has an element of trusting someone in spite of the existence of contrary evidence. If we truly love God and feel his love for us we trust him to keep his promises and to do what is good for us. At the same time it can't be that the will of God that human beings act irrationally. Even if things held on faith cannot be proven with certainty there's much that can be understood. Take something like interpreting the meaning of the Bible. In order to understand the Bible we have to read it. Those who can't read Hebrew or Greek have to depend on translations and translators often disagree about the correct translation of certain passages. Furthermore, when reading anything written many centuries ago we have to be sure we understand the expressions and way of thinking of the people to whom the work was addressed. Otherwise we're in danger of misunderstanding its message. Now this is particularly true of historical religions like Judaism and Christianity whose claims to credibility are based on happenings in time and place. These religions have long histories during which certain ideas develop. Take something like the idea of the Messiah. It is really impossible to understand the meaning of the claim that someone is the Messiah without understanding what the idea meant among ancient Jews and how it came to mean what it did. Christianity was born within Judaism. Jesus and his disciples were all Jews. They were educated along Jewish lines and thought of themselves as Jews. To understand Christianity it is therefore necessary to know a good deal about Judaism. Now this is particularly true for a Jew who becomes interested in Christianity. He has to face the Jewish roots of Christianity and therefore his own Jewishness which is something he may never really examined before. We will attempt to explain how Judaism views Christianity and why it cannot agree with some of the most important Christian beliefs. Now because we will concentrate on our areas of disagreement we may give the impression that there are no areas of agreement. Now that of course is not so. Belief in the dignity of man as created in the image of God is one area of agreement. So is the teaching that we must help those less fortunate than us because God so desires it. And there are many other areas of agreement. Nevertheless, for a Jew to come to believe that Jesus was God to take just one idea in Christianity that Judaism cannot accept is a very serious matter and so we hope you will continue watching with an open mind.


AppalachianWireless.com is here to make your life easier. Sign in or create a self-care account to pay bills, view usage, or check contract dates. You can also apply for paperless billing and auto pay to save up to $5 per phone per month on post-paid plans. It's self-care from Appalachian Wireless. Tuesday, February 14th, Judge Executive Ray Jones designated February as Career and Technical Education Month. CTE Month will urge students to become familiar with the services and benefits of the CTE programs in the county. The biggest thing we need in Eastern Kentucky's jobs, and the quickest way to get people into the workforce is through career and technical education. You know, there are different career paths. Some people choose college, some people choose the military. But what we've seen is career and technical education, jobs like HVAC, electrical work, automotive, construction, technology, those jobs are plentiful. And a lot of those jobs pay great money. And you can get through a career and technical education pathway a lot quicker and get into the workforce. And it's a skill set that's desperately needed. CTE programs offered in Pike County include welding, carpentry, diesel mechanic, industrial maintenance, electricity, and health sciences. The career and technical education is on the comeback.  And then we don't have our plumbers. We don't have our electricians. We don't have our mechanics and our carpenters. So with career and technical education now, we push our programs. And you know, usually when they go into the career fields, they don't have that student loan to pay back when they can actually start work when they leave high school and make a good wage and stay here in eastern Kentucky. Reporting for Mountaintop News, I'm Brianna Robinson.


OK. Hi. I am Sophie Watson, and I work at Red Hat, and today I want to tell you about learning to rank. So raise your hand if you've ever used a search engine and not found what you're looking for within the first few items returned. OK. Pretty good. Perhaps you've then gone on to amend the query that you originally searched for and the results get worse. Sometimes you might even find yourself having to click on that dreaded button to take you to the second page of Google search results. Well, we're going to be tackling that problem today. So contemporary search engines are often good at finding a whole load of documents or web pages that might answer your question or your query, but are often not quite as good at returning the ones that you really want. And search engines are everywhere. We're not just talking about Google and Bing here, so if you look at this slide behind me, you can see that there's a lot of money and happy customers riding on returning good search engines and search results. So to begin this talk, I will tell you about some non-machine learning methods that are currently used for search and have been used for a while. We'll talk about why they aren't so good and why we might need something else, something more general. We're going to outline the problem of learning to rank properly and we'll look at how we summarise queries that users make and documents into feature vectors. We'll then look at three different machine learning algorithms, explain what they do, how they work, and then we'll go on to see them implemented and we're going to use XGBoost to implement them. So to begin with, let's set up the problem at hand. The first thing we're starting with is a query. So what I mean when I say a query is I'm thinking text search. So this might be something like a phrase like neural networks or it might be an explicit question like how do you implement neural networks in Python? In the movie search case, it could be something like Christmas films or something more specific like Christmas films starring Hugh Grant. Is everyone happy with what a query is? Anyone unhappy? Okay, we'll take that as a no. In addition to the query, we also have a set of documents. So a document here, I'm using that term quite generally. I'm assuming that it's probably got some sort of structure, so we might have a title, a subtitle, and then main text, but it might be something like a film title, a film blurb, a list of actors in the film. There's probably going to be use case specific items in each document. For example, if it's a web page, we would class the URL to be part of the document. So the goal of learning to rank is, unsurprisingly, to rank documents. We want to take that query that the user has given and return to them a list of documents in order of relevance. So a standard method that you might have seen used or you might have implemented yourself is a full database text search. So for example, postgres text search. So the way in which I'm thinking this works is that the algorithm looks for matches between the query and the documents, so I've circled where they are within the document in this case, and then it ranks them based on those. So something nice about things like postgres full text search is that the user, well, the producer of the system can state which parts of the document they feel are most important. So if you feel like for this specific query or class of queries, the subtitle holds more weight than the title, you can encode that in your algorithm and hence we'd get return something that looks like this. Another standard ranking algorithm that is used is PageRank. So PageRank works very well. I think you'll all agree that is what is essentially used by Google, so we probably use it many times a day. There are some negatives with PageRank, so one of those is that it often downweiths articles or documents that have fewer links in them, fewer URLs. Another negative of PageRank is that the algorithm works on using knowledge of a crowd, right? So it grows as the crowd grows, and crowds can make bad decisions, and then other people can latch on to those bad decisions and the bad decisions get worse. Both of these two examples, PageRank and the postgres full text search, require some user input as well. So in general, you need to know the domain, you need to know what's happening. We can use something like PageRank for movies, for example. So, although they do work fine in their specific cases, we want something that's much more general. So that's why we're going to use machine learning techniques. So all machine learning techniques that we're going to talk about today begin the same way. We've got ourselves a query and a document. And what we want to do is we want to capture the information overlap between the two of those. So the way that is done is to generate a feature vector. For every query document pair, we want a feature vector. So this feature vector is a numeric vector. We've got numbers in it. And we need to figure out how we make it. So we can do this fairly automatically. Some of the terms in the feature vector are going to, we call them query dependent, and they depend on both the query and the document itself. So they might be things such as how many words from the query appear in the title of the document, how many words from the query appear in the midsection of the document, how many words into the document do I need to count before I reach a word that's in the query. You can think of lots of examples of things that exist there. There's a common statistic known as IDF, or inverse document frequency, which is often used to summarise query dependent features. So there's lots of methods there that we can use to get those. Some of the elements in this feature vector are going to just depend on the document. They're going to be independent of the query. So they might be things like the length of the document, how many characters are in it, how many words are in it, how many paragraphs does it have, the kind of summary you get when you do word count on a document in word. And the last set, surprisingly, just depend on the query. So there are things like how long is the query, how many letters in it, how many words in it. So you can see that for any query document pair, we can generate a feature vector quite easily. Once we have our queries and our documents and we've generated our feature vectors, we're nearly ready to learn to rank. But sadly, learning to rank in the machine learning setting is a supervised machine learning method. So what we need is a human to go through and give us a score. So what that score is going to say is it's going to say how relevant is this specific document for this query. So there's three types of machine learning algorithms that I want to talk about today. The first is point-wise ranking. So the idea with point-wise ranking is that we take our documents, we turn them into feature vectors, we know how to do that now, and then we go from the feature vectors and we turn that into a score. So we are trying to predict a score given the feature vector. Once this has been repeated over many documents, many feature vectors, we're able to take those predicted scores and then we can rank our documents from best to worst. Okay, so now we know how to rank. All we need is an algorithm that takes us from the feature vector to the predicted score. So I think we should begin with everybody's favorite machine learning algorithm, linear regression. So what we're going to do is we're going to fit a straight line or in general the feature vector is actually multi-dimensional, right? We saw it has lots of different components. So this is going to be like fitting a plane in space rather than just fitting a straight line. Once we've got that straight line that we fit using some training data, we can come along with a new feature vector and we can estimate a score for it, right? Well, why not take it one further? Let's get rid of the straight lines and go to curved lines. So you can think of any type of regression you might want to do that's going to fit something and we can use that to learn to rank. Okay, so we've already seen arguably two learning to rank algorithms. One is linear regression and one is parametric regression. If we've got two algorithms, how are we going to compare them? We need some sort of distance metric that's useful in the ranking case. So I'm assuming we've got ourselves a data set where the human has gone through and scored those documents. They've said this document is relevant, this is a relevant score that I give it, this document isn't, this is a worse score. And because we have those scores, what we can do is we can compute mean squared error on a testing set. So we can split our data into two parts. We might put 60% in the training set and put 40%, the remaining 40%, into a testing set. And so we can evaluate a metric on that. So what we would do is just take the true score given by the user away from the predicted score. So that's quite nice, but if we think about the problem at hand, when you go on a search engine, you don't really care, you never see those scores. You don't particularly care what the score user ranked was and what score you're getting. All you really care is the order in which the documents are returned, right? We want the best at the top, the worst somewhere, not at the top. So I want to talk about a distance metric that takes that into account. So what I've done is I have taken our documents that we had the scores and I've just replaced the scores with the predicted rank. So the document that we give the highest score to, we give that rank one. The document with the lowest, we've got six documents here, so that's six. Now, because we're doing this in a training testing environment, we do know the underlying truth, so we're able to list the true ranks so they're what the human gave in that pre-processing task. And all we're going to do now is we're going to count how many permutations it takes to go from having that top list of numbers, one to six in order, to having the bottom list in order. So we're trying to go from what we were given to what we really wanted. So one, two, three. Okay, so that would give us a different distance metric and that is three. So that's quite nice, but having to swap the first two documents was given the same score as having to swap the bottom two documents. But really what we care about is what's up top. We want to wait the fact that our first two documents are out of order much greater. That's much more negative, so we want it to have a stronger pull in our distance metric than we do the two down the bottom. We don't really care about those. We're not going to look at them. So what we really want is a metric that combines those two methods. We want something that does take into account the score, the value, and it also takes into account the location. And the metric that does that for us is Normalised Discounted Cumulative Gain, or NDCG. So in all learning to rank competitions you might see on Kaggle, they all use this NDCG. So NDCG requires the predicted rank, the true rank, and the true score. And it uses this equation here, so it's awaiting of the true score over the log of the predicted rank in order to compute our distance metric. Now the log on the bottom and the contribution from the predicted rank on the bottom is ensuring that we care more about what's happening up top and much less about what's happening at the bottom of our list. So we can just compute that for each of our documents, plug in a number, and we're nearly done. Now what I told you then was actually just discounted cumulative gain, and that's useful if you only want to check this out once, but if you want to do it multiple times or compare across queries, which we probably want to do, or across data sets, you're going to want to normalise this so that the results are comparable. So to normalise it, we divide by the optimal discounted cumulative gain. That is the discounted cumulative gain you'd get if your documents were returned perfectly in the right order. So NDCG is going to take values between zero and one, and one is great. One means we returned the optimal list, and zero is terrible. It couldn't got any worse. Another common metric that people use is NDGC at K, for example, where K is an integer. So you truncate your list and you only compute it on the first K items. That gain allows for better comparison when you're in production and you have queries that have potentially different number of documents returned. So, for one query, you might get a million documents returned, but for another, you might only get a thousand. So, in that case, you might want to just compute the NDCG at a thousand, and then those two are comparable. OK, so I motivated the introduction of NDGC, our metric, by saying that we don't just care about the predicted values, we also care about the ordering. But when we did point-wise ranking, all we were looking at was predicting the predicted value, predicting that rating. So, pair-wise ranking works harder to put some effort in to think about the ordering of items as well. The way in which pair-wise ranking works is that it's going to take in two documents at once, or two feature vectors. So, I'm afraid I might use the term documents and feature vectors interchangeably now. What we're really thinking about is passing in feature vectors. So, we pass in our two feature vectors, documents, and it determines which one should be ranked more relevant and which one should be ranked less relevant. It then uses that to update parameters in the model to make it better, OK? So, we're thinking about tuning our model here. So, the first algorithm we want to talk about is RankNet. It's a feed-forward neural network, and essentially, we pass in that pair of documents. It passes them through the neural network that we've initialised with some weights, some parameters. It then looks at whether or not the documents that it's spat out were ranked correctly. So, once a document has been passed through the neural network, it has a score associated with it. We can look at which is best, which is worse. And what it tries to do is adjust the weights so that the document that was more relevant becomes even more relevant, and the document that was less relevant becomes even less relevant, OK? So, we're changing those weights in the neural net so that we're pushing good things up and bad things down. When we come to use this in production, all we actually do is throw our data at it, and it gives us our predictions. It is just a model. We can think of it as a black box, but it's good to know what's happening. So, if we passed it the first two items here, it would aim to push them up and down because they are in the wrong order. And similarly, if we passed them the bottom two, it would aim to push those up and down as well. It would adjust the weights so that next time we pass that pair through the neural network, the results would be better. Now, that's OK, but it was pushing the things at the top of the list, up and down by same amount as things at the bottom of the list. And we said we care more about what happens at the top of the list, not the bottom. You're never going to go to the last page of Google, I hope. So, Lambda rank is, again, using that feedforward neural network technology. But the way in which it pushes the documents, the pairs, once it passes them through, is so that NDGC, NDCG, I'm sorry, I keep switching those two letters around, NDCG is taken into account. So, this is what we had before with our equal pushes when we were using RankNet. And what we get now is that the documents at the top would be aimed to be pushed more, so the weights would be updated so that they were pushed more, and the ones at the bottom pushed less. Now, so those were our pair-wise ranking methods, and they were pretty good. They work quite well, we'll see that in a bit. But there's lots of talk about just pushing good things up and bad things down. And what you actually sort of end up with is that all of the good documents are in the top, but they're not very well-ordered within themselves at the top. So, we're going to go to Fulhag and we're going to go from point-wise to pair-wise to list-wise. So, the list-wise ranking method is going to take all of the documents into account at once when it updates those parameters or the weights of the neural network. The list-wise technique we're going to talk about is LambdaMart. And LambdaMart is a decision tree algorithm, so the idea with decision trees is that you start with all your data at the top, you then split on some feature of the data. So, we've got a feature vector, so we might say, hey, if the third element of the feature vector is less than 10, then you go left, otherwise you go right. Okay, so we split the documents, and this keeps on happening until eventually the documents all end up at what we call a leaf node at the end on their own, and a score would be associated with those. Those scores are then used to rank. So, when we're training such a model like this, what we're actually learning, using our testing and our training set, is we're learning on what should we split. And this example here shows just one decision tree, but in practice, LambdaMart is using multiple decision trees. There's loads of ways we could split the data if you started with it all at the top. So, in parallel, it sends off your list of data to multiple decision trees. A specific document or a feature vector will end up at the bottom of, say, these 10 decision trees, and you combine the scores associated with the leaves that your document ended up with to get its score, and then we can do our ranking. Okay, so that's the end of the algorithms. We've seen point-wise, which was our linear regression. We've seen pair-wise, which was the rank net, and then we've seen our list-wise, which is LambdaMart. And that's nice, hopefully you have some insight into how they work now and what they're doing, but what we really need to be able to do is use them. It's machine learning, so we can't just pen and paper it anymore. So, in order to do that, I'm going to need a data set. The data set I'm using is open source. It's the MSLR Web 10K data set, so this was curated by Microsoft for learning to rank, hence the LR. It's been used in many Kaggle competitions. So, the data itself that we've got 10,000 queries, 10,000 questions, and then there's multiple documents for each query. A human has gone through and given each of the documents a value from 0 to 4 for the specific query with which it's associated with. So, a note is it's not relevant at all, and a 4 is it's really relevant. So, the data set is nice. It's already split into training testing and validation sets. So, there's not very much to do in order to get started, except the data is in a bit of a funky format. So, this is what one row from the data set looks like. So, the first thing we've got is the relevance that's given by the user. That's that number between 0 and 4. Next is our query ID, which is written of the form QID, then a call on, then our query ID. And everything else is our feature vector. So, in this example, the feature vector is 136 features long. So, that's our summary of the query and the data set that we saw earlier. And the kth query is written as k colon, then its value. So, we can see here the first query... Sorry, the kth feature has written k colon value. So, the first feature has value 2, the 133rd has value 7, and so on. So, I've written a bit of code that turns that data set just into columnar data. So, we just have... We get rid of the colons and the numbers before. So, our feature vector is literally our string of features. And from there, it's really simple to learn to rank. So, if we're going to do this with linear regression, everyone's favourite machine learning technique, you can see that it's three lines. So, here this code is in Python, and I'm using Apache Spark to do it. So, who here has used Apache Spark or has heard about it? OK, I'm pretty good. If you haven't, when I first came across it, I was kind of shocked. It just does all the parallelism and sorts out sending your code off across cores and distributing it all on its own. You don't have to tell it anything if you don't want to. So, it really speeds up the computation. So, you can see here that we can define a linear model and in order to make predictions, we just click the transform button and we're good. So, in order to do the more complex methods, the pairwise and the listwise, we're going to use XGBoost. So, XGBoost is an open source, optimized distributed gradient boosting library, and when we're talking about updating the weights in the algorithms that we talked about earlier, that's actually done by a process called gradient boosting. So, we don't really need to know about it, but the first thing that we have to do if we want to implement one of these is set up our parameters. So, the first parameter, max depth, is the number of layers in our neural net or the number of splits that we're going to allow in our decision tree, depending on which algorithm we're using. The ETA parameter is something that prevents overfitting. So, whenever you're using machine learning, you never want to overfit your models. If you think back to that linear regression example I showed earlier, if you overfit the linear regression, it wouldn't be linear anymore, but you could imagine a line that would interpolate all of the points in the testing set, and that's going to give a very funky recommendation, a very poor estimate of the score. The next thing we have there is the objective function. So, the objective function is what changes between the three algorithms that we've looked at. So, if you want to run a lambda net, then you set that equal to rank map. If you want to run a lambda rank, you set that equal to rank ndcg. And finally, if you want to run our list-wise method, then you set that equal to rank pair-wise. So, watch out. Once we've got those parameters set up, training your model is, again, completely simple. So, I showed you the linear regression example to show just how straightforward it is. And this is exactly the same. We can just go ahead and predict. And so, if you want to use a search function or you want to type directly into GitHub and check that the ranking results are any good, you could type in that there and you will end up at a Jupyter Notebook that walks you through the methods that I have talked about today. You can implement all of these on that MSLR training set. And you can play around and make the notebook better and put in a pull request. So, something that's really nice about XGBoost is that it has some visualisation. So, what we're actually viewing here is one specific decision tree. So, you can see that at the front, at the top, we split on a feature 65. So, if, for a particular vector of feature 65 was less than this value, I can't quite read, then we'd go left else we'd go right and so on. Another thing that's nice is that you can look at the feature importance. So, for each of those features in our feature vector, you get a graph of how much impact did it have on the scoring decision and therefore the ranking decision that then enables you to go back and look at what those features were and think, does this make sense? It's always nice to have a sanity check with machine learning. So, I can tell you here that the feature which is most important, you'll have to take my word for it, but that was how many words appear in the title of the document and in the query. And the second one was to do with the IDF, the inverse document frequency that we talked about for the first paragraph of the documents. So, that sounds pretty sensible, we'd be happy with those results. And finally, just a little graph to show that the algorithm improves, so the NDCG gets better as you go from using linear regression to rank net to lambda rank and then to the decision tree method rank mark. So, you remember that NDCG was a number between zero and one and one is perfect, we've got everything in the right order. Okay, so we started by defining our problem of learning to rank, we looked at the existing methods and then we talked about how to develop a feature vector. Feature vectors aren't just useful for learning to rank, you'll find them everywhere in machine learning. We went on to look at our list-wise, point-wise, some pair-wise methods and finally we looked at some implementations in XGBoost, so if you wanna get in touch, I am AXOFWATS on Twitter and I am Sophie at Red Hat. Thanks. Hi, thanks for the talk, I found it very interesting. I have two questions, one is more technical and the other is more like, well, I don't know how to characterize it, but however, the first one is in terms of the document features, I didn't get how to extract them because I don't know if you used some kind of word to beg or globe or something like that or some embeddings because the length of a query is not supposed to have some correlation to nothing. I mean, there are different queries which have the same length and also which are equivalent to other queries with different length and I mean, I don't know if that's clear, so I had that doubt. I agree, yes, you certainly wouldn't think and it's probably not the case that the length of the query is going to affect your machine learning model and certainly we could go back to that plot I showed where you saw how important all the features are and we could have a look and the length of the query probably didn't impact. However, I think what I suppose I wanted to show is that we want an extensive list of features and it is machine learning, sometimes you get a surprise about what can have an influence but I agree, I don't think the length of the query has much impact. In general, I'm just throwing lots and lots of features into those feature vectors because it's not very expensive but the ones you would focus on more and you'd have more of are the ones that depend on both the query and the document together. Okay, thanks. The second one is like a more generic one which is I find that ranking systems try to optimise cells for advertising, I mean, and that it can be like kind of optimised through clustering, through different profiles so that the weights of the embeddings of the, I mean, the context changes and it's like more personalised to the different profiles. So I don't know if there's some research on this area because I find that Google and all those engines are trying to maximise like advertising instead of maximising what we get from the information and which information do we get in order to know more? Yeah, I completely agree. So my last project at Red Hat was building a recommendation engine and when I started on this project, I thought, oh, there's a lot of similarities because you're right when things are returned to us in a list now online, it certainly takes into account those personalised recommendations. There is some literature out there. People have been doing work on it and, yeah, it's something that we are thinking about looking at. So drop me a line and I can point you in some directions. No worries. Hi, thanks for the talk. It was really great to see the different approaches. I have one question about how you got the labelled data or some of the question. So you're saying for these algorithms, you can take a previously labelled data set, which is sometimes quite difficult to do because it takes lots of effort to have a human look at the query and the document and come up with some relevant score. Are there any approaches you can think of or know about where you can do this based on user interactions with search results? Of course, the tricky thing is, if you want to change your ranking algorithm, that's going to change the order of search results and that's never been presented before. So it's hard to know exactly how that will perform unless you actually go to production with it. So, yeah. Yeah, absolutely a great point. No one wants to number 10,000 queries worth of documents. Yeah, there is some work out there about how to automatically rate them. You could do things like looking at retention rates when people have actually clicked on that item, how long have they spent on it, and therefore you would use that to score it higher and you could use that score as the truth, as the ground truth. There's positives and negatives. You get back into the crowd mentality and something that isn't the best can continue to be upvoted and so on. There is some research out there, but it's not something that we've looked into yet. Looks like it's it. Thanks for turning up, guys.


Hi guys, this is Jason here from Nathaniel School of Music. In this lesson we are going to look at how to build our left hand and also to have some kind of a left hand awareness where to play and what to play in that particular register. The registers are basically, you know somewhere around middle C, somewhere below middle C and then really low. So you need to figure out what to do in each register. So what I've done is I've created a melody, a simple tune which goes something like over some simple chords. I'm going to teach you that first and then what we are going to do is we are going to study the role of each register of the left hand, if that makes sense to you. What I mean by register is the pitch range, whether it's the first E or the next E or this C or this E, right? So that's pretty much what we are trying to do in this lesson. So first let's learn the melody. Then we learn the chords for the melody. Then I'm going to tell you what to play in each, in the left hand in each register and then a few patterns along the way. And I think this could serve pretty much every skill level. If you're a beginner just learning how to play melodies here with harmony here, this could definitely help you. If you're someone who's advanced, who's proficient with the sustain pedal, this could also help you greatly. So stay tuned till the very end of the lesson. There will be something to learn at each level. And even if you're not able to figure it out right now in this lesson, you could probably write things down and work on it over the weeks and the coming months. Let's get cracking. And before we do, it'll be great if you can hit that subscribe button, hit the bell icon for regular notifications, which we will give you, not we, YouTube will give you whenever we release a new video. And the notes on Patreon will help supplement the learning. There will be notes for each of these lessons, their future lessons and whatever we've done in the past as well. Okay, guys, let's get cracking. So first let's learn the melody. Melody. So I've chosen this on the key of E minor. E natural minor, which is basically E F sharp G A B C D E, E D C B A G F sharp E. E natural minor is developed from the G major key or the one sharp key coming to the tune. The tune is can follow along with me. It'll also be notated for your reference. So first thing is let's just try if we can play it with either an E minor chord. And that's one thing I'd like to talk about with respect to the left hand. The left hand, when you play around middle C, it's okay to play triad. So in this case, E minor played as E G B, how we learn it normally. But you don't want to play too low. You don't want to play it so low. As you even though it's a beautiful chord, E minor, it just sounds really annoying. Low because the frequencies of each of the notes are too close to each other to make a lot of sense. Sort of like color, very tough to tell the difference between two really, really dark colors like red and green, really dark. You may not even tell the difference, isn't it?   So the same melody first here, then the same melody here. You need to just play it with fifths. And if you want to go super low, you can only survive with octaves and octaves sound huge. So whenever you're playing octaves, try to consider playing it in the lower region of the piano keyboard around here and not Now it kind of intrudes the melody and it doesn't sound as heavy or as epic as it should have, you know, so let's just develop that. So line one in this region around middle C, then lower. You can now do a fifth chord, E, B and E, or you could go super low and play like a thick octave. Okay, now I must also say this, if you don't have a piano, which has so many keys, when you're, if you're just starting off and you have a smaller keyboard, I think 61 key would be like the bare minimum. Don't get anything smaller than that. It'll be very difficult for you to navigate with your hands, unless of course you're buying something for travel purposes or something where you assemble blocks of keys together and play them. So 61 key becomes a bare minimum. So you could use a transpose button and go minus 12 to take the whole keyboard down an octave, primarily because it's rare that you're going to play really high elements. You're not going to play so unless you really want to, of course, in which case you would need an 88 key piano. So I would suggest if you have a 61 key, just turn the octave down by about an octave, either minus 12 or an octave minus one. If you have an 88 key, then it's quite easy to visualize. You have this is where you play your block chords or the entire chord E, G, B and this is where you play the fifth chord and this is where you play the big octave. Okay, now the melody that was the first half. I'm just going to add another variation to the second part of the melody. First part again, so first line, second line, just a variation. Maybe you want to see my fingers once crossing my hand here coming to the chords. It's boring to just play an E minor, right? So the chords are there, which are that's a D major. Second chord, which you could consider as the seven flat major. That's a D major. Now you go C major. Now, if you know C major seventh, you could add a B there and then you could go B minor at the very end. Or B minus seventh, which is B D F sharp A. Now, all these chords work when you play them as blocks because they are in and around middle C. So let's go by that once more. D major C B minor again. D major C major seventh, played with some emotion, which is essentially dynamics and make some notes stand out to keep the rhythm going by. I try to actually imagine a drummer playing with you and feel some kind of a ghost percussion or a drummer, musician, just playing along with you. And that really helps to build more left hand options. So you go variations there. Another thing I like to do in my right hand, because what's going to tend to happen is as you go lower and lower in the left hand to make it more and more deeper and more epic. The more deeper it goes, the more epic, the more braver, the more vibrant it can tend to sound, you know, and more impactful for the overall listening experience.  So you should also figure out a way to squeeze in that chord in your right hand as you go lower. So I'm going to do the same melody. First it was now with chords, you see, I'm not even using my left hand right now, which is quite cool, isn't it? So you go, what's happening here? I'm just adding other notes of the chord. That's E minor. I could even hold my pedal down, which is happening right now. Now I need to cross, right? Now you do the other inversion of E minor, which has the B up top. You could do like a tada sus four going to major, which is all possible in the right hand with that lower voice again. And now next. So this kind of works really well when you pick out the chords of your song and then play the melody with the chords. But then you need to invert the chord so that the melody line stands out at the top. Now you may be arguing what happens if the melody is not contained in the chord or the chord notes are not contained in the melody. Well, that's a bit rare. If you ask me, most of the conventional melodies which happen will be either the root, the third or the fifth stressed or accented. So why do we need that? Because when we go lower, this is the voicing which I tend to employ. So we finish this voicing. Now you could play this in another way, in an arpeggiated way. There's a lot of movement. I'm not going to talk so much about arpeggios in this lesson because there are a ton of videos on YouTube, literally a ton of videos where we deal with a lot of these arpeggios, especially the left handed arpeggios, which will serve this lesson very well. So do check out some of our other tutorials on specifically arpeggios and let me know in the comments if you have any doubts regarding that. So anyway, so you could play it as blocks or you could play it as arpeggios. There we go. But now I want to take it low. I want to take it deep to this low E and see what I can strategize from there. So the first opportunity you have is the fifth chord. So you can play EBE, which takes off the third, namely the G. So play a nice rhythm. And then. So you could go. This is your rhythm. Any rhythm really just using the root, the fifth and the octave, I will write down a few rhythms. So do check that out in the notes. So you go. B minor. Sounds quite big, right? Just by going lower in the keyboard, what you could do in the right hand, you could try and slam these chords with the harmony, which I told you earlier. So so that's your left hand and slightly thickened right hand because the right hand is trying to now do what the left hand used to do. And it can't do that by playing the third since it's lower. Now you may also argue, why can't I play the third? Why do I have to take away the third and play a fifth chord? Well, you could voice the chord slightly differently. You could do what we call as a spread voicing technique in the left hand, which goes one, five, ten. The ten is also the upper third. There's a huge, huge playlist, detailed videos on this on our YouTube channel. Just search for spread voicing. You'll find a lot of these things. I've even done songs using these wider arpeggio techniques. So with that, well, you could go with fifths or root five, ten. So now you're playing all the notes of the chord in a spread voicing. So this one, of course, trying to do it with two hands. So you need an arpeggiated kind of arpeggiated because it's very tough to hold it together with one hand. You'll have to arpeggiate the hand, right? And the last part of the video or the last part of this discussion would be how do you make it even more epic? Remember what I said earlier? The lower you go, the more incredible it's going to sound or the huger it's going to sound. So if you just actually throw away the chords and just play the roots of the chords and go to the lowest possible E, check that out. Just hold that. It's more than enough. And again, could sort of slam it more aggressively if you like. This is not too difficult to play, actually. We've actually come to like a very, very basic version, but super epic. It's like the most epic. If you compare it with even though this is a bit trickier to play with all the chords here, it's just single roots and octaves slamming. Check that out. You're just using the property of this amazing instrument, the piano to just give you that sound. It's not really a human thing. It's more awareness of where to play, especially the left hand. Okay, now you can couple this octave technique by going something like. So what I did there, I played the root of the chord. And then what did I do? I climbed all the way up and continue to play the triad, which I played at the very beginning, just a little delayed. So this is the normal one with the epic bass. There we go. So we have the best of both worlds. We have the really epic bass here and we have the entire chord. And then I'm going to literally the, I guess the last note of the piano, which is this B or one of the last notes. And then it's also needs to be said that the sustain pedal is providing an active part of this shifting process without the pedal. See, you can't really do, you can't go, your hand will jump very tough without the pedal. So make use of that tool. Most pianos come with the pedal, even digital pianos. If not, try to figure out a pedal which will help you play in this style. So let's just recap everything, guys. Again, try to move the video back and forth to just see if you've missed out anything. I hope that you achieve all of the points which I tried to convey in this lesson. The first and foremost, the melody. Let's revise everything now. The tune with the chords. You can just do blocks in and around middle C. Where do blocks work again? Middle C. Okay. Then we did the fifth option. And how do fifth sound even more epic or even more cooler by adding the 10th instead of the octave? There we go. And the last mission was to play the super low E or the roots very low and then combine that if you can with the pedal, with a higher triad. But the triad has to be played in and around middle C. Let's do that once. Low, high, that's pretty much it. So I hope I've conveyed the general role of each register of your left hand or base region or base clef of the piano. Very important to be aware of what you can do and what you thus should do. Because what you can do is governed by the laws of physics and just created by mother nature. So you can't really change that. Can you? You can only use it and see the beauty with each area of the piano. That is a very important part of this lesson which I wanted to convey. And I hope you can make sense of this in your own music or any cover or any song which you're trying to learn. Because this was just a small example or a small glimpse with a really simple melody. And it's always good to start with a small motif like this and then see where it goes from there. And I hope you enjoy your left hand even more after this lesson. As always, this is Jason here from Nathaniel. Do consider subscribing if you haven't already to the channel. Hit that bell icon for regular notifications. We are on Patreon where you'll have all my notes. And if you would like to consider learning music in depth at our school in person with us via virtual conferencing, you could go to our website, Nathanielschool.com, fill up a couple of forms and we will hear from you. Cheers, catch you in the next one.


what's up guys welcome back now in today's video i'm going to be asking you a question and this question i think can affect the way you possibly think about the future right so i said it can affect not going to say it will affect because this is this all comes down to your personal beliefs and your view and vision of what you want for your future but here's what it is it's what's the point this is my question what's the point of having a business if all you do is work all day long now here's what i mean by that a lot of people when they they think about starting a business or a lot of people when they do start their business they do that because they they know they're not cut out to work for someone else they're they're wired a little bit differently um they want to have more control they want to have more freedom they they want to have more creativity um and they know they don't want to work for someone else so they start their thing start their business um and what most people don't realize is when you start a business the first one to i don't know i mean i can't say the exact amount of time i can tell you from my experience the first one to five years is absolutely painful right it's hard you have a lot that you're not only learning um if you don't know how to sell you have to learn how to sell you don't know how to market you have to learn how to market you don't know how to uh put a program together you have to learn how to do that like you have to deal with customers you have to deal with problems you have to deal with obstacles that's very common every person faces that when they start any type of business it doesn't matter right but the first one to five years are very very hard very challenging very difficult and go look up the stats you can see how many businesses fail in the first year first two first five first ten i mean it's pretty staggering right but my question here this is for you if you're thinking long term with your business right and really what i mean is you know what is the point of starting a business if that's all you do if all you do is work right if that's all you care about then what's the point now am i saying that if that's all you care about that you're a bad person no i i can tell you for a fact the first four or five years in my business i did not care about anything or any one right and that's that's one of the reasons why i succeeded is because i had my head down i was driven i was focused like zero distractions just that that's all i cared about right but as i've gotten older i've realized you know what like yeah you you have to be really focused you have to have maybe a few years where you are like that but as you grow what you do it should be about leverage and it should be about how can we set up the business to where we can start working less in the business and more on the business but create the business in a way that gives you more free time to do the things that you do want to do and that's a completely different way of looking at it than starting a business and just grinding it out for the rest of your life and again there's nothing wrong doing that i would much rather have that as the option to work for someone else like let me be very clear i would absolutely do that than work for someone else all right but as you grow and develop what you do you want to try to think in terms of how can i set up systems so i can leverage my time so i'm not having to be in the day to day uh you know busy work that i used to have to do and when you think that way now you start to build more leverage within your business and i feel like the only way you can build leverage in your business is by you having more experience the more experience you have the easier it is to figure out what those things are the less experience you have well it's going to be very difficult to to have leverage when you don't have any clients right and this is why i i've looked at this very closely within my life i've looked at this very closely within other coaches that were helping and i think this is actually really common it's more common than people think as you grow your business and as you scale oftentimes those type those people become trapped in their business and once they get trapped they're probably working more hours yeah they might be making more money but it's not going to feel as fulfilling at that point because all they're doing is spending all their time working all right so my challenge to you very simple okay i want you to be able to look at what you're doing with your business and think okay how can i set this up to where this will be better leveraged in the future to where i can spend more time on the important activities that drive my business versus working in the business all the time let me give you some examples of what this can look like this way i'm not just talking theory here i'm just i'm going to give you some actual examples so one example would be if you are a coach who does a lot of in-person training and you have built up a good reputation you have experience you've gotten great results hey a good opportunity for you would be well could you hire another coach could you bring another coach on who can start to take over some of the training that you're doing right could that happen yes is anyone going to stop you from doing that nope right so you can absolutely do that another option is could you create an online version of what you do with your clients the answer is yes i've proven that to be true you can go look it up online soggerskills.com i still have products that sell every month i've created a lot of different products there i just ran a July 4th promo and that did really well like while i was outside with my wife on a walk we were gone for like two or three hours i came home i checked my email there was many sales of a $200 product can that happen for you yes are you gonna have to figure it out and learn how to do it yeah right but those things are possible so i'm talking about while you're not working how are you generating revenue right while you're going on a walk or while you're going on a hike how can you set something up how can you set up a mechanism that it can't work without you right and that in my it just in the way my brain thinks that's how you're going to be able to create more freedom from your day to day busy work type of business or your in-person training bring someone on or try to go online right and i want to tell you that not only to encourage you to start thinking in terms of building that but i'm telling that because there's a lot more to like life than just working in or on your business all day long and again that's a personal choice that you get to make i'm not going to tell you that you should spend more time with your family i'm not going to tell you that you should spend more time with your kids that's on you right what i'm here to say is like i i've been consciously thinking of this over the past year with how i operate what i do and the only way to make tweaks and make changes with what you're doing is by taking a step back and actually looking at what you're doing and saying well how many hours am i working like how do i want to design this to where i can build my business right around my lifestyle right and that's why for me there's going to be many changes that i'm making over the next six to 18 months with what i do personally many changes i know one of those things is i'm not going to have social media period like not going to be responsible for replying to anyone on social media period there's certain things within the business that are going to change and that's because i've taken a deep look at well what are the things that take me time that i shouldn't be doing that i don't need to be doing that either someone else could be doing or it shouldn't be done at all and how could i create a little system there so i can go spend more free time doing whatever with my wife or going out of town or just doing whatever things that don't have anything to do with work all right and that's why i wanted to share this video and i know i'm talking about a lot of different stuff here but that question of what's the point of starting a business if all you do is work that really that's hit a lot of people that i'm helping right now because they are starting to see as their business gets better sometimes they they get trapped in their job and that's all they have time to do and i really challenge you to think and think in terms of how can we set this up in a way where it's more leveraged that's it for today's video if you want to hear more video or see more videos like this make sure to hit that subscribe button it's been really cool we've i feel like in the last couple months we've been able to grow here on youtube quite a bit and i'm the type of person i don't care if we have a lot of subscribers i care if you're watching these videos and these actually help you and you take action that's all that's the reason why i shoot these videos is i actually want you to take the information from someone who has a lot of experience and implement that because these these are things that i wish i had when i was a lot younger when i started my business all right so hit that subscribe button if you have any questions shoot me a text at<PHONE_NUMBER> that's it i'll see you later


Westerners think they are free-thinking individualists, and it's effing adorable. The Times has published an article titled, Lady Gaga embodies everything China fears. Subtitled, the singer's uncompromising individuality makes her a serious threat to the mass imposition of cultural conformity through censorship, and its contents are exactly as horrifyingly idiotic as you would imagine. Here are the first three paragraphs of the article by Ben McIntyre, because if I had to read them, then so do you. Quote, A woman looking like an extraterrestrial praying mantis, upholstered in red leather, strode onto the stage at Tottenham Hotspur Stadium. Jets of flame shot a hundred feet into the air. Fifty thousand outrageously costumed fans screamed. And I understood why China is so terrified of Lady Gaga. For there is nothing so wildly individualistic, so defiant of convention, so unwilling to be regimented and controlled as Lady Gaga in full voice, an erotic, exotic Uber celebrity, who also contrives to be the girl next door, Stephanie Joanne Angelina Germanata from New York City. Lady Gaga's chromatica ball last week was the first UK performance in seven years by this raw meat-wearing, bisexual feminist, who sings of liberty, drugs, addiction, mental health, and the absolute right of self-expression, because she, as everyone else, is born this way. Simultaneously channeling Freddie Mercury and Princess Diana, she is both an extreme fashion freak and defiantly ordinary, which is why she is one of the most powerful pop stars in history and, from the point of view of Beijing's communist leadership, a serious threat. McIntyre goes on to explain that Lady Gaga was banned from China in 2016 for meeting with the Dalai Lama, who, just between us, is known to have collected a massive paycheck from the CIA for decades, which makes her a serious threat, whose bold defiance and bisexual feminist individualism gives Xi Jinping screaming night terrors. Lady Gaga poses a threat less for her political views, her visit to the Dalai Lama, and her support for LGBTQ rights, and then, through her determination to be, and encourage others to be, entirely different, McIntyre concludes, do what you want, she sings, and Beijing trembles. I seriously cannot believe this article was published. Like, anywhere. I would have been surprised to see it picked up by even the most obscure clickbait blog in the seediest backwaters of the internet, much less by a prominent 237-year-old British newspaper. But from where I sit right now, the funniest thing about it is the way the article portrays the Western world as this bastion of free thought and individuality. Just that one fact alone eclipses the absurdity of the fact that the article's author thinks the perfect symbol of this freedom is Lady Gaga strutting around in a meat dress. I mean, just the fact that we are ingesting anti-China propaganda to facilitate the long-term strategic agendas of the US centralized empire while reading in the Murdoch Press about how free and unique we are compared to the Chinese shows you how bizarre this claim is. In an authoritarian regime, you do what the powerful want you to do. In a free democracy, you do what you like, and it's only by pure coincidence that what you like just so happens to always align perfectly with what the powerful want you to do. The more you understand about the brainwashing effects of domestic propaganda in the West, the more adorable it is when you see Westerners talk about themselves as free-thinking individuals living in a free society in contrast with the citizens of nations like China. A civilization whose inhabitants are continuously indoctrinated with power-serving belief systems from childhood until their dying breath is not individualist, is not free, and is not thinking. Its inhabitants only think this is so, and they think this is so because they've been programmed to. Freedom of thought and freedom of speech only exist on the fringes of Western society in such small numbers that they make no difference. The mainstream population whose numbers could be used to affect revolutionary change are herded into political factions which are designed to prop up status quo power at every turn and corresponding media echo chambers which keep them from providing any meaningful existence to the machine. As a whole, we are marching in perfect accordance with the will of our masters voting how they like, thinking how they like, speaking how they like, working how they like, shopping how they like, and living how they like. It is only the power-serving narratives put in our minds by our educational systems and our media which tell us we are free. And it is only those power-serving narratives which have us trained to look down our noses at people in nations like China.