All right, we'll welcome everybody to the Lowy Institute and welcome to this conversation about Australian Defence Policy and AUKUS with Charles E. Dell, Levina Lee, and Justin Burke. I'm Sam Roggeveen, Director of the International Security Program at the Lowy Institute. I'll introduce our panel more formally in a moment, but as is customary, we begin by acknowledging the first Australians on whose traditional lands we meet and pay our respects to the elders past, present, and emerging. Well, it's no exaggeration to say that AUKUS has dominated the news here in Australia since President Biden and Prime Minister's Albanese and Sunak made their joint announcement in San Diego last Tuesday morning, our time. Australia, it was announced, will acquire three to five secondhand Virginia-class nuclear-powered attack submarines from the US and then eight new generation submarines designed and built with US and UK help to be known as SSN AUKUS. And incidentally, SSN is the accepted short form for nuclear-powered submarines. It's a term you might hear frequently from our panelists today. It stands for Ship Submersible Nuclear. The three leaders also announced Submarine Rotational Force West. From as early as 2027, the UK will rotate one SSN through the newly refurbished HMAS Sterling Naval Base in Western Australia, while the US will contribute four. It's fair to say that the announcement also came with a large dose of what marketing and advertising experts refer to as sticker shock, which is that shutter and lightheadedness that we all feel when we see a large number on a price tag. In this case, an estimated $268 to $368 billion Australian over 30 years. So the job for our panelists this afternoon is to discuss the merits of that spending, what sort of military equipment and how much military deterrence will Australia get for its investment. That's at least where we'll start this conversation, but I'll also throw the floor open to all of your questions later in the session. For now, let me introduce our panelists. Charles E. Dell is the inaugural Australia Chair at the Center for Strategic and International Studies in Washington, DC. One of America's most renowned think tanks. He previously taught at the University of Sydney, where he was a senior fellow at the US Study Center. Prior to that, he was a professor of strategy and policy at the US Naval War College and served on the US Secretary of State's policy planning staff from 2015 to 2017. Welcome back to Sydney, Charlie. Dr. Levina Lee is a senior lecturer in the Department of Security Studies and Criminology at Macquarie University. In 2020, she was appointed to the Council of the Australian Strategic Policy Institute. Levina is a non-resident fellow and that's a colleague of Charlie at CSIS and a non-resident senior fellow at the US Study Center in Sydney. Prior to joining Macquarie University, she was a political risk consultant with Control Risks Group. And last but not least, Justin Burke is the 2022 Michael and Deborah Thorley Scholar in International Security at the Lower Institute. He's also a non-resident fellow at Keel University in Germany. Justin's completing a PhD at Macquarie University on the uses of submarines in naval diplomacy. He has written for the Royal Australian Navy Sea Power Center and other scholarly publications and he appears regularly in print and online in Australia and internationally. And I'm gonna take the opportunity, Justin, to begin with you as our true submarine expert on the panel today. I wanna ask what is it that, well, we hear nuclear-powered submarines described as the apex predators of the ocean. So tell us a little bit more about their capabilities. What is Australia getting? What will Australia be able to do that it has never been able to do before? Thank you for the question, Sam. Also allow me to thank you for your hospitality at the Lower Institute these recent weeks and to Charlie for hosting me at CSIS for the last three months in Washington. Of course, the Thorley Scholarship is an opportunity to immerse yourself in these places and to develop a little bit of knowledge about something and submarines has been the chosen topic. So to answer the question, I think that the issue of nuclear submarines for the Australian Navy is very new to the public but less of a new topic to the Australian Navy. It's a capability that matches and Australia's requirements, Australia's needs, Australia's geography, something that has been thought about for a long time but a particular will and a particular political configuration is the most recent change that we've seen. So that is to say Australia has been using diesel-powered submarines in a way that nuclear-powered submarines are traditionally used, transiting long distances, pushing through a lot of water. And so the view has been put to me that we have really reached the limits of the chemistry and the physics of what a conventionally-powered submarine can do and it was simply gonna be insufficient for our future needs. There is also the issue of needing to snorkel, which is to say coming up close to the surface to run diesel engines and suck down air. That is a detection risk. It's a risk that in the decades to come is going to be an unacceptable one and an unacceptable practice. And there are other aspects looking to the future with SSNs for Australia. So as well as the upgrades to the Collins class which we expect will be receiving Tomahawk land attack missiles, the Virginia class submarine is obviously, this will be a new capability for Australia that raises some interesting questions. But I think even further ahead when people start talking about an autonomous future, autonomous underwater vehicles, I think we really need to step up in terms of this power source because we need to be able to run this kind of mothership autonomous teaming. I think that's the future. And I think a nuclear powered submarine is really crucial to that. I don't think it's something that we could really contemplate with a conventionally powered submarine. Just to amplify this point, the issues really here, the advantages of nuclear power are range and endurance and it's really quite stark. I read a study myself just recently that for a nuclear powered submarine operating from say the West coast of Australia, the transit time to the South China Sea would be roughly a third of what it would be for a diesel submarine. And once it's on station in the South China Sea, it could operate for something like 70 or 80 days. Whereas the endurance of a diesel powered equivalent will be something in the order of two weeks or less. If I may jump in, it's a very popular kind of diagram that's done the rounds. It does omit the fact that Australia does pull into Singapore routinely, refuel and replenish. So it does have the ability to go further and to sustain on station for longer, but it is nonetheless true what you say. So the question we have to get to for the hours out is why that's important for Australia to have those kind of capabilities. But Charlie, let me first turn to you and ask you about the response in Washington to all of this. So we, as I said in the introduction, this has absolutely dominated the public conversation in Australia, including the, you know, splashed all over the front pages of our newspapers for days. What about in the United States and in Washington in particular beyond the direct, you know, policy and political circles that would naturally be involved in this? What has been the reaction? And then also as a follow-up, what's the, how would you describe the support level for AUKUS inside Congress? Because that's gonna be very important going forward, right? Yeah, so thanks for the question, Sam, but thanks very much to Lowy for hosting. It's terrific to be back here. I'm here for three and a half days only so I can pulse the very vibrant debate that we're seeing here in Australia because it's not actually been as much of a debate in the US thus far. A couple of different reasons. One, everything happens all at once. So the news cycle is sometimes drowned out by other things. We had a bank financial collapse pending that didn't happen. So the news story when it broke in the US last Monday was an enormous story for one day and then it's submerged if you allow me. We can play with this analogy all day long. The puns are out themselves, Jolly. They do indeed. Look, I prepared for this by re-rooting 20,000 leagues under the sea. So I am good to go, Sam. But it was a large story and for one day and then it's gone away. I would say a couple of further things on this. There is largely a wellspring of support for this from Washington, from industry, for people who read this, but there are lots of questions to be answered just like there are here. And one of the ones that we'll talk about, I'm sure, is the United States has its own naval requirements. They are set about how many things we need. SSNs, SSBNs, we can use lots of analogies here, but how many capabilities we need to meet the objectives that we set for ourselves as a country. So the question is, will we still have the ability to get them because we've not been meeting the objectives and will August now, will an infusion of investment by Australia, by the Brits and by the United States into the submarine industrial base support the requirements that we already have. So that's a question that I think is out there, but there's a larger part here that I think is resonating through the American public. Partially this comes via Ukraine, but I think it's a larger point at this stage too, that I think the American public by and large, despite the chest beating that you might see coming out of us and we have lots of that, of course, is acknowledged the fact that given the turn in geopolitical events, given the increasing concerns around Taiwan, given Russia's invasion of Ukraine, that the United States wants its most trusted and most capable partners to be stronger than they have been in the past. So I think there is a turn away from what used to be called simply American primacy. We are going to be stronger than everyone else combined. And now you're beginning to see a development of thinking that given the way things have evolved in the global environment, America needs and indeed wants its allies to be stronger than they have in the past. So that is, I think, actually boosting this decision around Washington and then more pervasively within the country too. Lavina Lee, this is not just a trilateral story, of course, it goes far beyond Australia, the UK and the US. Can you take us through regional reactions to AUKUS? Sure. AUKUS was originally announced about 18 months ago. So we were at that in process. We're now talking about the plans for the optimal pathway. And at that point in time, there were countries in our region that expressed some concerns about AUKUS. And principally they were Indonesia and Malaysia who have talked about concerns about nonproliferation. And recently, again, we had to reiterate those same concerns, but also concerns about the idea that in making this agreement that we might in fact be accelerating some kinds of arms race in the region. Now, there are a number of ways you can interpret this. So in one way, you could say that they could have actually made a lot more of a fuss about it. That in fact, whilst mentioning some of these concerns, they haven't actually been as loud and as consistent and vociferous as you might have expected. So I think we could actually take that as a positive sign that either we're doing the right kind of diplomacy. I think the first time around, it was a bit of a shock for everyone because there was all sorts of secrecy, obviously involved in making such an announcement. But the second time around, the government has been making a lot more efforts to in advance talk to their regional counterparts to reassure them. Now, one of the aspects of this deal that doesn't get talked about as much is the nuclear proliferation aspects. And if you're a nuclear proliferation expert or someone who's in that field, I think you would have concerns about AUKUS. And I say that as someone who actually supports the AUKUS deal, but it is relying on an exception within the Nuclear Proliferation Treaty that allows for nuclear propulsion. So it isn't banned under the NPT, but some would look at it as a kind of against the spirit of the NPT, even if it's not against the letter of the NPT. Now, I think Australia and the AUKUS partners have done a good job, I think, in reassuring the region that we're not about to start reprocessing uranium or enriching uranium or reprocessing plutonium. We're not getting that technology. The fuel will be provided to us. We're not creating it ourselves. We won't have access to it. It will be in welded units that will last for the lifetime of the submarine, which is around 30 years. So we have to think about the waste aspect. Afterwards, that's a problem that we as a country have to think about, how we're going to deal with that. I think there are solutions. But in terms of the proliferation aspects, there will be some who will still say it's setting a precedent, that there might be other countries, especially other nuclear weapons states, who might think, all right, well, why don't we do the same thing? We might have an ally or a very close partner that might be advantageous for us to have a similar type of deal. Look, I think that the IAEA has come out, the director general, and said that he is very satisfied, in fact, of very glowing, about what Australia and the Orcas partners have done in terms of reducing proliferation risks. That's a very big positive. But I also think that, I think we just can't forget how unprecedented Orcas really is and the likelihood that there really is another nuclear weapon state out there who would be willing to sell, not sell, but share their crown jewels with another country. I would even wonder whether this no-limits partnership between Russia and China would also go that far. So this is a big deal. And so if we're talking about precedence, you still got to think about the likelihood that they will actually be followed through. And now your original question was about Southeast Asia. And what I would say, final comment about Southeast Asia is, it's kind of an open secret that Southeast Asians really respect power. So they're very respectful of the United States. I think they internalize the military modernization project that China is embarked on, which is the largest project of any country since World War II. They largely internalize it and accept it. And I think in terms of Orcas, they will internalize and accept it. And I think there are a number of Southeast Asian countries that don't say it vocally, but they're actually happy that we are taking steps to bolster the balance of power in this region. And I think there's an acceptance. They know very well that ASEAN is a diplomatic and institutional forum, but it is not capable of providing that balance. So they look to us and I think they will actually treat us better because we're more capable. They'll actually look to do more with us in terms of defence cooperation than they ever did before. So when we hear Indonesia express concerns about proliferation, we should read that as literally concerned about proliferation and not as a proxy for a broader doubts about the strategic aspects here and about Australia's growing military strength. I think that's the case. I mean, very recently, I'm not sure I can't tell you exact dates, but very recently we had announcements that Australia and Indonesia were moving forward to deepen their defence cooperation and this was in the shadow of a, I think maybe two weeks later, the August announcement was due. So I do think that they do have concerns, but I think those concerns can be placated and I think Australia, the UK and the US are doing as much as they can, I think, to do that. Charlie, you talked about a turn away from primacy towards helping allies to develop their military capabilities. That brings me to former Prime Minister Paul Keating's dramatic intervention last week in this national debate, which I know you familiarise yourself with. What's your response to the argument that America's, and I'm quoting Keating now, that America's geo-strategic priority is to contain China militarily economically, close quote, and that through AUKUS, Australia is effectively signing up to that ambition. I would say it was certainly a dramatic intervention that Mr. Keating made, whether or not it is an effective intervention we'll see as the debate plays out. Look, I actually think that you have to start by responding to that question from the point that Levina had just introduced, that this was a dramatic announcement, both 18 months ago and again last week, but it shouldn't be an altogether surprising one. The particulars the details are, because this is a fairly natural, I would say, response by three nations to an unprecedented expansion by China. Levina said the most explosive exponential growth since World War II. Over the past two decades, three decades, we have seen the Chinese economy grow. We've seen them plowing money into military modernization. We've seen 13 new submarines that the Chinese have put to sea over the past 15 years, several of which carry nuclear armed weapons, which Australia's will not. And we've seen not only a growing capability that is oftentimes opaque, right? You have to look pretty hard to understand what they're doing, because they try not to advertise everything that they're doing. That is one thing, but it's the use with which that force has been put. Growing capabilities of betting and expanding set of goals by China. Two increasingly, and this is the easiest argument in the world to make here in Australia, intimidate, coerce, lean on, and occasionally attack China's neighboring states. The security environment has deteriorated and has been destabilized because of the actions that China has taken. This is not surprising that there has been a response. It's surprising that's taken so long, I would say. So the fact that there is a dramatic response doesn't surprise me at all. One of the things that I look at when I'm watching how the press unfolds here about what's happened with AUKUS is that just like the American press, sometimes we get a little parochial, right? That you look at what is happening in Australia, absenting what's happening in larger contexts. Because Australia has in the midst of really ramping up what it's doing. We should note too that AUKUS is only one part of this, right? Your government is in the midst of the defense strategic review which will be released in a month's time. AUKUS is only a part of where that is going to go. But this idea that the environment in which you live has been badly destabilized is not a decision that Australia is alone in recognizing or responding to. The Japanese, a pacifist country, have just announced that they are doubling their defense budget. The Philippines are ramping up what they are doing. The South Koreans have decided that they're going to start talking with their old nemesis, the Japanese, because they're worried about what is happening in their environment. Same with the Indians. These are all a set of responses to the same set of stimuli, right? And increasingly aggressive use of Chinese capabilities. So this strikes me as not containment, but a natural response to what has been all in this. I mean, I think Penny Wong talks about this regularly as strategic equilibrium that Australia is looking for. Because at this point, you were talking about the Southeast Asians response to this writ large. The Philippines said in response to the AUKUS announcement last week that we were hoping that something like this begins to restore strategic equilibrium for us and therefore we welcome it. So this strikes me as a pretty natural, if dramatic response to what has been happening by China over the last two decades. I would say that with perhaps the exception of Mr. Keating, I doubt it would be controversial in Australia that we would respond with dramatic gestures of our own to the rise of Chinese military power. That seems completely natural, I would say to most observers. There is of course a different question about how we respond. And Paul Keating's foreign minister at the time, Gareth Evans has come out saying that this is a pretty dramatic shift from a doctrine focused on the defense of Australia to one back to a forward defense strategy. And I've argued myself in the past that capability can drive policy. What we have determines what we do. So if we buy submarines that are more or less expressly designed to operate thousands of kilometers to our north, then that's how we'll use them. So how do you respond to the argument that the capability in itself will drive Australia closer to American foreign policy objectives on Taiwan, for instance? Look, you have said like 15 different things there. So we would probably take each one at a time before we get to the covert deal that your government has signed up to with the US as we heard this morning from Hugh White. Look, let me start by answering that and then actually Justin I think can chime in as someone who knows the capability really well. When you were talking at the outset, Sam, about what do SSNs, right? It comes somewhat trippingly off the tongue. What do they give you? They give you range, they give you power, but they also give you stealth in a way that diesel submarines don't. And I think, so let me draw back to the strategic angle. I think that this is a bet amongst other things by not just Australia, but by the United States and the UK as well, that if they look back, if all of our governments look back over the past two decades, not very much has deterred China, right? China thinks that they are operating in a very permissive security environment. And if you have a permissive security environment, you keep going. Now, as Richard Marl said just last week, when you have a stealthier capability, it increases the questions for Beijing. Where are they? What do they have the ability to do? And before you continue taking not only assertive actions, but potentially quite aggressive ones, this increases the complexity of the cost-benefit analysis for Beijing. That is a good thing that we should want to increase. We should want to increase the questions that reside in Xi Jinping's mind before he decides to roll the dice in a horrible way, be it in Taiwan or somewhere else. And so the stealthiness of these capabilities, these SSNs is something that I think, and this is where we should probably get to the deterrence conversation. The bet here, at least as I read it, Sam, is that by bringing more capabilities online, not just for Australia, but increasing the capacity of all three of our nations, it creates more questions in Beijing's mind and begins to convince them that they are operating in a less permissive security environment, and that will ultimately stabilize the region more than it has been over the past decade. Yeah, it's an ongoing desire of mine for the Navy and for the submarine community to talk more about what they do so that we can understand and appreciate it, because I think that is affecting the kind of assumptions that people make. So the assumption that our current conventionally-powered submarines don't operate thousands of nautical miles away from our shores incorrect. They can, they do and have done. Australia's operated submarines for more than 100 years in all sorts of places, though, as I say, accounts of what they do and where they go are tightly held. Defence would say that the more they say about what submarines do, the less value they will have because obviously as much as Australian citizens, taxpayers and voters are interested, so are our adversaries. I would submit to them that they could do a little bit better. They could perhaps tell us a little bit more. And I look to the way our intelligence agencies, even in the last 10 years, have increased transparency and have worked to earn the social license of what they do by telling us a little bit more about what they do year to year might be a model that Defence could look at. Yeah, Lovina. So your original premise of the question was about containment, that Australia was buying into a containment strategy by the US. Now, I mean, that word is always bandied about, but it is a cold war term that I don't think applies in this current environment. I think what we're really trying to do in line with what Charlie's suggested already is it's about constraining China's options. It's not containment. China is the number one trading partner of a large number of states. I don't have the number, but a very large number of countries in the world have China as its major trading partner. We're not, I don't think Australia's ever suggesting that we're not going to trade with China. There might be selective decoupling going on in terms of high technology, in terms of critical supply chains, but it is selective. And the idea is not to contain China, but to shape its decisions. And as Charlie said, up until now, you can see, say for example, in a period where our relations with China, when I say our United States relations with China were still very good. When Obama was in power, there was a lot of conciliatory kind of moves in around 2009 when we had the GFC. And then from that point on, you can see the steady expansion of kind of aggressive behavior by China. And up until now, there hasn't really been a steady response to that. So I think this is about sending a signal to China that we're improving our capabilities. It sends a big signal about resolve that we are capable, but why are we doing this?  You've got to, if you were China, you'd be, there's a good reason why they're making so many noises about it. So if it wasn't actually an important thing and I think a quantum leap in our defense capabilities and specifically our abilities towards long range strike, which we really don't have yet, we really have to develop that ability to deter with long range strike weapons. So this is just one step. SSNs are an important step for all the reasons that you've already spoken about in terms of their range, their stealth. You don't know where they operate. They can actually take out fleets.  And I think this is Orcus Pillar one, but we've got Orcus Pillar two. And that's where I think we'll even see more in terms of this development of a long range strike capability. And that will be what will deter China. The surest pathway to war is if China actually thinks it's easy to do. So we're trying to make it not easy. Just before I open it up to the audience, I did wanna go a little bit deeper into Pillar two and Justin, maybe you can describe what that term is and what's involved. Yeah, certainly. So when Orcus was first announced, nuclear powered submarines was the first order of business. And then for reasons unclear to me, every other advanced defense capability under development was added. So I will miss some certainly, but hypersonics, counter hypersonics, unmanned underwater, quantum, cyber space, I think was added at one point. So that is to say, as part of this trilateral security pact, all of those other capabilities are on the agenda. Those of us who pay close attention were listening for any sign of that last week, and we did not hear it. I would suspect that we will not see a president and two prime ministers reunite on stage to announce any of the particular developments that happen. I think that there's a school of thought that says the combination of all of those other advanced technologies is as important, if not more important than nuclear powered submarines. I like to think that there's a lot of overlap. So I think that it's a matter that nuclear powered submarines and all of those technologies are going to be speaking to each other in all sorts of interesting ways in these coming decades. So I know that there's a piece of regulation in front of the House either last night or tonight to welcome the Secretary of State to Congress to report regularly on the implementation of AUKUS. And so that may be the forum in which we hear developments of that kind. And that reminds me, Charlie, I don't think we got to the question I asked earlier about congressional support for AUKUS. And in particular, the initial part of the submarine agreement for the transfer of Virginia-class boats will require congressional approval, right? Are there major sort of stumbling blocks towards that? Or does that look like smooth sailing to you? Yeah, no, look, this is, we did address it, but I'll underscore it a little bit more because if you're a submarine nerd, and I guess all of us are now, you're looking eagerly to be fact sheets that was released after this dramatic announcement. And one of the things that kind of jumped off the page of me was the sale of three to five Virginia-class submarines to Australia, right? To help cover that looming capability gap that Australia has, right? Which was, by the way, foreshadowed when we had an Osmond, the ministerial meeting of between Penny Wong and Richard Marles and their American counterparts in December, one of the journos who was there asked, well, how is Australia gonna cover its capability gap?  The Collins class will not last. And Lloyd Austin, his US Secretary of Defense said, we will cover that gap. So that's the dramatic announcement that we saw. But the most important words in that, as you've rightly noted, were comma, pending congressional approval. And what I had said earlier was, we have requirements in the United States, right? About if we have set objectives, which we lay out explicitly in our national security strategy, and then in our explicit and public national defense strategy, here are the resources you actually need if you're going to achieve those objectives. And it goes all the way down into the weeds about this many attack-class submarines, this many ballistic, ballistic submarines. Zoomers. Zoomers, thank you, SSBNs. But the requirement currently that the United States operates under is that it will produce three submarines per year. Two attack-class, Virginia-class submarines, and one boomer. Due to a number of factors, but COVID looms largest here, we are not achieving either of those objectives. I think, depending on who you ask, we roll out. We only have two shipyards that produce submarines. One's up in Connecticut. The other is down in Virginia. We produce either 1.4 or 1.7 submarines per year. And so the pending congressional approval is, I think there is support, as we have seen from multiple letters and multiple members, and it's bipartisan, by the way, assuming that we hit not only that two submarines, two attack-class submarines per year, but go over that. And I think really what, one of the things that I take away from the surprise announcement last week, is it's the decision to invest by all of us in ourselves and in each other with the idea that this gets us to net positive way beyond what we're producing currently. Yes, Australia way down the road, Britain a little bit more quickly and America much more quickly. So that is the stumbling block about how quickly we can scale up before we begin delivering these to ourselves and to Australia. That's okay. Great. Let's, let me open it up. If you could raise your hand. Yes. Please, Trevor, please wait for the microphone. Trevor Rowe. My concern is that this announcement is dramatic, pardon me, and if I look forward a few years, I see elections here in Australia. I see elections in the United States and I see considerable uncertainty as to those outcomes. What impact could this have? Secondly, in Australia, I don't think the public's got any idea that we have a labor government here that's an interventionist government, big programs on welfare and the like, plus the existing military commitments alongside AUKUS now, but it's nine billion annually. It's gotta be found over three decades. Looks a challenge now. Obviously we don't know what the components are and how this will be done, private sector, partnership, whatever. But the point being, I don't think that's been sufficiently articulate in average Aussie doesn't like tax increases anyway. Same with the average American, by the way. No, more so. And we've got already a retrograde tax system, so we need tax reform as well. So this creates a lot of items on our agenda is both in the US and Australia. And so I've been to new reviews of what happens in the US and the longer term, what happens in Australia in the longer term, because I don't think this will look like what it looks like now in the longer term. Well, who would like to take that on? I could tackle, I'm not going to tackle that. I'll leave you and Justin to the American side of the equation. Look, I do think there's a lot of risks in this pathway. So they've done it in a way that at least we're purchasing off-the-shelf submarines. And as we know, we don't seem to be very good at one, deciding what we want when it comes to submarines, changing our minds, but also just delivering defense projects on time and on budget. So I think we're all in agreement that there's big risks here. Now, we might try and reassure ourselves that this is such a big deal that all three countries will be really wanting this to work because it's actually going to send a terribly, a terrible message to the region and to China I know governments don't like to mention the C word, but we've made this big announcement. We're talking about an exponential leap in our capabilities. If we can't actually do it, that actually signals that we're pretty weak. So I think all of our three countries will be putting as much resources into making this work as much as possible. Now, I do also think I agree with you when you think about the pipeline of the 368 billion initially when I heard that number I thought, what a strange way of announcing this to give you a forward number going into 2050 with so many moving parts that it's actually just an estimate. Nobody really knows how much it's going to cost. So I think in a lot of ways they probably made it sound worse than it might be. We don't know whether there'll be economies of scale that might make it actually less expensive than that but put that aside. I think that it's eminently possible that we don't necessarily, and you guys might disagree with me, we might end up with the three to five Virginia class boats and we might decide that we don't do the next stage. And that's a decision for future governments given their cost-benefit analysis of what money we really have at that point. If I can jump in too. Please. I'd say we actually have some data to begin answering your question, right? That we've had a change in government here and the new government is just as supportive as your prior government. We haven't had a change of government in the UK but you've had the change of leaders and then the change of leaders and then the change of leaders but they're all still supportive of it. The question mark here is obviously the United States because we haven't had a change in leadership or a change in government yet but we have looming elections in front of us. Look, I do not do horse race betting on the US and I'm not gonna tell you who's gonna win in 2024. What I can say about this is that, look, I'm the inaugural Australia chair at my institution but also anywhere in Washington. And I can tell you because I talk about Australia a lot obviously with the wrong accent that there is a wellspring of support right now for Australia at the likes I don't think I've ever seen before and it is bipartisan. That's important when we talk about this pending congressional approval. I'll also say at a larger level that Democrats on the left and Republicans on the right and particularly as you move further out to the extremes both want America to have more powerful and more capable very trusted allies oftentimes for very different reasons. And that is not necessarily going to give us the answer for whether or not AUKUS will be supported forever depending on who the president happens to be. We haven't seen any statements by any of the potential candidates about AUKUS but it does tell us that there's a lot of support for this. The final point I would say on the Australian side of the equation is when I've been listening to all the statements that have been made by political leadership here the one that struck me as quite resonant was the deputy prime minister who I think over the weekend had said look costs are large but we're also a very rational people. And when you're doing your assessments the one thing I think everyone agrees on is that our security has deteriorated suggesting that we need to pay into the system more to make sure that there's more stability in the region. And I would simply say in the US too there is a recognition especially with the war in Ukraine that we do not have enough of what we need to deter our adversaries. We have given an enormous amount to the Ukrainians who are using it valiantly and we don't have enough left. And so just the defense budget that was proposed by the president two days before AUKUS came out suggests an enormous amount of investment into our industrial capabilities to make sure that we have more armaments than we have right now. Can you look at the total gap left? Again, I can't predict idiosyncrasies. Andrea, just in the... Chris, one quick comment and then a question. I think that Australia shows its immaturity by continually harping on some big number for 30 years hence spending. In the US they take a much more mature view and look at things incrementally. They have a long-term estimate by all means but they don't assume it's all or nothing. They evaluate it every year, Congress reviews it and they change their mind as they go along. And I would say that yes, there's been a poor track record in Australia of achieving defense programs but often that's because the strategic environment has changed and the government has responded accordingly. My question though is rather than dwell on a big $268 billion, surely a much more important statistic is the 0.15% of GDP which represents over the 30 years and that actually compared with increasing our defense spending that's actually quite reasonable, wouldn't you agree? I would say the thought that comes to mind are two particular quotes. One is as was said of Australia many decades ago, Australia is a great country but there's too many journalists and not enough news. And I'm comfortable in saying that as a long-time journalist myself. So it's almost inevitable that a number like that is gonna be overly focused on. But the other quote that comes to mind is price is what you pay, value is what you get. It's a Warren Buffett quote. And so I come back to this notion of trying to understand better this indeed, it is a huge number but a huge strategic bonus as well. I acknowledge my shipmates from HMAS Adelaide who are here today. I was on an academic sea ride with them back in November. It's a program the Navy runs to make sure that academics and others can really see what happens with life in the Navy. And I think it gave me a particular appreciation for some of the awesome capabilities that we have and some of the fantastic people and platforms that we deploy all the time. And I think around this really large number there's an old narrative that Australia is somehow incapable or we're not up to it.  And I think that it's time to grow up. It's time to say that it is a big number and it is a big capability and we can do it. It's a moment to really pull the sword out of the stone and I think there's a great resolve to see it succeed. So I think we should be confident. Lavina. Well, look, I think events like this are important in, I think the government so far hasn't necessarily made the case for why they're doing what they're doing. Why do we need to spend 0.15? I think we were speaking earlier about a lot of the announcements about how many jobs are being created or of industrial basis. That's all important. Don't get me wrong. It's not a bad thing for Australia to get another 20,000 jobs in South Australia and elsewhere. That's not a bad thing. But I think they need to make a stronger case for what they understand to be a deterioration in our strategic environment. I think, you know, whilst you don't want to be alarmist as to the risks of war in our region, the risks of war are real and we are in a period where we have a chance to deter that from happening. We, as we've mentioned earlier, we've looked at the steady expansion of Chinese military capabilities that are actually more extraordinary than, I think they've almost become normalized. We don't really even blink an eye when we hear about it anymore. But we've got to ask ourselves, what are they going to be using all of those capabilities for? And we have to listen to, I think, President Xi, when he talks about what he wants to use those military capabilities for. And I think maybe about three weeks ago, you had the head of the CIA report that the intelligence agencies, or his intelligence agency had gathered intelligence that Xi had said that his military should be ready to use its forces in Taiwan by 2027. So we should take these things seriously. And I think the government, even though they don't like to use the C word, there has to be a strong justification for spending this kind of money. And I think they need to make that justification a bit clearer. So let me play the devil's advocate briefly for all three of you. We can say the C word. And there is... China, just the devil's advocate. It's just China. And it's, again, as I said earlier, there's no question about the scale of the military buildup. It seems to be Mr. Keating only who is not concerned about that. And yet we're a long way away. One stat I often throw out in the public debate is that Beijing's closer to London than it is to Sydney. So why this for Australia? What is the argument for this as opposed to some other capability? Why would Australia take on the task of essentially defending our nation from the South China Sea rather than do it closer to our shores? Well, I think one of the ways that Navy would put it is that you can use submarines to defend your ports. You can use submarines to defend choke points a little bit further away. Or you can use submarines in operations where your adversary is. So if we're talking about China and we're talking about the potential of an amphibious attack across the Taiwan Strait, literally the most complicated, most risky military operation that you can commit to, one that China has never done, right? Then there is one type of capability that is really important there and that's undersea, that's submarines. So during my time at CSIS, I was adjacent to the excellent war game that was published by that organization and they made clear that attack submarines were one of two capabilities that were decisive in the United States being able to defend Taiwan. So it's plain as day what they're capable of. That is not to say that Australia has made any pre-commitments, but it is equally to say that Australia is strengthening itself so that it has options. The corollary would be to say to weaken ourselves, to forestall options would be quite cowardly in the circumstances. Not a pre-commitment, Justin, but it does imply that the security of Taiwan is a vital security interest for Australia. And many people believe so. Many people believe that a democracy of 25 million people in our region is something to defend and believe that the loss of credibility to America should it not defend or seek to defend or successfully defend that would affect us. Can I dive in? So first of all, I disagree with your point, Sam, that acquiring this capability is an implied commitment to Taiwan. The US-Australian alliance is a partnership. Partners work out what would be used. I take the deputy prime minister and your prime minister at the word when they say when there's an Australian flag hoisted over those, they have full control of where they are going. But let me step back for a second to make a broader point, I think, on this, because I think you've hit on a really key debate here about what is the correct posture orientation and therefore strategy for Australia. Is it just defensive Australia or is it something that looks a little bit more forward into the region?  And that all this talk that we've been having about a deteriorating security environment, it looks really bad, but it probably won't affect Australia in any way, shape, or form. And I don't think that's true. In fact, I think we again have evidence for this that we've seen this. And again, look, I am a historian by training. I'm sorry if I evoke the 20th century, but we've run this play more than once before, where if you just seek to batten down the hatches, make yourself a little bit more prickly or spiky or a kind of like, right? We have lots of analogies here. You hope that you can weather the storm. That is not conducive, I don't think, to the environment or to the flourishing of a country's interest. Now again, I say I think because I am not Australian. I will say there's a different version of this debate that happens in America. And I will say that over and over again, we have run this tape before, not once but twice in the 20th century.  And in fact, I would say from historical evidence, invites further aggression. I'll be there. Yeah, this idea that defensive Australia is where we should be. I find it hard to reconcile in the sense that we're a trading nation, 99% of our trade comes by sea. So I just, I thought of, maybe it's the hypothetical that we should think to ourselves. If we batten down the hatches, if for example, the United States chose to batten down the hatches as well, we would know that China would dominate this region. There is really no other possibility if the United States is not here, if the United States is not willing to play that role, that balancing role. We can play some part of that role but we really need the United States to be here. And we need to play our part as well. So I think the idea that we can simply just defend our territory, defend our near shores, that's not just where our interests lie. And I just invite you to think about if we did have a Chinese dominated region. Can we really assume that things just go on as normal, that we will just go on selling our iron ore to China? China will pay market price and not a price that they choose to pay or that we will be able to enact laws in our country about foreign interference without suffering some kind of coercive pressure from the outside. I think we have to think about these things that it's not just about defending our territory, our interests are much bigger than that and that we have to play our part in that. Otherwise we have to consider what life might be like. All right, we have time for a couple more. Brian at the front here, Andrea. Colin Clark, Indo-Pacific Bureau Chief for Breaking Defense. It looks like AUKUS is going to be even bigger than the Snowy scheme. Immigration has been a huge issue the last 10 years. You don't have the bodies for your own economy now and you need nuclear experts, you need highly trained welders, they're already 70,000 short of those. How is Australia going to do this? That's an excellent question. Justin might be outside my remit, I'm afraid. I mean, I don't have the answer to that. You've identified a really big challenge. And indeed, if you are to ask tough questions of AUKUS, it does come beyond this question of top line cost into opportunity cost. And so those people can be found and they can be trained and they can be welcomed into the country but they won't be doing all sorts of other productive useful things. And so it's undoubtedly a big challenge. It's one of the things we hope to hear more from the government about. I think when we're talking about AUKUS, it's a long-term plan. We've got 20, 30 years. You might be optimistic and you might think, okay, because there is a forward plan, then we can also, you know, the people who are going to man AUKUS SSN are probably in kindergarten. So there's a long period of time where we could potentially incentivize people to build those skills, go to the right universities to learn about physics and nuclear physics. I had a friend at university who was a physicist who did a PhD in physics and then finished his degree and had no job prospects. So I mean, this could be a really big deal for a lot of scientific communities in Australia. I know that's not necessarily answering your question but I think think about the fact that it is a long-term plan. So we do have the ability to plan ahead. I'll just say that I just came up from a couple of days in Canberra and the full attention and focus seems to be on the enormous endeavor that this is and whether or not it is yet translated into action plans and therefore budgets across a variety of agencies that haven't yet touched this.  Education, the Department of Education, the Department of Health, all of these departments and agencies will touch this in various forms, not to mention the state governments too if we're talking about the enormous bills that are going to start occurring today, they're about out in WA, no less down in South Australia too. So government seems to be focused on this but then pushing forward to make sure that it translates out into this and has the budgets and uplift is I think the work ahead. I'm sorry, we'll just keep it to one question. We have time for one more and I've noticed all the hands have been mailed up to this point, always a problem. Thank you very much for our final question. If you wait for the microphone. Just a simple question, the C word. What regarding the timing of Xi Jinping's visit to Russia? And his talk with Putin, what is the real motivation behind that? And what is the message that he's trying to project to the world about it? Well, we're a little bit off-orcus but if anyone wants to intervene on that one. No, okay. Look, this is the manifestation. My read of this is this is the manifestation of that no limits partnership that we heard about right before the Olympics and right before Russia invaded Ukraine. And as Russia has fared so much more poorly in this war than everyone thought they would, they have an ally, they have a friend and they have a backer. That's I think the message of that. In addition to Xi Jinping making a play that only he can help a peace plan, which by the way, it looks exactly like the peace plan that Putin himself would draft. That's what I take from the meeting that we just saw. In fact, we do have time for another one. Yes, please. Thank you. Lloyd Bromfield.  Okay, we're talking now. This is technology now. In the decades to come, there's going to be development in sensing under the water. And I've seen at least one study that says the ocean is going to be transparent. So what's the utility of our nuclear-powered submarines then? Yeah, it's a phrase that has been around for a while and the oceans remain not transparent.  So you can have a radar going through air and it kind of can see things and show you. Undersea is completely different.  It's incredibly complicated. I have heard some fanciful kind of things in the media in the last few days about how transparent the oceans are suddenly going to become. It's something that serious people look at and think about. Over decades, there's a contest between offensive and defensive and that will continue. So the submarines, as they are now, are not as they will be in the decades to come. But at the moment, and historically, for submarines, you know, stealth has been a key advantage and finding submarines, detecting them incredibly hard. And so we can expect that in the near future. But as I say, over the middle longer term, it will be a contest. So ladies and gentlemen, thank you so much. We've run out of time for today. We appreciate you coming as always and supporting the Lowy Institute's work. Plenty more events coming up. So please keep an eye on your email and on our website for the moment. Thank you very much for your attendance today and your interests. And we wish you a very good afternoon. Thank you. Thank you. Thank you.


