Hey, hey everybody, how you doing Russell Moore coming to you live from Dedicated financial literacy once again. It's good to see everybody be sure to hit the subscribe button. Hello Give me a thumbs up if you like the content and hit the bell so you can get content in the future Let's jump right into it. You guys are ready. Are you ready to jump right into it when I talk about? The 401k it's been a lot of questions about the 401k and a lot of people are advising people nowadays to Get out of your 401k and mostly the reason why they're saying that is A lot of people are expecting a major market crash between now and 2023 a major market crash deep recession Possibly a depression. I'm not making all of that. I'm not making all of those I'm not saying that that's what's gonna happen. No one knows the future. All right I do want to say off right off the cup as a disclaimer. I am not a financial planner I am not a broker. I am not I'm just a guy that has been in the market for over 20 years and I've learned some things and I got this channel established so I could help some of my friends and my church my family people to ask questions about stocks bonds 401k whatever okay anything that has to do with finances I'm one of the things that I want to say real quickly before I get into this 401k thing 2023 you want to reduce your debt If it all possible go into 2023 with no debt If it all possible or very low debt attack your debt attack your debt attack your debt All right another thing I want to say right now We're in a market a bear market bear meaning 20% or lower is a call considered a bear market So once the market goes down 20% or less. We're considered a bear market. We a we've been approaching 30% NASDAQ 2,500 the Dow Russell 2000 which is small cap and mid caps and so Be careful during this time, but let's jump right into it concerning the 401k. All right gang 401k the 401k was actually started 1980 1981 by a guy by the name of Ted Bennett Look him up. I'm not gonna go into all the history of the 401k But before that there was pensions mostly what companies would do is add pensions and It was very costly for the employer. So the 401k was kind of an alternative. All right For that and so Ted Bennett is the one that's kind of basically they call him the father of the 401k All right, so basically a 401k. Let me kind of give it to you and I'm going to try to make this as simple as possible It's actually a tax code. It came from a tax code. It's the 401 tax code, but 401k is When and here's how I'm gonna explain this you can have a 401k outside your employer But I want to talk about the one that that's employer based Okay, where you are on a job and your company has offered a 401k program All right. Now that 401k many times not all the time but many times It's company match meaning if you give 5% the company will give 5% All right. Now these are pre-tax dollars. I want to say that again pre-tax 401k Pre-tax dollars. So in other words say you take say you're getting three hundred dollars out of your check Going to this 401k All right, three hundred dollars is going Your money your company is gonna match that So you've got six hundred dollars Every payday so you get paid twice Right you get paid twice in that month So that's $1,200 going into your that's got $1,200 going into your 401k All right six hundred by you Six hundred by the company because they're matching so that's 1200 For 12 months the reason why I'm bringing that up. It's because because it's pre-tax dollars That's gonna reduce Your total income which is gonna help you tax wise That's gonna help you at the end of the year Because all of that money that you put in a 401k is it's pre-tax So they only tax you on the money after the 401k is taken out then they then they say this is your income So you get taxed on that so that's good news. So it's pre-taxed That's one and it's a company match. That's two. That's great. Here's some of the here's some of the cons though You are getting a fee you're getting a fee You're getting a fee You're getting a fee a lot of people don't realize that and it seems so small seems so small But over the life of your 401k if you if you happen for 30 years that money adds up gang Because those fees increase as your 401 for one increases say the first three years It's five thousand dollars first then eight years is at twelve thousand Well, those fees are increasing Keep that in mind What are the fees for? Because the 401k is managed you have an a manager assigned to your 401k. All right, it's a it's it's a manager It's a management fund. So someone personally is managing it, but they're really not managing it This is where I have a problem with it another con You tell them what fund you want say it's the Black Rock seven thousand mutual fund and it's it's it's comprised of stocks and bonds Okay, and you say hey, I want 90% of this fund to be stocks 10% bonds that's what they're gonna do the manager's gonna set that up and Then they leave it alone. They don't touch it. They don't adjust it if the market goes down the next day They won't adjust it you have to do that And in most cases they only let you adjust it once or twice a year So you're at the mercy of the market. So if the market goes down Market goes down your fund goes down the market goes up the fund goes up What I did a few years ago And see here's the thing about you said well, what can I do? I want to get my money out of the 401k in most cases for a company you cannot get it out They won't let you get it out Now there are withdrawals that you can do you can withdraw your money There are hardships and there are loans a lot of companies nowadays. They're not allowing hardship Like in a hardship is probably like a medical condition Or say you're you're in you know your house is about to be foreclosed That would be considered a hardship But in most cases they're not giving hardships and they're definitely not giving loans and a lot of these 401ks All right, so you will have to just withdraw your money But here's what happens when you withdraw before the age of 59 and a half you withdraw your money from a 401k You will be taxed. Remember you are taxed in the beginning when you started that money's not getting taxed And money's not taxed It's it's that money's not taxed game So when you get it out you got to pay federal and if you're in a state like i'm in like california You're gonna get you're gonna get hit up for your state taxes and then you're gonna get a penalty What's the penalty for because you got it out early? You got it out before 59 and a half See that's what it gets you buddy So they're basically they're trying to What they're doing is trying to encourage people keep your money in your 401k. Don't take your money out Save it. We're keeping it for retirement But it's going to depend on the market gang It's going to depend on how the market is doing So what I did when I left my job and that's the way you can get that 401k out is after you leave fired resign Now you can get it out. How do you get it out? You roll it roll it over into another Account and what I did is put it into a Roth. I'm not going to do anything about a Roth today But there's several types of rock a traditional Roth There's so uh, I mean, I'm sorry true. I'm sorry ira an ira An individual retirement account ira so I went from I went from a 401k and rolled it over into a Roth So there's a traditional ira. There's a Roth ira.  You don't have a lot of employees You can open up a sep ira or a simple ira or if you're um Say you're an independent an independent contractor you work for Lyft or uber or something like that door dash Yeah, you can do that. Okay, so um, but it's such a wonderful alternative I rolled it over. Here's the thing my the Roth is not managed Now you can't have somebody manage it, but I had the option. I don't I didn't want somebody to manage my fund Now I can sell and buy stocks You can buy and sell stocks with a Roth. Another thing is after tax So when you you can withdraw money and won't be taxed for it because that a Roth is used the after tax It's after tax now Remember you rolled it over from a 401k So you gotta they're gonna get you somewhere they're gonna get you So if you get money out of a Roth out of your ira before 59 and a half You can you can end up paying taxes because remember it's after tax All right, so I'm not gonna go into the Roth. Let's get back to the 401k. Let's just go over this really quickly I just want to run it down to you one more time A 401k It's money that you get out of your out of your paycheck They take it from your paycheck and it goes into an account. It's managed So there's a fee on that there's a fee on that 401k. All right The 401k is affected by the market if the market goes up The 401k goes up your 401k goes up if it goes down the 401k goes down It's usually company matched you put in 5% the company matches it with 5% now. You got 10% coming You got 10% every paycheck Got that. All right, and then what do we say about the cons? There is a fee You're also you can't do anything with the fund you can't you can't um You can't trade stocks on your own you can't do individual stock trading from a 401k Now you can't if if you set it up and it's outside Of your employer There might be some some things that you can do when it's out when you purchase a 401k outside your employer I'm talking about an employer based 401k. You're very limited.  Okay All right, so I hope this all made sense gang I'm not telling you to get out of your 401k It really depends on your situation many people have been um Many people have been saving for years and their 401k is grown. It has it's actually grown But remember this gang this is not the 80s or the 90s. This is not the 80s or the 90s any longer Our economy is not as great. It's our federal government one would want us to think so be wise Pray about it And if you feel like it's time to move it if you can Roll it over into something See when I rolled my 401k over into a to a Roth IRA I rolled it over and now it's in cash and all I needed to do if I'm going to buy a stock or etf Which is an exchange traded fund all I needed to do is just take some money and say I want some of that stock My whole fund isn't affected see Very few people When you have a 401k with the company They don't have like cash sitting on the side like part cash part stock part bonds stocks are bonds I've heard of some that have had a little bit of cash, but pretty much it's allocated all into that fund With an IRA I got cash I rolled it over and it became cash and then I allocated it. Here's another thing about a Roth IRA an IRA You can pay put up to $10,000 towards a new home And not you have to pay a penny of tax $10,000 up to $10,000 Medical bills there's so many things you have options to use that IRA for and not be affected from a tax standpoint. All right, so I'm you know, you got to use wisdom. Let me pray for you Lord, I pray I pray I pray I pray for those that have a 401k those that are in iris Give our people wisdom Give our people wisdom lord with their finances And I praise you father. Thank you that they're prospering. I speak life life over their accounts life over their accounts And we take authority over that bear market And we speak for a bull market Thank you that even though the world might experience recession Not the kingdom of god let your kingdom come and let your will be done in our lives in jesus name Thank you lord. I give you praise for all my people out there Go for it. Go for it. God is on your side and he's going to prosper you during this season So so so and you'll reap a great harvest. I'm out of here. Love you


