All right, good morning. So I guess plan of the day is let's blast through this lecture and then talk about quiz one, so more people come. So let's just jump right into it and then get to talking about the important stuff, which is the quiz, which is not that bad. Whoops. OK, mute myself, yikes. All right, so last lecture, we at least attempted to implement a lock and we failed miserably because two threads could make it to the lock code and then two threads could return from that function, which does not guarantee mutual exclusion. So in order to implement proper mutual exclusion, you have to have you can do it with minimal hardware support, so as long as loads and stores are atomic and instructions execute in order, you can actually implement mutual exclusion. So there's two main algorithms you can use. There's Peterson's algorithm and the Landport's Bakery algorithm. They don't scale that well, though, and processors nowadays execute out of order, so we actually need some hardware support nowadays. I might go into the details of one if Ashwin does it later, but I'll show you how locks are actually implemented in hardware nowadays. So the easiest way to think about how you would actually implement locks in hardware nowadays is you can assume that there is a magical atomic function called compare and swap, so this will translate directly to a CPU instruction, except reading assembly sucks, so let's just pretend it's a C function. So the compare and swap function takes three arguments. It takes a pointer that points to a number, and then it takes what you expect that number to be and then the third argument is what you want to change that number to, and then whenever you call compare and swap, it will always return atomically what the value that the pointer is pointing to is, and it will only swap if you get back the original old value, so if I call compare and swap and I gave it my lock I gave before and said the old value is zero and the new value is one, it will only return zero if it changed that zero to a one, and that's the only time it will transition from zero to one, which would indicate a lock. Otherwise, if you tried to call this with zero and one and it returned a one, it means that the value was one and it did not swap successfully, so it will only swap if it returns the old value. So if we give it another shot with our lock implementation, well, this actually makes it a lot shorter since compare and swap actually sets the lock for us, we can just have a while loop that just continuously does compare and swap. So if compare and swap returns zero, it means we transition from a zero to a one, which would break out the while loop because it would be while zero, which is while false, so it would break out the while loop and then return from the lock. Otherwise, if it was already locked, it would return one and then keep on looping through this again and again and again. So now this actually works as a mutex and this is called a spin lock and it's called a spin lock because of that while loop. So it just continuously tries and tries and tries and tries again if it can't get the lock and it doesn't do anything smart, it's just wasting CPU cycles on that, this. So this is a valid implementation, but it kind of wastes time and this is called a spin lock. So any questions about compare and swap? It's just a magical atomic function, so it either happens or it doesn't, there's no in-between and it will only swap the value if it returns the old value, right? Otherwise, it just returns whatever it's pointing to. Okay, so that's a spin lock, right? That's what we implemented in the previous slide. It's a valid implementation. So this compare and swap is the common hardware instruction that you use to implement all your synchronization permatives. On x86, it's called complex-tinge because that's a great name, right?  Don't ask me why they shortened it like that. They thought they were clever. But this has a busy weight problem. So if we have a unit processor system and we can't get the lock, the better thing we could do is just yield our CPU time. If we're the only thread active and it's locked, no other CPU is magically going to unlock it, right? So why are we even bothering trying when we know we can't get the CPU? So the better thing would be to just yield your CPU time and then hopefully the thread that has the lock gets scheduled and then by the time it's done running, it's done with the lock so now I can run, right? But a multi-processor machine might depend so how long another thread uses a lock. Maybe you don't want to put yourself to sleep. Maybe you would just get the lock in like two or three spins anyways and not waste that much time and you'd be much, much more responsive in that case. But as everything in computers, it's going to be kind of a trade-off that you have to make. But let's go ahead and add a yield. So if we don't get the lock, we'll just do the compare and swap. If we fail, which means that the value is zero or sorry, the value is one, which means it's locked, we'll just yield the thread. But now we have another problem. So we have a thundering herd problem. So there might be eight threads trying to get this lock. Then they all yield themselves and then as soon as it's unlocked, you have eight threads all fighting for that lock and then seven of them are going to be yielded again. Ideally, you just want to just wake up one thread and then that thread gets a lock and you don't have to bother monkeying with seven other threads. Also, remember what we said about properties of our locks. We want them to be fair. So if you can think of it, you'd rather there be a line for the lock than just a giant free-for-all, which essentially this is just a free-for-all, right? You have no control over who gets the lock. Whoever gets woken up first or whoever just tries it first gets it. There's no sense of ordering. There's no sense of fairness or anything like that. So we can do better. So you can add a weight queue to the lock. So just pretend we have a kind of queue structure. So in the lock, if I don't get the lock, I will add myself to some lock weight queue where I'm just going to politely stand in line and then I'm going to put myself to sleep. And remember, putting myself to sleep just kind of blocks it until someone else wakes me up. So then in the unlock code, it would unlock the lock. And then it would check if there's any threads in the weight queue. And then if there is a thread in the weight queue that wants the lock that I just had, then I just wake it up, right? So I wake up a thread I know is waiting for a lock. So there's two issues with this. One's called a lost wake up and the other's called the wrong thread gets the lock. So can anyone guess what might happen to cause, let's say the first one, a lost wake up? So is there a scenario where you have two threads that want the lock where one thread just gets put to sleep forever? So let's switch to this. Whoops, didn't see that. I'll say that later. So anyone see any issues if we have two threads? I'll put the whole thing there. It wakes up multiple threads before? So it should only wake up a single thread, right? How would it wake up multiple threads? So the only thread that's gonna be able to unlock is if it has a lock already. So we know that this will just get executed by a single thread at a time. Unless we don't pair our locks and unlocks in which case you used it incorrectly and then that's their fault. Yep, yep. And then that's if a thread already has a lock already, right? Right? So here, I'll try and clarify that. So assume thread one has the lock. So if we assume thread one has a lock, well, what can happen to Jolly old thread two? So thread two can execute this compare and swap which is going to fail, right? Because some other thread has a lock? And then it will go into the while statement and be right here. And then next thing it wants to do is add itself to the queue. Now we get context switched. So now thread one calls unlock here. Then thread one, let's label that thread one, would go ahead and unlock it. It would go ahead and unlock it. Then next thing it would do is check if there's any threads in the way queue, which there are no threads in the way queue yet because the thread that requested it hasn't added itself to the way queue yet, right? It got context switched. So this statement wouldn't go into the if statement, so it would just exit unlock. And now at the end of that, thread one now no longer has a lock. So thread one doesn't have the lock anymore and now it would context switch back to thread two which then thread two would add itself to the way queue. Now there's one thing in the way queue and then it would call sleep on itself. And now it's just a sleep. No one has a lock, so there's not gonna be an unlock paired with it. So it's just gonna essentially be in a coma, right? Like it's not gonna get woken up because you're assuming that you add yourself to the way queue and then if there's threads in the queue you just wake one up. So that's an instance of lost wake up. So does that make sense? So we have to do a bit better here. What about the situation where the wrong thread gets a lock? Yeah. So compare and swap to Tomic. So it will make sure that only one thread will change the value from like a zero to a one. So that way that they both can't acquire the lock which is what happened before, right? Where they were reading and then writing. So it combines read and write in kind of a useful way where we know whether or not we were the thread that transitioned it and there can only be one. Yeah. So the other thread after the first thread does the compare and swap and swaps it it's going to read get one return from compare and swap because that's the current value of it. Value, yeah, yeah, yeah, yeah. Yeah. So the other problem with the wrong thread getting the lock so assume that, you know, so assume T1 has the lock and then thread two is in weight queue. So if you have that situation where it's in the weight queue then what can happen if thread one goes and unlocks itself and then thread one is here. So it's just unlock the lock and then you get a context switch to a third thread, thread three that hasn't even requested the lock yet. It could go and execute this instruction thread three and then it just came in, swoop and then took the lock when it should have been thread two, right? Thread two is already in line but if I have a context switch right after the lock another thread's not gonna know that there's anyone in line it's just gonna do the compare and swap and be like, hey, I changed the zero to a one, I got the lock, yay for me. So another thread came in, swoop the lock, that was not super fair, right? They cut the line at Disney World, they got the fast pass or whatever the hell it's called now, yep. So the question is how do I know when the context switch will happen? And the answer is you don't have any control over when it happens. So when you need to argue concurrency thing you have to argue that, hey, you know, there's a lock here I know only one thread's here it can't context switch in and do this code but any code that's not between the locks you have to consider at any time it can get context switched out. So this and usually you just do it by unfortunately reading and understanding the code and then finding a situation in which the context switches really screw you over. Yep, so that's you changing the lock back to a zero. So it was one, so at the time of unlock it's gonna be a one, right? So we just write the value zero to it to indicate it's unlocked. Yeah, well they'll just keep on spinning over and over again. This is just to save time. Yeah, when it wakes up, when it wakes up it would wake up here, right? And then try it again and then it would acquire the lock. Okay, so that's the example of the last wake up just so we have it and the wrong thread. So except I called the thread something different but when you create these examples you can say whatever. All right, so this is how you fix the problem. So to fix these problems you actually use two locks. So you can kind of decompose this into two locks where I'll use my spin lock implementation because I know that's okay. So we can assume that that int guard represents a spin lock and the spin lock is only used for these lock and unlock calls. So if it makes it easier to read let's hide myself real quick. Get out of here me. So to make it a bit easier to read at the top of lock here this while compare and swap guard you can just substitute in like lock guard and then at the end of both of these scenarios where we set guard to zero that's just unlock guard and then again in the top of the unlock code you can think of that as just lock the guard and at the bottom it's unlock the guard. So where am I? So within the unlock we know this block of code it only runs in one thread at a time right? It's like the same as having a mutex lock and unlock around it. So all of this will just execute in a single thread and it can't be context switched out and something else can't run that. And then same thing here. So there's in the lock. So this is again like lock for the guard and then we have an if condition that checks the value of the actual lock that we want to represent as part of this lock and unlock. So if it's zero we just acquire it in this case and we don't need a compare and swap for that because we know we have the guard and this is all mutually exclusive this is all happening in a single thread it's mutually exclusive. So we don't even have to worry about the compare and swap to transition the lock from zero to one. So in this case we'd acquire the lock oh sorry we'd acquire the lock and then unlock the guard and then it would return but in the case that it does not acquire the lock that's when we would add ourself to the queue and now because that's within that guard lock we know we can't get context switched and this can't happen because it's the same guard lock right so if we'll add ourselves to the queue and no one else will try and access the queue at all then we unlock ourselves so that some other thread could execute an unlock or something and then we put ourselves to sleep. So then in the unlock we can now that we don't we're not fighting over adding elements to the weight queue right there's no data races involved with it anymore we can just check if it's empty we just release a lock we don't have to wake up anything otherwise we would just transfer the mutex to the next thread so we would just check the front of our queue and then wake up that thread. So does this make sense as a better mutex implementation so now we're fair right there's no data races involved with our weight queue it's just like a first in first out queue and then we also don't yeah we don't have any data races with that so we don't have any lost wakeups nothing else can come in and swoop the lock because it needs this guard and we're all good we solved all of our problems we don't have a busy spin lock at all except for the guard but that's okay as a spin lock because it's protecting a very small bit of code. All right any questions on that yeah so spin lock was just that so that was our spin lock so this was a valid lock implementation it just wasted CPU time because it just kept on trying and trying it again but so spin locks are valid they just kind of waste time so we essentially used a spin lock to implement a better lock all right cool so that makes sense so again remember what causes a data race so two concurrent actions access the same variable and at least one of them is right so if you don't have any concurrency between them you don't have any data races your life is good so that's why if we consider the queue as a whole we don't have to worry about any one particular element of that being involved in a data race if we just lock all the accesses to it makes our life much much easier but if we look at this definition there might be some things we want to do as kind of an optimization so at least one of them is a right which means that well we can have as many readers as we want and you might be in a situation where your memory location has very infrequent writes and then a lot of reads and you still don't want any data races with it so you can use a different lock for kind of optimizing this case which is called a read write lock so with mutexes and spin locks you either have the lock or you don't even if it's a read you have to have it protected even though you might be able to have multiple threads in so mutex is just all or nothing it doesn't really care but you want reads to happen in parallel ideally so the way that work is there's this pthread read write lock so there's two lock calls there's a call for locking it for read and then a call to lock it for write so the idea is that many threads can make it to a read lock call and then pass through it because you're essentially saying that oh pass this is just read so that's fine and yeah that's fine we can have as many threads do that as we want but only one thread should be able to go through the right lock at a single time so this is how you could implement a read write lock so it's the same idea before where we just use a guard lock and this time I'll just not show the implementation of it because it could be a spin lock it could be a mutex at this point so we have a variable for lock that represents our normal mutex and then a guard that's only used within these read write lock calls so the write lock can just straight up use the lock because we know that guarantees mutual exclusion so the write lock and the write unlock are just correspond directly to our mutex lock and unlock the only difference is our read lock so the read lock just uses a guard because there'd be a data race with the number of readers so we're gonna keep track of the number of threads that currently have the lock open for reading so we have a guard lock that protects the number of readers so if we acquire the read lock and we get the guard we increment the number of readers and then if this is the first reader so if it transitioned from a zero to a one we know it's the first reader and then we should grab try and grab the normal mutex lock right so then that way you can't pass a write lock because now the read lock essentially has the mutex we care about and then it would just unlock the guard again mostly just to protect the end reader variable and then in the read unlock it would get the guard again to protect because we're going to modify the number of readers so you decrement the number of readers if there are no more readers then you can just unlock the lock right the lock that represents the entire thing and then you unlock the guard so does this make sense as an implementation so if you have eight threads all calling read lock they would just increment the number of readers the first one through would acquire the actual lock representation in this read write lock struct right it would acquire this lock and then another thread can come in it doesn't need to reacquire the lock right because we already acquired that lock for reading so we can just allow more and more readers to come in until eventually all the readers will unlock at some point and then when we have the last reader we can unlock the lock completely so does that make sense to everyone cool so the summary of what we talked about today and yesterday is we want critical sections to protect against data races you should know what they are and how to prevent them mutex and spin locks are the most straightforward and kind of useful locks that you will grab and they're kind of the most straightforward and we know how to implement them with some hardware support you're going to need some kernel support for wake up notifications or in lab two you're actually doing this too so you could implement a spin lock on top of your thread or a good mutex on top of your threading implementation because you'll have thread sleep and you'll have thread wake up right so you could implement this now and then if you have a lot of readers you should use a read write lock all right any questions about locking all right cool well then we can talk about the quiz all right so quiz one details it is open book this is posted by Ashwin so you consult your notes, lecture slides, textbook you're not supposed to search the internet and you can't talk to your friends digitally, in person whatever you want also optionally there is a room book that I will be in or Ashwin will be in likely me I hope where we can go you can go write the quiz if you think finding a room on campus will be difficult just as a curiosity who actually wants to do that any commuters here yeah so I'll be there I have a longer commute than most of you probably so yeah if you want I'll be in that room I guess there's not that much interest but it houses like I think it has room for like 50 people or something like that so there's that option if you want to use it it will be I mean it won't be that fun but it'll be something the quiz format there are going to be 15 true false questions five multiple choice five multiple answer which is like pick the things that apply and then to short answer we write like at most three sentences so on Quarkus there was a micro quiz posted either last night or this morning I'm not actually sure but we can do that cause honestly this quiz isn't that bad and this micro quiz is actually probably worse than the actual quiz so let's go through it together so the first question is invalid I'm not sure why you put that on there so on context switch between two processes the operating system has to modify the state in the MMU that's yeah it gets true so this isn't super valid for us but we know that the operating system has to change address spaces so you could answer that yeah true yeah I literally went through and so this is pulled from I guess an old one cause I saw this question in the question bank and I changed it to just say address space instead of MMU well it's posted here so it's probably not in the actual bank yeah so that's just state in the MMU like the hardware part of the MMU yeah the state of the process is a different thing so to switch between two process one would be like put depending on what it did it would either be put into blocked or put into waiting and then the other thread would transition or other process would transition to running right but it's kind of a weird states like a super overloaded word in computer science all right next question cool when a divide by zero error in a program occurs a trap instruction is invoked so the kernel can kill the program yeah sorry so trap instruction is something like a system call where you invoke it yeah yeah so false it's an exception and also if it's an exception you'd get a chance to handle it too there'd probably be a signal sent to you so false cool and yeah and that was actually a pretty hard question all right question three on a computer system just one processor core there are no benefits to having multiple threads within a process I mean that's pretty easy up if that was true then why the hell would we take this course right that would just be mean all right this is a weirdly worded question which of the following is responsible for translating a process's virtual memory address into physical memory address which also is not super valid because the answer actually should be the MMU but between all this yeah which of the following is responsible so technically it is hardware because it's the MMU so what which is why I don't like asking these questions now because we don't know how virtual memory actually works so the kernel will set up the mappings and then there's some hardware that actually does the translation so it's essentially like you set up a lookup table and then there's hardware that uses it which is not that hard of a concept which is why I'm waiting for it but yeah so hardware all right this is question five this is a multiple answer one this is tricky assume you have a computation such as matrix multiply that you'd like to parallelize so the computation can be completed more quickly you can do this by either using multiple threads within a process or multiple processes to decide which of these two approaches you to use you consider various trade-offs which of the following considerations are valid select all that apply so using multiple processes will result in less physical memory needed yeah that sounds not true because there'd have to be some more accounting for processes they probably use slightly more or it's like a watch or it's like insignificant at best using multiple processes will result in slower more costly synchronization true right because they're in different address basis so you have to communicate between them and you have to go through the kernel and that's slow all right using multiple processes will result in faster sharing well that's kind of the opposite of what we just said so that can't be true using multiple processes will result in higher context switching overhead true but this one's also kind of yeah so that's true if you're switching between threads within the same processes without switching to another process in between so context switching threads if you're within the same process you just have to essentially swap the registers while if it's a process you have to swap the registers you have to swap the address spaces and you have to swap open files other stuff we don't really know about yet so that sounds true using multiple processes will result in fewer harder to detect bugs oh we got so okay so for sake of argument do you have data races between processes so are data races a pain in the ass to debug so probably true because most of the time all your problems are due to two things running at once and communicating between them so if they're in the same address space you can't really detect if something really bad happens while if everything is super explicit then you actually know probably have a better idea of understanding what's going to happen and then two if a thread crashes your process is dead but if a process crashes the other it'll probably give you a better error message and the other one will still be alive so you'll at least be able to figure out in which process did something bad happen and you're probably more likely to narrow it down cool let's submit our quiz well yeah see so now you can see why I said don't be that worried about the quiz like some of the questions so it's like it's pulling from a question bank so it's like it'll pull what I say 15 true false questions out of like 30 there's some that are slightly trickier than others but like I don't know at least in my opinion like this is probably the hardest one or not I don't know depending on you guys yeah any other questions or yep no no code writing short answer is going to be either explain this or what happens if which remember we kind of talked about the only real valid thing to ask and what would happen if is like threads stuff because I can't ask anything about processes because they don't know anything right all right well cool we can so I had a request to also clarify make it super crystal clear what is kernel mode and what is not kernel mode so let's write some kernel code so kernel code is so unfortunately you don't get to do anything or have a flavor of it but so here's your flavor now so if you want to write I don't know okay it doesn't so if you want to write kernel code it looks something like this I don't know what apparently code doesn't recognize it but the kernel kernel code is just C code it's not special in that way the only thing that's special about it in what is what CPU mode it runs in so anything I'm writing here if it's running in the kernel it will be running in kernel mode and I can do any random stuff I want I can kill all the processes if I want to I can do whatever I could play with hardware if I knew how to do that I don't know the calls off the top of my head but you could do that so it has some macros just to make things easier to debug and stuff but it doesn't exactly look like a C program because it's missing something called main right so the kernel is kind of like a very you can think of it if you want kind of as a long running process so it doesn't have any main because it's already running so how the kernel works is it separates code into modules and then you insert the module into the kernel and then it would execute the code as part of the kernel so it's in kernel mode so as part of their functions you can register a function to run whenever the module gets loaded into the kernel and starts executing and then you can have some code that executes whenever you take it out of the kernel and have it stop running so in this case you'll also see that because I'm in kernel mode libc does not exist I don't have a C library so I don't have printf so what they did just to make it easier to develop in the kernel there's like an internal buffer that they used to print messages to so you can see so instead of printf use printk and there's a bunch of different it's essentially like a logger if anyone's used a logger before that you have different levels that you can print to so one is called kerninfo and then you can just print whatever message you want so I'll just show that this code's actually running as part of the kernel I'll just print something into the internal kernel buffer and then when it exits I'll just print that the exit happened so if we go ahead and make that we're all good and you'll see that it generates a lot of stuff but it also does not generate an executable at all what it does generate is this .co file which if you compile like a C file you'll generally see .o files that you can compile into an executable right but since this is the kernel there's not going to be an executable that .co file just represents a kernel object file and then you're allowed to load that directly into the kernel so let's go ahead and do that so the command to insert modules into the kernel is called instmod so install install module and we could say hello.k and then now at this point that all the code in the knit ran because that code is now in the kernel right it's running in kernel mode which is pretty sweet let's go ahead and see that message so you use dmessage to look at any messages in the kernel's buffer right because this is all user space we don't have access to kernel I have to do it as a super user and then use dmessage which would make system calls to the kernel it says hey I want to read your buffer right so if I do that I put bash l info because I only care about seeing info messages if I do that I see a bunch of crap that happened when I booted and then my message right there so my message so that is kernel mode right so I could have written a bunch of stuff there but the problem with writing kernel code is it's kind of a pain in the ass right even to figure out how to print stuff there's no terminal there's no anything so I have to use printk you have to kind of look up documentation get used to it yeah so the question is could I kill a knit here finally finally kill a knit people want to kill a knit uh... yeah you probably could can I uh... I don't know what the call to use is you could but and then to remove the module I remove module hello if I look at that see now my code exited and that's that's it and we can even you know see when we install our module we could even s trace it to see you know what's actually going on we expect you know it's not going to print to standard out or anything but we can see the system called actually inserted into the kernel so if we look at that there's just a bunch of crap and uh... so this is the kernel module here it opens it up file descriptor three we see the normal l file so it's a good thing we learn what that is so it's just some code and then it's this call right here at the nip module that loads it into the kernel and then the kernel takes over from there and then it would just start executing it so that shows are clear separation between kernel mode and user mode so any questions about that fun stuff so this is how you actually write kernel code it's like not special the only thing that special about it is what mode it runs in so cool we we all know how to write kernel code now but this like super illustrates that kernel mode and user mode like they don't even really look that different it's just a CPU mode on your hardware and it's like clear boundary right so printk that is a kernel internal buffer if i try and run this in user mode that not even doesn't even compute right it's running a completely different thing the kernel doesn't exist in user mode it only exists in kernel mode so any of these calls any code you write it's not going to work which is also why debugging it is a pain in the ass so i don't have gdb anymore i don't have uh... yeah i don't even have a standard c library like what you do you don't have malloc right the kernel needs its own malloc of course because you don't have c and who has to implement the mechanics behind malloc the kernel right yeah so questions what's the underscore t in like in all the definitions it's just a shorthand for type so it's just a way that because typically you want to the whatever is at before the dash t is the name of the thing and you'd actually want to use that name and if it was just called that without the dash t you couldn't use that name anymore because the compiler would get confused so they just throw dash t to say that it's a type and not an actual variable or something yeah so that yeah so yeah so sometimes too there's all different conventions sometimes you can call a struct something else that doesn't have struck in front of it sometimes it'll have struck in front of it that's like just random c things you can do and that kind of depends on you like you can get rid of the struck keyword if you want in the kernel they want the struck keyword always there so if you try and contribute code to the kernel and it doesn't say struck on it you try and hide your struck they'll yell at you and the links current developers will yell at you if you do something wrong but like in a kind of nice way alright any other questions about the quiz or anything yeah mm-hmm the read write the thread woke up before it went to sleep true yeah it's still a problem yeah so because the guards unlocked here I could get a wake up before it sleeps second card yeah yeah I have to look at how they I think that came up before yeah but yes there would be an there's still an issue it'll happen less frequently yay yeah I have to double check that alright any other questions for quiz one the simple quiz yeah lab lab two is harder than my OS labs were by a fairly long shot I don't even remember what my OS labs were in undergrad there's one where we like uh... did a buffer overflow attack on the kernel that was cool but other than that I don't remember any of the other labs I'm gonna look at what the other course did uh... because they did some set contact stuff so I might do that Monday just to help with lab two and plus we're like they're gonna take at least two or three lectures to catch up to us on like fork and p-thread stuff so we got time oh no I mean I guess we'll see we'll see after quiz one if you guys do better than guess yeah so I guess on that uh... yeah hopefully we do good on quiz one but if there's like forks and stuff we we can do pretty good I think pulling for you we're all in this together