Hi everyone, I'm Joe for jaspyscasewrakes.com with the bowman draft team random. You're guaranteed a team here All right, it's a 12 spot right so pull those 12 teams out of bowman draft pick your team 11 and we're essentially turning into a random team break also Two free spots being given away by a full spot chance to win a full spot total of two being given away So let's do that first. So we also only sold 10 spots outright New dice new list top two After five we'll get extra spots little buy one get one opportunity one two three Four and good luck fifth and final time we got Ryan and Tim corrects to you After five extra spots Going your way. That's always nice little buy one get one opportunity Now let's match you up with a team different dice roll and a new list here there we go and Let's roll and randomize that Two and a two for the hard way. We're just randomizing your names not the teams two and a two four times one two three and For the hard way. We got Ryan and Ryan down Joe after four Hi, so worked out nicely for you Ryan Harold pirates and braves Matthew got the Rangers Tim with tigers and reds Joe with the Yankees Devon with the Padres Keith with the brew crew Joe with the Giants Ryan with the Cardinals Brian with the Marlins and Joe with the A's All right, we'll see in the next video for the break itself. Jasper's case breaks calm


The Central Processing Unit CPU is the electronic circuitry within a computer that carries out the instructions of a computer programmed by performing the basic arithmetic, logical, control and input slash output I slash O operations specified by the instructions. The computer industry has used the term Central Processing Unit at least since the early 1960s. Traditionally, the term CPU refers to a processor, more specifically to its processing unit and control unit. See you distinguishing these core elements of a computer from external components such as main memory and I slash O circuitry. The form, design, and implementation of CPUs have changed over the course of their history, but their fundamental operation remains almost unchanged. Principal components of a CPU include the arithmetic logic unit ALU that performs arithmetic and logic operations, processor registers that supply operands to the ALU and store the results of ALU operations and control unit that orchestrates the fetching from memory and execution of instructions by directing the coordinated operations of the ALU registers and other components. Most modern CPUs are microprocessors, meaning they are contained on a single integrated circuit IC chip. An IC that contains a CPU may also contain memory, peripheral interfaces, and other components of a computer. Such integrated devices are variously called microcontrollers or systems on a chip social. Some computers employ a multi-core processor, which is a single chip containing two or more CPUs called cores in that context, one can speak of such single chips as sockets. Array processors or vector processors have multiple processors that operate in parallel, with no unit considered central. There also exists the concept of virtual CPUs which are an abstraction of dynamical aggregated computational resources.


