Hey, what's up you guys and what is going on welcome back to another I just created an NFL player on a rugby video game Video yeah does that makes yeah, no that makes sense in the previous one. We made Tom Brady We made the goat of of the NFL. We made the goat of American football The six-time Super Bowl winner who is now at the Tampa Bay Buccaneers Tom Brady we put him at scrum half. I don't know if that was a mistake or not because the fact is is His awareness was just not there, you know He's meant to be at the base of a ruck passing it pretty much every time except he kept on going into the ruck and Getting stuck in there, and I thought you know what? I'm thinking we do want these players to actually know what they're doing on the field so that they do You know do what we want to see them do on the field what I want to see them do on the field So so with that being said we're moving out one place We're moving out to the the number 10 or the first five eighth He's the playmaker the nine gives it to the 10. It's the tens job to look up and decide what to do He's either gonna be running a move with the back line He's gonna be kicking the ball gonna be passing it possibly even looking back on the inside for an inside ball You know the playmaker the number 10 is Basically the quarterback of the game of rugby. It's just that you know not only does he have to just throw he has to run He has to kick and he has to tackle.   So I put him at number nine But a player who does have the physical attributes to play number 10 and in fact we're gonna have Three players in this position three players the first one is Christian McCaffrey, which you've actually already seen I made his player and I put him through a game. You know those videos.  I'm not giving any of my input It is literally just a screen recording of the game that I then put up But anyways, I hope you guys enjoyed those these ones are a bit more Interactive because I'm actually making the player on camera with you guys and then putting him into a game So today we're talking about the first five eighth. We've done Christian McCaffrey. We've got two more The first one we're gonna do is Lamar Jackson And the second one we're gonna do is Patrick Mahomes. He was the Super Bowl MVP He's just signed a 10-year deal His name is being thrown around everywhere. It doesn't matter if you're in the the world of American football or any other sport You know that deal that's just been signed for 10 years has has has gone worldwide.    He might go for a run. He might kick But if he does pass it, he's gonna pass it off and the guy that's gonna be Catching it on the burst at pace hitting holes Is Saquon Barclay. Anyways guys, it's time to get into this Today's video is Lamar Jackson. Let's do it I'm hoping and I don't I don't see any reason why they wouldn't be I'm hoping Jackson is in there as A name that the commentators will call Yes, it is fantastic. Okay Now we look at his stats. So like I've mentioned in the previous video I've got stats from the NFL website and I've also got stats from their Madden 20 profile And with that being said Lamar Jackson is At the moment 23 Right right footed nationality we're gonna go Wrong way USA we're gonna go Fly half And we're gonna go fly half of the sevens as well now attributes. This is where it gets interesting That is the preset scrum half statistics. This is the preset fly half statistics And if we have a quick look, I mean what changes basically Shit I'd have to say the passing goes down slightly and And really the only thing that goes up is kicking which is understandable and a bit of strength They've got 25 strength.  Well, he's only got 61 strength Now we're gonna keep it consistent. All right guys. Here we go fitness Shit, I'd have to say 90 speed. He has 96 Acceleration, oh man, this guy's gonna be Yeah, this is why I this is why I wanted to create Lamar Jackson Although he probably could play in any position on the field aggression aggression. I don't know 80 agility Well, we're gonna go 95 That is his Madden agility racing breaking tackles Well, we all know how good he is at that so we're gonna go 85 tackling I've actually never seen him tackle although.  He needs a good pass. He's a quarterback He's gonna have a good pass.  We're gonna go 85 Kicking now I want to keep this consistent with what he would actually be like if he's a number 10 He needs a certain amount of kicking. We're gonna bring it down to 50 honestly because Have you seen the Marjaxon kicker ball?  So we're gonna go 85 I think you've definitely got 85 catching strength. What's a 61 was it? Yeah 61 Mental agility now what I'm gonna do is I'm gonna I'm gonna take the awareness Statistic from Madden and I'm gonna share it between mental agility and discipline Right, so he's 92 awareness and if we have a baseline of 50 We've got 42 additional Points we've got 42 additional points divide that by two. That's 21 H. So we've got 71 mental agility and 71 Discipline because they are playing a completely different game now jumping You know what? Jumping doesn't really matter unless you're in the lineup, but we will have a look at Lamar Have a look at his Results from pre-draft measurables. Ah, he didn't do the he didn't do any jumps Which makes sense really, okay? That's fine.  We're gonna go 70 Head here we go. Where are you mate? Fuck? That's a big neck Okay Not so much the head, but the neck Now if I was getting paid for this and I was actually creating a game. I mean, I'd be here for hours Trying to get it right, but you know That's not the case neck angled neck width This will be a good one.  I gotta say we're gonna go defined for sure and Mid-range, okay All right, complexion is what we need to do first. So what do we got here? I mean I'm gonna go that one Face the eyebrows are certainly on a on an angle here I'm thinking thinking that one brown eyes He'd get no No, no, okay. Now we're starting to get somewhere Crew cut mid-length. What do we got mid-length? No, no, we're not going mid-length crop cup Hair color we're gonna go black facial hair is Black and it's a little thing down the bottom There he is Now let's get this hair right. I'm taking it from the Madden. No, sorry. I'm taking it from the NFL profile Photo we need some curls here, man. We need some curls. Where's the curls at man? That literally is the closest thing. We're probably gonna get now mid-length No, no, no, those are some rugby haircuts if I ever did see some crew cut This might be all right Is that him, you know what?   Yeah, if he shaved his head, he's got a decent hairline. I think that's him. I think that's him What are you gonna do? Okay? now 212 pounds or 96 kg and six foot two or hundred and eighty-eight centimeters. So 96 188 torso Kind of skinny, but he's definitely shredded. So we're gonna go small stomach definition defined spine we're gonna go arched arms Is he as big as cam Newton? That's what I want to know. No, he's 96 kg and he's six foot three. So We'll give him a bit of size bit of size not too much legs Yeah, they have a bit of size. Um, yep Don't worry about that Right, this is how we're gonna see him on the field And the way that we're gonna do that is by putting him in purple boots and Purple sleeves and it's worked quite well so far Tattoos He probably does have tattoos, but we're not gonna worry about them and that my friends is the Margex Sorry, I just spat everywhere. Um What's his hairstyle like now? Oh shit, he's got the dreadlocks doesn't he he's got the dreadlocks It's not easy man. I don't know What do you do? mid You know what we're gonna have to go We're gonna have to do a Derek Henry Or are we? Wow, this is uh, this is harder than I thought Nick minute, it's definitely harder than I thought and you know what we're gonna give him bit of length We're gonna go with this one save And that's him. Okay, so now what we do As you guys know We go to teams We go edit team In the last game we played as Tom Brady Today we're gonna be playing as team Lamar Jackson We're gonna chuck him in the deep end as I said in the description box I'm gonna see just how he goes in the world of rugby Playing number 10 will with all of those attributes. He's probably gonna be the fastest player on the field to be fair Which is gonna be really interesting to see what happens. So with that being said, let's go to the squad We're gonna take out Tom Brady from the number nine position. We're gonna put back in Aaron Smith and we're gonna recruit our latest creation At a 92 start rating age 23 Lamar Jackson, there he is We're gonna grab him. We're gonna put him in at number 10 and take Dan Carter off the field Dan Carter the legend What that means is that we also need to set we also need to set Lamar Jackson as the kicker and the Play kicker, which means kicking within general play And with that being said It's time. It's time So guys sit back relax And let's get the show on the road. We've got team Lamar Jackson versus the USA We've got A match played at Franklin's Garden once again It's a fine day. It's a 10 minute match and it's played under normal rugby rules With that being said Let's go The All Blacks won back the world championship in 2011 winning back the title and play first one in 1987 beating France 8-7 very tight and nerve-wracking final Incidentally, it was France that New Zealand had beaten in the 1987 final The All Blacks have to be the clear favorites going into this they're clearly in a different class And joining me is former All Black Justin Marshall I expect we'll see a pretty one-sided match here Justin Should be some good quality rugby It's pretty good atmosphere here and the fans are expecting a good game Your Blacks prepare to do the hucka just waiting for the ref here. Then we can go to keep the games. We're underway Messle waits Taken down there I think it's there for New Zealand Aaron Smith has it now We allow him side stepping his way through Good contest, but it's still theirs Aaron Smith Thanks for options Back he goes Your Blacks looking to recycle this Owen Franks picks it up Back to his feet quickly and wrestling for the ball They're getting some momentum from that phase play That'll knock the wind out of him This is a more The ball controlled at the back Here's the pass Strong defense He's trying to turn it over quickly Gets a crowd on their feet with that run Back to his feet quickly and wrestling for the ball Banks rams it out of the back Well played good ball retention here Edwards gets the ball away No stopping him there It's still alive on the attacking side Stringing together some phases, but the defense holding pretty strong Nice ref wants him to let go of it A real field position opportunity here Advantage He's been lost forward They'll play advantage here He just took his eye off the ball slightly and then just knocked it on Breaks through Paul stops him now Your Blacks looking to hold on to this Nonu feeds it on Smith gets the ball to his support player It's been brought back for the scrum Scrum in the game Aaron Smith puts it in Good battle going on here USA have stolen this Ref says ball is out Brashing run into the line Pound it into the ground And it looks like it might be a turnover Harry takes some stopping in that run Back inside Runches his way up I'm sure he didn't mean that, but he's hit him high And that's a penalty Hit him high there Well, the referee could give him a yellow card here This is very kickable for him This is as easy a kick as you'll get all day Edwards with the three Did very well there in the build up Jackson kicks off Abbot takes in the kickoff What a good catch They were coming up fast And the balls turned over Good turnover, excellent stuff Ben, I agree Karen Reed, decent meters made on that charge They might still have it Kevin Mialano delivers it on Lovely footwork there Nanu charges towards the try line And he's over for their first try They finally got him into some space And he's showing us just how brilliant he can be Pure entertainment What a great try So powerful man Nanu Seems to break the line at will You can see his pace here That is remarkable No one could catch him But it was a great pass that set him up Couldn't agree more A chance to add another two here A real study of concentration here As he looks to convert the try From right out wide Not a great kick It looks like this will go wide And it's just away Not an easy angle to kick from Go short Richie McCaw to secure this Putting his foot down now Up and over half way now It's there Brodie Retellik has it out the back Franks makes a telling run Now they drag him down And they'll take the line out Makes his way back on Nicely rested after his ten minutes on the sideline Lost against the throw Pass goes inside there Smith puts the foot down That'll knock the wind out of him Trying to turn it over quickly Ball's being contested Brakes free in that tackle Nice defence Charge is towards the try line Well, the chance is gone Just when they look like scoring Referee playing advantage here Locking that ball on Cost them a good chance to score They won't be happy with themselves Set The All Blacks with the putter The battle going on here Jackson not quite so easy To put away Only meters away from the try line The All Blacks lead at half time Five-three The All Blacks have the lead at the break But it's a tight game so far So half time here And such a close match so far A real surprise Just a bit messy so far Justin Yeah Good work being done by the forwards And you can see that in the hit-up figures And you can see in those hit-ups That they're not afraid to carry the ball forward The kick-off snapper Good defence Now he gets the ball away Driven hard Into the turf Strong defence Go with the ball There's some real force in this defence Edwards takes it Now taken to the ground in a good tackle That defence has been Very strong so far A powerful defence Butcher takes him in a nice tackle Thanks gets the ball away Superb technique in that tackle Davis is absolutely smashed Next it up Has a dart at the defence So they're making focus But still some work to do here He kicks deep into the opposition half Gives it short Crouched to the ground He's been hit high and looks in some pain And the penalty is given Oh yeah, that was a high one He'll be looking for touch here He's banged it into touch American blown out Takes it nicely And he's shaken up by that one Absolutely smashed Trying to turn it over quickly That'll knock the wind out of him The ball's broken The ball's being contested Take him down Right block goes no further Take him down Reed gets it away He pushes the pass further He grabs him over halfway Go with the ball Aaron Smith feeds it off now But Anonu going for a big run there That's two drives in the match now for him You want to move to take him over the line And aren't they ecstatic Exceptional skills A third try He's just such a gifted footballer Anonu, great stuff there Yes, you're absolutely right Yeah, he's done very well there Breaks away And then no one could catch him Simply too fast Yeah, I think you're right Justin And we're ready for the conversion attempt Shot to come from way Out wide Tough one Way out wide Tough kick here for two points Kick now Probably just sailing wide Just wide Even the best of the miss from that wide out So he won't be disappointed with that It's a short kicker He's too powerful for that defender Goods from Run Back to his feet quickly and wrestling for the ball Reed picks it up Liam Messam Is pushed back in a great tackle He spreads it Smith shows his pace And he's knocked over the line Stretching up Edwards pushes it on A forward pass So they'll come back for the scrum Things just not going right for them there And the mistake came as a result Here's the scrum The scrum is pretty tight in this game No one will give in here New Zealand Get a good hit on here Ball is out now Aaron Smith off the bat Nanook charges forward Oh and a penalty Right on their own line That's a bad mistake from the skipper The tackle was a bit high They'll look for the three This to put them further ahead They're going to have a crack here by the look of it With the scores this close It makes sense They've dragged this one away That's gone dead They've only got a few minutes to make something Edwards gets his going again From the 22 metre line Julian Sarvia takes it over The half way line Kevin Nealum finding top gear Trying to turn it over quickly Liam Messam Picks it out of the bat And the ball lost forward So he's playing advantage here It's always frustrating When you give away a knock on this bow He'll not be happy with himself What down dangerously close To his own goal line there So just a few minutes remaining here And they'll come back for the Scrum Let's see how the Scrum responds here Find pretty useful Scrum It's been pretty much even Stevens In that department This match just about over here Furious looking Scrum now Look pushing through both teams Davis picks up That's the ball out there Small bounds They've got control of this As they look to do something with this ball Lovely tackle Edwards twice He's got to let it go now The ball is set up in the right And they drive him into the grounds I believe they've kept this from USA Davis bursting through with that run And a good show of strength there to beat the tackle Back to his feet quickly And wrestling for the ball He pushes the pass further And he's driven backwards now He makes a dart from the back I feel like they're going to lose the ball here Tackle not complete Keeps going It's all over The All Blacks sleep in the air They have the victory The All Blacks have finished too well What an impressive match it was Both teams fought hard And were very evenly matched But in the end There could only be one winner They controlled territory well They made plenty of gains without Being pegged back The stats show a slight lead in position While we know there's never a foregone Conclusion in rugby This result is pretty much as we predicted it This has been a tight contest here A very good match Your Blacks have the victory Thanks for joining us We'll look forward to seeing you next time