The internal wrangling within the People's Democratic Party has heightened, even as a river state governor Newsom Weke has stressed that he can't be killed no matter the intimidation and the threats. Weke also accused PDP Big Weeks of striking a deal with President Mohamed Buhari to win his reelection in 2019, adding that river state has contributed the most to the successes of the PDP since 1999 and has not benefited anything from her dedication to the party. In 2019, I went to negotiate with Buhari. That's what Buhari won a election. They came to me and said no, no negotiation. PDP must win. I said no. Those of them who could not stand, when I see them talking to the opening their mouth, those of them who make sure that PDP never survives in 2015, that destroyed PDP, I see them today, they're opening their mouth. Those of them who left this party are today calling us boys, the boys that stand back and keep the party.


tax benefits from it if you call it a disease and like and it goes it's a mess. Any case, as the HSA account beneficiary you can pay these expenses for medical care for yourself, your spouse, and your dependents. So even though non-prescription medicines other than insulin do not qualify for medical and dental expense deduction, they do qualify as expenses for HSA purposes. The cost of menstrual care products, tampons, pads, liners, cups, sponges, or other similar products, that made me a little uncomfortable to read that whole thing, are also reimbursed for HSA purposes. So amounts you pay for personal protective equipment such as masks, hand sanitizer, and sanitizing wipes for you, your spouse, and your dependents for the primary purpose of preventing the spread of COVID-19 are treated as medical expenses. The cost of home testing for COVID-19 for you, your spouse, your dependents is an eligible medical expense. Okay you cannot treat insurance premiums as qualified medical expenses unless the premiums are for long-term care. So now we have the qualifications of health insurance which gets again kind of tricky because you have basically you know the general health insurance which might be your high deductible plan that you're in but if you go over a certain age then you have the Medicare kind of system that might be then the normal kind of insurance and then you have the long-term care insurance which is generally thought of as of insurance against being basically like needing full-time care of basic kind of things which is kind of a whole another thing in and of itself. So health care continuation coverage such as coverage under COBRA so if you leave your job and you have continuation coverage the COBRA is supposed to help so you don't lose the insurance and then possibly need to purchase it again in which case it sometimes could be difficult to do possibly because of preconditions and so on. So health care coverage while receiving unemployment compensation under federal or state law or Medicare and other health care coverage if you were 65 or older other than premiums for Medicare supplemental policy such as Medigap okay high deductible health plan and HDHP high deductible health plan is a is a health plan that meets the following requirements. So you have the minimum annual deductible so for the self-only $1,500 for the family $3,000 and then the maximum annual out-of-pocket expenses $7,500 and $15,000. So a lot of times when you hunt down the plans they're they're more pretty explicit about whether they qualify or don't qualify say as a high deductible plan but there's that technical kind of qualification for it. Figuring your HSA deduction the maximum amount that can be contributed to your HSA depends on the type of high deductible health plan coverage you have if you have self-only coverage your maximum contribution is $3,850 if you have family coverage your maximum contribution is $7,750 note if you are age 55 or older at the end of your tax year you can make an additional contribution of $1,000 your maximum contribution is reduced by any employer contributions to your HSA any contributions made to your archer MSA and any qualified HSA funding distributions you can make deductible contributions to your HSA even if your employer made contributions however if you or someone on your behalf made contributions in addition to any employer contributions and qualified HSA funding distributions you may have to pay an additional tax so you cannot deduct any contributions for any month in which you were enrolled in Medicare also you cannot deduct contributions if you are someone else's dependent for 2023