Now, when I snake and drive down, when he hits the mat, I'm going to keep this hook.  I don't have my ankles crossed right now just because I don't want to put a ton of pressure on his low back.  Now, that I have this, and he feels that pressure, he's not going to be leaning to his right. He's going to be leaning a little bit to his left, which is fine. But as he's leaning to his left, I'm walking this arm out, the deepest half I can in the world. I want to get my shoulder and his armpit right here. Now, we've been here before. Which way should I roll? I can drive and run my half, but I'm going to roll to my half side. Now, as I have this hooked up, boom, feet are in the mat, and then we were back here yesterday out of our crab finish. That elbow breathe right here, if I want to hook that top leg. If it's not there, I just drop my hip, put my knee in his chest. So as I'm breaking him down with my leg ride, if I can get that hook, I'm in great shape. A lot of times when I try to pull that hook up, he'll fight his hand down in his crotch. We'll go to our charella from there. So I'll give you two options. Double thigh pry, swing, stand up drill, snake, drive down, drive him down. I keep my ankles crossed here because I want to keep pressure on his low back. Is his knee floating? Is his knee floating? No. His knee is not floating? Yes, it is. His knee is floating. Pull it in tight. Get your bar. I don't want any part of this to feel good for him. Now, if I get here, a lot of times, if I get here, he's fighting his left hip down. My half's going to be easy to walk out. See how I'm walking my half out? I'm kind of twisting his body both ways.  I'm also pulling the bar. He can't relieve the pressure because he's got nowhere to go. He can't go to his left because of this. He can't go to his right because of my half.  See how I'm extending his shoulder out? He's flat. I'm not even really arching with my legs right now. He just wants to go somewhere to get rid of all this pressure.   But I'm here. Once I get that half just like we were yesterday. Nice and tight. Again, we're going through the entire process. Then we'll talk about if he hides his hand down low, we'll get to our charella tilt. Double side price swing. Stand up, snake, drive, drive, drive, secure it. Pull it back. Hold this elbow right here. Thread my bar. Then I'm going to walk my finger. I literally want you to do that. How tight is that right here? How tight is that? Boom. He just wants to go somewhere. Absolutely. That's what I just said. I can hop out right here, let that elbow breathe a little bit and then just run that half. Or I can roll it all the way through. We've rolled it through and stacked him up and finished. But again, everything's tight. Then if I get him there half bar and then start giving him that leg ride hip, man, he just wants to go to his back. He just wants to go to his back. I get him here. When I get here, my ankles are crossing. I get that half. I get right here. It's a little added. I'm in charge on top of that guy. Questions? What's up? One more again.


