Friday, January 31, 2020

Nuclear Weapon and Cold War Essay Example | Topics and Well Written Essays - 2500 words

Nuclear Weapon and Cold War - Essay Example The debate on nuclear policy has addressed the deterrence of aggressive nations and the proliferation goals of nuclear weaponry. The Cold War, which took place following World War II, was a power struggle between the world powers, more specifically the United States and the Soviet Union. During the Cold War, nuclear proliferation became inevitable as the world powers and their allies struggled to obtain the resources necessary to build their own nuclear weapon. As other nations developed the capability to produce nuclear weapons, limiting nuclear proliferation to the greatest degree possible became one of the primary goals of American foreign policy. The events following World War II, inadvertently changed the international politics of the United States by requiring the American government to take a more active role in the affairs of the nation. In the long run, the proliferation of nuclear weapons increased the Cold War but diminished the desire for a hot war. For centuries, the United States' foreign policy was isolationism, however, the Americans' international politics changed dramatically by the end of World War II.2 The United States rarely developed international policies, military advancements, or technological advancements before other nations. "The United States through most of its history had hardly led the world in developing new war-fighting technologies. Americans had tended to imitate rather than to originate weaponry"3 As the war came to a close, the United Stated tested the first nuclear weapon, an atomic bomb. The Americans' development of the first nuclear weapon was unprecedented, but the United States was trying to find a fast and cost effective solution to bring World War II to an end. "Having acquired this awesome weapon, the United States used it against Japan for a simple and straightforward reason: to achieve victory as quickly, as decisively, and as economically as possible Hiroshima and Nagasaki were destroyed"4 This devastating demonstration of the atomic bomb ended World War II only weeks after the creation of the United Nations. The United States government started to take an active role in the world and the security of the nation instead of maintaining its isolationist views. The United States government enacted organizations, policies, plans, and treaties to insure the safety and security of themselves and their allies, therefore taking on a very untraditional role. At the end of the Second World War, the major concern was the containment of communism and the security of the United States and its allies. In 1946, Winston Churchill warned the United States about the Iron Curtain. The Iron Curtain was a "symbolic separation of Europe" between countries that were controlled by the Soviet Union and those that were not controlled by the Russians.5 The fear was that a "domino effect"6 (one country falls to communism then they all

Thursday, January 23, 2020

Macbeth: Superstitions :: Free Macbeth Essays

Macbeth: Superstitions The tragedy of Macbeth was written by Shakespeare in 1606 and produced in 1610. Macbeth is the most concentrated of Shakespeare's tragedies. The action gushes forward with great speed from the beginning to end. The main characters in the play are Macbeth and Lady Macbeth, who are very noble, but their evil ambition ultimately causes their downfall and death. The play focuses around evil, greed and the supernatural. The play was written by Shakespeare for the king at that time, since he was a big believer of witches and the supernatural. Supernatural is classified as the unnatural or the explainable mysteries of our universe. In Shakespeare's time many people would relate many of the unusual happening against the supernatural, since this was the most simplistic of an answer to give. Elizabethan's have several beliefs in superstitions. Some of these superstitions include that they believe in witches, ghosts, destiny, and the foretelling of the future. This essay will investigate superstitions and how they are used in the play Macbeth. Witches were believed by many people in Shakespeare's day. The supernatural was believed by everyone from the educated to the non-educated. When something was not explainable they would relate that problem to the supernatural, even though today that same problem was explainable in scientific terms. The witches in this play are named by Shakespeare as the "weird Sisters". These witches had all the features of witches in those days; old people, dirty broken clothe and come together in groups of three. These witches have many animal's but in this play - a cat, and a toad are used - who are actually evil spirits who have taken this form. In Macbeth we here about the owl quite often which has to relate to the witches. The owl gives a sense of scariness which makes the paly thrilling to read. It keeps the reader hooked to the play and the suspense increases with every scary sound. Macbeth had many nightmares, which were caused by the witches, even so hallucinations, such as the "air-drawn dagger." that Macbeth seen before he went to kill Duncan. The very - word "nightmare," often called in Shakespeare's time "the riding of the witch", which refers to a witch riding wildly through the night on horseback, visiting bad dreams on her victims. Supernatural is the unusual, unseen, and the unknown. The supernatural occurs in many parts of the play. The supernatural occurs in the appearances of the witches, in the strange behaviour in nature on the night of Duncan's murder, in the appearance of Banquo's ghost, in the apparitions with their prophecies,

Wednesday, January 15, 2020

Learning Review Essay

