Luke, this is Mariano Anaya, and he's going to talk to us about clean code in Python. Let's hear a big applause. Hello, everyone. Thank you for coming. Let's talk about clean code in Python, software quality in a favorite programming language. First, a bit about me. My name is Mariano, a software developer. I'm interested in open source technology, software architecture and high level design. Linux and Python, of course. Feel free to contact me or reach me by any of these means if you're interested in talking about some of these concepts after the talk. Before we start with definitions, I'd like to make a few comments first. The code in the slide is written in Python 3, but there should be any problem, no problem at all if you're using another version of Python, so don't worry about that. Second, what I'm about to tell is that if I don't mean something strict or rigid, or you must implement it, there are some ideas or guidelines, some of them are opinions, so you might think otherwise, and that's perfectly okay. In concourse down, we can say that there's no sole definition of clean code, and instead you will find as many definitions as developers and authors available out there. Let's try this one, which says that clean code is one in which every function does pretty much what you would expect, and you can call it a beautiful code when it also makes it look like the language was made for the problem. The reason why I picked this quote is precisely because of that last statement, because that's what we call a Python code, or a code that is idiomatic in Python. We'll see examples of that and how we can achieve that. So to have a common ground of understanding, we can say that clean code is focused, which means it does one thing well, and that thing that it's doing should be pretty much what you would expect, so the code should not be misleading or error-prone or confusing, instead it should be clear, and this is important for many reasons, because arguably the quality of the code will determine the quality of the software. We all know there's a strong correlation between a poor codebase and a software that has a lot of errors and it has to maintain, whereas the opposite is also true. If you can maintain your code clean, readable, and understandable, it would be much less likely that there are errors and problems in the code, and if there are, it would be easier to spot. So readability counts, as we know from the sense of Python, and it makes total sense because if you think about it as developers we spend much more time reading code than actually writing code. So if we want to make a change or add a new feature, we first have to read all the surroundings of the code we're going to modify or extend. And the extent to which you can read the code and actually tell what it's doing is what ultimately will determine or define how fast can we ship new changes in the code or new features, so it's related to Asha development. We all know that previous messages lost you down and deprived you from shipping new functionality faster. And last we can mention that the code is like a blueprint, it's like another model that you have where you should represent the business logic and the requirements of what you try to do. So it has to be read also, it's useful. On the other hand, we have some scenarios, we are exactly the opposite to what we want. For example, complex, obfuscated code, code that is misleading or that has misdirections, the complicated code is like the worst thing we can have in the project, and code that is not intentionally revealing and that instead of revealing the business logic or the business requirement, it's exposing implementation details which should be encapsulated or abstracted. And this is all part of technical debt. There are many ways of technical debt, but having a poor code base is arguably one of the worst. And to make things worse, technical debt is also invisible. It's not only negative for the project, but it's something that is sometimes hard to spot or identify. So let's try to see some examples of this with Python code. The very first example is something really simple which is speaking about meaning in the code. Let's consider this function that, given a year, it should bring one line per day of the year. You think that it works and it actually does work, it does what it tries to do, but now suppose like, I don't know, six months, a year elapsed since you first wrote it, and you find yourself trying to figure out what it's trying to achieve or trying to do. And you see that it's trying to do some calculations and see if the year is divisible by some numbers. And you cannot actually spot what it's trying to achieve, but you find that if that condition is met, it's added an extra day. So you say, okay, maybe that's trying to figure out if the year is sleep or not. But that's the problem. The fact that you have to guess is the problem. You shouldn't be guessing. The code should actually be telling you what it tries to achieve. So if I want to know if a year is sleep or not, I'd rather have a function, let's call it is sleep even a year. So I can read the code and I can actually replace that and only with a statement or something meaningful in the code. This is a very simply yet powerful thing you can do in order to increase the reliability of your code because it's not about like reducing code, it's about separating concerns, differentiating different problems into different layers and having an organization in the project. Remember that functions are the first line of organization in a project. Functions should do one thing, one thing only and do it well. And starting from this very simple example we can say that it's actually related to code duplication because if you think about it, most of the times code is duplicated because it didn't have a proper abstraction or a name for it. So you might say, okay, let's say we have a validation in some part of the code. I'm going to say, okay, I need to add a similar validation. So someone might say, okay, let's copy this line from here to here, paste it here. Let's change this number, the one by two. I'm all set. But actually not quite right because maybe you introduce some duplication in the code inadvertently. And the reason why that happened is because it didn't have a name, it didn't have a proper abstraction. We all know that we want to avoid code duplication at all costs because duplicated code forces you to do parallel changes. You have to change things in many, many places in the software at the same time. And if you forget one of those, you have a bug or there is a problem. So instead, we do not want duplication and you can remember the dry principle, the dry and crony moon for this, which stands for don't repeat yourself. And the things must be defined once and only once in the project in order to be efficient in the work. So this has been sought after principle in software development over the past few years. And in that regard, there have been many enhancement of progress. For example, libraries, frameworks, tools, design patterns. And those are great and it's usually a good idea to help us in mind. But on top of that, we can say we have a so-called extra tool when it comes to Python, which are decorators. I will not explain all the details about decorators because it's to extend the topic and it's worth a token itself. I will only mention what's relevant for the purpose of this talk, which is addressing college obligation. The general idea is that you can have some functionality abstracted in one place, but repeated or reused many, many times. Let's see this with an example. So let's say I have a maintenance database task that is part of a framework called like this. And the high-level idea is that it is made out of a sequence of commands and these are going to be executed. So the first task is to update the index of a database in Postgres. So I have a sequence, which is a const of one command and the logic follows like this. I execute every command in the sequence with the cursor which is provided. If there is an error or something went wrong, I log the exception and return minus one. Otherwise, I log that work fine and return zero. So far so good. Let's assume these are the valid goals that the framework requires, but then another requirement arises and says that I need to move some data from some records from a table to an archive table to only leave the most recent rows in the table. So I say, okay, I can do that in two commands, two SQL statements, one for inserting the rows into the archive table and then a second one for deleting the affected rows from the main table. But then as part of the framework and the logic, I have to preserve the exact same logic. So I can do something like, okay, for every command in the sequence, I execute it with a cursor which is provided. If an exception occurs, I log the exception and return minus one. Otherwise, I log that work fine and return zero. This actually also works, but now we see the problem. The problem is that I have to preserve the logic, but this is exactly the same code as before. Starting from the try except block is the exact same lines as before. And the reason why that might happen is because those lines that were in charge of doing the error handling and logging didn't have a proper abstraction location or name for it. So it's kind of similar to the very first example with Libya. There was some code that didn't have a name, didn't have an abstraction, so it was actually very error prone to duplicate the code. Let's see if we can address that with a decorator. So the idea is that I create a new function which I'm going to call db-status-handler which is going to be a decorator so it assumes it receives the function which is the one that is going to be decorator. And inside it defines a new function and there I can put the logic for doing the error handling. I execute every command in the sequence. Again, if an exception occurs, I log the exception and return minus one, otherwise I log that task completed well and return zero. This assumes that the function that's being decorated provides the sequence of commands. So there's an interesting thing here. First we have a name for that. It's no longer an unused code. Now it's called db-status-handler and it's in charge of one thing which is the error handling and executing the commands. So now the previous two functions can be changed to use the decorator. So I can remove all that duplicated logic and instead only return the sequence of commands which is the relevant part. But they're still preserving the same logic because they're being decorated by the db-status-handler on top of the function definitions. We actually did three things with this change. First we assign a name to the previous anonymous code which now is called db-status-handler. Now there's a separation of concerns of the logic. Remember that the decorator now only handles the commands and the logging and knows nothing about the commands itself whereas this function has the opposite behavior. This function only returns the sequence of relevant commands and knows nothing about the error handling. And last, we remove the duplicated code and we have it defined only once. So this was a cool way to use decorators to address duplication. So this is somehow related to another topic which is managing implementation details. The idea is that you have to run like a task as part of your core functionality but you also have to do some other things that are related from technology you cannot avoid you cannot escape from. So this is similar to the one before. We do not want to mix up or different things into the same problem. We still want the same logic separated into smaller pieces. So let's see what Python has to offer for each scenario. Let's consider a very simple example. Let's say I have a web application an online game with players playing online and I have a requirement that says that a player finishes the game I need to update the score with the new points that player has just earned for the match it just finished. So the idea is that giving a player status object I call the accumulate points by the new points that I have to set for that player. You might think this works but if you take a closer look you'll think that indeed it's not very good because it's mixing up implementation details with business logic. So what I want to do is to add new points for a given player but instead I'm having to deal with a race connection with a key 0 which seems to be at a default value an integer then follows where I actually want to do which is to add a new score for the player and then again another implementation details another technical detail with the set value. So instead what I would like to have is not the previous accumulate points method but instead just points with the Python variable because it's easier to follow and understand. So if I want to get the points of a player at any given time I just type points the same for the set. So the previous accumulate points there's nothing particular about it it's just plus equal to any number as I do with any or regular Python variable or attribute. So in order to achieve that we can use the property decorator which is a built-in decorator in Python which is a method of the class and there we can move and encapsulate and abstract implementation details so from where it's calling it doesn't know what's behind it and that's a good thing to have it only knows about the points and we have two methods or two properties that are smaller in size and easier to understand. So you can use the property decorator to use some computations based on our object attributes and you should prefer this approach to custom getters and setter methods because the code will be easier to read to follow and also to test because now you can test your code with anything that has like a points attribute you don't have to have like a radius connection for running your test or mock the connection or patch it etc. So it's easier to understand and follow. It's much more Pythonic. Now let's suppose I have like a web application in this case but it's an online store that has stock representing all the products that are in the store. So there are dividing categories and I might have a view like this one that says like request for customer that is going to handle the scenario where some customer is trying to make a purchase of a product online but if you care about code quality you will find that this is a bit hard to read in particular these lines are not very expressive but you still go to the trial to read those lines and find a clue near the if statement when it says if product available in stock so you say okay maybe the previous line we're actually trying to figure out that again I'm guessing over the anonymous code so you say if I want to figure out if a product is available in stock I might rather just simply write that like if product in current stock which actually makes perfect sense is speaking in terms of the domain problem and is self-documenting it doesn't need a comment because whenever you write something like that if product in current stock Python slightly translates that by calling the contains method the so-called mashing method because of the double underscore and passes the product as a parameter so the idea is like okay now I know that I can implement the contains method into the stock class and have an interface that you want to have before but actually it also makes sense so the search algorithm can be encapsulated away in the class another case for managing state or handling scenario is when we have a code that again runs a core functionality in your project but you also require to do certain tasks for example you might have a code that has pre-conditions or post-conditions or both for example you're connecting to a server you want to make sure after processing the data you need it's actually making sure it's closing the connection or releasing the resources it allocates so the problem is here that we might again feel the risk of actually trying to mix up those things and instead it should be together separated into different layers so let's see if we can do that with a context manager which the idea is very simple let's say I have to run an offline database backup so my backup requires that the database service is stopped before running then run the offline backup and then of course I want to make sure I'm leaving the database service up and running again so instead of trying to put the stop database service and start database service inside the run offline backup which doesn't belong to and is making the code more coupled or more yeah, actually instead we can separate that into a handler which is going to be called and I write like with an object that implements the context manager protocol Python suddenly translates that and calls the enter method automatically which in this case will stop the database service then follows the wait statement the block and then I can run the core functionality what I actually want to do which in this case is running the backup and then after the last statement completes it automatically calls the exit method even if an exception occurred so it's making things easier because I don't have to do the run, leave myself or manage edge cases or scenarios I will make sure that even if this fails or something went wrong the database service will be left up and running no matter what you can slightly improve this by using the context decorator which is an interface provided in the context live and once you inherit and extend that interface you implement the enter and exit methods and once you have that you can use that in the context decorator for the function so whenever in this case if I call it like this whenever I'm calling DB status handler this is going to be called automatically inside a context manager calling the enter and exit methods so from all of these we can draw the conclusion that there's always a much more pythonic way to write things and the best way to write pythonic call is to actually take advantage of the features of the language of playing well with python reserve variables like two pieces of hashics that match together so in a way that makes sense like the example of the stock and sometimes in order to achieve that the most common answer is the magic method but now that there are many other tools many other magic methods or features of the language such as scriptors etc so if you're starting you're beginning in python I really encourage you to try to find these in order to transform your call into a much expressive one and if you're an experienced developer you might use these examples as ideas in order to provide feedback in a call review or in a pull request try to see if the call is pythonic so to wrap up we can say that the best way to write pythonic call is to actually take advantage of the language of the future languages sometimes that means using a decorator removing duplication etc aside to that you also have some standards that can help you write better call and can be understood by the team for example Pepete or Coding Islands but not that you can be 100% with them I still know how pythonic call because they're actually looking for different things although it's a good idea to keep them in mind try to pull doc strings functional annotations you want to keep your readers about what you expect at any function in the call if you're here for the so-called productive call also applied for unit tests you should also maintain your unit test clean and with good structure so they are useful and also it's a good idea to use test and TDD because you will naturally follow this logic or actually trying to define smaller pieces because you will want to make your call test a lot and in addition to that we have finally some tools that we can use to provide metrics for all the call we have like Pygostyle, Pylin and Radon you can run this in your project and it will give you metrics such as psychomatic complexity, maintainability index et cetera that you can use as a head start to know where the call needs more improvements urgently and finally Koala which works with the previous tool but also lets you define your own standards to be run or check automatically as part of your continuous interaction environment if you're particularly interested in some of the topics you can have more information in some of these sources and then you can go to the board for the talk that would be all and if you have any questions I will add the answer, thank you very much I think we have time for questions we have time for a couple of questions any one no questions so thanks to the speaker again ok