Thank you. Thank you. Uh, so yeah, I'm I'm on second dollar was supposed to be two of us up here But unfortunately my colleague Flavio couldn't make it which is bad because a he's Italian so he talks really fast So I'm not sure how we'll do on time But it's also good because like I can blame everything that goes wrong on him so Thank You Flavio So in this in this talk I want to talk about like what what does it take to create an application the right way with the focus on the DevOps part on the deploying how to create your infrastructure and Make sure that you set up yourself for success in the far future So not like the quick and dirty things that you can do in a day But something that hopefully won't take that much longer But we'll stay with you and with the project for for much longer It is an opinionated talk. I'll be presenting some concrete tools and solutions that work for me And that's just a personal just a personal choice. So the more more important part is What I say why I'm doing some things not necessarily exactly how because there are many different tools and and people have different experiences and that is that is great so that was So that was Some set up and let's get let's get started So first again some assumptions. So let's say that you want to build a website You want to build something that that you want to share with the world and This talk is for running it in the in the real world. So again, nothing we can dirty Nothing also free, but we'll try to keep the cost as down as possible The idea is that this is again sitting yourself up for long term So not something that you would do for a project that you want to just have up over the weekend and then tear it down This is more for for something how I believe Projects should be run When you need to need them to be alive and when you want to build upon them and expand them So like if you're starting a new project in your company or your personal project or something like that Or just want to learn how how things are done So There are some some disclaimers that well so far. That's all the things I've been doing but There are definitely easier ways how to do this both Those that are compromising on some of the things I deem important but also just some that You you might have something already prepared by a third-party library or a framework This talk is more about this is how it works underneath and how it's how it's done if you can jump start three steps out of five that I that I described by using a freely downloadable template or something like that 100% go for it and hopefully this talk will give you the tools to Determine whether that's a good thing or a bad thing what you're about to do and last disclaimer I promise and That is before you start writing an application think twice whether you need it These days when you have things like github pages when you have static site generators when you have all of these things You can get by with no code or very little code for a lot of use cases out there You can usually cobble something together with freely available components and services That will run them for you either for free or for some some small amount So always keep that in mind that that should always be your first option The best code is no code at all. I think that's kind of obvious So now let's get started So we are starting a fresh project. So first we need to do is is create some code For me if you don't know or if you're on the verge what to use for web application, etc That means that the answer is Django It is it is the default for a reason. It has the most resources out there It is the most common denominator in the Python world at least So if you're unsure if you don't know 100% sure that you want to use I don't know Flask or something something else use use Django That's that's the easy part Now what other parts are we going to need? So we're going to need to set up the the local development so First we're going to need something to install Django or something like that I use poetry to do that But again so many other tools and pretty much for for the use case that we're talking about all of them work Just fine. So again, just use something that works personally for you The reason why I chose poetry the the why that you should that you should remember is it does two Important things for me. It allows me to track dependencies exactly with it with a pinned version and It allows me to keep it clean So if I remove a dependency it will remove everything that that sort of came with it and it's much easier to To manage these things because those are sort of first-class citizen commands in the poetry ecosystem that's why I chose poetry, but again your mileage may vary and Just do something that will do these things for you allow you to very easily add and Remove dependencies Probably touch something my apologies So the other part we're going to need is we're going to need some configuration So in this case, it's pretty easy. I will stick to the sort of simplest thing possible, which is environment variables so whenever you're creating a configuration for your Django project or anything else just sticking the values that will work for you locally and Allow it to be overwritten in production by setting environment variables You can do it manually as I specified here or there are plenty of tools that will do that for you There are more or less sophisticated depending on kind of on your taste me personally I'm a very simple person. This works for me super well because everybody can see what it's doing Some people prefer nice abstractions, etc. There was a talk about Pidentic and and other and other tools that can serve for this purpose as well but It just depends on your kind of appetite for complexity Versus having something ugly like this in your code and When I said you should default for the local for the local environment There is one exception to that whenever there is something that deals with security or debugging or anything like that the default should be off So that's just that's just one thing you should never ever have to deal with the problem of accidentally deploying something in production in debug mode With whatever tool you're using so make sure that that's the one exception where you need to override it very explicitly one developer when developing locally so that to prevent accidents in the future and Then there are some there are some tools and I put them here at the beginning of the of the talk because I think that this is something that you should do first is Make sure that all of the good things that you're trying to do will stay good So something to keep you honest and also just basically for the psychological effect of things it's much easier to add Things to an already existing tooling or whatever Compared to introducing a new tool So that's why I like every new project to start with pre-commit installed and configured for my favorite linter Formatter and and also tests running even if you just put a dummy test that asserts that one plus one equals two That's a great test to have there because it's so much easier to add another test When you're comparing it to oh now I need to introduce testing and Do some bootstrapping or something like that? No, make sure that all of it all of it is there from the very beginning Even if it's just if even if it's just dummy things. This will help you keep things clean as you go and Also, don't trust yourself that you're gonna run it Make sure that there is there is an independent party in this case a CI continuous integration tool In my examples, I would use github because that's probably the most common one That will that will run it as well that will give you two major benefits First is the obvious even if you forget to run tests and and you push some code it will still get run and Second it will verify your setup. It will verify that the that the Dependencies for example that you have are sufficient that you haven't accidentally installed something without Committing it into the code so it will not get transferred to the new environment So those are the two major benefits even when you're working alone To have CI Once you add other people well, then it's even it's even more beneficial and Nowadays Adding CI is not a big investment With with github all you need to do is create a file like this So this is everything that you need to do to run Pre-comment as configured in your local configuration the way you use it locally On on github you just need these three predefined actions and and you're done It is it is not complicated if you want to add if you want to add another job to run your Python tests Pi test is my library of choice with with Django. There is Pi test Django again Pretty pretty obvious. It says what it it does what it says on the tin and This is how you run it. This is even a more sort of Complete example It even runs a database for you So this is pretty much enough for 99% of the applications out there already and You can get this you can get this done In if in a few hours even if you're completely fresh You just Google how to do Django tests in in github actions or pi tests or something like that And you come up with that not to mention that all of these commands are something that you should be familiar with because that's what you Had to do locally to get the tests running So there is really no excuse to not have these things and they will set you up for For a piece of mind because now you know that what whatever happens These things Linting code formatting Testing etc. You'll never have to think of think about it again. It's there. It's your safety net So when you add things all you have to do is add add the test Configure a new a new linter for example if you introduce new file format Or if you discover that something doesn't work for you really well Again, it's much simpler to add and tweak tweak things as opposed to introduce entirely new concepts So that's why I say that it's it's nice to have this done before you start any coding That allows you again to two things. I Like to say that everything benefits in two ways You can really subdivide it any way you like first is like what I what I described like This is now the project setup and now I can switch my mind Okay, and now I'm thinking about application and I'm done with that stuff So if there is a mental clarity that yeah, I don't have to worry about this and also Because this is done before any application code you can reuse this you can you can then save this as a template and reuse it or More realistically you can find a template that already does all of these things This is how I would judge a good template when when I'm looking for like how to start a Django project Does it have all of these things? Does it allow me to do all the things that I that I mentioned all the benefits? Does it give me the peace of mind? Is there a place where I can just add another test? without having to figure out anything so This is where we are at the beginning of the project now We can we can run some we can write some code and usually that belongs with Starts with an important question where and how are we going to store our data? Typically, we need a database. That's the established default in the industry. Everybody tells you every tutorial that you read For Django or for anything else. Yeah, this is how you start a project. This is how you would start your database It even assumes that the database is going to be a relational database that might be the case But again, you have to think about it Oftentimes, maybe The the files don't change. Maybe the data don't really change that frequently and they only come from a certain sources Like from you maybe at that point probably a YAML file in the same git repo is Much easier than having to have a database and manage a moving part Maybe I just need a few counters or something like that and Redis would be much simpler than having than having a full-fledged relational database, which is a very complex piece of software So always think what is it that you need and When thinking about this think about how are you going to use it? Many people fall into the trap that they try to model the data and say okay So I have these entities and I have they have these attributes and and this is what the data is. I Don't care. I care about what you want to do with the data What are the queries that you want to run? What are the operations that you want to perform and then choose your database? And then design your schema accordingly to make your life easier you unless you're writing this for like Like a school project on database design Nobody cares whether you're using first normal form or third It's it's some useful principles are definitely there and you should be familiar with it But ultimately what happens of what matters is how are you going to use this data and how What will make your life easier? Be lazy. That's ultimately what the job is so once you select a database or Hopefully not you need to run it somehow locally first So for this docker is your friend and in particular docker compose because it allows you to kind of grab something and Nowadays every pretty much database or service or anything like that will come with the pre-built docker container that you can just grab and run and Configure it super super easily and all you have to do is create a docker compose for those dependencies that you that you have So this would be my example where I'm just running Postgres. I'm running Redis and that's it Notice one important thing. I'm not running my Python code in there This is purely for the dependencies for Python code I still prefer to run that manually in my virtual environment Just on the on the command line or from your IDE It makes things so much easier because you don't have to deal with another layer of abstraction that you don't really need for for development You just you just develop locally and you just have these These services up up there through the docker compose If something goes wrong here database gets into an unknown state or something Just kill the docker compose and start it back and back again clean slate It will work for tests It will work for some of your some of your manual testing, but not so well It won't work really well if you if you're used to Testing and developing things while looking at the browser or something like that to me that's a feature because it will kind of force you to Do things the the the right way which is just just use tests just use repeatable code as opposed to doing things manually That's why we created computers in the first place so that we don't have to do things manually use it so That's it now. We're now. We're done developing We've we've created our setup We've we've created our feedback loop with the tests with the docker compose and we wrote all our code And now we're ready to go to go live we're ready to share something with the world and Make sure that it stays there So how do we how do we go about that? So first thing that we need to do is we need to create some infrastructure and Just like with the test just like with anything else. We want to do that through code We never want to do anything manually It might sound and and when I show you the examples it might look overwhelming And there's definitely a lot of things there but It's usually Roughly the same complexity as trying to figure out where to click in the cloud console UI or something like that and it is Repeatable and most importantly it is iterable Because you can kind of start with a small thing With the first example that you find somewhere Copy from some slides or download somewhere from the internet and then you can gradually improve on it and just keep running it over and over again until it gets until it gets good and You you never kind of are in that situation where you don't only know how things got where they are And you don't know what the next step is Because it's just code you can you can iterate on it you can test it You can you can validate it you can do all of these things you can cooperate on it in the future So for me the weapon of choice for there is terraform again. There are many other options I like terraform because it's again the default as I said I'm a simple person terraform is the default it will have support for any kind of services and tools that you decide to use And you don't have to think about it too much if you if you ever will need help or hire somebody Chances are it will be much easier to find somebody with terraform knowledge Then we need some of the services the databases etc I think this one is pretty clear. You don't want to run your database That's not your job if you're in this in this talk you want to develop your application You want to deal with the idea you don't want to babysit a database. That's just what what we developed, you know Services for that's that's why we have Google otherwise. What's the point? So just use the just use the pre-built pre-built services again You can use you can use terraform to manage them. We'll see how that works And finally for your code Docker is the perfect vessel We're kind of past like dealing with virtual machines and running things yourself You just package things up and hand it over to something that understands how to run a container That was the entire idea behind them in the first place and that's what we're going to use One kind of technical point here All throughout all of this process all you have to keep in mind is whenever you see something that's potentially sensitive like a password It should never ever be written anywhere and you should never ever see it That sounds counter-intuitive. How do I work with something that I don't see? We'll see Okay, so this is an example for terraform for working with the GCP with the Google cloud again You can work with any other cloud. It will be very analogous For me, I'm now familiar with Google cloud And this is like the basic basic setup. I'm creating a good project. I'm creating a database instance I'm quite a small one in this case and and that's the that's the beauty of terraform if I find out in the future that I Needed to be bigger. I'll just change that one value from f1 micro to f1 super super extra extra large I'll end up paying more money, but I'll have a bigger instance and it will terraform will do all of that for me And I'm creating a database and you can see that I'm just referring and as a variable to the instance where I want the database created And speaking of secrets, this is how this is how you do it You ask terraform to generate your random password Then you refer to it when you're creating the database user and then you store it in a Google secret store So you're telling Google here. I have a secret. I want you to keep it safe for me and also use it to create this database user and Then when you're handing your container over to something that will that will run it for you You say oh and there is a there's a secret that you have that you have in storage for me I want you to expose it to this container under the name database underscore password So it will be there as the environment variable But as you can see we've never seen it once it will never be written in in any file and That's a good thing Agreed awesome And by the way, yeah cloud run is The Google's alternative for the service where you just hand it a container and it will and it will run it It's it's that simple. It's It's what Google does so All good there and now we just need to we just need to wrap it all up So we need to we need to say we need one command to kind of do all of this Because we need this to be easy We need to be this to be so easy that we can run it several times an hour every time you you reach to reach to a State that works you should feel absolutely safe and comfortable just deploying and pushing it out Again to get you into the pattern of pushing often as opposed to putting things off and saying Oh, I'm not sure whether this this fully works And I don't want to go through the trouble of deploying it because I might have to change something No, if if that's your thinking that's a clear signal that you've done something wrong probably Because this process should be effortless you should always feel perfectly free to just say yeah, I deploy it should take a few minutes at most and That's how you know that your system works when you feel very comfortable Essentially every time you do a git push you you will do a deploy as well This would be the script in our example. It's really this this simple. You build the Docker image You push it into the registry you run the terraform apply and Then you update the Google Cloud Run In once everything is set up in Google So after you've run this once you don't you can actually skip the terraform reply because that's the part that will take the longest That's the one that creates all the databases or make sure that they're up-to-date and all of these things So that's all typically only has to be run once or then after you change anything in your terraform so you can then Kind of command it out or have two different commands one for the initial setup and one for then just the deploy and With the Docker build push and the gcloud run it should really not take longer than a minute or two and It is not super complicated Would you agree? Awesome, so Notice that I have kind of omitted a few a few things here So first is Kind of staging environment Usually you want to have two different two different environments What one where you test with test things and experiment things or you want to maybe share with somebody? Features that are not yet ready for ready for prime time there was a reason why I felt comfortable skipping it because It's easy when we have everything in code Then we can run the code twice and get two different environments All we need to do is define some variable that will declare the domain or the project name or something like that to to keep them separate But I could do just the same thing just by specifying two different two different sets of credentials for like two different Google accounts for example and And just run and just run the same Run the same code. That's the major benefit of having the infrastructure as code because not only can you iterate on things but you can also then parametrize them and have multiple environments or use the same code for multiple different different projects and It being code it just does that you can just define define a variable pass it in from the command line and say Oh now I want to go into that environment and in that region And and I want to use that docker image with that application It's it's just as simple as defining a variable which as programmers, we're all very familiar with So all of the benefits of code work here the simplest way to do it is to just parametrize the deploy SH file and and Make sure that it knows what to do and where to do it now to address the elephant in the room Usually when we're talking about deployment, it's it's you know the unwritten law that somebody will mention Kubernetes sooner or later No No so Kubernetes is something that other people use to build the services that you then use Unless you're in that business In which case, I don't know what you're doing in that talk in this talk Like you don't need Kubernetes It is way too complicated. It is way too low-level and it is just no please Like every time you use Kubernetes to deploy it a Python application There is a kitten that dies somewhere. I'm sure so yeah, I This deserves like to a few more knows because like this is this is important And I don't know for what reason it became like this idea that you know Kubernetes is the way how you deploy things Everybody clear on this Thank you, okay So then what happens what happens next what happens when you want to add more people more people to the team Or you want to automate things even further well, we have a word for that and that's continuous delivery So we already mentioned CI continuous integration. So this is the the other two letters this in the CI CD acronym So continuous delivery is where you automate even your deploy dot SH Script that's really all it would take in this case and it would be really simple because all we have to do is take those three commands that we had in in the deploy those Dot SH and put them into a get-up action We already know how to do that because we've done that for Pre-commit we've done that for our tests and all it will need is some credentials to make sure that it can communicate with Google to to do the deploy to upload the the image and all of these things and we know how to do those things as well Because we just use a secret So we would manually upload a secret into into github and then we would be able to use it in the get-up action So that the get-up action can run with the appropriate privileges to do all that is to do all that is needed So that would be a great step when you decide to add another person to your development team Because then you don't have to worry about who runs the deploy and when and From what state? Because otherwise it can happen that somebody will run it, but maybe they haven't updated to the latest version They haven't pulled your your latest change or something like that. There might be some miscommunication They'll just be concurrency issues where two people are trying to deploy at the same time Etc. Just not worth it. There is there is no reason to communicate with that other person You know just deal with computers. That's what we do, you know computers over people, right? But in this case, yes Because it makes it it makes it easier and when we're communicating to two humans We can focus on the important stuff not Can I deploy now? Do you have have you pulled everything? No, nobody wants to have that conversation. It's boring And finally, what's next? Once you have all of these things, what are the next steps in your long-running long running project? well, the first one is Backups make sure that everything is that you have all of the things Luckily due to us using infrastructure as code all you really need is the data because you can recreate everything else You have a script to do that. You have one command that you can run that will create everything from scratch so you're safe there if Google in Europe goes down. You can just change one variable to US East to run in the US region in Google Cloud and run the same command and it will recreate everything there All you need is then to populate the data So make sure you have the data. It's as simple as that typically all of the services that that we talked about using Like cloud SQL Will have options to have automated backups use them and verify them Make sure that you go through this exercise at least once every year To make sure that a it works and be you know how to do it Because you don't want to be trying to figure this out on a Sunday afternoon when you want to desperately be doing something anything else So that's not a conductive conducive, you know environment to learning how to How to restore from a backup make sure that that's second nature to you and that's documented somewhere You also want to have monitoring to even know that something happened Usually for the first few years of a project It's fine to just have an external monitoring service that will tell you whether the system is still up. That's it And if it's not you want to know why it isn't up So use some error reporting Maybe some APM in the in the future some logging etc. I Believe that there are there are a few companies here who do that like like sentry and others which again is Is a free service for for smaller accounts or you can or you can run it yourself But typically you don't want to So this would be this the steps to do to kind of make sure that once you're once you're live You will also stay live So that was pretty much it A Little light on the concrete examples because we had to oversimplify a lot of things But the general principles remain a stick to the philosophy of everything should be repeatable and iterable So that you can start small and Built on top of it, but you will never have to kind of stop and redo everything You will it will just always be another small step And you will have tools that will help you make that step if you want to add a replica to your To your database you just add one more resource into your terraform run terraform apply and it will happen You don't need to figure out how to how to do it if you want to resize your database if you want to Suddenly have multiple different deployments You can do again the same thing and just run terraform apply and it will do it if you want to move from this To something the size of you know Millions of users and all these things there is a clear path You will never have to kind of scrap everything and start over so this is really setting you up for for success and It highlights always what the next step is you should never be like okay now I don't know what to do. I need I need to get there and I don't know how no with this approach you should always know how or Be able to figure it out So, thank you so much and now we'll have some time for questions Thank You honza Please use the microphones to ask the questions. We'll have a few time Thank you for your talk. We're interesting. I would like to ask you about logging Have you any advice about a good practice how to manage logging in production because sometimes it's a little bit Tough to find useful information in locks. Thank you Yes, I Have unlimited amount of information on logging. That's my specialty. I tried to stay away from it but as so make sure that the logs are captured somewhere and They're they're not stored in files, but they're stored in somewhere else in our example with using cloud run, etc They will automatically be collected by by Google and you will you will see them You will see them there you might have to configure that again You can do that using using the same terraform file And it will it will be there. You will have an interface and you will have a search So you can so you can search through them the most important part is that? How you generate those logs and what kind of information you put into it? The best advice that I can give you there is always add structure to your logs and context so use a struct log or some other library that allows you to do structured logging and and Play a little bit around it and just make sure that your logs are in Jason or some other parsable format So that you can so that you can work with it again You can do this in an iterative approach first version would be just set everything up at the very beginning So that you can do structured logging That should be in your template again before you start touching application code and then you know that you that there is it There is a path forwards So first it will just be locally in a file in your cloud run. It will be in the cloud console And you can log there and search through it when you grow even further You can start parsing the logs and and creating dashboards based on based on those structured data into it and and Alerts and and things like that Even further down the line you can then capture it into some system like like elastic search the ELK stack or Or or anything else again tools like sentry or datadog will allow you to do the same thing The primary aspect is you need to know what you look what you're logging Why and that it contains all of the information that it that is relevant No, just you know oops something happened But this particular thing happened and this was what I was trying to do and these are the parameters And this is the time of day and you know, this is the phase of the moon right now All of the information Make sense Awesome More questions. Yeah Good talk actually you covered pretty much Everything from start to end up to going to live. So really good talk just one question. You mentioned about Storing secrets as github secrets when a new developer joins in It's easy for them to like, you know run through the github workflow But we had a problem. So say for example, I'm in the development team and I'm adding the github secret The new developer comes in they don't have to bother about anything they run it But when I leave the secret remains secret So we weren't able to extract that secret from the github because we can add it But we can't retrieve it. How would you solve that problem actually any suggestions on that? I would not And the reason for that is to me secrets are right only I never want to read a secret as a person if if something like that happens You leave and somebody else they should just create a new secret and replace the one that is that was there without trying to retrieve it So so again, ideally I would have some something that would generate that that that secret for me and push it there Without anybody seeing it. But even if it's just a copy paste for for one time set up. I'll allow it but yeah, don't don't try to recover the secret and Just create a new one because that's that's better. Anyways, because you want to rotate them in case something something leaks Especially when a person leaves Like that secret should no longer be valid because that should be tied to the person who created it But the project might have like, you know, 20 or 30 having like AWS roles and other things which are responsible Not always we can rotate it, isn't it? Well, that's why you want to automate that That's why you want to have it as code So you will be able to rerun it or update it and and not not worry about these things For example, like when we create get up secrets, etc Like it's also run from Terraform which will create like a service account in Google Generate the key and push it into GitHub without anybody ever seeing it So it should be it should be independent and it's it's it's a secret. Oh, sorry it's a secret like any other it's not it's not special and It should not be treated that way like if if in doubt kill it replace it. Don't don't worry about it. It's not a person It's fine. Thank you Sure Hi, I think first go talk I would like to ask about one little detail notice about pre-commit hooks because I liked To use pre-commit hooks, but lately I've been noticing that it They are doing more harm than they're good for and especially when I noticed that Where he was setting up the CI you are actually running a pre-commit hook So unless you are actually pushing to main is there any benefit of running a pre-commit hook always so First running it you mean running it locally Yeah, so you you want to you want to shorten the the feedback loop You don't want to push it and something and then figure it out later that it's wrong when you you've already You've already switched to something else you want to you want to get that feedback as soon as possible that something is not ideal and You want to do it before anybody else sees it Because that will be just like so I push something where the pre-commit doesn't doesn't work Let's say I messed up the formatting or something like that And I don't want anybody to have to go back and say okay. No, that's wrong. You need to you need to fix it We shouldn't we should not have that conversation as people That's again delegate that to delegate that to the machines And you want to do that as soon as possible So that you so that the feedback loop is as short as possible So you avoid sort of mind switching and and task switching and doing something else. It should be That's why you that's why you're right locally. I mean sense Awesome. Thank you for your talk The question do you have a public rapport with all this in one like some kind of template that can be used? No, no, I don't that's a good question so There are plenty of plenty of other other examples examples out there Honestly, I didn't have the time. I wanted to but a Lot of that is also super opinionated and wouldn't be wouldn't be super useful But for things like the for Django, for example, the cookie cutter that you can find out out there is pretty advanced It does even a lot more things that I didn't even go into So always just there are tools already out there. I was focusing more on the principles here Yeah Django cookie cutter. So cookie cutter is a library for or is a tool for using using templates for projects and for other things and It was created by two Django people So the Django cookie cutter which is a template for new Django project is actually quite nice and and has a lot of a lot of features It doesn't yeah, that is true. That's just for just for the Django part But again, if you just Google like Terraform Django cloud run, you will you will find you will find a lot of things But that's just an excuse. I know I know I didn't have time. I apologize true I Will have time for a last question. Yes, you showed how to Create a deploy a sage and have all the code all the infrastructure as code And then you subtly mentioned that after the first time you should delete the Terraform apply Is there a better way to like check if that's already done? Is it like it important or does that term apply in? Infrastructure, how does that work? Good question? Thank you. No, the Terraform apply is important You can keep running it. I mentioned that you can kind of omit it for to save time so so what I typically Did in that situation was I would have a single if around it says like if not initial then then skip it and So or like if if fast deploy flag is turned on Skip it and and do that and I would use that like if I need to deploy a hotfix or something like that but you you You should be able to always run the Terraform apply and it should tell you nothing to do and that's a good thing Thank you, so thank you so much if you have any more questions, I'll be around