The examples in this section refer to an important and exciting question on our list. This question is most relevant to how we plan our fieldwork. What people, locations and activities to engage with and what tools and methods to use. You might remember that there are two aspects to this question. The first one is who are our participants and what are the activities and sites of our research. For this, let us return to Neha Parikh's project on designing a low-cost toy for children. We learned earlier how and why Neha settled on the ethnographic approach for research into play and play-like activities. In designing her research, she chose to look at the various locations outside of schools where children carried out such activities. This brought within her ambit, homes, playgrounds, common areas such as corridors and stairwells in apartment buildings and neighborhood parking lots. And who do you think were the participants in her research? Think for a minute and note down your answers. All of you may have guessed that the children playing in these places became the participants of her research. But those of you who recalled our earlier discussion on the diversity of participant groups may have a more detailed answer. Let us have an overview of Neha's various participant groups. Check how many of these you thought of. Besides the children, Neha's participants included people who were influencers and collaborators in playing. These were the playmates of her primary participants, friends from school, tuition and neighborhoods. Among playmates, she also included adults, like parents, grandparents, aunts, uncles, neighbors and so on. And older children who some of the kids looked up to. Neha also included in her research people who might not play with the children but who either supported or inhibited the children's play. So she interviewed the children's primary caretakers, mothers, fathers, grandparents and other adults. Each of them shared their observations with her. I hope you thought of these different sets of people as participants in a toy design project. Now reflect on this again and ask yourselves why these various people may be considered as participants in a study and how does it help the researcher? By speaking to these people and observing these spaces, Neha identified particular times of the day which were interesting with respect to children's play patterns. These included the hours after school and before dinner and during school vacations, the afternoon time when adults rested and children were restless. These places, people, activities and times defined the design of Neha's primary research. We see that there are many diverse locations ranging from the intimate to the public that form the context of this research. There was also great diversity in her participant groups. Her brief had been to design for primary school eight children from the urban middle class. However, she was aware that this was not such a homogenous group. She wanted to understand the differences in play patterns among children of different genders, ages, economic classes and with different family compositions. Some of her participants lived with grandparents and parents. Some were single children living only with their parents. Others were surrounded by siblings and cousins. Children of different age groups revealed different patterns of play and choices of games, both made up or bought from a store. Children from different genders often chose games that were specific to their genders and just as often, they also broke out of those choices to play games that were traditionally considered unsuitable for them. Children living within large families were influenced by several different adults, their parents, grandparents and older siblings. And children who did not have siblings often sought others to join in in their games. This resulted in elders or children from the neighborhood becoming their playmates. And so in looking at a diverse range of participants and locations, Neha learned about the many different ways in which children understood and invented play. She learned of the wide range of factors that matter to children in making play and how they access play and enjoyment in different situations. There is another kind of diversity that we need to talk about. We had talked about the importance of looking at the same site or location across different times of the day. Often a space changes drastically as the day progresses. We find such an example in several cities in India, but let's go to Ahmedabad and look at Rani Nohajirov, a locality in the old city. During the day, it is a bustling jewellery market and also a parking lot. In the night, after the market closes, the space transforms. The closed shutters of the jewellery shops become backdrops for street food stalls and the parking lot transforms into open-air eateries. It becomes a cowbelly of food court of sorts with groups of people thronging the various stalls for late night food and revelry. In this manner, one particular site may be many different sites. It may host a wide range of people and activities and change meaning as its purpose changes. Neha's project and the example of Rani Nohajirov gives us an idea about how we may plan our fieldwork to learn from a variety of people, places and activities. Now we come to the second part of our question, how to learn from these people, sites and activities. We had earlier spoken about the tools and methods we may use for learning from our participants. Let us discuss a bit more about that. Our choices of tools and methods to observe and record is based on a number of different factors ranging from the comfort of our participants to the availability of time and resources for the study. Among these parameters is the nature of information that we wish to access. Let us take an example to show how different tools and methods can be used together to create rich and detailed ethnographies. Say we are conducting a study of the economic conditions of small-scale farmers. We want to learn about the impact of changing economic policies on their lives and livelihoods. We could learn from the farmers and farm workers by having conversations with them. We could listen to them speaking about their ways of living and about the changes that have come about over the years. We learn from them through listening to their narratives and observing their expressions. Here audio or video recording become a great way to ensure that we present their narratives in their voices. Their words, the tone and sound of their voice, the phrases they use, all of these may be recorded and represented using audio-visual tools. To make these narratives more accessible for those who may not understand the language of our participants, we can provide translations. In addition to spoken narratives, we could learn a lot by observing the objects that make up their environment. Houseful objects and gadgets purchased in times of prosperity tell the story of those times. The changes in build structures indicate the changes in economic conditions and aspirations. Similarly farm equipment may tell the story of how farming activities have changed over time. By using visual recording techniques such as photography, drawing or video, we can present the rich stories that these objects and environments tell us. Let us do a small activity here. Here are pictures from a kitchen in a household. The pictures tell us something very particular about the household and about the members of the house. Can you note down what you learn from these pictures about the people who use this kitchen? A little bit of background information may help. These are images from an ethnographic research into kitchens and practices of cooking. The household is that of a middle-class urban nuclear family. So what did you learn from these images? Some of you might have noted the wide hatch that connects the kitchen with the sitting room area. You might have guessed that it ensures convenience and ease of serving food. That is certainly so. Another image is of a number of vegetables chopped and stored in the fridge. You might guess that this is to make the task of cooking easier and quicker. Again to make the process more convenient. These answers are certainly correct but there is more here than meets the eye. Let us look at these images again. The hatch in the image is much bigger than what is required for passing trays of food. Why does it need to be so big then? The researcher asked this question to Akhila whose kitchen it was. She explained that when she is preparing a meal for her family or for guests she ends up being stuck inside the kitchen while people chat away in the sitting room. So when remodeling their home she asked for the wall between the kitchen and sitting room to be opened up. Through this wide hatch she could freely interact with people while she cooked. And the chopped vegetables have a similar purpose. Chopping vegetables can be the most time consuming part of cooking. And for someone who is cooking 3 meals a day every day that takes up a lot of time. So once or twice a week she chops all the vegetables she might need for all meals and stores them away. When she has to cook any meal she can simply take out the chopped vegetables toss it in the pan and have a meal ready in no time. Akhila has designed a kitchen space and practices to minimize the time she spends in the kitchen. This of course tells us about how efficiency and time are important for her. But it also points to the tediousness of the task of daily cooking. This is not something we could have understood if we hadn't experienced the space and seen her cooking practices. Nor would we have understood it completely if we hadn't spoken to her. Observation and interviews are both important in ethnographic research. Each adds a new layer of understanding to our knowledge of our participants. Together these pieces of audio and visual information can help us construct a richer understanding and a textured description of our participants' lives. These were examples from different projects showing us how we can plan our fieldwork. One of the key factors as you can tell is diversity. We learn from a diverse set of people, places and activities and we try to use a variety of tools and methods. The greater the variety the richer our research is likely to be. Having identified who we want to learn from, we need to figure out how we may access them. Towards this we do some homework. We gather some knowledge of our participants' culture and society before we approach them. We will share some examples of this in the next section.