Introduction Learning Logs are more or less like personal diaries which helps you to record, structure, think about and reflect upon the evidence of your own learning. The difference between a learning log and personal diaries is that a learning log contains your conclusions about how what you have learnt is relevant to you and how you will use the new information or knowledge in the future. Development I used the Learning Log to record the courses I went on, Internet sites I had looked at, and television programmes I watched. My first experience I had when I was writing the first learning log was quite interesting and very difficult, being that I have never done anything like that before. I would say it is sometimes hard for someone to talk about oneself and feelings about something. Before I started writing the log, I asked myself a couple of questions like (What I did? , my thoughts and feelings? , what I learnt? , and What I will do differently next time? ). At first it seemed difficult to critically reflect upon my own learning’s, but over a period of time after much practising, it became a little easier and understandable. The more often I practiced the skill of self-reflection, the easier it became. Most of my learning logs were more or less focused on my personal life as it seemed easier to reflect on my personal life than reflecting on my academic life. Although talking about my personal life can get difficult as I sometimes did not know how to express my feeling toward what I was writing on. I encountered many difficulties and questions in writing my third log. At first, I thought I knew how well to write learning log, but later, I realised I was not so good. I asked myself, do I need to write every learning log referring to all my previous lecture or tutors? I cannot apply them so quick and see if they work for me. Then I realised it is easier to write about my daily life although it is harder to reflect on personal life. The content of one of my lectures (principles of marketing) was quite hard for me to write about and apply in my daily life. Apart from the above mentioned problem, I also have a question of what I learnt from an online marketing intelligent tutor program. At that tutor session, it was focused on the main issues of marketing. Evaluating the lecturers tone and works, the choice of evidence, the validity of the evidence, I think these points can be tried only when I read more commentary or article about the topic. The third lecture from my economics class was on critical reading. In the part of defining critical reading, I found myself always reading books passively and recklessly. When I have to read textbooks, this will happen easily. Some contents of those textbooks are quite long and boring. Just as now I am studying Microeconomics, I should read the whole chapter to get more information and concepts about this subject. But I don’t think it is easy to read. The sentences are long and hard to understand. When I read this textbook, I often cannot get concise concept and write summaries to be able to reflect on them One of the interesting logs I wrote was on a book I read titled â€Å"Good Decisions†. This particular log gave me a better idea on how to perfect my log writing skills because I was able to reflect on it. This book made me understand the different ways to approach ethical problems. I learnt that I have two core values, upholding harmony between people and doing the right thing, and this makes my decision-making difficult. I think I am not alone though, most people probably have similar problems and the reason why we cannot agree on some ethical issues is based on the fact that we approach them from different perspectives, rather than that we disagree on the fundamental values we have. I realised that if we share these values, our decision will depend on how we define caring for others and what things are the right things in different situations. I would also assume there might be a gender difference, with women being more likely to prioritise well-being of others and men finding it more important to uphold the rules. I decided that when next I am faced with any ethical dilemma with someone, I will try to identify what methods they are using to make the decision and see if that extra insight would help us solve the problem at hand quicker. Conclusion Overall I believe that the learning logs have helped me understand the importance of self-reflection. After I completed the amount of logs required weekly, I was able to achieve certain goals. Learning logs have made me tolerant, Analytical, Diplomatic, Become more open to learning, reflective in all I do and Self-Aware.

Tuesday, January 7, 2020

Programming a Tic Tac Toe Game in Visual Basic