All right, so we're starting this Monday edition of the Sports Max Zone. We're going to be talking football and the Jamaica Premier League type. So the Jamaica Premier League is at its halfway point. Still teams of that competed in the Congo-Katharebian Cup are playing catch-up, with Cavalier and Harbourview playing the first of their two reschedule games on Sunday. Harbourview left it late to defeat Treasure Beach 2-0 through stoppage time goals from just Sean Anglin and Shaquille Bradford. Meanwhile, the featured game on Sports Max saw Cavalier dismantle 10-man Anet Gardens 3-0, with Kyle Ming air returning Dwayne Atkinson and Shaniel Thomas getting the goals. Anet Gardens head coach Xavier Gilbert said a lack of wit contributed to his team's loss. Cavalier's technical director Rudolf Speed loaded his team's unpredictability. All right, it's a pleasure Leje to have you in studio with us, our football analyst. We're going to start now by talking about that loss for Anet Gardens, because did you see that one come in and by that margin of goals? Well, I mean, I haven't been here for quite some time, but let's forget I'm still a prediction guru and I had to make the prediction without people hearing, but I did see that last come in. I think Cavalier have been really impressive. I think this season, especially the last couple of weeks, their defense has really started to improve. You know, a lot of clean sheets on the bounce now and Anet Gardens, I don't think that they've quite found their feet as yet on a new management. They lost a lot of players, so the refresh rate in the squad is quite high. They've gained, yes, Fabian Rideau has come back into the team and for the past two games has performed admirably, but I still think with a very young midfield, Jayim Tamas, I know a lot of the, it's practically a completely new midfield than what they started last season with. I still think that there are some growing pains for them to work out, especially with how Xavier Gilbert coaches, you know, he wants his, a lot of associative play, he wants his players to, you know, really be around each other and really figure things out on the field. And when you come against a team that's really well-drilled, like Cavalier, where they were always going to struggle and that's exactly what happened yesterday. Leger, you know, I'm always rooting for you and always on your team, but here's a bit of advice, right? Whenever you're doing predictions and getting them right, you have to do them on the show. You can't, you said you were not on the show and you made that prediction and it was right and nobody heard you. And that's unfortunate because when you do make them, they're wrong on air. You know, I think maybe Ricardo realized that I was going to go through a purple patch of predictions, so he scheduled me to be off for a couple weeks, but you know, I'm back now and I won't let that happen again. All right, good on you. Do you think Anato, they've been feeling the effects of losing Kimani Osburn? I saw that as a headline in one of the Jamaican newspaper. Yeah, that's a possibility as well as I mentioned that they don't have a lot of continuity from last season. I mean, someone who was there, he didn't start week in, week out, but I do think that he's a talented player. He started this season really full of confidence and he could have added something, especially down the flanks where they started Warner Brown, who is usually an out-and-out striker to really partner Fabian Reed and you saw as Ava Gilbert speak about their lack of width. I think that came especially down the right hand side because they didn't have that out-and-out winger, but they did have wingers on the bench, so I'm assuming that was on purpose. Maybe the width was supposed to come from the wing back, but, you know, you was pinned back by Dwayne Atkins on the left hand side for Cavalier. So a lot of tactical tweaks didn't go the way that Aine Garnes would have wanted it to go and Cavalier. On the other hand, I think they were really good. Yeah, two quick questions here for you, Lige, because we know that Rudolf Speed is a student of the game and he studies and strategizes expertly when he comes up against his opponents. Dwayne Atkins is back for him. So it boosts his attacking options, but his leading scorer, the Antigone, Jalmaro Calvin, scored in three consecutive games and was benched for yesterday's match and it is to Cavalier's credit and Speed's credit that he was able to get such an emphatic win with his team roster that he put out, taking his main goal score up to this point of the starting roster. Yeah, that's very true. But if you listen to Rudolf Speed at any point in time throughout these past years when he's been in the league, he's always made mention that he thinks that his system is over any player. So if he were to swap and change, and he's proven to be right, to be honest, because since Cavalier have been in the league since 2017, 2018, they have been in the semifinal every single year. That's really astonishing consistency. And we see the amount of turnover they have. They've done it with a really young team. So every year there's always new players really stepping up. They've lost Colin Anderson this season. We see Jalmara Calvin stepping up and scoring goals. And they have other players coming in now. And then I mentioned last season when they were going into the running, how them losing doing Atkinson would have impacted them negatively. They went really far. They still went to the final of both the Ling Cup and the Jamaica Premier League. But at the same time, I said when you come against the very best of teams, like Monplier that were last season, there's something that doing Atkinson brings to this Cavalier team and to the Jamaica Premier League that they can't just replace with one player. And he showed that again, getting a goal and an assist against Inet Guards. And I think he was really good in his performances. He still looks really bright. And he has the finishing, he has the movement, he has the pace, he has the creativity. And I think on his day, when he's playing consistently, there is no doubt that he's one of the best players in this league. Yeah. And I want to emphasize the point that for a few seasons now, we've said in our coverage of a Premier League football that Dwayne Atkinson has the potential to be an international quality player. He was briefly on loan in Iceland, didn't work out that well for him, so he's now back here. How much quality would you say Dwayne Atkinson has? I think he has really an immeasurable type of quality because there are certain things that you have to be on the lookout for. You know, we saw him in his youth days at Kingston College, he was a very good player, playing alongside Trevor and Reid, you know, other quality players. But when you have to think about when you see a player at a young age, if they can translate what they're doing then into the senior game. Yes, you have players that are faster than players when you're playing under his football, but then when you get to, are you still going to be faster than these grown men? He does have that. Can he still take on grown men that will? He does have that. Can he still, his ball striking, is he still going to be able to replicate that? He can do that. And that leads him to be also a goal threat and also really important for Cavalier creativity wise. So I think that he can go at a very far level. If he continues to keep this consistency, it's just whether or not he's going to get those opportunities because he's still very young as well. Yeah, let's quickly move to Harbaugh View because I'm not sure what's going wrong with Ludlow Bernard's side. Only their second win yesterday for the season. And at 90 minutes, it was nilol against Treasure Beach. They got two stoppage time goals to get the win. Happy for them that they got the win, but real problems for Ludlow Bernard and his Harbaugh View side. Yeah, and I think in my lifetime, I can't quite say it's been a short lifetime so far because I've gotten up there in age now. But in my lifetime, this is the first time I've seen a lot of the Bernard team struggle this much. They've had a lot of turnovers as well. But I think with their turnover, they've replaced the quality with good players. We see them there in 11th place. The last suffering since, we're not seeing them in rows for them anymore. But they replaced him with Ajuma Johnson, one of the best number 10s on the island. And then they needed a striker. They ended up getting Shaquille Bradford, who has been playing really well, I think six or seven league goals now. So it's not that they're not replacing their quality with more quality, or at least an equal level of quality. But it's just not gelling for them. I don't see it, especially in the midfield. They have Joshan Ogden and Kasim Prisley. That's as formidable a midfield pair as we're likely to see in this league. But it's just not clicking for them offensively, defensively in the middle third. It's not as smooth. But if there is any coach in Jamaica who has experience and the quality to really get this team clicking, especially towards the end of the season, we know it's Lola Bernard. But with the quality of teams ahead of him, I'm not quite sure if that experience and quality he has as a coach is going to get them into this top six this time. Yeah, I'm not quite sure myself. But by the way, DJ, welcome back to work. And I hope you enjoyed your vacation, your time off that you requested some time ago. It's a pleasure to have you back, by the way, still. It's a pleasure to be here with you as well, Ricardo. Making up predictions and when he does say them for the public, they are wrong, right? And that's a mariah. Yeah, let's take a break for that because after that from Ricardo, that come back, we need to take a water break. We'll be back.