Hey, everyone. Welcome back. My name is Brian. And in this video, we're going to talk about Qt Concurrent. We're going to talk about what is it, why use it, and how to use it with some simple examples. Now, at a very high level, no pun intended, Qt Concurrent module provides high-level APIs. Now, notice some keywords here. It's a module, meaning we have to add it. But don't worry. It's ridiculously simple. And high level does not mean you lose power or functionality. Quite the opposite. It will make writing threads and working with threads ridiculously simple. And you don't have to deal with any of the low-level primitives such as mutexes, read write locks, weight conditions, semaphores, things that we haven't really touched on yet. But if you dive into threading a little too deep, you're going to run to them very, very quickly. So this is going to be a very high-level example, but it's going to just give you that power right at your fingertips, something that you can use today at the end of this video. Now, if you want a more in-depth review of threading, I do have a Qt 6 or Advanced with C++ out on Udemy. It's usually on sale. I also give it away for free in my VoidROM's Facebook group quite often. But if we just scroll down, there's a lot in this course. So forgive me. We scroll down all the way down to section 3 threading. You can see we really dive into the deep end on threading. But that's the beauty of Qt Concurrent is you don't have to know all that complexity. You can write high-performance, multi-threaded applications today. So let's dive in and take a look. So really, what is Qt Concurrent? Well, we're talking about concurrency here, meaning we want to be able to run multiple threads, synchronize them, and get values back and manipulate things using those threads. Concurrency is a very complex topic. And I probably just explained it very poorly. That's how complex it is. But Qt Concurrent is honestly just one of the most beautiful things that I have seen. And I'm not even joking. That being said, it has some functions in here. For example, map, which applies a function, notice the keyword here function to every item in a container. Meaning you could have like a function that says add 10, and it'll go through every item and say a list and modify it in place. That is awesome. And then there is the plural of that mapped ED mapped is like map, except it returns a new container. I mean, it creates an entirely new list and hands it back to you. And then there's reduced, which is like mapped, except for the modified results are reduced or folded into a single result, meaning it's going to make a computation and fold everything into one result. Then there's filter, which, you know, removes items and then filtered plural, which is, you know, pretty much the same except for a new container is generated and then filter reduced. Obviously, you can read the documentation for yourself. But we're going to micro focus on this little guy right here. Qt Concurrent run. This is going to be our buddy for this video. And we're going to work with what's called a future. If you don't understand the concept of a future, it means we're going to work with a value. But the value is not there yet, the value will exist in the future, but it doesn't exist yet. So this gets really confusing, but there's a lot of power to it. There's a future, a future iterator, a future watcher, a future synchronizer and a promise. And you can dive into the documentation if you want, we are going to cover some of these in this series. But at a high level understand what we can do with the future, we can monitor the status, we can wait for it to finish and we can even track its progress. Those are all advanced things. Pretty, pretty sweet. Alright, so let's look at this slide right here. Concurrent is a module. Now what do we mean by that when we flip back to the documentation and scroll up? First thing it says, the Qt Concurrent module, wait, what? What is a module? Well, Qt is well, big, it's massive. So it's not all one thing.  So you've got Qt Core, which we've been working with. But there's also like Network, Concurrent, Test, and there's others, of course, we're going to focus just on Concurrent. Now, because this is a module, we have to add this.  A module is like an external library. It's a separate file altogether, be it a DLL, a library, or what is it called on Mac? Somebody tell me down in the comments, I think it's called a framework or something like that. I always forget what that's called. I just call it a library on Mac. But anyways, it's separate. It comes with Qt. You don't have to install anything extra, but we have to tell the compiler and the linker what's going on here. So we'll just have to add that and see, make it ridiculously simple. Don't stress about it. One question I'm always asked is, why even use Qt Concurrent? I mean, what am I really getting out of this? I've already learned how to use threads and I've learned how to use a thread pool and they're both awesome. So let's compare the three. We have what I call normal threading, which is basically you have a Qt application, you manually make some threads Q thread to be specific. And then you make some objects and you move those objects to those threads. You have to, of course, connect signals and slots to communicate with them.  This is mired in complexity, you have to manually manage these threads and the memory underneath. And you have to worry about things like what if dog is trying to communicate with bird, but bird doesn't exist anymore, bird got deleted. Bird flew into a ceiling fan or something. It's just not there anymore. You'll have those kind of issues, which will just completely measure application up. And on top of that, each time you create one of these threads, you're incurring a penalty in terms of CPU and RAM because threads have a real world cost associated with them. So we then moved on and learn the concept of a thread pool. I love thread pools. These are awesome. So you have pre existing threads that Qt has already created for us. And they live in a pool meaning it's just going to recycle these over and over again. Okay, this is very elegant. Because now you don't have that penalty in terms of CPU and RAM of creating new threads because they're already there. But you have to use what's called a Q a runnable, which is why I have an R here instead of a T. You have to use the runnable interface, and then inject that I should say send it to the thread pool and then wait for the thread pool to execute it. There's some complexity there, you have to understand Q runnable, you have to understand the thread pool, you have to use different techniques get information back, for example, signals and slots. It gets to be kind of cumbersome honestly, when you get used to it. So this is where Qt concurrent comes in. And current is part of Qt, but it's a module. So I've got it in this big green binary container here, which uses the thread pool under the hood. So what you're going to do is you're going to send something to concurrent, it's going to take the complexity of the runnable, and put it into the thread pool for you. And it's going to generate what's called a future. Now remember, a future means it's some sort of value we want to work with in the future, it doesn't yet exist. But the cool thing is you can actually hook up signals and slots to that future. So basically, if I can just take this and let's just bring to front, it looks more like this, let's call this concurrent. It really looks like this. Qt will send to concurrent, concurrent will hand you a future and you do whatever you need to do with it. You don't have to worry about any of the details under the hood. Now if I go ahead and send that to back, just understand what's happening under the hood is you have all of this beauty right here. You have a thread pool with multiple reusable threads and Qt handles all of that complexity for you. I love this. This is just simply amazing. Okay, I'm a huge fan of showing every single step. So I will try to go through this quickly because I don't want to waste your time. But we are going to open up Qt Creator, and I'm going to show you how to add the Qt concurrent module into your project. So we're going to make a new project. We're going to make a console application. And it's called this Qt 6 episode 24. Man, we are flying through these episodes. The big takeaway here is make sure you're using CMake as the build system. You can still use Q Make. But remember, they're not really developing that anymore. So they're going to favor CMake in the future. So we will as well. And this video is going to follow CMake. Now I'm not an expert at CMake. So bear with me on this. Kit selection as long as you use in Qt 6 or higher, you're good. Alright, what we have before us here is just a standard Qt CMake project. And I'm going to give it a good build just to make sure we have a happy little program. Once you see this little green bar, we got a solid build, meaning this thing is now runnable. Let's open up CMakeList.txt. Again, I am not a CMake expert, but this is ridiculously simple. They even have what you need in the documentation, but I will summarize for you. We need to modify these two fine packages and this target link libraries. So we're going to tell it to go out and find concurrent. And as long as you spell that correctly, everybody who watches my videos know I am a horrible speller. I actually have very terrible eyesight, but as long as you spell it correctly, it should work. Now what I like to do is take this where it says Qt version. I like to plop that in there as well. That way there's really no questions in CMake's mind on what we're trying to do here. But notice we're adding core and concurrent, core and concurrent, core and concurrent. This is just very simple and straightforward. Make sure you save this file and give it a good build. This may just take a microsecond longer to build, but the end result, you should get this right here. And if you don't, you can go into the compile output down here and figure out what happened. That being said, we saw the linker linked everything and it is just exit normally. So we are good to go. To give this a real test though, and I mean a real test, what we're going to do is I'm going to just plop in some includes through the old copy and paste. We're going to put in Q debug, Q random generator does exactly what it sounds like. It's just going to generate a random value for us. Our buddy Qthread and we're going to work with Qfuture. Remember, we want a value that's in the future and we want Qt concurrent. Notice this has got a t here. It's not Q concurrent. It's Qt concurrent because it's a module and you can highlight that hit F1. And of course, it gives you everything that I've just explained right here, how to add it in C make, how to add it in Q make. I absolutely love that. But once you have these in here, let's go ahead and give us a build. And this will prove to you about a shadow of doubt that it's linking correctly. And we've got a good build. If you don't get to this point, you'll have to go into your compile output and figure out what's going on. First thing we need to do here is, well, let's make some test functions. But before we do, I'm going to say, I'm going to plop in some code here so I can see what we're doing. So we're saying starting and finished. And then right here in between to do thread. Because we want to work with some awesome threading. Now the power of Qt concurrent is we don't have to work with those low level primitives. We can just say, hey, Qt concurrent, I want to thread something. Go do this. So I'm going to write a very complex function. Please pay attention. Let's say void test. I don't think I could write any more of that. But really what I'm doing here is I'm saying, okay, the simple little function, we're going to take this function and push it out to Qt concurrent. So I'm just going to grab him and let's go here. I'm going to demonstrate the non threaded version and then we're going to go ahead and thread this. So we're going to run this real quick. Alright, so notice how this is starting Q thread and it's all the same memory address. So if we really really want to what we can do here is say Q thread, current thread, set object name. Let's call this main thread. That way we can see without a shadow of a doubt what thread this thing's actually running on. Remember, we have not threaded yet. That's coming up really, really soon. Just bear with me here. Now that we've gotten to this point, we see that our function is running on the main thread. Let's go ahead and we're going to take this a little bit and modify it. So let's grab this. I want yet another function. So let's call this test random. Wow, if I could spell random that was embarrassing. It was a randomly bad joke. Anyways, let's go ahead and we're going to work with this. And we're gonna say Q thread, current thread, and we want to put this to sleep. So I'm gonna say MSleep. So whatever thread it's running on, we want to put it to sleep for one second. But then we want to go ahead and we want to return a value. Let's say return and we want Q a random generator global and bounded. And what bound is going to do is return a range. Notice it's wanting the highest. So we want to say in smacks added bonus, we're going to show you how to put a parameter in there. So all this really is going to do is it's going to say hey, we're running random on whatever the current thread is, we're gonna say current thread go to sleep for one whole second, which is an eternity in computer time. And then when you're done, go ahead and return a random number between whatever and whatever. Pretty simple. So let's dive in and see these things in action on a threaded application using Qt concurrent. Now that we've got our happy little functions here, test and test random, we're going to go ahead and work with these. So let's wipe this out. What we're going to do is we're going to say Qt concurrent. And then we're going to use run. Now you notice the signatures here. If you're coming from Qt five, be warned, these have flipped around. And when I mean that, I mean, the signatures have been flipped around. It used to be completely different. It used to be the arguments than the function, but now it's the function than the arguments. For this simplistic example, we're just going to say we're going to give it the function name of test. Notice what's happening here. Well, we're just saying Qt concurrent run this function. And it's just going to, well, you guessed it, run it. Go ahead and run this and see what happens. Okay, well, this just won't do. You see, it started, it finished, but then our test ran on a Q thread pool thread. That's the thread pool inside Q concurrent under pool. But notice the order started, finished, and then the test ran, meaning, well, our main thread is already done. And we want to actually stop and wait on this thing. So let's go ahead and work with what's called a future, which is what run is going to return. So let's go ahead and say Q future. And this is a template class. So we have to give it a type. In this case, it's going to be void because our function returns nothing. So we're telling Q future what to expect. And let's go ahead and call this f one. Now, what we can do is something like this. We can say f one dot and let's see, we want to do wait for finished. So it does exactly like it looks like it's going to do on the screen.  And we're going to say, hey, our future, wait for that thread to finished. Let's go ahead and run this and see what it looks like now. Okay, that looks much better. So we have started and then we've done whatever we wanted to do. But we have this running on a thread pool inside Q concurrent. And then we can actually wait for it to be finished. And everything synchronized the way we wanted it. That is actually really cool. I love that. Okay, by now the power of Q concurrent should be pretty obvious. You can take any function, it doesn't even have to be designed for a thread. And really just say Q concurrent, go run that function in a thread pool and then do something with it. You can either wait for finished or return a value or whatever you want to do. This is just insanely powerful. So what we're going to do now is notch the difficulty up just a little bit. We're going to say Q concurrent, we're going to run test random. Notice test random has two different things. We're going to get a value in the future, doesn't exist yet. And we're going to feed it a value as a parameter. Okay, well, how do we do that? Let's go down here and say Q future, not Q feature translation, sorry Q future. There we go. And remember this is templated. So we have to get from the function what we're working with here. The return type is an int. So we're going to say this is going to be an integer. Notice the wording. It is going to be, not it is. Meaning the value does not exist yet but it will in the future. That's something you have to wrap your head around when working with futures. We're going to call this F2, you can name it fuzzy kitten or whatever you want. And we'll say Q concurrent. Of course we want run and this is where people coming from Qt 5 get very, very, very confused because they have flipped the arguments around. It used to be args then function, now it's functions and args. And I think in Qt 5, if memory serves, it was limited to five parameters. And you notice in Qt 6 what it's doing now. So let's go ahead and say we want to run this on the function name, test random, and let's give it a parameter. We want to say the max is 100 and we could do comma 200 whatever depending on how many parameters we have here. And there it is. So it's going to take our test random, load it into Qt concurrent, pass this value over to the function and then run this. Now here's the tricky bit. Remember how I said the future does not exist yet. It will exist and here's why. As this is running, this is going to run off to thread land out in Qt concurrent and it's going to do its thing. But in our code we're saying Q thread, current thread, sleep. So it's going to put that thread on the thread pool to sleep for one second and we can change that to longer. Then it will return that value and that one second in computer time is an eternity. So what we need to do is tell our program we need that value. So we're going to go ahead and say Q info and we want to just say random. So our random value is and let's go ahead and say f2 dot and we need some way of telling this we want this. Well we want the result and you notice how there are different ones. There's result, result at and this takes an index position and result count. That's right this can actually return multiple results. A little bit more complex than where we are now and you can get a list of the results if you're returning multiple. So this is extremely cool but we just want the one. So we're going to get the result of course this is templated so it's going to have our return type and we're going to say ta-da. We want this result. Now if we hit f1 returns the first result in the future if the result is not immediately available this function will block and wait. Burn that into your brain meaning we are now synchronizing these two threads and we're saying we are going to stop our program and wait for that thread to finish. Meaning we don't have to call wait for finished it's already in there. So let's go ahead and run this and see it in action. All right did you notice the pause we're going to run that again here in a second but let's step through this it's starting and then test is on our thread pooled random is on our thread pooled and then we have our random result and then finished. That went a little fast so what we're going to do here is we're going to kick this out to five seconds which is forever and ever in computer time. So five seconds let's go ahead and run this at the speed of my compiler there we go so starting test random and now it's sitting there waiting because that thread is asleep and we are waiting for that result. Finally it kicks back the random was 86 and then our beautiful finish back on our main thread. The major takeaway here is Qt concurrent is insanely powerful and yet very simple to work with. You can be a complete newbie and you can get this running today without even understanding how threads work. I hope you enjoyed this video. You can find the source code out on github.com. If you need additional help myself and thousands of other developers are hanging out in the void realms facebook group. This is a large group with lots of developers and we talk about everything technology related not just the technology that you just watched and if you want official training I do develop courses out on udemy.com. This is official classroom style training. If you go out there and the course you're looking for is just simply not there drop me a note I'm either working on it or I will actually develop it. I will put a link down below for all three of those and as always help me help you smash that like and subscribe button the more popular these videos become the more I'll create and publish out on youtube. Thank you for watching.