Programming computer games may be the most technically challenging (and possibly the best paying) job that a programmer can have. Top level games require the best from both programmers and computers. Visual Basic 6 has now been thoroughly bypassed as a platform for game programming. (It never really was one. Even in the good ol days, serious game programmers would never use a high-level language like VB 6 because you just couldnt get the cutting edge performance that most games require.) But the simple Tic Tac Toe game is a great introduction to programming that is a little more advanced than Hello World! This is a great introduction to many of the fundamental concepts of programming since it combines techniques including: The use of arrays. The X and O markers are kept in separate arrays and the entire arrays are passed between functions to keep track of the progress of the game.Using VB 6 level graphics: VB 6 doesnt offer great graphical capability, but the game is a good introduction to what is available. Much of the rest of this series is an exploration of how GDI, the next generation of Microsoft graphics, replaces the VB 6 level graphics.Using math calculations for program control: The program uses clever modulo (Mod) and integer division calculations using the two-game marker arrays to determine when a three-element win has occurred. The class of programming in this article is perhaps just a little past the beginning level but it should be good for intermediate programmers. But lets start at an elementary level to illustrate some of the concepts and get you started with your Visual Basic game programming career. Even students more advanced than that may find that its slightly challenging to get the objects in the form just right. How to Play Tic Tac Toe If youve never played Tic Tac Toe, here are the rules. Two players alternate at placing Xs and Os into 3 x 3 playing field. Before the game starts, both players have to agree about who will go first and who will mark his moves with which symbol. After the first move, the players alternately place their marks in any empty cell. The goal of the game is to be the first player with three marks in a horizontal, diagonal or vertical line. If there are no empty cells and neither player has a winning combination, the game is a draw. Starting the Program Before starting any actual coding, its always a good idea to change the names of any components you use. Once you start coding, the name will be used automatically by Visual Basic so you want it to be the right name. Well use the form name frmTicTacToe and well also change the caption to About Tic Tac Toe. With the form established, use the line toolbox control to draw a 3 x 3 grid. Click the line tool, then draw a line where you want it. Youll have to create four lines this way and adjust their length and position to make them look right. Visual Basic also has some convenient tools under the Format menu that will help. This is a great chance to practice with them. In addition to the playing grid, well need some objects for the X and O symbols that will be placed on the grid. Since there are nine spaces in the grid, well create an object array with nine spaces, called elements in Visual Basic. There are several ways to do just about everything in the Visual Basic development environment, and creating control arrays is is no exception. Probably the easiest way is to create the first label (click and draw just like the line tool), name it, set all of the attributes (such as Font and ForeColor), and then make copies of it. VB 6 will ask if you want to create a control array. Use the name lblPlayGround for the first label. To create the other eight elements of the grid, select the first label object, set the Index property to zero, and press CTRLC (copy). Now you can press CTRLV (paste) to create another label object. When you copy objects like this, each copy will inherit all properties except Index from the first one. Index will increase by one for each copy. This is a control array because they all have the same name, but different index values. If you create the array this way, all of the copies will be stacked on top of each other in the upper left corner of the form. Drag each label to one of the playing grid positions. Be sure that index values are sequential in the grid. The logic of the program depends on it. The label object with index value 0 should be in the top left corner, and the bottom right label should have index 8. If the labels cover the playing grid, select each label, right-click, and select Send to Back. Since there are eight possible ways to win the game, well need eight different lines to show the win on the playing grid. You will use the same technique to create another control array. First, draw the line, name it linWin, and set the Index property to zero. Then use copy-paste technique to produce seven more lines. The following illustration shows how to set the index numbers correctly. In addition to the label and line objects, you need some command buttons to play the game and more labels to keep score. The steps to create these are not detailed here, but these are the objects you need. Two button objects: cmdNewGamecmdResetScore Frame object fraPlayFirst containing two option buttons: optXPlayeroptOPlayer Frame object fraScoreBoard containing six labels. Only lblXScore and lblOScore are changed in the program code. lblXlblXScorelblOlblOScorelblMinuslblColon Finally, you also need the label object lblStartMsg to mask the cmdNewGame button when it shouldnt be clicked. This isnt visible in the illustration below because it occupies the same space in the form as the command button. You may have to move the command button temporarily to draw this label on the form. So far, no VB coding has been done, but were finally ready to do that. Initialization Now you get to finally start coding the program. If you havent already, you might want to download the source code to follow along as the operation of the program is explained. One of the first design decisions to make is how to keep track of the current state of the game. In other words, what are the current Xs and Os on the playing grid and who moves next. The concept of state is critical in a lot of programming, and in particular, its important in programming ASP and ASP.NET for the web There are several ways that this could be done, so its a critical step in the analysis. If you were solving this problem on your own, you might want to draw a flowchart and try out different options with scratch paper before starting any coding. Variables Our solution uses two two-dimensional arrays because that helps keep track of state by simply changing the array indexes in program loops. The state of the top-left corner will be in the array element with index (1, 1), the top-right corner will be in (1, 3), the bottom-right in (3,3), and so forth. The two arrays that do this are: iXPos(x, y) and iOPos(x, y) There are a lot of different ways this can be done and the final VB.NET solution in this series shows you how to do it with just a single one-dimensional array. The programming to translate these arrays into player win decisions and visible displays in the form are on the next page. You also need a few global variables as follows. Notice that these are in the General and Declarations code for the form. This makes them module level variables that can be referenced anywhere in the code for this form. For more on this, check Understanding the Scope of Variables in Visual Basic Help. There are two areas where variables are initialized in our program. First, a few variables are initialized while the form frmTicTacToe is loading. Private Sub Form_Load() Second, before each new game, all variables that need to be reset to starting values are assigned in an initialization subroutine. Sub InitPlayGround() Note that the form load initialization also calls the playground initialization. One of the critical skills of a programmer is the ability to use the debugging facilities to understand what the code is doing. You can use this program to try: Stepping through the code with the F8 keySetting a watch on key variables, such as sPlaySign or iMoveSetting a breakpoint and querying the value of variables. For example, in the inner loop of the initialization: lblPlayGround((i - 1) * 3 j - 1).Caption Note that this program clearly shows why its a good programming practice to keep data in arrays whenever possible. If you did not have arrays in this program, you would have to write code something like this: Line0.Visible FalseLine1.Visible FalseLine2.Visible FalseLine3.Visible FalseLine4.Visible FalseLine5.Visible FalseLine6.Visible FalseLine7.Visible False instead of this: For i 0 To 7linWin(i).Visible FalseNext i Making a Move If any part of the system can be thought of as the heart, its subroutine lblPlayGround_Click. This subroutine is called every time a player clicks the playing grid. (Clicks must be inside one of the nine lblPlayGround elements.) Notice that this subroutine has an argument: (Index As Integer). Most of the other event subroutines, like cmdNewGame_Click() do not. Index indicates which label object has been clicked. For example, index would contain the value zero for the top-left corner of the grid and the value eight for the bottom-right corner. After a player clicks a square in the game grid, the command button to start another game, cmdNewGame, is turned on by making it visible. The state of this command button does double duty because its also used as a boolean decision variable later in the program. Using a property value as a decision variable is usually discouraged because if it ever becomes necessary to change the program (say, for example, to make the cmdNewGame command button visible all the time), then the program will unexpectedly fail because you might not remember that its also used as part of the program logic. For this reason, its always a good idea to search through program code and check the use of anything you change when doing program maintenance, even property values. This program violates the rule partly to make this point and partly because this is a relatively simple piece of code where its easier to see what is being done and avoid problems later. A player selection of a game square is processed by calling the GamePlay subroutine with Index as the argument. Processing the Move First, you check to see if an unoccupied square was clicked. If lblPlayGround(xo_Move).Caption Then Once were sure this is a legitimate move, the move counter (iMove) is incremented. The next two lines are very interesting since they translate the coordinates from the one-dimensional If lblPlayGround component array to two-dimensional indexes that you can use in either iXPos or iOPos. Mod and integer division (the backslash) are mathematical operations that you dont use every day, but heres a great example showing how they can be very useful. Â  If lblPlayGround(xo_Move).Caption TheniMove iMove 1x Int(xo_Move / 3) 1y (xo_Move Mod 3) 1 The xo_Move value 0 will be translated to (1, 1), 1 to (1, 2) ... 3 to (2, 1) ... 8 to (3, 3). The value in sPlaySign, a variable with module scope, keeps track of which player made the move. Once the move arrays are updated, the label components in the playing grid can be updated with the appropriate sign. If sPlaySign O TheniOPos(x, y) 1iWin CheckWin(iOPos())ElseiXPos(x, y) 1iWin CheckWin(iXPos())End IflblPlayGround(xo_Move).Caption sPlaySign For example, when the X player clicks the top left corner of the grid, variables will have the following values: The user screen shows only an X in the upper left box, while the iXPos has a 1 in the upper left box and 0 in all of the others. The iOPos has 0 in every box. The values changes when the O player clicks the center square of the grid. Now th iOPos shows a 1 in the center box while the user screen shows an X in the upper left and an O in the center box. The iXPos shows only the 1 in the upper left corner, with 0 in all of the other boxes. Now that you know where a player clicked, and which player did the clicking (using the value in sPlaySign), all you have to do is find out if someone won a game and figure out how to show that in the display. Finding a Winner After each move, the CheckWin function checks for the winning combination. CheckWin works by adding down each row, across each column and through each diagonal. Tracing the steps through CheckWin using Visual Basics Debug feature can be very educational. Finding a win is a matter of first, checking whether three 1s were found in each of the individual checks in the variable iScore, and then returning a unique signature value in Checkwin that is used as the array index to change the Visible property of one element in the linWin component array. If there is no winner, CheckWin will contain the value -1. If there is a winner, the display is updated, the scoreboard is changed, a congratulation message is displayed, and the game is restarted. Lets go through one of the checks in detail to see how it works. The others are similar. Check Rows for 3For i 1 To 3iScore 0CheckWin CheckWin 1For j 1 To 3iScore iScore iPos(i, j)Next jIf iScore 3 ThenExit FunctionEnd IfNext i The first thing to notice is that the first index counter i counts down the rows while the second j counts across the columns. The outer loop, then simply moves from one row to the next. The inner loop counts the 1s in the current row. If there are three, then you have a winner. Notice that you also keep track of the total number of squares tested in the variable CheckWin, which is the value passed back when this function terminates. Each winning combination will end up with a unique value in CheckWin from 0 to 7 which is used to select one of the elements in the linWin() component array. This makes the order of the code in function CheckWin important too! If you moved one of the blocks of loop code (like the one above), the wrong line would be drawn on the playing grid when someone wins. Try it and see! Finishing Details The only code not yet discussed is the subroutine for a new game and the subroutine that will reset the score. The rest of the logic in the system makes creating these quite easy. To start a new game, you have only to call the InitPlayGround subroutine. As a convenience for players since the button could be clicked in the middle of a game, you ask for confirmation before going ahead. You also ask for confirmation before restarting the scoreboard.