The pitch to Arcia and it's a triple for Arcia to run homer what a day for Orlando Arcia a new Franchise record for a single game 13 extra base hits for the Brewers As Bogleback comes up way back he's done it a second time in this homestead


Well, what a pleasure it is for Nancy and me and all our distinguished guests to have the President of Israel and his lovely wife with us at this festive dinner. It's a special occasion for us to have you with us, Mr. President, because of your personal distinction and because you represent Israel, one of our closest friends and partners. Moreover, Mr. President, your visit has special significance for yet another reason. It's a great day for the Irish. I can't help but note that Ireland is so successful at producing national leaders and that an Irish brogue carries as much influence in Jerusalem as it does here. That you were born in Ireland and that my ancestors come from there may seem accidental, but it speaks to the history of both Israel and the United States. Ours are nations of immigrants and nations of opportunity. Israel was established with an open door to the Jewish people from around the globe. The epic drama of the in-gathering of those who came to Israel to find freedom, escape persecution, rebuild their lives has captured the imagination of all Americans. We too come from distant shores and in different circumstances struggled for our own freedom. Israel has never lost sight of its destiny to be a nation of free people living by the principles of democracy. Israel's vibrant democracy offers the best and strongest rejoinder to those who denigrate its achievements or who try to equate Zionism with racism as the UN General Assembly did in 1975. In that connection, I welcome recent action by the Congress calling for the overturning of the UN General Assembly's misguided and reprehensible resolution. Over the last four decades, Israel has grown and prospered. Your farmers and pioneers have made the land green. Your universities and research institutes have created miracles of technology and science that have added to human welfare. And your people have set the world an example in courage and fortitude. In these 40 years, we Americans have been proud of our friendship and partnership with Israel. New nations enjoy richer or stronger ties. Support for Israel is not limited to one group or region. It is felt and expressed throughout the United States. It reflects genuine affection, admiration, and mutual respect. Since Harry Truman extended diplomatic recognition to Israel, every American president has cared deeply about Israel's security and its quest for peace. I carry on that tradition, and I renew tonight the pledge I've made before. The United States will always ensure Israel's security and work with her in partnership for peace. Mr. President, Nancy and I extend our best wishes to you and Mrs. Herzog and the people of Israel for health and prosperity and for the continued close friendship between our two great countries and peoples. Mr. President, Mrs. Reagan, I rise to thank Mrs. Reagan and yourself for the kind hospitality extended by you to Oran and myself on this historic occasion, the first state visit of the president of Israel to the United States of America. It is very difficult, well-nigh impossible, to give adequate expression to what one feels on such a moving occasion. Not even something you and I have in common can help to overcome this difficulty. I'm referring, of course, to the fact that somewhere in our personalities we have a common advantage over many others, that of the gift acquired from the Blarney Stone. Despite the enormous differences between our two countries, as we celebrate our 40th anniversary, one cannot but remark on many similarities. When the director of our railroads first visited the United States, he was asked by his hosts how many miles of railroad we had. Too embarrassed to tell the truth, he replied that he could not recall the distance, but he knew that we had the same width as in the United States. The common foundations which both our countries have, based on the teachings of the Hebrew Bible, have been used to build a superstructure of relationships which is really quite special. I do not know whether history has another example of a great free democracy extending so broad a hand of friendship to a young, although also very old, state so far from its borders and so different from it in size of population and area. Indeed, our partnership led to the fact that in this building was signed the peace treaty between Israel and Egypt. It was a truly unique occasion in the history of peace. It signified the first great achievement of the peace process, which we and I believe the vast majority of the peoples in the adjacent Arab states pray will lead to a lasting peace to the Middle East. America's support for Israel, a free open democratic society in which the dignity of man is enshrined as a supreme value, has been a pillar of American policy, a commitment of all American presidents, a consensus uniting the American political spectrum, and a reflection of the will of the American people. You, Mr. President, have brought our relationship to unprecedented heights, to a closeness that is symbolized by this evening. Mark Twain once said, always do right. This will gratify some people and astonish the rest. Indeed, the main thing is to continue to do what we believe to be right, as you, Mr. President, are doing with your resolve and leadership in the Middle East and in the Persian Gulf. It is always important to remember what it is that we represent, two peoples with a rich heritage and a message, that the destiny of mankind is freedom, that the greatness of a nation is determined by its commitment to freedom, and that peace and international cooperation are the only parts to a secure future. Mr. President, on behalf of the people of Israel, I thank you for your friendship and unfailing support. Your name is inscribed indelibly in our history as a dear and close friend who appreciates the importance for the free world of a strong and stable Israel as an outpost committed to the defense of democracy in a region swept by the winds of fanaticism and fundamentalistic bigotry. I ask you, Mr. President, to give us, the people of Israel, the opportunity to express to yourself and to Mrs. Reagan, who has a special place in the hearts of our people, our profoundest feelings for you both by coming to Israel and meeting a grateful nation and by seeing for yourselves the realization of an ancient people's dream. I would ask your Excellencies, ladies and gentlemen, please rise so that I may bring to the health of the President of the United States and Mrs. Reagan. I am sure I speak for all of us when I thank Roberta Peters for a magnificent performance. For decades, Roberta has been singing with the New York Metropolitan Opera, and over those years she has been heralded as a preeminent soprano, one of the preeminent sopranos in America, and I don't think anyone here would quarrel with that. You were generous and you were kind, and it was just beautiful, and we loved every minute of it. Thank you.