Hi everyone, Joe for jaspyscasebreaks.com. Happy Saturday coming at you with jaspys three box divisional round high-end football mixer Random team a break number one Rams defeated or sorry the Packers just defeated the Rams not too long ago and we're getting ready for the Ravens Bills game Ravens at Bills that's coming up pretty nice stuff 32 spots all card ship obviously the mixer includes 2019 flawless one briefcase One box of 2019 NT football and one box of 2020 impeccable football Very big. Thank you to all of these folks right here for getting into the action now whether you bought a spot straight up or Whether you won spots. Thank you for For trying those filler breaks Congrats to the winners. Thanks to people who bought their spots straight up. It should be a pretty nice break All 32 teams are in so now let's roll it. Let's randomize it Four and a four eight times Hard eight for each list for names and teams one two three five six Seven and eighth and final time We got Dylan down to Eddie four and a four eight times hard eight and Eighth and final time after eight.  Let's sort by column B by team and Now give me a minute here. I'm gonna come back to the screen in just a second But I'm gonna flip to the fresh cases we have here for the breaks So you can see on the top camera, there's the immaculate case right here and tease over here flawless is right there So these are all from fresh cases. Here's the 2019 flawless Right there remember trade at your own risk. All right, so there's one and two We'll select a die. I Like that one right there. We'll go one two three for the top box four five six for the bottom box And it's four one two three four five six. So this is the one we're gonna do for this break right here This one we'll save for next time Let's do this 2019 NT football actually slide these this way So we'll go one two Three and four So with the die we'll go one two three four if I roll a five or six I'll just roll again. There it is right here for So that's the one we're gonna do right there So we'll take these other boxes Take them here and last but not least The so these are two 2019 boxes and this is 2020 so current draft class current season pop these guys open Set them right there And so there's three boxes one two and three this time we'll go one two three four five six on the dice roll and It's two So one two is the top box right here box number one. I'm gonna save these for next time. All right There you go. So we got all three boxes here waiting and ready to go I'm gonna pause the video when we come back. We're gonna see if there's any trades and Then we'll have the break stick around. We'll be right back All right, welcome back folks. There was a lot of trade chatter But in the end no no deals were finalized, which is fine. Thanks for hanging with me on a Saturday We've got more football coming at ten about ten minutes until Baltimore squares off against the the bills. That should be exciting Thanks everyone for watching for getting into the action really appreciated Good luck some nice stuff here. All right. So I guess we'll start with impeccable Then we'll do NT then we'll close with flawless. All right. Good luck ladies and gentlemen You have case hit here, maybe? No, no case hit. You got a hit on the bottom here So this is this is 2020 by the way in the other two or 2019 We use one of those blank cards and slow play the hits a little bit. We've got Joe Mixon three out of 50 That'll be for Cincinnati Matt McLaughlin That Dan the man Marino one out of 50 for Miami. That'll be for Zach Gwinn another base card here George Kittle the 75 37 I 75 for DD LP and the Niners The hits now some relics. We've got oh an autograph rookie autograph Patrick Queen 54 out of 99 we should see him in action tonight Will he will he raise his stock in tonight's Ravens Bills game? Maybe an interception a sack something like that. It could be interesting. I think he's playing tonight. I think he's healthy Next up is a Jaguar 16 out of 75 rookie autograph CJ Henderson That's for Nick Stover tried to trade couldn't trade mojo We've got rookie autograph for the Cardinals Isaiah Simmons four out of 75 For Jack and the Redbirds We've got for the Titans nice AJ Brown Eight out of 25 three-color patch and autograph for Rory and Tennessee and the last one here is gonna be a Viking oh nice Justin Jefferson three out of five a little bit of a soft corner on the bottom left don't like that Panini come on, but a very nice hit For Minnesota that is gonna be for Kenneth Geiger in the Minnesota Vikings. He won that spot, too You got a piece of the pigskin looks like a helmet sticker, maybe And out of five out of five's under get the train whistle Ken Kenny Kenny G All aboard the big hit Express Nice Box two of three this time 2019 Nt football. It's a little pop there. You got a plate right there. I think might might just be a base plate Could it be autograph don't know We've got Ranny Moss treasured moments 46 out of 75 the heads that play by Moss leads to TD Yeah, not a bad day Kenny What happened here the Moss didn't score during Minnesota's 28 20 win over Denver He did set up a touchdown though on a final play of the first half The wide receiver grabbed the deep pass before being tackled to start pitch the ball Behind his head to Moe Williams who waltz into the end zone Kind of vague memories of that. I was back in 2003 Remember them people remember that Vikings fans probably remember that We got my homies Patrick Mahomes 62 out of 99 That'll be for Brian Crouch and the Chiefs got Barry Sanders 58 out of 99 piece of his jersey century materials for Detroit Eric K Wonder who the Lions are gonna get Coach the plate is a relic plate two-color patch James White one of one century materials For Brian Crouch and the Pats It's kind of weird not seeing the Patriots in the playoffs Brian all aboard the Big Head Express We got a colossal relic late in van der Esch 10 out of 99 for Dallas Sean Maddock Triple relic Kyler Murray Daniel Jones Dwayne Haskins 11 out of 99 Cardinals is Jack Giants is Matthew Shearer and David Alsop has the Washington football team. So that's gonna be One happy person two sad people will do that randomizer just a bit We've got Zach Allen 25 out of 97 Cardinals for Jack Zach for Jack and we've got the future Easton stick 13 out of 25 Mike with the bolts. I guess he was the future until they drafted Justin Herbert They're not all gonna be they're not all gonna hit. They're all gonna hit All right, we got treasured moments John Riggins That's pretty cool two out of ten for David Alsop and the Washington football team. His moment was against the Dolphins in 1983 In need of in need of a single yard Washington made the easy decision and turned to Riggins It's hulking running back the diesel took the pig skin bowled through the defender just passed the line of scrimmage for sprinting down The sideline for a 43 yard score in the Redskins 27-17 win over the Dolphins in Super Bowl Xvii There you go rumblin stumbling mumbling and The last one here is gonna be nice rookie patch auto meekle hardman jr. 23 out of 99 Chiefs that's gonna be for Brian Crouch Brian's gonna be rooting for this guy tomorrow Big game for him Would be a big game Gain for this the value of this card Nice Now the flawless my 20 2019 were the gold briefcases All right, so you can see the encased cards up there. What is going on? You feel like very large encased cards here. Wow Let's do That card first You want to have the briefcase Eddie? What about all the other people that want briefcases too? There's Barry Sanders This is just a digital blockchain card, but there's Barry Sanders for Detroit Eric K with the blockchain card. All right, we got the Dan Marino Two-color patch 16 out of 20 Dolphin Zach Gwynne Devon Bush two out of ten three-color jersey No, the briefcase is not worth anything. I mean you can buy it can probably buy one on eBay for like $10 There's Devon Bush that goes to the Steelers Mike No, we're not gonna random off the case We've never random off any of these cases if we started doing it now Then people will come out of the word work from six years ago and be like, hey How can we not want to randomize the briefcase for every single break? We don't want to go down that road eight out of ten two-color patch An autograph late and vanderish for Dallas Sean Maddock. Hey, if you come visit Jaspies though You can you can pick one up for free Ball supplies last there's rookie shadow signatures. No offense 20 out of 25 Broncos Matt Buckler tried to trade couldn't trade mojo three more to go 12 out of 20 three-color patch and autograph Will Greer 12 out of 25 for the Panthers. That's gonna go to Brian Crouch And here's a nice rookie auto DK Metcalf 17 out of 25 for the Seattle Seahawks And that'll be for Gail. There you go Gail. Oh Well now that's an idea Kenny autograph and then randomize it We I maybe maybe we'll do that we'd have to I'd have to do that for like charity or something Oh, and look at this Hall of Fame auto Marshall Fox six out of 15 That'll be for the the old st. Louis Rams that goes to LA now of course that goes to Matt Lieber and the Marshall Fox auto nice All right now. Let's see what monsters we have here Good luck. Let's do this one way over here And that's a nice Joe Montana Ruby 11 out of 10 Niners that's gonna be for David David D. This hit over here Is gonna be Carry on Johnson four out of seven Diamond carry on my wayward son Eric with the Lions and here's a big hit right here. Is it autographed? It is autographed. Wow It's a Kyler Murray patch rookie patch auto book That's got to be a one a six out of ten nice low number on that Rookie Kyler Murray we got the card of Cardinals of course that's right at right on the front Of his jersey right there. That is pretty awesome. Jack Townsend Who bought a spot straight up? Got randomized the Cardinals and gets this Kyler Murray very very nice And all the gems of course are naturally mine not lab grown Empty briefcase right here The case is closed on this three box high-end football mixer. Now. Let's do this randomizer really quick Let's flip back to some fresh dice and a new list. We got Jackson has a chance at the triple relic Kyler Murray Arizona Daniel Jones, New York football Giants and Dwayne Haskins the Washington football team Let's roll it. Let's randomize it six and a two eight times team on top gets after eight one two three four five six Seven and eighth and final time after eight Washington football team that goes to David. There you go David 11 out of 99 on that Three-color triple relic I'm Joe for Jasper's case breaks calm. Congrats again to Jack. Thanks everyone else for getting into the action Yeah, how much does this go for? Yeah, at least a few thousand You might actually might want to hold on to this hold on selling it until maybe when the next NFL season Starts and we see more Kyler Murray in action So that might be the play and there you go folks I think we'll have another we've got that other flawless briefcase so we can we can build another three box high-end Divisional round mixer out of this. So look out for that. I'm Joe for Jasper's case breaks calm Thanks for joining. We'll see you next time for the next one. Bye. Bye