In Silicon Valley, if you said I like Bitcoin, you were ostracized as a conservative closed-minded individual, which is absurd.  Satoshi purpose-built blockchain tech to build Bitcoin.  It's terrible. It makes so many trade-offs to build Bitcoin that it is basically ineffective for almost anything else. What's up, YouTube? My name is Giovanni. Welcome to our show. Today with us, Dan Held, Head of Business Development at Kraken. How are you doing today, Dan? Doing well. Thanks for having me on. You have been in crypto since the very early days. So you said since 2012, and you were hanging out in the very first crypto community in San Francisco in early 2013. So for me, it's very interesting to know how was the atmosphere, the environment back then, and how you compare it to the situation in the crypto industry today? Yeah. So back in 2013 in San Francisco, San Francisco is the tech hub of the world. And even in San Francisco, the Bitcoin community was only like a dozen people. So it was at 20th and Mission Street was the building where we all met. Very rundown, a lot of graffiti on the outside. That's where all the Bitcoiners met in San Francisco once a month. And there was like Charlie Lee, Brian and Fred from Coinbase, Jed McCaleb from Ripple and Stellar. And there was like a 12 of us, including these individuals, and a cooler of PBRs, which are a very cheap beer in America. And it was super exciting because in March 2013, that group was 12 and it went to 120. So 10 X and that people forget that there's two bubbles in 2013. There was the March 2013 bubble and the December 2013 bubble. So that was an incredibly exciting time to be part of Bitcoin. For sure. And I also know that you were using the very infrastructure available at the time, like you were sending money to Mt. Gox, for example, which was, I guess, one of the few exchanges available at the time. And you were using the very first wallets available at the time. So how was the experience in using that infrastructure compared to the infrastructure we are available right now? Yeah, that's kind of a fun walk down memory lane where, you know, I'm not a technical guy, I've been in a product role, but I'm not an engineer. But back when I got into Bitcoin in 2012, it was almost all the engineers. And so Bitcoin QT was the first wallet that I had, which was a full, it's the software that Bitcoin Core produces to be the default Bitcoin Core wallet. It's also a full node. So, so I'm, you know, I'm using Bitcoin for the first time. And I'm like, why do I have to wait for this thing called the blockchain to sink? So it was extremely onerous back when I used it. It was really complex. I didn't know what public private keys were. There was no really good documentation on how to explain what they were, how to store them. People forget as well that mnemonics, the 12 to 24 word seed that you write down is actually a new technology that didn't exist back in the 12 and 13. So, you know, when you print it off your private key that was on paper, you know, do you delete the file on your printer to make sure that there's no other copy of it? You know, writing down the private key is kind of dangerous because it was so lengthy. And there's so many different characters versus like the 12 to 24 word mnemonic, which is much more human readable. And so, yeah, it was really, I mean, a lot of people back in that time lost their bitcoins due to private key management issues. You know, the mantra, not your keys, not your coins is a great mantra if people know what they're doing. And I've seen a lot of instances where people didn't know what they were doing. And so, you know, it was pretty hard not to lose your Bitcoin. Yeah, it was really difficult because it was so hard to hold on to it.  I mean, it's one of the most scammy spaces out there, right? So, trying to just hold your bitcoins, not invest in anything, not trust anyone else with your private key, but also not trust anyone, you know, not fully trusting your own storage method was kind of a source for a lot of anxiety. So, you know, that was kind of a huge issue. And then, I mean, there's, there's definitely another type of future alternative reality where some things didn't go to plan and Bitcoin actually died.  So I think like now we're so robust and so strong that it would take, I'm not sure if you can really kill Bitcoin.   A lot of people thought miners were in control of the protocol, which doesn't make much sense. They're more of the hired guards. So people are much more understanding of the political dynamics of how Bitcoin and blockchains work governance-wise. So I'm super thrilled. I'm surprised. I was frequently surprised that Bitcoin survived. It went through a lot, but it did survive, and that makes me more bullish than ever. I know that you sold ZeroBlock, the company that you created, for Bitcoin at the price peak in 2013 when Bitcoin was worth $1,200. Then two years later, Bitcoin was only worth $200. So a lot of people after an event like this would have been so disartinent that they would have walked away from Bitcoin forever, I think. What went in your mind when you saw Bitcoin price gradually collapsing to that bottom? And what gave you the motivation to stick around? Yeah, I mean, to be frank, it was very depressing to see something you built and you sold for this new currency. Bitcoin, to see that fall 85% in value and still hodl required a immense amount of belief. That's where my belief was somewhat irrational. It was this pure belief that, hey, we're trying to do something here that's like the importance of it is huge. And I knew that all it took was like another speculative bubble for this all to be reinvigorated and to be rebuilt again. And a new 2008 financial crisis macro backdrop like COVID would also be a catalyst as well. So I hodled on and saw it through. Yeah, I guess that you got hard skin now to face the following crashes. You already got through the worst part probably.  So yeah, I think I have sort of the, I feel like a battle hardened troop. So, you know, I think after Bitcoin will be so battle hardened that any other investment after this will just feel very, very, I think very easy to handle. Listening to a recent interview, you disclose that you have 90% of your net worth in Bitcoin. So that's even more risky than Anthony Pompliano's portfolio of 50% of his net worth in Bitcoin. And a lot of people consider that to be madness. Don't you think that this kind of investment is a bit too risky? And what are your thoughts in general about portfolio construction? Oh, yeah, I definitely wouldn't recommend my portfolio construction for most people. I think it is a very risky setup. If Bitcoin were ever to completely fail or the every Bitcoin across the world started stopped believing in it, the value would drop down tremendously and my net worth would drop tremendously as well. I think people also forget that, you know, I haven't been buying nearly as many Bitcoin as I bought in the early days, because that would only add very small incrementality to my Bitcoin stack. So, you know, I still have traditional investments. It's just the value of my Bitcoin has grown so much in relation to my traditional investments that it's still, you know, it's a very high percentage, but it's not like, you know, I'm still contributing and investing in other things. Everyone has their own risk profile, whatever you decide to allocate, I think is largely dependent on how much risk you could stomach.  You know, but if you're 22 years old and 25 years old, you only put in 1%, I also think that's a little low for your age group in the risk that you're taking. Bitcoin has very asymmetric returns. So, you know, risking 10% of your portfolio when you're young is easier, because if you have a loss, like, say Bitcoin goes to zero, which I find very improbable. Let's say it goes to zero, then you've only lost 10% of your portfolio, but if it 10Xs, you've now doubled your portfolio, basically. So I think the risk is very much dependent on the person. There's very much personal risk, very much goal oriented. So when you enter any investment, you should have an investment thesis. Mine was that Bitcoin could be a contender for goal 2.0. And if that occurs, then Bitcoin's market capitalization should be something massive, and the trillions or tens of trillions. And so Bitcoin is much smaller than that. And so I entered with that investment thesis in 2012. And we have not seen Bitcoin achieve that yet. It is getting closer and closer.  But essentially, you enter the investment with the idea of I'm entering this because of this reason, I'm going to hold it for X amount of time. After that X amount of time, if it reaches that value, I will take X% off. So it's about having a structured approach to any investment strategy is the right way to go. Always thinking about what risk you could stomach. Bitcoin has a high amount of volatility, a lot of risk, a lot of reward. Yeah, and talking about this volatility of Bitcoin, which is what most people are attracted by. So you also said that volatility is probably one of the main reason why people got massively into Bitcoin. So don't you think that for Bitcoin to succeed in the long term, probably reaching this goal that you were talking about, this volatility will have eventually to disappear? Gradually? Yeah, I mean, Satoshi hypothesized that Bitcoin, that the volatility of Bitcoin would bring in more people. He even says before Bitcoin ever had a price, Satoshi hypothesized that as the price increases, more people become aware of it and buy in anticipation of that value increasing. He's describing FOMO. Volatility is a good thing for Bitcoin. Every asset is volatile out there, this whole misnomer of volatility. Have you ever heard of something called markets? Like everything fluctuates. Bitcoin's going to fluctuate quite a bit because it's going from $0 to a World Reserve currency with no central bank, no investment bank and no institutions buying, essentially buying into it for most of that journey so far. As Bitcoin matures and becomes larger and larger, and becomes more and more liquid, we should see that volatility slowly drop over time. Now, a lot of people perceive a good store of value as being price stable. It's actually antithetical to that. So gold, the world recognized 4,000-year-old store of value, does not have a stable purchasing power because it is not centrally controlled. There's something to have a stable purchasing power requires it to be centrally controlled. So inevitably, gold and Bitcoin will always have some amount of volatility that is higher than one type of asset that has artificially dampened volatility. But what you see with that artificially dampened volatility is you have like 2008 and COVID where the dampen it, the dampen it, and then it explodes. So Bitcoin, in its final stages where it hits, let's say, who knows what it is, but $5 trillion to $100 trillion of value, at those sort of stages, Bitcoin becomes something very, very boring. Again, it's a safe haven asset. It's a gold 2.0. No one buys gold because they're like, oh dude, gold, totally that's going to 10x. No one does that because gold is very stable. It's old. It's a safe haven asset. Bitcoin in its final stages, decades from now, will be something very boring where like our grandkids will go, grandpa, grandma, I don't want to hear about Bitcoin. Everyone's got Bitcoin. Who cares? It's a boring investment. It's like holding cash. Like cash doesn't earn you much. It just stays there. So I think that's what Bitcoin will evolve into as it becomes the moving from a store value exclusively to a medium exchange and unit of account. So those final stages of money, it'll stabilize and become very, I would consider very, very boring from an investment perspective. Talking about future scenarios, you often say that price is very important for Bitcoin to succeed. While a lot of people usually say, oh, don't pay attention to the price, it's important to pay attention on fundamentals and adoption, etc. Don't look at the price. So why do you think that actually the price of Bitcoin is so crucial for it to succeed? Yeah, this is a great question. A lot of people, as you mentioned, see that, oh, don't worry about this. The price is just this sort of fluctuation that is somewhat immaterial. But when you look at how Bitcoin is constructed, the price is everything. It breeds life into Bitcoin. So Satoshi, like I said earlier, hypothesized that FOMO would essentially create more adoption for Bitcoin. The price plays a very important factor. Not only is it a signal for relevancy and attention, so as the price goes up, more people become aware of it. That also increases liquidity. So there's deeper and deeper pools of buyers and sellers, which then enable more participants to come in. Also, as the price goes up, you have a largeable, total addressable market so people can build more products and services to service Bitcoiners like wallets and full nodes and block explorers, etc. And then finally, Bitcoin's long-term security or Bitcoin security model, so Bitcoin proof of work, the miners expend capex and op-ex, so they buy mining equipment and they consume energy, and then they're rewarded with something called the block reward. And that block reward is comprised of newly minted Bitcoins and transaction fees. So the price very much influences both of those, essentially the value of the reward that miners are getting to secure the network. So as the price goes up, the value that is given to the miners and the block reward and the form of the block reward goes up as well. And so what that means in layman's terms is that as Bitcoin's price increases, its security increases too. So this is very important because as Bitcoin's network effect gets larger, as the price attracts more and more people, it will further threaten governments and it will further threaten existing institutions and their complete control over money. So as it grows larger and poses more of a threat, it becomes more secure. And this is all a function of the price. So the price is I would say the singular most important thing to pay attention to. Does it matter if it fluctuates 10% a week? That's kind of a whatever, you know, we should zoom out and look at how it's trending over months and years. That's kind of the important thing to think about. And I think now is still a great time. Bitcoin has only like 160 to 180 billion market cap in the day. I mean, that's still tiny compared to gold, which is 10 trillion. So you know, it's still very young and the price very much reflects the aggregate belief, aggregate belief, security and aggregate number of hollers in Bitcoin. Talking about other projects. So apart from Bitcoin in the crypto space, you consider, I mean, you have a pretty Bitcoin maximalist position as far as I understand. And you also said that it's time now to stop to stop experimenting with with altcoins. Why do you think it's time to stop developing altcoins? Yeah, so I would define myself as a Bitcoin minimalist. I think a maximalist is a maximalist was a term created by Vitalik Buterin, the founder of Ethereum to marginalize Bitcoiners. So I don't really prefer that term. I prefer Bitcoin minimalist, which means I very much prefer the most minimal amount of architecture and the most minimal number of chains in order to solve the problem of having to sound money. So when we look at Bitcoin, a lot of people go, oh, how about this thing called blockchain? You know, couldn't we take this tech called blockchain and repurpose it for everything? We'll put a blockchain on the moon, we'll put a blockchain on food, we'll put a blockchain on industrial stuff, even to sprinkle it like a salt like salt bay sprinkle some blockchain dust on it and it'll magically give off some efficiencies. Satoshi purpose built blockchain tech to build Bitcoin.  It's terrible. It makes so many tradeoffs to build Bitcoin that it is basically ineffective for almost anything else. A good analogy is like if Satoshi built a tank, yes, you could take that tank and you could pick up passengers and drop them off. You use it as an Uber. You could take that tank and you could use it as a tractor to plant gardens. Did you special purpose build that vehicle to do that? Not really, so you could, but it would do it really poorly. And so Bitcoin, the blockchain tech was special purpose built to build a new sound money, Bitcoin. When you look at the security model of how Bitcoin and every other blockchain works, which is the block reward function, you'll quickly notice that anyone who's ever dug into this more than 10 minutes quickly notices that as the subsidy, so the newly minted coins of any new blockchain, as the newly minted coins decrease over time, transaction fees have to replace the subsidy. That's why it's called the subsidy. It subsidizes that future transactional volume on chain that will drive the fee revenue that will incentivize miners properly. There's only two chains that have any meaningful transaction fee volume. That's Bitcoin and Ethereum. And those are the only two trending at all in the right direction. I mean, we're talking like in magnitudes of like 100x or 1000x. The other chains simply won't have any security at the end of the day because no one's really using it. And so to move value, to move large chunks of value, to be a settlement layer. And so when you look at that, you're like, wait, so it was only been like, so really money is the only thing that's been validated as a use case after 10,000 experiments over eight years and tens of billions of dollars being deployed and hundreds of thousands of developers. I mean, we don't need to run more experiments. We've already invalidated that hypothesis that could be used for other things. So many times, what is running another 100,000 or 10,000 experiments going to do? So talking about Ethereum, you seem to be a very big critic of Ethereum and the defy space around it. Even if you admit that Ethereum along Bitcoin is one of the few examples of successful altcoin, you still say that Ethereum has might have not protocol market fit. So can you explain why are you so critical towards Ethereum and the defy space?  Vitalik came with the word Bitcoin Maximalist and marginalized Bitcoiners. I live in Silicon Valley, and the Ethereum narrative was so strong that Bitcoin was old and conservative, like you were a Trump supporter, and that Ethereum was hot and new, that dichotomy was so strong out here that you were persecuted to believe in Bitcoin. In Silicon Valley, if you said I like Bitcoin, you were ostracized as a conservative, closed-minded individual, which is absurd. I mean, to be honest. When exactly was that? 2016, 2017, 2018. 2019, as Ethereum dropped massively in value, that narrative finally unwound as people realized Ethereum wasn't going to be able to achieve these things, and Bitcoiners were fully justified in their right to fight against being persecuted, and also Bitcoin being goal 2.0 is the primary use case for blockchain tech.  I'm very cool with, look, I fly drones for fun, I'm getting cryo-preserved when I die, and I'm a weird libertarian type living in San Francisco, formerly Texan. I have a lot of different things, I'm not this closed-minded, and I also mined Prime Coin, day-traded Litecoin, I've bought and sold Ethereum before. I'm not this guy who just sat in a hole and emerged and was like, I only like Bitcoin, but that's how they're painted, is that Bitcoiners are these conservative individuals, but in fact Bitcoiners are the most rational heads in the room, just going, hey guys, I don't think this is going to work, and I think it's kind of unethical to have tens or hundreds of billions of dollars behind you when you know it won't work. So Ethereum started out and marketed on the Ethereum.org webpage as a how to run unstoppable programs or unstoppable applications or a world computer was how it was marketed. That eventually manifested into a DAP platform, which very much fit the Silicon Valley understanding of app and platform. Boom, what if this is the decentralized version of that? And so Ethereum was perfectly marketed towards the Silicon Valley community. Vitalik is a genius, genius marketer, one of the best marketers I would say in like this century, absolutely brilliant, because he marginalized Bitcoin, polished Ethereum to be this perfect narrative for Silicon Valley. And so Ethereum has gone through a couple different narratives, world computer, DAP platform, fundraising platform. We saw all those decay over time as none of them found protocol market fit. I mean, you don't need the experiments, the experiments to be in such high number and length and value behind it to, to reject this hypothesis that all three of those narratives are incorrect. So we're then left with what is it? Well, what does Ethereum do? And we've seen the Ethereum community pivot to Ethereum is money, which is pretty bizarre because they've called it oil and DAP platform, fundraising platform, everything else. But as those narratives collapsed, they then pivoted to sound money. That Ethereum is also a money. Ethereum is a goal 2.0. And so they're trying to pivot to take advantage and ride on top of Bitcoin's narrative, which is very, very perfect and very much aligned with the current macro backdrop with COVID and Bitcoin going, you know, just completing the halving, now about to go through another bull run, they need to append themselves to Bitcoin's narrative in order to write it as these other narratives have decayed and fall apart. So if we can just conclude on a positive note, I will just ask you very quickly what you think, what do you see Bitcoin in 10 years from now? So you've been in the space since 2012, and you have been seeing the whole space evolving like this. Do you expect the same curve to continue at the same pace in the next 10 years, or you expect a more slow growth or a faster growth? That's a great question. I think we're poised for another bull run. If we look at historical markets, we look at how the historical cycles, if we look at post halving, what typically occurs, you know, if you take that combined with the macro backdrop of COVID, the highest unemployment like a century, you know, this is a very fertile ground for Bitcoin to have a very tremendous bull run. In this bull run, you know, where does the price land? Does it continue upon a normal cycle? Is it a super cycle, where it goes much higher and larger than usual? I'm not sure. I think this one versus other cycles will be much stronger, I think, because we will have institutional money flowing in. We'll have much more developed architecture, much better marketing. Bitcoin was largely a very, very niche community up until this last bull run in 2017. You know, I think that this is a much, much, much different scenario where we're about to see what happens when the whole world wakes up to Bitcoin and all the institutional money, hundreds of trillions of dollars. And if they become afraid that they will be able to preserve wealth over time, then that hundreds of trillions will flow into Bitcoin. And so I very much think that, you know, Bitcoin has gone through a couple of cycles during largely one of the largest bull, you know, during one of the largest bull runs in the macro environment. So now we're seeing a moment that Bitcoin is built for, you know, when the markets aren't doing so well. And when we have all the institutional pipes plugged in, so we could very much see Bitcoin go through what I would call like a super cycle. So a lot of people are predicting Bitcoin goes from 10,000 to 100 to 200, 300. What happens when the whole world wakes up to Bitcoin's value crop, being this decentralized store of value that's not seasonable? You know, socialism rises, if taxes rise, I could see tons of people flowing trillions and tens of trillions of dollars in Bitcoin. So Bitcoin might not just stop there, it could go to a million. But look, who knows where the price is going to go? Like I said, when it was $10, we weren't sure how long it was going to take. But I do think that Bitcoin was a special purpose built for this moment. And that everything is lined up, everything's in place. That it's, I think, you know, it's the best chance it's ever had at achieving that goal, 2.0 status over the next, you know, four to five years. Awesome. Thanks a lot, Dan. That was cool. That was an interesting conversation. Yeah. That was Dan Held, head of business development at Kraken. And you guys, if you enjoyed the interview with Dan, don't forget to smash the like button and subscribe to our channel.