United States! Thank you. Please sit down. Well good afternoon and welcome. It's good to have you all here for this briefing and it's a real pleasure for me to see so many friends. My pleasure I must say is tinged with sadness because of one who is not here, Cliff Evans. I don't have to tell anyone here what a fine newsman Cliff was. It's a White House correspondent. He reported events accurately, incisively and with a sense of history serving not only RKO but the American people. Cliff was also a friend, a sharp mind, a kind and gentle heart. In the course of his life as you know he received all kinds of awards. He was a complete professional and a true gentleman. But knowing Cliff I think he'd want us to get right on with the business of government that he loved so much. Now I understand some others. Jim Baker and Ed Meese and others have or will be going over various subjects with you in detail. So what I'd like to do is give you a general overview of our accomplishments in the past two and a half years. And first let me mention the engine that drives everything else the economy. America's engine had broken down. In fact we face the worst combination of economic problems in our post-war history. The month George Bush and I were inaugurated inflation was well into double digits. The prime interest rate reached a level not seen since the civil war and real wages, housing starts and productivity were all in decline. Uncontrolled taxes and spending had nearly destroyed our economy. With the support of responsible Republicans and Democrats our administration set to work to make what we called a new beginning. We reduced the growth of spending prune needless regulations, reduced personal income tax rates allowing Americans to keep a bigger share of their own earnings and passed an historic reform called tax indexing so that never again can tax or government use inflation to profit at the people's expense. And today less than two years since we set our policies in place our nation has one basic problem to help every American woman and child and it's called economic recovery. The prime rate is almost half what it was when we took office still too high but I think it's going to come down further. Inflation has plummeted to 2.6 percent over the last 12 months from two years of double digit inflation before we got here. The American workers real wages are rising for the first time in three years and housing starts are at their highest level in four and a half years. Factory orders, retail sales and productivity are all up from a year ago and since last August the stock market has gone up sharply as we know. This has greatly increased the value of America's nest egg because the retirement savings of millions of workers are invested in pension funds that have benefited from the stock market surge. Unemployment is still too high but is dropping fast and since December more than two million Americans have found jobs. Just as we're turning the economy around we're strengthening our armed forces and bringing a new sense of purpose and direction to American foreign policy. In the military the number of combat ready units has gone up a third since 1980. We're attracting better recruits and keeping them longer because we're giving them better pay, better equipment and the respect they deserve. In foreign policy we've let the world know once again that America stands for the political, religious and economic freedom of mankind and something else. Under this administration our nation is through wringing its hands and apologizing. We don't put up walls to keep our people in. We don't put religious and political dissidents in mental hospitals and we don't cold, bloodedly shoot defenseless airliners out of the sky. Instead we're laboring for peace in southern Africa. We're giving firm support to the democratic leadership in Central America and working for a just peace in the Middle East. The ceasefire in Lebanon now more than a week old represents a definite step toward peace yet it's only a first step but now that the guns are quiet the different sides can hear each other talk and the peace process can go forward. In our relations with the Soviets we have more major arms control negotiations underway than any other administration in history and for the first time the Soviets are talking about more than just a nuclear arms ceiling. They're talking about nuclear arms reductions and yet while we're intent on reaching arms control agreements we can accept only those agreements that call for balanced arms reductions on both sides not pseudo arms control and we will insist on verifiability. As I said at the United Nations the Soviets have violated the Helsinki final act by failing to provide their people with rudimentary freedoms and they've broken the biological weapons convention by reigning yellow poison among villagers and Afghan tribesmen. So when it comes to arms control agreements we have no intention of simply taking the Soviets at their word. Sooner or later they will realize that arms reduction are in their interest. In the meantime we'll continue to negotiate in good faith and from strength. New vigor in the economy new strength in our national defenses new purpose in our quest for peace I think we are making a new beginning. We still face a multitude of challenges both here at home and in foreign affairs but I know we'll meet those challenges successfully and I'm convinced that historians will look back on these years at the time our country began to heal the wounds of the past and under God once again to look to the future with confidence and courage. So I thank you and God bless you and I know I haven't got too much time left but I what I time I have here is that you might have some questions. Yes. Mr. President I'd like to ask you a question about the interior secretary. There is so much or as much congressional and public opposition to Mr. Lott. Why then do you still support him? Do you not consider him a political ally? Well I know that he he made a ridiculous statement and one that was was just should never have been made but at the same time I don't think that came with any malice or nor was that an attack on any of the people mentioned in there. It was a very poor choice of words and if he'd wanted to point out the legitimate mix that he had on that commission to reveal that it is typical of our society he could have done it in a far better way but as Jim Wright the majority leader of the house said yesterday he doesn't think it was an impeachable offense. I have to look at the same time at the record of what he has accomplished in the job and contrary to what some critics say about that he has done a fine job as secretary of the interior. So I believe that I don't believe that this was something that you would lynch someone for. I have a two-part question sir. Did you have an opportunity to speak with Margaret Thatcher when she was in Washington last week about the troubles in northern Ireland and the second part of the question sir is and I know it's not one of the major trouble spots of the world but it's an ongoing situation and when I was recently there I heard a lot from the Republic of Ireland officials pleas for the United States to get involved. Do you see any circumstances under which your administration could play a role in mediating the troubles in northern Ireland? I think that no it did not that subject did not come up. I think that it would require us being invited to participate in that. It is a purely internal affair involving two the governments of Ireland and England and the local autonomy of northern Ireland. It is a tragic affair. It's horrible to think that both sides are doing what they're doing in the name of God and being half Irish and half English I feel I feel very deeply personally about it. I also have a theory of my own. I believe that what you have on both sides is a relatively small group of extreme radicals or let's just say extremists who are terrorists in their acts and that the majority of people on both sides if given a chance could come together and work out their problems but their lives are in danger if they suggest such a thing openly. I remember that one very brave woman when her sister and her sister children were killed as a result of a terrorist act in the street when she crossed the line and to one from the other side another woman they organized the wives the women on both sides to strive for peace and yet their open activity has more or less well if it exists at all it's underground because of the threats that I've mentioned but we would be more than happy if there was a way that we could be involved here but again as I say I think in that case you have to be invited in. If she brought it up I would have volunteered to be helpful if we could. President can you tell us about any possible modifications in your travel plans for the Philippines? I can't say any more than that probably before the day is out there will be an announcement we are reviewing the entire trip and it's scheduling we're not thinking in terms of any cancellations we are thinking in terms of a change of schedule and the entire reason is because the trip had been scheduled an unusually long trip to be away in the country but scheduled and the understanding that the congress would not be in session and now we have learned that the congress will be in session and will be in session on the most contentious of all the issues having to do with the appropriations the continuing resolution and all all those things so what we're doing and it is not aimed at anything going on in any one country we're not talking of cutting anyone out of the trip we are surveying to see if possibly we can do a couple of the nations for specific reasons early in November but it would only take a few days and I could be going that long but there's no way that I could be going for the entire trip with congress here so what we're doing is surveying the idea of a of a postponement of the others no cancellations in talking to the average man and woman on the street it's not real clear why we are in Lebanon and I was wondering if you could tell that person why the Marines are there why their sons are there and exactly what are the interests being protected I would love to and I have to tell you that that if you won't tell anyone Saturday morning on my five-minute radio broadcast I sat down yesterday afternoon and I wrote next week's radio program to do just that very thing of I'm aware that there just is a great lack of understanding of why we're there and if if our people and this is what I suggest in my script if they'll ask themselves some questions first of all could the United States or the western world stand by and see the Middle East let's say incorporated into the Soviet bloc we know there are others that have eyes on it we've tried as you know to be helpful and as a result of the camp David process and resolutions 242 and 338 of the United Nations we brought about peace between the two primate antagonists Israel and Egypt they have a peace treaty so a year ago with trouble still there and with the bulk of the Arab state still denying the right of Israel to be a nation I came up with a proposal that we would again offer our services not to impose a settlement we can't do that but to help bring one about to help bring the Arab states into the realization of that Israel does have a right to exist as a nation and that should negotiate out their differences and then have in effect more egypt's in the meantime the internecine strife that was going on in Lebanon and then the occupying of part of Lebanon by the syrians the PLO with their own militia which was shelling and rocketing across the Israeli border killing innocent people in the villages along that border Israel was forced to invade Lebanon not to attack Lebanon anyway but to drive back these PLO terrorist bands and I made the proposal that we offer our good offices to try and bring about an overall peace in the Middle East but it began with first having to solve the problem in Libya and stop the shooting and the killing that was going on so we proposed and our allies went along with us England France and Italy a multinational force to then persuade the outside forces to leave Lebanon and then while the Lebanese government brought into being its own military and began to take control of its own borders this in multinational force would be there as a stabilizing influence you might say behind the lines to help keep order while the Lebanese army went out to restore its sovereignty now that's the mission and it is still the mission of one thing that happened to both countries Syria and Israel had agreed that they would leave when the other did that they'd leave together Syria then changed its mind and with the occupation in Syria not occupation but let us say in Syria there are substantial soviet forces now I'm sure that they've had some influence on this we have had diplomatic measures going round the clock for a year now are people going back and forth from Damascus to Beirut to Tel Aviv and to Saudi Arabia persuading the Arab nations to join us in trying to bring about an end to the bloodletting Israel has made its agreement with Lebanon Syria still has not acknowledged that it will get out we're holding for that but I think that our mission there is because as I say there's no way that the western world could let the Middle East go into hostile hands first of all the western world and Japan are virtually dependent on the Middle East for the energy that fuels its industry I'm taking more than the five minutes I'm going to take on the air to explain all of this but we have to face that that the you have to say could any of us in the western world stand by and just see the expansionist policies of the Soviet Union interfere with what the Middle East means plus which since 1948 when Israel was created as a nation this country under every administration has always had an assurance to Israel that we uphold their right to be a nation that we are allied and that we do have a very definite interest in their security so this is the reason we're there and we're not thinking of expanding our role I do say that anytime that we send our armed forces any place in the world and for whatever reason they're going to go with the assurance that if someone starts shooting at them they can defend themselves and that's the only participation they need I can only take this one because I'd recognized you at the same time and I'm sorry but he tells me that time is up thank you mr president during the Carter administration there were those who accused the administration of losing Nicaragua and losing Iran and my question is sir do you feel that no matter what we do in towards the Philippines that because of the human rights violations of the Marcos regime and the continued problems there that we are in danger of losing a pro-american government in that country as a result of what's been happening there I don't think we can afford to lose a pro-american government in that area with the bases our own bases that give us a presence in the western pacific I do think that there's been a great distortion of what is going on over there I had a I won't name him but a rather liberal senator who had served there in the military come back recently from a trip over there and he told me that the situation was far better and far different than what we're portraying the violence in the streets and so forth and I I do feel that this country held back in Iran at a time when it would have been a benefit not only to the western world but to the people of Iran themselves to have thought out our policies better with regard to Nicaragua under the Carter administration it was a case of we know that for more than 20 years the Somoza regime and members of his family before that had an authoritarian they weren't totalitarian they did allow some freedoms that are not present in a totalitarian society and yet it was authoritarian and when a revolution arose in Nicaragua the United States held hands off we did not under during the Carter administration we did not help the Somoza regime at all we stood back totally neutral and when the Sandinista government on the basis of its revolutionary promises which it had made in writing to the organization of American states that that government if it assumed power would guarantee human rights would guarantee free unions free elections freedom of speech and freedom of press and so forth and when it assumed office the under the Carter administration aid was immediately forthcoming in the hundreds of millions of dollars to Nicaragua until we discovered that number one the Nicaraguan government was providing the weapons for the guerrillas in El Salvador to that were attacking the democratic government of that country and number two found out that the Sandinista revolutionaries made up of several factions and groups that the one group which was totally communist totally beholden to Cuba and the Soviet Union had no sooner gotten in than it ousted those other revolutionaries that had participated with them in the revolution and it was then that the Carter administration withdrew all aid and stopped sending any additional aid to Nicaragua well we have looked at the situation there we've watched them since we came in and there's no question this is setting up to be another Cuba on the mainland and they themselves have been blatant in their open statements that their revolution knows no boundaries as a matter of fact one of our congressional delegations that went down there to learn what they could came back and reported to me that one gentleman high in the present government said don't be surprised in 18 months if you see us at the border of Arizona and New Mexico now he may have been being pretty boastful but this is I think we've been consistent they had supported what they thought was a legitimate turn to democracy in Nicaragua it proved not to be and the Carter administration stopped aid we are we've made it very plain that unless and until they return to the promises they made to the rest of the organization of American states as to what they do incidentally they made those promises at a time when the organization of American states had said it would ask Samoza to step down in the bloodshed by resigning if these were their promises these were their principles so the government is going to be totalitarian it's going to be pro-cuban pro-soviet they have a few thousand Cuban so-called advisors military advisors there they have a few thousand Cuban teachers there who are setting up schools throughout the country where they've never been schools before that sounds very benevolent they're teaching the children to read like read Karl Marx and the other night one of the networks on television showed the little children standing there singing a hymn they called it out in the schoolyard translated the hymn kicked our brains out it was all for the revolution and we were the villains so well I'm sorry that I have to go without taking any more of it it a pleasure to be here for a few minutes thank you very much