Students need to learn the art and craft of writing, you know, well-formed sentences, paragraphs and texts. So in this regard much depends upon the teacher and their role in the classroom, how they can teach paragraph construction. Of course there are various ways but we will just see one of the ways of teaching paragraph construction in the classroom. So that this kind of strategy can be used at elementary level where students are at their early stage of language learning. So for example teacher can use substitution drill method which invites students to write a paragraph to this identical which they have read. Yeah and notice some of the features of grammar, some of the features of words and how they are formed and they can also produce the similar identical paragraph. And teacher can introduce new vocabulary, new concept. So if you look at the slide the next slide you can find out how this method can be used at elementary level to teach paragraph construction. For example William Shakespeare is England's most famous playwright. He was born in Stratford upon Evan in 1560 but lived a lot of his life in London. He wrote 37 plays including Hamlet, Romeo and Juliet and in 5th and 12th night he died in Stratford upon Evan in 1660. So look this kind of example can be given and on the next slide you can ask the student to write some sentences on Jane Austen. For example what was her occupation, what was her profession and what was her date of birth and what was her place of birth and where she lived most of her life and what are the examples of work and where she died. So teaching paragraph construction in this way at elementary level can be helpful for the students to consciously notice how parallel writing can make them notice the features of grammar, the features of punctuation or conventions of writing.