Hi, let's talk in this tutorial, do we need to use var or let keyword for initialization in for loop in JavaScript language. First, let's make a for loop by using var keyword for our initialization. For example, let's say var i equals to zero, i less than five, i plus plus. Along with this code here is that this variable i is going to be visible and it's going to exist even outside of our for loop. So if you want to use for something this variable i, you can also use it outside of this function anywhere in your program. But that's not a good thing because you can get few bugs by doing that. So instead of using keyword var for declaring your variable, it's better to declare it with keyword let because now variable i only exists inside this code block. So outside of this code block, this i variable is now undefined, i is undefined. And with usage of keyword let here, you can avoid bugs in your code. That's all for now in this tutorial, don't forget to subscribe to my channel. See you in the next tutorial.


The Minnesota Safety Council made a stop in Bemidji for their 13th annual Northern Minnesota Safety Conference. The conference provided both employers and employees a chance to interact and learn from a variety of safety topics ranging from workplace violence to distracted driving. More than 125 people attended this year's conference which has doubled in attendance since last year. For many the conference is a chance to learn new safety measures and to be reminded of the basics. First of all we want people to get up to date. We want them to get re-energized and get a few new ideas about how to bring safety back. And then the last piece is to start thinking about other pieces of safety that do affect them at home and on the job that they might not have thought about before. The conference also focused on the growing opioid epidemic and its impact on businesses and society. 2018 marks the 90th anniversary of the Minnesota Safety Council. If you enjoyed this segment of Lakeland news please consider making a tax-deductible contribution to Lakeland PBS.