Have you ever looked in the spring and are like gosh it couldn't get dry? There's a technical term for that that's called a drought management plan. Yeah. And if it doesn't rain in April, you know your grass production is going to be down. And so you know you should start identifying which bunch of cows is going to go to town first because you won't be able to feed them. And if you wait until everybody's grass is gone and everybody's hauling cows to town they're going to be. They're not worth it. They've got less value. A drought plan might be that you feel you can run X number of cows every year. We know how to take care of grass by building root reserves. The big rule is you don't let them bite off the same plant twice. So once if you leave them out there and let them bite off that same plant twice, you're reducing the root reserves. Same thing in the fall. Those increasing cool season ones have another spur to growth in the fall.  And that weakens that particular species for going through to come in the spring the next year. And so you're using that number of yearlings that you can take in as your clutch mechanism to account for the differences in the rainfall.


to Happiness Isn't Brain Surgery with Doc Snipes. Each week, we record the podcast during a Facebook live broadcast in which Doc Snipes presents information and tools to help you start living happier. Our website, docsknipes.com, has even more resources, videos, handouts, and workbooks to help you apply what we talk about. After each podcast, the accompanying video, text, and worksheets will be published from members on docsknipes.com. Additionally, each week we have a members-only educational group, followed by a question and answer session with Doc Snipes, to help you apply the tools to yourself and start living happier, faster. The Doc Snipes podcast will be providing listeners and members the same tools and information Dr. Snipes gives her clients. Go to docsknipes.com to learn more. Welcome back to Happiness Isn't Brain Surgery with Doc Snipes, practical tools to improve your mood and quality of life. This is the fifth module in dialectical behavior therapy, exploring emotion regulation. In this last module, we're going to explore emotion regulation techniques, including mindfulness, identifying and labeling emotions, and changing emotions and improving the next moment. So let's start with mindfulness. What is it? Mindfulness is really just non-judgmental observation and description of your current emotions and physical state, understanding how you feel, being aware. Awareness and mindfulness can often be used hand in hand. It's important to remember that your primary emotions, as we've talked about in the other modules, are often adaptive and appropriate. That means your initial emotion, your initial emotional reaction, based on the knowledge you have and the situation at that time, often makes total sense and is designed to help protect you or keep you doing things that are positive for yourself. So understanding that they're good, now what you do with them can be harmful or unhelpful. A lot of your emotional distress is a result of your secondary responses to your primary emotion. So if you get angry, that may be very normal, probably is, because you perceived some sort of a threat. But then if you start feeling shame over getting angry or anxiety about being wrong, maybe I shouldn't feel angry about this or rage due to feeling judged for it. So if you get angry and you feel like other people are judging you and you get angry at other people for getting angry at you for being angry, wow, that's a lot of stuff to deal with. In reality, accepting that you felt angry, identifying what the threat was, and then figuring out how to improve the next moment to make that threat go away or decide that the threat's not worth your effort, makes a whole lot more sense. Mindfulness can serve as an exposure technique, because it helps you realize ahead of time how you feel and become aware of feelings like anger. All too often, in our society, we feel feelings and we don't even know we feel them. So we just kind of go on through our day and feelings build up. Mindfulness encourages you to tune in and be aware and say, oh, I'm feeling angry or I'm feeling stressed, and then do something about it. So it's an exposure technique to get you used to feeling feelings and recognize that feelings in and of themselves are not dangerous. They're not uncontrollable. They just are. Exposure to intent emotions without negative consequences extinguishes the secondary emotional response. So that's a whole bunch of garbledygook. Basically, what it's saying is if when you get angry, you just accept, you know what, I'm angry, and you figure out what's causing the anger and you deal with it. That's like over here in scenario two, where you have an unpleasant experience, you have an unpleasant emotional reaction, and you just deal with that emotional reaction and that experience right there. So it's a one-on-one fight, you against that threat. In the other scenario, you have an unpleasant experience, which results in an unpleasant emotion like anger. Then you start feeling guilt and shame or anger about the anger. So you have this avalanche of secondary emotions. So instead of just having that one threat to deal with, now you've got four or five threats, and it's kind of like Bruce Lee trying to fight off six people at once. It's a lot harder to deal with that than to just deal with the initial unpleasant emotion and be done with it. So you don't have to feel guilt, shame, anger, and all that secondary stuff that just complicates it. So to be mindful, the first thing you do is identify the event prompting the emotion. You notice your thoughts, your physical sensations, and your urges. So something happened. You got a call from your boss and all of a sudden you felt terrified because you were summoned to his office.  What are your physical sensations that tell you you're terrified? Your heart being faster, your hands start shaking, your breathing faster. What are your urges? What do you want to do? Do you want to run away?  Do you want to have a drink?  What is it that your urges are? It doesn't mean you have to act on them. It just means being aware of what your thoughts, sensations, and urges are. And what are your expressive behaviors associated with that emotion? Did you slam the phone down or do you start walking around and pacing in your office trying to wonder what's going to happen? What do you do when you feel that kind of an emotion? What are your interpretations of that event? So are you expecting it to be negative? Probably, or you wouldn't be having the emotional upset. And what is your history prior to the event that increased vulnerability to the emotional dysregulation? And again, that's a long sentence that says, what is it that was going on ahead of time that was using up your energy? Are you sleep deprived? Are you not getting enough to eat? Are you dealing with six other different stressors? So this was just one more, the straw that broke the camel's back, so to speak. What else was going on or is going on that might be making you more vulnerable to make a mountain out of a molehill? And you can also think about the after effects of the emotion on other types of functioning. Think about when I get this upset, how does it affect me for the rest of the day? How does it affect my relationship? How does it affect me getting stuff done and concentrating? So once you've identified what's prompting your emotion and you've kind of gone through that checklist, part of going through the checklist of all those things that we just talked about, are to help you get out of that adrenaline rush. When you feel a threat, the first 60 to 90 seconds, you are not going to think clearly because you've got the threat response system has flooded your system with adrenaline and you are not designed to think clearly. During that period, you're designed to fight or flee. We want to let that kind of drain off so you can think a little bit more clearly. So you go through that checklist identifying how you feel, the prompting situation, yada, yada.  So check the facts foreign against those spots that are telling you that this is a threat. What evidence, objective logical evidence do you have supporting the fact that this is probably going to be a bad thing? And what objective evidence do you have that says, no, there's nothing bad that can possibly happen? There's probably going to be some on both sides because you don't know what your boss has got in store for you. You also want to look at emotional versus factual reasoning. Because if something happens and you automatically get stressed out about it, your emotional reasoning is probably going to tell you, I feel stressed out. Therefore, there must be something threatening coming up. Whereas the facts may not support that.  So when you look at the factual reasoning thinking, oh, I'm going to get fired for sure, I'm going to get written up. Is, are there any facts to support that? Or are you just trying to figure out why you're afraid? Another thing you can do is problem solve. Change the situation that's causing the unpleasant emotion. Now, when you're dealing with your boss and he calls you up and he says, I want to see you tomorrow at two, you have between now and tomorrow at two to fret and freak out as much as you possibly want. Or you can change the situation. You may not be able to go meet with him until two tomorrow, but what can you do? And we're going to talk about some skills that include improving the moment. Sometimes you need to take a break from it. After you've checked the facts and said, you know what, there's probably nothing here. Or even if there is, you know, maybe you have been late and you weren't getting your paperwork in. Well, there's nothing you can do about that now except improve the next moment. Start doing the next right thing, but also take a step back because whatever he has to talk to you about is already set in motion and you're not going to change it with anything you do today and prevent vulnerabilities in order to reduce your reactivity. So in order to prevent getting upset when your boss calls, one of the things you can do is make sure that you're taking care of your mind and your body and you're keeping healthy and well rested. This will help turn down the stress response. If you're rested, your body's going, you know what, I've got energy to take on whatever comes my way. Hungry lion comes. I got it. When you are well nourished, same thing.  And reducing vulnerability helps you be aware of and able to learn and remember positive experiences. So we talked about, I think it was in module three that when you are constantly under stress, you're going to be looking for threats. You're not going to be looking for the happy things or the exceptions or the people that are there to help you out. You're looking for what's the next shoe that's going to drop. So as you prevent your vulnerabilities, as you get more energy, as you reduce your chronic stress, you're going to start becoming more aware of the good things that are in your life and feel a little bit more balanced. You can also build mastery.  Self control and a sense of competence to handle your stressors include goal setting, small steps and mental rehearsal. So when something comes up that stresses you out, set a goal. How do I want this to turn out? Take small steps. What's the first thing I need to do to make sure that it turns out this way and mental rehearsal.  Your goal is to be able to go into that meeting, handle it and not get completely flummoxed when you're in there and hopefully not be a complete basket case between now and then. So small steps. What is the first thing you need to do in order to make sure that you can get through it, not be stuck in unpleasant feelings between now and two p.m. tomorrow. One of those things might be improving the moment and just taking a break or focusing on the positive things. Sometimes you just can't change the situation and you can't anticipate what he or she has to say. Another small step you can take is like we talked about earlier of checking the facts. If you want to make sure this meeting goes off okay, you don't want to be unhappy between now and then. Let's check the facts. What is the logical reasoning that supports that something bad could happen? And if there is none, then that can help you start feeling a little bit better and more relaxed. Figure out which steps you need to take, but then you can also mentally rehearse. So when you're going into that meeting, imagine going into that meeting with your boss and going through the meeting, hearing whatever he or she has to say, taking it in, the meeting going well, and you walking out of there just fine. Whether you expect it to be good or bad, imagine coming out of the meeting just fine and figure out what a positive resolution could be. Physical mind and body care are also important. So deal with pain and illness so you're not cranky and irritable and uncomfortable. Laugh. And this is something we haven't talked about yet, but laughter is so important. It releases endorphins. It helps you feel happy. You cannot be angry at the world and laughing at the same time. In that very moment, it may not last for long, but in that very moment that you are laughing, especially if it's a good old belly laugh, you weren't angry. So add some laughter to your day and try to find that little kid inside.  Find some comedians that you really, really like. Have them at your disposal and use them every day.  Eat to support mental health and physical health. So don't overdo it on caffeine or simple sugars. Try to eat somewhat colorfully and, you know, when you're looking at your plate, if it's all white, probably not getting all the vitamins and minerals you need. So try to have some colors in there. That's all I'm going to say for right now. Anything more specific is between your doctor and you or you and your nutritionist, but you need to make sure your body has the building blocks to make the brain chemicals that will help you feel happy. Avoid addictive behaviors or mood-altering substances. Behaviors too. Yes, we talk about addictions and alcohol and stimulants and opiates, and we know that those alter brain chemistry. But addictive behaviors do too.  It's helping you feel better, but you're doing that artificially. And if you do that too long or too often, it can cause an imbalance in your brain chemicals.  So you need to try to figure out ways to not drain or cause imbalances in your brain chemistry. Sleep. Get good quality sleep. Enough said on that. Exercise. And when I say exercise, I don't mean you have to go to the gym and work in your target heart rate range for 40 minutes, three times a week or more. What I mean is get off the couch. Move.   Anything that gets you moving and active and increases your oxygen intake is going to help you feel a little bit better. So exercise is what works for you, but movement is going to help you feel better, especially if it's outside, but it'll help you feel better. So in order to create mastery, one activity you can do is think of a situation that often gets you upset or stressed out. Identify the thoughts that are causing your distress. So if there's a particular situation, I know when I taught at the University of Florida, and it wasn't just me. It was pretty much everybody I worked with. Whenever it was time to get our student evals in, we would all just get completely stressed out. So we would have to identify the thoughts causing our distress. What is it we expect to be in there? What is it we expect the consequences of those evaluations to be? Check the facts. How reasonable is it? Identify how you want to react. Set a goal. So if our evaluations were negative, how do you want to react? I mean, you could melt down or you could change your teaching style or you could learn from it. What do you want to do? Identify the steps in making that happen. And part of those steps are eliminating vulnerabilities and caring for your mind and body in the process. So while you're waiting to get the evals back or even after you get them back, you still need to try to make sure that you're taking care of yourself so you have the energy and resources to deal with the stressors. And then rehearse it in your mind. See yourself successfully handling the situation. In the case of the evals, see yourself getting the evaluations, reading them, assessing them, and taking them at face value for what they are, taking what you need from it, and leaving the rest. What situation stresses you out is going to be different than what stresses me out and different from what stresses your neighbor out. But think of something that happens often because once you go through this process, then whenever that situation comes up, you can go through this in your head and start mastering that situation so it doesn't cause you as much stress anymore. Will your automatic reaction maybe be one of anxiety? Maybe. But each time you experience it and each time you come through it successfully, the next time you encounter that situation, your emotional response is going to be less strong. So instead of being terrified, you might be only mildly worried. Emotional dysregulation is common in many disorders and issues, whether it's anxiety or depression or addiction. So it's not something unheard of. And it's not something weird. It's not a weakness. It just means that you either don't have the tools to deal with the emotions as they come. And or when you experience life, you are more sensitive to other things and you are more reactive. Does that mean you're wrong? No. It just means that's how you react to life. So accepting that and embracing that as who you are as being someone who's more sensitive is the first step. People with dysregulated emotions have a stronger and longer lasting response to stimuli. So if you get emotionally dysregulated, which means you get really, really angry or really, really upset, it'll take you longer to calm down. It is what it is. Understanding that that's how you work and it takes you longer to cool down is important to helping manage your stress and interacting with others. Over time, you may reduce some of your reactivity. But right now, just accept the fact that it may take you a little bit longer and you may react to something with a 10 instead of a 2. But that's okay. That's how you reacted. So let's change the next moment instead of focusing on beating yourself up for reacting too strongly or overreacting or whatever someone else might call it. Emotional dysregulation is often punished or invalidated, which increases hopelessness and isolation. So don't invalidate yourself. Accept your feelings as they are. If you don't want to feel that way to that intensity anymore, then you can figure out how to start changing what is prompting that feeling and start developing mastery. But right now, in your current reality, you feel how you feel. Accepting that and embracing it instead of fighting it is a much better way to use your energy. Emotional regulation means using mindfulness to be aware of and reduce vulnerabilities and identify the function and reinforcers for current emotions. So when you get angry, ask yourself, what is my body trying to tell me to do? What is the threat? And work on it because your body isn't designed to just stay angry. You don't want to just stay angry. That's your mind telling you need to do something. So figure out what the function of that anger is, what your brain's trying to get you to address and address it. Once you figure out what the stressor is, check for the facts and then problem solve. And that's the addressing it part. Emotion regulation is one of your first skills of many skills in dealing with unpleasant and intense emotions. In the next few podcasts, we're also going to talk about distress tolerance and the matrix, which will help you figure out how to choose or how to react behaviorally when you have certain feelings in ways that are going to help you ultimately achieve your goal of being happy.