In this episode of Mind Pump the World's Top Fitness, Health, and Entertainment Podcasts, we talk all about high intensity interval training. We're in the summer. That means most of you are really interested in peeling down those fat layers so that everybody can see you're sculpted and amazing body. Oh yeah.  Every time. So hit training. You're welcome, Ms. Johnson. Very effective. Unfortunately, most people do it very wrong. If you do hit training wrong, you're not going to reap the benefits of it. So in this episode, we talk about the things that you should focus on to make your high intensity interval training super effective. Also, this episode is brought to you by our sponsor, Felix Gray. Now Felix Gray makes some of the best blue light blocking glasses you'll find anywhere. One of the reasons why we like them so much is the Felix Gray glasses don't change the color of the room. They're not orange or red glasses. You don't look weird. It doesn't make your food unpalatable. Palletable. You guys ever try eating food with red or orange glasses? It's weird. The Felix Gray ones are relatively clear, but they still block a great deal of blue light. And wearing these glasses a couple hours before bed improves your sleep. Studies prove this. If you walk, if you work on a computer all day long, it'll also prevent eye fatigue and help with concentration. Anyway, we have a mine pump link if you want to go check them out, go to Felix Gray glasses.com. That's f e l i x g r a y glasses.com forward slash mine pump. And you'll get free shipping and free returns. Also, this episode is all about hit training. We have a high intensity interval training program that we created ourselves. All you have to do is enroll, go online.  Everything is spelled out and done for you. So all you got to do is follow the program and you'll get remarkable results. It's a home gym friendly workout as well. A barbell, dumbbells, you don't need lots of equipment. That's pretty much it. And you can do the whole hit workout. Now this whole month, we're putting that program 50% off, half off. So here's how you get that discount. Make sure you pay attention. Go to maps hit.com. That's M A P S H I I T.com and use the code hit 50. That's H I I T 50 no space for the discount. Boys, we are officially in summer. Oh, it's hot. All them sexy bodies are coming out now.  It's bikini weather, Justin. Oh, it is. That's right. Wow. I better wax my kids two piece ready. What did you say wax your cakes? Yeah, get rid of all the hair. That's gross. Yeah. No, this is when everybody really pushes hard to typically get leaner for sure. You know, when I was growing up, cut season was right around summer bulk season crunch time right now. Yeah, show it. And so I think it's, you know, it's important we talk about some of the most effective exercise ways to burn body fat. Now one that pops up a lot is high intensity interval training. Studies show that with shorter periods of training, high intensity interval training, also known by its, you know, its acronym hit burns as much body fat as other workout, you know, styles in shorter periods of time. In other words, you could do 20 minutes or 30 minutes of a hit workout and get similar results to a 45 or 60 minute, you know, other type of workout. I remember too, when the first, early 2000s, early 2000s, I remember too, I remember being a personal trainer and, you know, coming across the first bit of research that was done on hit training. And like usual in our space, that's right away, just then it would turn into a trend then for probably, I don't know, a couple of years there, I'd say that's how you saw almost all the trainers in the gym. We're now trying. Oh yeah, you saw that and then you saw these different variations of like time signatures and different cycles, Tabata type of hit. So it just, it evolved into a lot of different forms of it, but that became like the gold standard of how to train everybody. Right. Now we've talked about this many times on the show, but I want to kind of restate it. You know, cardio type exercise does burn a lot of calories. It actually burns more calories in the time being spent than resistance training type exercise. But that's not the whole story, of course. You want to, with resistance training, you actually teach your body to burn more calories on its own.  With cardiovascular type training, you tend to teach your body to become more efficient with calories. In other words, you slow your metabolism down, which can make fat loss and maintenance much more difficult in the long term. One of the biggest challenges I see with hit type training is that people use it with cardio and they don't use it with weights. I think you can utilize the effects, you know, the benefits of hit training with its calorie burn, but also mitigate the metabolism slowdown effects that you can get from lots of cardio. So a lot of people don't know this, but you can do hit training with weights and you can do hit training with cardio. Both of them are a bit different. Hit training with cardio looks, you know, like this. I'm on a treadmill and then I'll sprint for, you know, an all out sprint or whatever for 15 seconds, 20 seconds, and then I'll do a slow jog or a walk for a minute or so. Get my heart rate to come back down. Or you just see a ton of burpees followed by jump squats followed by, you know, anything else that will just like exhaust you immediately calisthenic wise. So it's a smash it all together. The real benefits that come from this is it's the variation of the heart. It's the hard spike to where you reach close to your maximum heart rate and then it's the recovery time to come back down and then it's the returning back to that. And I think the idea is that because it's not high intensity training for a long duration, you're not sending that same signal to your body that you're doing cardio purely for a half hour or hour because you're allowing the heart rate to come back down and then spike up again. I think that's where the muscle sparing piece to this comes. It does, but it gets even better when you do your hit training with weight. So rather than doing the cardio aspect of it or version of it, use weights where you may, and it kind of, it resembles a circuit, right? Similar to a circuit. You're going from one exercise to another with minimal rest, getting your heart rate up, then you take a break like you would with hit cardio, allowing your heart rate to come back down and then you repeat the cycle. Now, why is that better than doing hit training with cardio? Well, first off, when you use weights, remember, weights are extremely versatile. There's a, there's a, you know, hundred different exercises per body part on my body with weights and resistance. There's, uh, I can train my body very specifically to what it needs. If I have forward shoulder, if I have a particular, a particular posture, you know, issue, if I have pain in one area, if I have overdeveloped quads and underdeveloped glutes, you know, if I want to build aesthetics in a particular way with weights, I can mold and modify my routine. The other thing too with weights is if you do a good hit routine with weights, you are training yourself in a very balanced way. What does hit training look like with cardio? The same movement over and over again, you're doing the same patterns over and over.  I'm, I'm, I'm sprinting, but I'm doing the same thing over and over again. And that can turn into, you know, muscle imbalances and injuries. Um, and it doesn't send a muscle building signal. Now, to be fair, hit training with weights doesn't send the loud muscle building signal that you're going to get with traditional resistance training, but it definitely sends more of a signal than hit cardio. Right. That's for sure. And why is that important?  Most of us don't want to lose muscle. We just want to burn body fat. And even if you don't care too much about how much muscle you have, you probably care about the fact that when you do lose the weight that you're looking to lose, that you don't end up having to maintain that weight with super low calorie diet.  Well, I also think it's a safer form. I remember, you know, programming this for clients that were, you know, above the age of 40, 50 years old and, and doing these, you know, circuit based type of routines. And the traditional thing that you see a lot of people is battle robes, jump boxes, a lot of dynamic plyometric type of movements to get their heart rate up. And quite frankly, most of my clients that were above the age 40 had no real business doing something like that just to elevate their heart rate. So I would way prefer to take a pair of dumbbells and do bent over rows with them or shoulder presses or squats, to get their heart rate elevated and hit that max heart rate before they come back down, opposed to jump boxes where there's a much higher rate of injury. So, and that was one of the biggest things that as a boss of trainers that were doing this for probably a few years, because it was so popular, you know, I started to get more and more of these clients coming with injuries and aches and pains with their joints. So that's one of the things that you have to take into consideration when, when you're training this way and you're using things like plyometrics or purely cardio to get the benefits. There's definitely a risk versus reward to all this. And that's why exercise selection is a very important piece to all this, if we are to include weights and to make sure that you are performing these with, you know, good form because you're still teaching your body this skill. You're teaching your body how to respond to this type of a movement and we don't want to teach bad behavior because that's what you're going to carry with yourself, just trying to get through the reps. Yeah. Now, when Justin says bad behavior, what he's talking about is your technique. Yeah. If you train wrong, you get good at training wrong. What you train gets stronger. The pattern that you practice is the pattern that becomes your default pattern. Here's the other reason why the, you know, those hit routines don't work really well when they're doing, like you said, jump boxes and jumping jacks and burpees. Those movements do have some value when used appropriately. Jump boxes, if you do them in plyometrics correctly, you build lots of power. When you're just jumping up and down on a box, it doesn't matter that you aren't jumping on a box, you do something else. You're just getting your heart rate up. Yeah. Well, I mean, even burpees, I remember it's funny because we've kind of clowned on burpees a little bit. Well, mainly because what you see when people start to get fatigued, they're, they're hip sag, they, they smash their whole body into the ground.  Whereas there's a way to do it where you can still maintain composure and, you know, get, get your body to do exactly what you want it to do in the movement. Right, right. So weights for hit training are superior. Of course, put together a good balanced routine because you are still getting a little bit stronger.  Again, it's not a pure strength training routine. It's more of a calorie burning routine, which is phenomenal in the short term. But with weights, you're still sending somewhat of a resist of a muscle building signal if you do it properly. So also the exercises you put together, make sure they're balanced, make sure they're not all pushing or all pulling or all squatting. Right. Well, there's also a lack of emphasis on mobility. I mean, that was the big problem. That's a big thing that I saw was when I look at all the programming done on this, if there, I mean, mobility belongs in, in every routine, no matter what your goal is. I don't care who you are. It's just how much of that, it just depends on how bad you need it. But it belongs in every program. It especially belongs in something like high intensity interval training. Oh, yeah. If there was ever a time that you needed to make sure to incorporate some sort of recuperative thing for your joints and your body, it would be when you're training at a high intensity. This is the biggest knock on high intensity interval training. It puts so much force and sheer forces on the joints like that you have to account for and to, to not have in place a plan to fortify those joints and to maintain the health of, of and function of the joints is going to be to your detriment 100%. No, that's totally true. Cause the one of the biggest weaknesses of this type of training is injury and poor patterning, poor recruitment patterns of the muscle. By the way, recruitment pattern just refers to the order and the way that your muscles fire. Remember your muscles move your body and there's an ideal way that they can fire. And then there's less than ideal ways that they can fire. And when you do this, when you have them fire in less than ideal ways over and over again, that's when you start to get problems. That's when you start to get pain or at the very least here's the other thing. Maybe you don't have lots of pain, but your body's pretty smart. Your body will actually prevent you from improving because it's afraid to let you get stronger. Okay. So let me repeat that again. Your body has safeguards that help prevent you from hurting yourself. In other words, your body's always trying to only let you be as strong or exert as much strength as it feels it's safe to do.  In fact, one of the ways I've ever, that whenever, whenever I've trained advanced lifters, one of the ways I've always got them stronger was just on helping them with mobility. All of a sudden I got that weak link out of the way and, you know, their bench press was stuck at whatever pounds for a long time. And I got their stability a little stronger on their shoulders. Next thing you know, they went up 10 pounds just from doing that. So mobility should be a very, it should be part of any routine, but especially if you're training with a high level of intensity, it should be a part of your work. In fact, you know, when we did our hit program, we put flow sessions in there specifically for that, specifically because you know, when you do the, even, even though we work, we did program the workout ourselves and it's a great workout because of the intensity involved. I mean, hit training is the only type of resistance training that intensity is part of the name, right? High intensity interval training. We knew because of the way it needed to be performed, that mobility was imperative because either the people following the program would maybe hurt themselves or they just wouldn't get the results that they could get because their mobility was preventing them from getting it. Well, I just, don't you guys remember, I remember when it, when we first started doing it like crazy, you know, over a decade ago, and shin splints, knees bothering me, low back issues, hip issues, like they also, I, you know, I remember this too when I got involved with orange theory, you know, about five, six years ago, very similar. Now they, they aren't exactly hit training, but very similar. They use these zones where, and they have like block, what they call blocks, where they want you to push and you go all out. And when you go all out, you're sprinting on the treadmill or you're sprinting on the rower. And so they have a piece of hit training involved in it. And there is no attention towards mobility training.  You know, if you, if you're just halfway making an effort at eating better and doing it at the same time, most people are going to see somewhat of a change in that first four to six weeks. But here comes the hard plateau after that, you know, they've been pushing their body that hard for a while, they've seen kind of results. And then now here comes all the tightness. Oh, out of every day after class talking to somebody that has shin splints or, you know, I don't understand why my knee is bothering me like crazy. I can't do the squat part. I can't do that part now of the routine.  So you have to, you have to just know that going into it. Like if I'm going to turn my intensity up, now I got to really pay attention to my recovery process. And by the way, mobility done properly is kind of a workout. It's not a waste of time.  I mean, again, in our hip program, we have what are called flow sessions. Flow sessions, you are moving through mobility poses, you're going to get a workout. It's actually part of your routine and your workout. And the reason why I'm saying that is I know I have to sell it to people who, you know, young people, right? Well, especially people in this mentality, I just want to just murder every workout. It's awesome. You will get faster results with proper mobility added to your high intensity interval training program. We also have to talk about the people that are that appeal to this. And that's, you know, this takes some self-awareness, right? If you're somebody who loves this type of training, you know, you need to reflect and ask why, you know, in my experience of training clients, more often than not, it's the type A personality. It's the go-getter. It's somebody who's already running at like high levels, stress all the time, go, go, go, that they want that extra hard push because they need that to feel like they did something or accomplished something. And to be quite frank, these are the people, these are the worst people for this. That's right. These aren't the people that should be gravitating towards that.  It was like, listen, if there's going to be people that are still going to go out there, do this, even though it's not the best thing for the body, at least at the bare minimum, be, take care of your joints. Right. Now, don't make no mistake.  Nothing burns calories faster and nothing causes a faster fat loss in a four week period of time than hit training. It is. Here's the second. Here's the next part. I said a four week period of training, you got to keep it short. Hit training is not meant to be all the time. It's not meant to be a 12 week program. On average, when I would train clients, I would have them do hit anywhere between two to six weeks. It was usually two to six weeks. Max, max, I might go an additional week or two, but never more than a couple months. A lot of wear and tear you're going to place on your body. I mean, if you just think about it, if you keep cranking that intensity knob up, up, up, it's just, it's going to catch up to you and your body is going to respond negative. It also just stops working. Well, I think of it the same, very similar to how we program the durability phase inside maps performance. That's how I like to peak a client. Exactly. It's like, we've laid a really good foundation. We've been scaling volume over time. We've been slowly increased intensity. Now here's the peak of your programming. And so for me, it would always be the last two to four weeks that I run something like that. This is key now. If you're doing this right and you want to get a short burst of fat burning, a short burst of accelerated results in terms of body fat percentage, you're looking for six weeks, maybe a week or too long on that max. You got to keep it short. Hit training.  But if you're learning to get, if you're looking to get the fat loss effects, if you do it for too long, here's what happens. Your body starts to adapt, stops working. And then because you're not doing the traditional resistance training, now you find yourself in a similar conundrum to when you overdo cardio. It just stops working. We also have to keep in mind when we compare ourselves to athletes and how they train. They have different adaptation goals than we do. The average person who's listening to this wants to be healthier, wants to lose some body fat, wants to build some muscle. That is not the main goal for most athletes. And so when you see them training and conditioning and pushing themselves to these extreme levels, it's, we're talking about a different goal. Like if I'm training that person, I might go longer than four or six weeks with them because I care more about replicating game time for them. I know at some point in their game, they're going to want to quit because their body's fatigued and tired. And so I'm pushing them through this workout to get the, to emulate a similar feeling they're going to get during game time. And it's more of a mental push than it is anything else. It's still calculated though. It's still calculated how frequently you use that button because you need to establish that like foundational strength. You need to establish that type of movement in different directions and strong in different directions and then build yourself and peak yourself going into season. You want to save that. And so, you know, to a lot of strength conditioning coaches out there who just constantly condition and beat their athletes to death, there's a much better way to do it. So I would challenge even that in terms of like that mentality. Yeah, keep it short. If you push it too long, you might start to notice even some muscle pare down, which then kills your progress. But if you keep it short, it's very effective. Like I said, four or six weeks, you know, maybe a week or two longer than that. That's where you're going to reap all the benefits after that move out of that and move into a more kind of traditional type routine. Now the next thing to focus on with hit training is that you want it to be anaerobic, not necessarily aerobic. I think a lot of people when they do hit training, what they're looking for is the exhaustion. They're looking for the exhaustion of their lungs, where it's tough for them to breathe, and it can barely move through each repetition. Of course, this leads to bad form. Cardiovascular exhaustion versus muscle fatigue. Right. You want to train your muscles, not necessarily the cardio. Hit training is more like weights and less than cardio. Okay. Now it's more like cardio than traditional resistance training is, but it's not like cardio. It's still resistance training if you do it the proper way. So focus on that. Remember that. Now, why is that important? Again, too much aerobic training. If your goal is long-term fat loss, by the way, nothing wrong with aerobic training. It could be healthy. It's good for endurance. But if you push it for too long, and that's your main goal, your body learns to become efficient with calories. It pairs down muscle.  They want to maintain it. They still want to be able to eat a normal diet or relatively normal diet. They don't want to have to eat super low calories all the time. They don't want to slower metabolism. They don't want the super efficient metabolism that may have benefited us when we are hunter-gatherers. They want a metabolism that's fast, and you get that from having more muscle. So you want to make sure that your hit training resembles more like resistance training and less than cardio, not the other way around because I see people do this in the gym, and the weights are just there almost as a prop. It's really not that different from me being on cardio. You're just jumping with them now. Yeah. I have dumbbells on my hand or I have a barbell. Well, you got to be careful of that too.  They're not that much different. And the thing that's beautiful about weights is that allows you to change the variables and make a big difference. But if you just do them in this fast pumping motion and you're combining it with things like burpees and jump boxes, you're losing that. Then it's just like stair master. It's not that much different than the elliptical at that point. So here's how you judge that if this is confusing. What is making you need to put the weights down? Is it that you can't catch your breath or is it that your form is starting to break down because your muscles are fatigued? It's very different, right? If it's like, oh man, if I could only breathe right now, I'd be able to do four more reps. Okay, you're doing cardio. If it's like, okay, this is hard. My heart rate's definitely going up. I'm breathing harder than I normally would, but I could still go, but hold on a second. My muscles are getting fatigued. Then you know it's more like resistance. I guess the weights down because my grip's sort of failing. One of the best ways to make sure you're doing this right is to prioritize form. Just to make sure that that at foremost is the most important part of this. Even though we are following a HIIT protocol and we're trying to get the extra benefits of burning more calories and burning more fat by pushing yourself at higher levels, you still do not want to break the rules of good biomechanics. You do not want your form to suffer and that's where you learn to shut it down. I remember when we were programming HIIT, that was like, I remember one of the hardest things that were like, how do we explain this to people? Because we don't want people to think that we don't want them to go to failure of exhaustion failure. We want them to go to failure when their form breaks down. Form failure. That's right. Form failure. You want perfect form. The worst form I ever see with resistance training is in HIIT style training. You saw this in the CrossFit workouts, oftentimes, where people are going from exercise to exercise. Form starts to break down. It's only about doing reps. You see this with circuit training, HIIT training, where, again, the exercise is almost seen arbitrary. It's just like, pick the dumbbells up, do presses, pick the dumbbells up, do squats, do some lunges.  And you watch people's form go out the window and what becomes the priority are the reps. What's the priorities? How many I can do? That is not the priority with proper HIIT training. With proper HIIT training, the priority is form. When your form breaks down, I don't care about anything else. Put the weight down and weight and then go again. And then when the form breaks down, repeat. What you don't want to do ever with resistance training is strengthen bad form. If you get really good at bad form, it becomes harder to correct that than if you start- I'm going to make a comparison here. So think of kipping pull-ups versus a strict pull-up. Right? I'm getting the benefits of strengthening my back doing a strict pull-up, whereas in the mentality of a kipping pull-up, I'm just trying to do as many reps as I can to fatigue. Meanwhile, my shoulders are suffering as a result of that. And one of them is going to develop your back a hell of a lot more, and one of them is just going to develop your gas tank. There is a difference right there. That's right. So form is absolutely crucial when you do any kind of training, especially when you're doing HIIT training. Again, because it's a very attractive notion to keep going and push yourself. You say, oh, high-intensity interval training. I've got to keep pushing. And so we kind of forgive ourselves for bad form with HIIT training more so than we would with traditional resistance training. Not the case. You will not get better results if you throw your form out the window and push yourself harder.  Trust me, listen to me. If you make form the priority with your HIIT training, not only will you get there better, but you'll get there faster. And one of the ways that we address this in MAPS HIIT was we had three levels, and we encouraged everybody to start with that level one, and then to scale to level two, and then scale to level three, versus just going straight to what's the most difficult thing for you to do. Right. In fact, it's funny when people were getting our HIIT program. By the way, HIIT was a program. When we wrote that program, that one was one that we kind of struggled with a little bit because we know how abused HIIT training can be, and we wanted to make sure that we delivered it and explained it so that people did it the right way. We want people to train the right way so they get long-term forever results. We don't care about the short-term, up and down type of progress. So when we designed HIIT, that all went into the program. But it's really funny because when we explain how form has to be number one, and then we'd have people who listen to show get the program, they would start with level one because they'd be like, all right, I trust you. It looks easy, but I'll trust you. Then they'd write back and be like, oh no, that was perfect. Any more than that, and I don't think my form would have been a priority. Yeah, when that's your mentality, it changes the entire format of the workout. And there is a better way to do that style of training. And it's a valid way to train if you do it for the designated amount of time that's just enough. And you have these types of parameters around what your focus is and the intent of it as you go into the workout. Now one of the things that I, you know, because we do kind of hammer, it's the only program actually that we have a warning on, right? It's the only program that we felt necessary to warn people that this is not something you want to stay in forever. But one of the things I do love about it is when you have limited space, limited time, or limited equipment, you can actually have a pretty damn good effective program. Oh yeah, yeah. The HIIT workouts are either like a dumbbell, a barbell, I think. Yeah, that's it. Yeah, so body weight stuff. Body weight, super, super home gym friendly or minimal equipment friendly. It's still resistance training, but we wanted to write it that way for two different reasons. Remember, we created the program before gyms were closed down and all that stuff. So it wasn't like we wrote the program thinking, oh, people aren't going to be able to go to the gyms. We thought to ourselves for proper HIIT training, you want to move from one extra exercise to another. Uninterrupted. Yeah, if you do machines or you do different exercises, that means you have to wait for the guy or girl that's on the piece of equipment before we move into the, you know, your exercise.  It's no longer HIIT training anymore. Now it's traditional resistance training. So if you just have one barbell, or a couple pairs of dumbbells to yourself, you could do the whole workout in your little square realm of exercise space or whatever. Yeah. Well, it just so happens today. A lot of people are working out at home. So that program now is extremely valuable because it doesn't require a lot of equipment.  I think the whole program is six weeks, if I'm not mistaken. Is it six weeks long? I believe it is. I believe it's about six weeks long. We'll have Adam double check that, but it's four to six weeks. Yeah. Depending on how you use it. It's a short term, very fast, high calorie burning routine. Of course it comes with all the demos and all that stuff. And because we're in June, and it's the beginning of summer, we're putting that program 50% off. So it's half off. So if you want to hit program that's done properly, you want to have flow sessions so you don't hurt yourself. You want to follow a well-programmed workout with weights so you don't send the wrong signal to your body. Then you can check out our program. And the flow sessions to me, I think are the diamond in the rough here. That was one of my favorite parts that we incorporate it because it's every other day. So you do a hit workout one day and the next day you have a flow session and then you have a hit workout, then you have a flow session. And then we actually program goals for yourself for like steps, like going out and walking on the weekends. So that's kind of how the program is laid out. And it's broken up in three phases every two weeks. So it's a six-week program and it's broken up in three different phases. So two-week phases. And again, I always recommend that people start on the more beginner side. Even if you're an advanced person, if you haven't been training hit style, start off with it in level one. You can always progress yourself to level two and level three. And honestly, put more energy and effort into the flow sessions. It was ever a time for you to really focus on that. This is great where we're all still, a lot of places are still shelter in place where we have minimal equipment or gyms aren't open. Still a great time for you to be working things like that. I love those and many of the movements in the flow sessions are yoga inspired, but there's lots of tension and control within them as well. If you want to follow our hit program, again, we wrote it so we know it's good. You can go to mapshit.com. That's M-A-P-S-H-I-I-T dot com and use the code hit 50. That's H-I-I-T five zero. Also, you can find the Mind Pump podcast on YouTube. We're also on video. Come check us out Mind Pump podcast. By the way, on our Q&A episodes, oftentimes we break up those segments. So you can just look up one question that we answer so you don't have to listen to the or watch the whole episode. So make sure you check it out.