Yeah, thank you. I hope it will be fun, but this is kind of a new presentation setup I'm doing So everything was basically run into a Jupyter notebook and so I'm going to present quite some code I tried to keep it concise. It's okay. If you just don't see the whole screen I also have some bullet points and I will talk you through it and My hope is to make that available a bit later also as a blog post with a bit more description You know we can come back and follow follow on it So I'm working for Agus, which is a Dutch company operating in the agricultural and finance and financial tech sector Where we are developing a supply chain measurement platform and we are going into too much details I will use this experience as a context to run my example for his dog So the heart of supply chains is the goods and how they are processed by chain participants and How they move from one chain participant to the next? so it sends to reason that a supply chain measurement platform then Chucks the goods as they move through the chain Right and when they are not in movement the goods are basically stored somewhere. They have a location and that's The concept I will use to illustrate race conditions here So how can I represent? In a nutshell a location Well with Python I will really focus on a few attributes here I will give it a name. I will give it an owner with a chain participant or just a reference to a chain participant here and also a location can have Child locations right or seen from the other angle a location can have a parent so we can have a hierarchy of locations Like we have a generic location. Let's say like, you know a big warehouse space in which then you can have like more Smaller locations located within I'm also adding here an identity fire field so that we can reference Locations between them without having to load their thing at memory. So we only work with what we need here so that's a Model for a location, but obviously we want to work with more than just one. So we will need also to store them and In this case, I'm I just like the Python interface interfaces and the dictionary is one of my favorites so I'll just basically use that abstraction to To handle my my store of locations, right? So so I can basically just retrieve a location by its identifier Insert or update With the set item of prediction interface and also, you know, we move identifier so that's basically Imagine the location the store of locations is just a dictionary of locations to which we we also add a Name index so that we can then look up by name and I will come back to that in a bit. It's it's just to support an invariant with unique names basically so that's that's just like a Well an implementation of repository we don't really have to look at it. It's basically just using a dictionary to store locations and And piggybacking on that to also have an index on names. That's just what it is So throughout the demo, I'm going to just use a singleton here, right? To to to instantiate and some locations and I will actually not use the singleton directly I will hide that behind a context manager so that we We have a nice abstraction to work with especially if we had enough time to replace the repository with With a wrapper on the database. I had slides of that, but that's just a bit too long So we still have a nice interface of a context manager. We basically Get a repo Repository instance and then we work on that as it was a dictionary applications basically so that's That's locations and then bundle of locations, but I don't want to just work with that. That's a bit too much Well, low level let's say so what is the API I want to expose here What is the business function that I want to to use or you know to expose as a back-end API if If we were doing that here so briefly the read-only API would be how to Get a location name how to retrieve the location parent and that's just That just exemplifies the concept of free repository I just mentioned We acquire a repository and within that context Yes, and within that context like once we are within the context manager here Then we just access the repository of locations as a plain dictionary So nothing should be too surprising here. We get a location and then we just return the attribute that matters So I have a name for the first function and the parent ID for the second function Obviously, that's only read-only. That's a bit limited. We still need to add a mutate data in there So we will also have a creation Yeah, also have a creation a create location function Again, you don't need to look at the whole code here. What matters is so within the context of repository first We will validate the invariant check. So is my Is the location name I want to use actually unique in the repository and If not, then I will just raise an exception and fail and if it is then it's fine I'll just move on and actually create a location and store it in the in the repository the Next mutation is pretty similar. We have first an environment check which is looks a bit Just slightly different Because we don't have the context of the owner. We have to read it from the store but otherwise is the same idea and then the logic is We update the location and we basically put it back in the repository to To commit the change So as a quick example, that might be a bit more a bit easier to grasp How do we use this API then? Well, we simply create locations and here we we pass the first location name and then the company owner of Twitter chain participant and we can also pass afterwards parents to have a hierarchical Relationship so the main warehouse is the parent of a freezer and some of a storage area and then we also have shelves that are nested under and Yeah, so we can use we can use our API here. We can just get the parent which might be Non-existent much been for the root location and we can also nest calls to then just retrieve for instance the location name of the grand parent of a location So that's just what it is here So it's a bit of a higher level API that allows us to to basically simulate how Well, imagine if we had a web API that would be the controller parts, right? We don't deal directly with the entities. We deal with business functions in which we are encoding and our enzymes So here the uniqueness uniqueness name of a location Yes Right, so this is a this was a quick setup basically To labor labor the scene for the further examples But I need to introduce a few concepts before that So we will look at concurrency race condition and critical section at first concurrency is basically the concept of interleaving Multiple tasks on one processing unit So that is each tasks get executed for a short period of time before moving on to another tasks and our task And so on until all tasks complete So in Python and while the global interpreter lock is still a thing Basically all the threads executed in one Python process will run concurrently. So it is something that you have Every time you use threads The concept is very similar in I think IO with coroutines because it's also you basically have one event loop in which You give coroutine like a bit of processing time After each other and that's different from parallelism Which would be the execution of programs on different processing units and then And then we actually have Real-time concurrent not concurrent real-time parallel executions That's not for this talk. That's a different set of of problems So quick example of concurrency if we use threads. So what matters here is that we basically create threads here and what they will run is a counting Counting loop so they sleep a bit to simulate some more some more work than they're actually doing and Then they just print who they are and in which part of the loop they are We start both of the threads Together, so basically they're now running concurrently and we wait for completion with the join join method and what we can see in the log here is so we have one one thread here which ends with 84 and It's it's it's output. It's basically interleaved with the output of the other threads So we don't see that the first thread run and executed everything and then the second run That would not be concurrent that would be sequential So this is just how those two threads are taking turn in execution basically Next the race condition Kind of the crux of this talk So formally race condition is the non-deterministic behavior Which code bath was followed? Basically all the outcome which data made it first which data made it last of a given program Race conditions are caused by the timing or sequence of events and That means which which beats of tasks get executed at one time in what order? So I will also show an example here Again, we use one common location two threads We start them concurrently and the idea is that both threads will try to rename the location the same location with a different value and The problem here is that we just don't know what the end name of the location is because Because that's that's a thing with race condition either one of the two threads can't finish first We don't know which one we don't have us. We don't have synchronization here When we rename the location So and that's that's our problem But a race condition cannot just happen randomly right it has to be somewhere and we call that somewhere a critical section That's the part of the program when we access a shared resource in a concurrent manner and if it's only about concurrent reads then we don't have any problem because you can just always read the value and Whether you do that at the same time or you know within 10 seconds of each other. It doesn't matter as long as you don't have writes or Side effects When it becomes interesting is when we have at least one mutation that happens concurrently to over calls because that's where we can have a race condition It's not systematic and that's that's the whole exercise here is is how to trigger a race condition so that we can then fix them and Well not have some probable So all of our heads when we are on production So let's apply those concepts to the API functions. I just I just define Our only focus on one function that we can use the definitions obviously on at least create location as well So that's that's that's the code I showed earlier for renaming location And I'm just going to look at a few parts So the first is the shared resource here First mark which is the repository. So the repository if you remember is just a plain dictionary So there is no Synchronization mechanism in place. It's a shared resource because if we have several threads accessing the repository then they are they are Are sharing it without Without saying hey, I'm I'm going to use that now. So please let me be And and when I'm done, I'll tell you and then you can go on So that's something we miss and that's why we then have a critical section once we are in the scope of the repository so from Mark one to mark three That's the critical section. So that means that's where we might find race conditions and actually we have two race conditions here One is when we first read From the repository to check if we have an existing location with the same name Because again, we don't know who else is accessing the repository and who else is doing something with it So what we read now at mark two Might not be the same value that is actually stored when we are Looking at the guard because it's possible that we stopped after reading the value Then somebody changed change the value in the store and what we end up with now is just still value That's the same the same approach we have on the third mark, which is basically that if I'm Overwriting a location name and somebody else is doing it at the same time. I am not aware of it So whoever does it Last basically wins, right if I wrote it first then I guess it gets overwritten and I'm not aware of it So that's they're basically losing data here. So we have we have an example basically a static example that I showed you in the function, but that's That's not very Right, that's not really helpful Let's let's just try to run the code and see what it looks like in terms of output here So again, I will just use two threads one location and they will call the rename location function at the same time with different values and The point is then to understand what value we have in the end who wins the race and basically who wins the Renaming because if you lose the race that means that you are the last one to write the value And so in the end you got to say what the location name is so let's see Let's see here. So I'm Basically copying the same code I had earlier to illustrate what a race condition is So bear with me as I walked you through it So I'm going to use functions when I have piece of code so that we can basically replay them a bit and What we do is we define two threads and they both Apply the same the same method So by default would be the rename location with different values thread one was here or thread two was here But we can identify when we look at the final value of the location who was the last one to write so again, we will start the thread concurrently and then let them run and eventually retrieve the value that was sold in And that was written on the location So we can just run that on a new location and yes, okay Sure, we get the value of the name of the location, but that's just one run So we don't see that that can be another value. That's always just one So we need the concurrent aspect here. We need to have like Yeah, we need to have more basically more runs to see that we have different values so I'm just introducing here a an orchestrator to basically play out the concurrent and Renaming of the location a hundred times and then we look at the results out of other times Who basically won and who could write their own name in the location name and if we then just apply this then we have a hundred times the same thing that we had before so 100 times out of 100 location to one and basically left their mark in the location Which is not what I want to see because here. I'm just I'm just confident that my code doesn't have a race condition I mean look that's only one value. So nothing can go wrong in production. He and no, that's actually not true The problem is it within our tests. We are not Exorcising the race condition. We are just hoping it will exercise, which is not the right way to test obviously So what we want to do for now is for the computer a bit to To help us and trigger the race condition every now and then and we will just in ten minutes In a minute, we will look at a better way to do that and exercise the race condition ourselves so I'm here defining a Decorator so I'm just so basically this is a function that I apply to a function to replace the behavior and What what I will do here is whatever Logic of the function I'm decorating was I will first Do some busy work just to keep the processor busy a bit And let the operating system switch between the two threads so that we can have a bit more of concurrent basically concurrent run between the two threads Otherwise, I just run too fast and we don't see anything anything happening So now if I run my my test run again, I can have Finally two different values. So that's great now I can see that sometimes fed one finished first and sometimes fed to finish first or last with the values here So that's that's better because here I can see that the race condition is a real thing And if I call twice the rename location concurrently, I don't know what value I end up with Which is obviously not a good place to be in So what we want to do is we want to be able to understand when and How many times of threads will basically Get interrupted so that we can then I can then Understand who will win eventually race condition or rather how we can get rid of the race condition in the first place So here it was trial and error to know how much busy work I need to have so that I can switch between the two threads and that obviously doesn't scale well It just worked on my machine. That's you know the trademark works on my machine So the the problem is that We really need to have a way of triggering the race condition programmatically every single time and We will now look at this and in general I need some more definitions briefly and then we can look at the methods that we can have in Python to do that so The whole the whole crux the whole problem here is that we have concurrent access to a shared resource the very first story and How can we protect that resource? How can we enforce that only one person can access it? Or one thread will access or mutate things at a single time We have two ways of doing it what I call implicit implicit concurrency management and explicit concurrency management and the implicit way is basically when we can delegate to a Library or to a lower level so for instance if you delegate to The database and then the database can then lock the whole table for you or just a row that you want to modify so you don't have to think about the actual locking mechanism the actual guard against the shared resource you just work with this frame within this framework of You know that when you want to mutate these data it will be protected It will be serialized and only one only one thread will mutate it at the same time. So that's very general purpose It's a great abstraction because you don't have to worry about it. You just let the system do it for you and Most of the time it's just the right approach just delegate but sometimes it's Sometimes it's not so nice, especially if you are really looking for You want to squeeze a performance out of it, right? And then locking the whole resource for instance like guarding against two threads accessing very possibly at the same time would just be To damaging in terms of performance in this case and you will want to well take the matter in your own hands and then use some Some specific concept to then protect the shared resource against against multiple access and here we call this synchronization primitives And that basically offers you a Really tailor-made approach that you can well, obviously Hopefully you can make it more performance than the general approach But well, it takes a bit of bit of care and and craft to do that and this This this these two concurrency management's Well, it would be easier to actually show the first one with an actual database implementation of the periphery Which is what I mentioned earlier the SQLite repository But well, that's a bit bit too much for that one talk So we'll we'll first focus and only focus on the explicit management and I will just briefly note about the implicit concurrency management later So what kind of tools do we have in the Python standard library to help us with that? We don't need we don't need actually anything external. We just can just use everything that is built in here So the synchronization primitives I mentioned the basically the tools in the toolbox Well in Python, they're just Python objects and most time can be used as context manager for an easy scoping Easy scoping writing I Think I will be a bit quick on those So those are your staples in computer science, but it's not specific to Python What is basing to Python here is just the API, but it's Pretty much tonalize over all of them So first we have the semaphores with RV which are one of the oldest synchronization primitive But basically count how many things there are in a pool in an atomic fashion So you can try to acquire something from the pool and if there is nothing left Then you are basically going to block unless you have a time out and You can then try to release something from another thread in the pool to give access to more things in there So that's the general concept of semaphores we also have related concepts, which is a bounded semaphore and that's more for assertion and let's say prebug Prebug purposes is just saying that you cannot go past a specific Number of things in your pool otherwise you get an error and that's that's more of safety check than anything else The lock which is a very basic Concepts it's you can get this in as a binary semaphore So you just have either zero or one thing that you can get in your pool and That basically gives you a single access to a shared resource So this can also be called mutex from mutual exclusion But in some of our programming languages, it has a bit more properties. That's we are not looking at here So the typical use case would be to basically protect a singleton against for instance double creation So when you initialize your singleton You want to make sure you've got only one So you just acquire a lock to guard access to this and then nobody can do anything with it until you release the lock Related concept will be the re-entrant lock or recursive lock Which just means that whoever owns the lock can then acquire the lock again Without blocking and so on and so forth Of course the the principle is that you release the lock as many times as you acquire it Otherwise you will end up with a broken lock and you might just hang in your process The idea is that it's useful when you have like recursive function calls in which you need a lock because the first time you actually have a lock and then the other times you just like Reacquire it for free kind of you go in and so forth in your recursion tree The event can be seen as a signal that one thread broadcast to many threads that are looking for it Basically imagine like a it's just a flag flag propagation Condition is Is a bit linked to lock event and predicate. I'm not going to go into too much details now It's just a thing. It's a nice thing in Python and Barriers which are not available in I think IO but in threads can be seen as a checkpoint where You know how many threads you want to reach that barrier and once everybody is there when you just let them go so if we apply those those Those primitives to to our race condition Example here, which is again To change the location name from to Fred's currently Yeah, just pushing a bit on that. Oh, no, sorry So, yeah, so the what I want to do now is actually trigger the race condition Programmatically so I don't want to have busy work and hundreds of iterations I just want to have one iteration in which I I know which red will run to the race condition And then I can basically make sure that both threads are Executing through the race condition and then causing an error and then I can fix that in the system Once I have a reproducible test and here we'll just apply the uniqueness of a location name as our Invariant that might be broken due to a race condition when we redeem location from two different places Yeah, so the example will just be again, we have We have two locations and We will just try to rename them to the same name concurrently. That's that's the code here so the The way this is going to work is we will first start both tasks Renaming a and then renaming B concurrently will let them execute But we'll stop them before they actually persist the change to the repository So that means that they actually pass the invariant check So both are allowed to write the repository, but we just stop them before they actually write and And then once we are there we can decide who we want to let go on and write repository and I chose the Repository update because that's the race condition. I'm looking at The expected outcome with the current code base would just be that we have basically Both locations end up being named the same way because they both passed the invariant check And they were both able to rename it, which is of course not what we want in the end But that's that's the test we want to reproduce the race location And we want to make sure that we actually have a bug in our system So the steps I just mentioned I will briefly apply the right synchronization primitives of them and Here it's it's gonna be First a barrier to basically get everyone up to speed We create the two threads. We make sure that they are initialized and they are Running or rather almost running and once we are there we can Yeah Then we can then let begin the task which will be to rename the location Because remember that I want to do this programmatically So I want to be in charge of when the fed starts actually Right potentially I can have more setup in between between the two steps here Once once they begin they will carry out the environment check they will Change the location. I mean memory and I don't want them to just persist yet I want them to be ready to do that because I want to again Be able to decide Which of the threads will try or will actually write the location to the repository so that I know Then what to expect in terms of in terms of failure So here the update to the repository is just set item method and the dictionary so that's where I will basically add another The primitive which will be another event per thread so It will it will basically look like I can then tell either Fred one or Fred two to then proceed once I Set that event when I said once I have set the flag and then finally the last two steps are basically Letting them proceed with the with the event I just mentioned above let them proceed and write the repository and then we wait for them by joining the thread Which actually is using a lock also internally so we have a barrier a Few events and then a lock in this example and those are really I mean those are those can also use other primitives But then the semantics is a bit different, but they work pretty similarly some of them are interchangeable here So if I just apply now those or transfer them to these steps to code the first task The first task is pretty similar to the second task And it's basically we are waiting for everybody to be set up. So that's the barrier, right? We need to work Then once everybody is set up we go on to the next block which will be When the when the test runner will tell us okay now you can actually Start your logic and try the invariant and try to update and Once that is set once once we've got the signal then we actually you know called rename a and rename b Which will then rename both locations to the same name the Mute is mutation seam. So the first step what really matters here is that I'm patching the set item of the repository. So that means that I'm really inserting a new block a new a new block which is actually an Event a thread Before I allow them to call the real set item on the repository So the yeah the exact the exact logic is here The intent is clear And if we wrap all of this together we end up with this long piece of code But basically what we have here is we again Well, we defined first the objects that we are going to work with synchronization primitives We initialize both threads with their own Logic function that we defined above and we pass the rates right primitives We start both of them and then we wait for them to be actually ready to do work So that's that's the barrier that all three threads the runner and the two task threads Going to wait for once we are there We know that both threads are ready and we can just signal them to go on and actually try to do the infinite check so after a bit of more Initialization that's basically step two then we can let them we let them know that we can actually start and so now concurrently both threads are checking the invariant Getting the change ready in memory and then they are stopping again Before they can persist to the repository because if we didn't stop them if we let them go further Then we are actually potentially in the race condition, right? Because then if Fed 1 did write if it just executed everything before Fed 2 then Fred 2 will just read the value from the which is already Fred 1's value and then we are not triggering our risk condition So step 3 is basically to make sure that all threads Have passed through the invariant check and were able to perform the change in memory so that's when we call the Final two steps, which we first let's task one which is the first thread one so renaming a to see To run and we wait for it to complete by turning the thread and then we do that also for step second thread location B and Well, I mean we can just execute this against the repository here I'm actually calling it and I don't see an exception That's I guess that's good news and If I now try to look at the actual values the actual names that were written for both location and location B I can see that they have the same name for the same owner So my invariant was broken and that's exactly what I wanted to see I could reproduce the race condition Programmatically step by step and now I know that I have a bug and I need to take care of it Just to make sure that I'm not saying anything stupid if I try to use the same name again Then yes, I get an invariant check error. So my invariant check is working. That's not a problem here All right, so basically I will give you a couple of solutions here as to how I how we can solve this now that we could reproduce it and It's yeah, it's just a few lines every time. That's that's a nice thing So the first the first solution which actually could be seen as the an implicit concurrency management would be to Lock the whole repository every time we try to access any location in it So basically would say I have exclusive access to rip repository now So I can do whatever I want nobody will see what I do until I leave the scope and then some over thread only one can Take the hand of the repository and go on there So in this case, I can just use Well, if I had a database, I could use an exclusive connection mode Or in this case, I just lock my single tone and lock. Remember, it's just a binary Semaphore, so only one thread can hold the lock at a time The others will just wait until thread until the lock is free and then only one will get it And once I have a lock, I'll just have access to the Repository which means that in my functions When I am in the scope of the repository context manager, it's now a synchronized access I am the only one accessing accessing the repository, which means that all the code that is after that It's not a critical section anymore I cannot have a risk condition on locations because nobody else can do anything with locations besides me So that's one way to solve it. It's like it's a bit brutal Well, it works and unless you are looking for More performance, you know simple is it's really better. You can just stick with this and then yeah, so The problem I would have had a problem if I run my test again I will just leave that as a In there, but basically I would need to change how I exercise my risk condition now Because since I have a lock, I cannot have both threads Being inside the rename location function at the same time because only one has access to the lock So only one can execute the environment check at one time So we need to account for that and introduce a few more synchronization primitives which we don't do that here or I add a bit of a bit of a time out to Let basically the other thread do their work But obviously this value here of one second and when I give some time Up to your thread to do something is again the same problem we had before it's well It's not scalable. It's just runs on my machine. So that's just a quick way to to make it work with a with a global look and Indeed now if I reset my locations and I try again To access the in-memory To access. Yeah, the in-memory locations from two threads. I get an error in one of the threads Which is what I wanted to see Because now that means that one thread will be aware that it failed to actually Carry out the operation. I didn't charge anything in my test. I just added the lock So that's good. I could fix it and If I look at the values of both locations Yep, indeed only one was changed in this case location a because it was first it was the first thread that I release from It's a single first We can have a few more solutions, but I will be just briefly mentioning them. So we could also only lock The mutation operations instead of locking the whole repository So that's that would be a bit more a bit more focus. It's basically Remember that the rest condition is only a problem if you have at least one mutation, right? If you only have reads With access you don't have any problem because you don't have any side effects. You don't have any changes So by only locking the mutation Then we can we can just Scope a bit the scope and hopefully let the other read access be more performant and not blocked when I want to carry one mutation operation So that's the nice thing. It's only about a subset of calls. Hopefully not the main course and I mean, well, that's just one example way of how I would Model that here. I would just you know, add a flag to the repository saying oh, I'm about to do the mutation in this context so please Get a mutation lock for me and then I would carry the work Alternatively, we could also have some final grain even and come up with a lock per location name because that's that's the invariant that we want to check and We are very much into a hand-crafting Tailormade solutions here because I want this invariant to not Fall into a critical sections, but there is no race condition that can happen there So I designed the minimal lock to basically Free that that invariant from the from the critical section It's a bit more involved because then you have to be really precise on which name you want to do But the intent is much clearer. It's more explicit. I'm saying I'm about to mutate only this location name So then I mean in the in the back end I have to do a bit more work because I have more locks to maintain and and potentially more more exceptions to to handle but from the use of of the code here It's much clearer. It's not it's not left to To the whims of the database as to when which exclusion exclusion mode you are isolation mode you are So to conclude You don't always have problems if you don't have concrete mutations, you don't have problems. That's fine You can have as many as you want as long as you have only read access And it's not because you identify your race condition. It's not because you see a critical section But it will happen and that's the problem here that I wanted to alleviate It's hard to reproduce. It's hard to test if you don't even spot it in the first place You might be well aware you might be unaware of it from your test suite because Unless you have enough data as I showed you with busy work or unless you have a more programmatic approach It will likely not show and you might just end up one day in production Realizing that you have a bug no idea what comes from no data to investigate no forensics and then that's that's the best Well, no, that's the worst place to be in As much as you can I would advise to delegate to local levels So let the database handle locks at role levels or table levels If you if that's not enough or if you want more performance double check your architecture So the example here was obviously a bit contrived And we could have come up with an alternative way of modeling things to not have such a high dependency on the and the repository being in a single axis and When all of this is not enough just Just exercise the risk conditions yourselves. Just make sure that you can reproduce them If you see them and then that you have a failing test and then you can fix it and keep that in a test suite Don't let that be happen since all the chance come into play And that's basically that's busy for for my talk. Thank you


I'm Lieutenant Pepper. I commissioned from the Air Force Academy in 2019, so I've been in for about a year and a half now. And I work in 21A as an aircraft maintenance officer, and I've enjoyed my time here so far at Hill. To me, my most significant barrier is myself, and that there are times when I feel insecure, or that I'm not feeling confident in myself that day, or, you know, I'm telling myself, oh, you know it's not my place. Well, guess what? I'm a Lieutenant. It is my place. It is my place to stand up for people. It is my place to have a voice and to use it. So, for me, my biggest barrier is myself in saying, hey, you got into the position where you have the voice, use it. So, that's for me. But then, I think for women in general, you know, people say that it's the military. Of course, it's not 50-50. There are so many jobs where women could be awesome. Our population is 50% women. And I think that we could get to a place in the Air Force where the population is also 50% women, or some kind of more equal, even having gender non-conforming people, non-binary people, where there's just more representation in general. Because, ultimately, we are defending the American people as a whole, right? And the American people as a whole don't look like what the military demographics look like. And so, I think if we have more representation in general in the Air Force, then we will see better defense of our country. My advice and something I've really struggled with is being confident for others. So, what I try to do is, even if it's a position where I might not stand up for myself, I want to stand up for my airmen and the people that I lead. So, if I see any kind of behavior, any racism, sexism, misogyny, any of that kind of stuff that happens, unfortunately, still in our Air Force, I am constantly encouraged to stand up against that for the sake of my people.


Making sure there's nothing going on there. Christy tries to loft it into the box. Head-it! Three-head-it! It hits the bar from Solanki! Goal kick to Huddersfield. Best chance of the game there. Absolutely. The Huddersfield players are looking to the lines one, but he's shaking his head. And you have to say that's a miss chance. And it was such a gentle delivery there from Christy. He's always had no run-up, and he's just across the middle as Philips touches almost. The eyes lit up there of Danny Ward as both are out getting a few passes going. It's down the right now into the penalty area for Bournemouth. Down the right hand, across the first goal. Anthony finishes it! Bournemouth have taken the lead here at Huddersfield, and a huge game in the championship. It's Jadon Anthony with his eighth goal of the season. It was a brilliant ball down the right side of the box. It went across goal, and from about six yards out, Jadon Anthony slipped it past Lee Nichols and Cherry's lead here. It's 1-0. Well, that was an excellent goal if you thought the one against Readingby as a passing movement, that comes close to it as well. Down the right-hand side, great ball, as you say. Dominic gets it in, and I didn't know if he could get the ball across to Anthony, but he managed to drive it past the keeper. Across his body in the middle of the Huddersfield half. Touch of base, and now it's Lerma trying to play 1-2. Solanke in the penalty area, saved by Nichols out towards the edge of the box. It's bouncing round. Lerma shoots! Lerma scores! It's 2-0 to Bournemouth, this bump from Scott Parker. Solanke was put through, and Nichols came out to meet him. It was really well saved, but the ball just bounced towards the edge of the box, and Lerma just hit it. Not a lot of power with his left foot, and it's just rolled into the far left corner willow, and Cherry's lead 2-0 inside the first half an hour here. Yeah, again, it was all about Dominic getting through. I thought he tried to knock it past the keeper. The keeper's got a scoop on it, but it went to a Huddersfield player who tried to control it rather badly. That's the Colombian. He's got options out to his left. Antony now up against Turton towards the left corner of the penalty area. Zamora is overlapping. Billing pulls it back. Solanke with the flick, and it's 3-0! What a start in the second half! Bournemouth, surely wrapped it up. It's done Solanke's 24th of the season inside the first minute of the second half. Cherry's lead here. Huddersfield 0-0, Bournemouth 3-0. Well, it was fantastic work by Jefferson Lerner to start with, picked the ball up on the half way line out to the left-hand side of the pitch. A little exchange, and I think it was Phil Bill who cut the ball back. I wondered what Christy was going to do when he was going to go over it, but no, he tried a little grief flick into the far corner.