Tuesday, January 28, 2020
The Empress Dowager CI XI History Essay
The Empress Dowager CI XI History Essay Empress Dowager Ci Xi was born in 1835. She had two younger brothers. Her father Hui Zheng was a member of the Bordered Blue Banner of the Eight Banners. Bordered Blue Banner was descendant of royal, so she had an excellent familys background. According to annals, she spent her early life in Anhui Province. The earlier period of childhood, she started to learn literature, painting and handwriting. She had been training hard for several years before she moved to Beijing. Ci Xi took apart in a selection program for concubines for the new Xian Feng Emperor. She was a talented girl, so she was one of the few girls selected to be Preparative Concubine. After that, she was promoted to Noble Person after she was selected to serve the Emperors daily life. She was pregnant for the first time in 1855, and she gave birth to Tong Zhi in 1856. Tong Zhi was the only son of the Xian Feng Emperor. So Ci Xi was promoted to Noble Imperial Consort Yi. The Xian Feng Emperor became lazy because of his ba d health, and Ci Xi was good at handwriting, so Xian Feng Emperor looked over the political documents, and asked Ci Xi to write comments on it. So at that time Ci Xi started to contact with politics. British and French troops attacked Beijing in 1860, Xian Feng Emperor took his son and Ci Xi fled Beijing to a safety place called Re He. However Xian Feng was seriously ill at that time, his son Tong Zhi was only 6 years old; its too young to manage the whole country, so Xian Feng Emperor summoned eight of his most prestigious ministers to help his son to manage the country. Xian Feng Emperor died in 1861. After the death of the Xian Feng Emperor, both of his Empress Consort and Noble Consort Yi were elevated to the empress dowager. Tong Zhi became the new emperor and the Eight Regent Ministers tried to reduce the right of the new emperor, but Ci Xi was not satisfied with the Eight Regent Ministers. So she made a plan to arrest them, and killed them with the help of Prince Gong. After that, Ci Xi started to mix in politics. In breaking with tradition, Ci Xi became the first and only Qing Dynasty Empress to rule from behind the curtains. Tong Zhi Emperor died in 1875, Ci Xis nephew Guang Xu became the new Emperor. However, Ci Xi still ruled from behind the curtains. The first Sino-Japanese War was break out in 1894, the result of the defeat the Qing government was forced to sign the Treaty of Shimonoseki. Empress Dowager Ci Xis policy to the war was negative, so after a series of the wars of invading China, we lost our dominion gradually. Empress Dowager Ci Xi died in the Hall of Graceful Bird on 15 November 1908. Empress Dowager Ci Xi, as an emperor had governed the Qing Dynasty for about forty years. When the Qing Dynasty was found at beginning, the emperor not Empress Dowager Ci Xi had set a ban that the imperial harem or seraglio should not participate in the international affairs. When it was Ci Xis turn to govern the whole country, everything seemed changed. She used her beauty to make Xian Feng believe her and they soon got a baby called Tong Zhi. When Tong Zhi emperor controlled the country, it was a bad time. Britain and France united army went through Beijing and attacked and occupied Beijing. Then Xian Feng emperor escaped to a summer retreat. That was absurd that the high status emperor escaped when facing violence. How could the folks look at him? The only thing they responded was laughing at Xian Feng emperor. Just at that moment, Empress Dowager Ci Xi grasped this chance to become herself a psychologist. She came to comfort Xian Feng emperor. But as a pity, he died soon. However Xian Feng emperor knew well about how good or bad Empress Dowager Ci Xi was. So he left an imperial edict to Empress Dowager Ci Xi to prevent her in case she done something harmful. But out of Xian Fengs prediction, Empress Dowager Ci Xi made the imperial in her own hands by using some kind of means. She made herself to be the emperor. How contemptible s he was! When Tong Zhi was died at the age of 21 with sexual disease, it was obvious that Empress Dowager Ci Xi should take over the political power when Guang Xu was too young to take charge of the country. Empress Dowager Ci Xi always insisted on centralism. She suppressed the Taiping Rebellion which was an appeal for peasants` right. But she made it down. She kept the situation which was called centralism. Making the military power hold in her hand, she would not like anyone else to crab anything from her. In 1904, Japan and tsarist Russia made a war because of the territory of China and Korea. It took place in the northeast of China. To everyones surprise, Empress Dowager Ci Xi held the position standing in the middle. Thus made the people lived in northeast of China suffered in great pain. She even could bear that the people who were under her control were in pain not only in physic but also in mental. She made all rights belong to herself. She designed and snared the ministers, judged them with blank commitments. She smashed others` power into ash. She insisted in holding the main power and making everyone who was under her control listen to her. She made a rule which was that anyone could not challenge her position or doubt her ability because all she wanted was the whole nation and the entire power. As a leader, she failed to care about the folks` emotions and even did not know what they really needed and what they worried. She just knew that she had the responsibility to protect her position from being usurped. Not only in her political aspect had she something that made people dissatisfied with her but also in the life aspect. For example, Empress Dowager Ci Xi had a habit that was: where she went, where the meal went. So she did not have a specifically restaurant which was designed to eat.à Incidentally, the bowls she used were colored in bright yellow, covered with silver lid, and some of them were decorated with dragon patterns, while others printed the Chinese character shouà ¼Ãâ à ¥Ã ¯Ã ¿Ã ¼Ã¢â¬ °. The each meal of Empress Dowager Ci Xi was contained about 150 dishes. All the dishes were neatly arranged in rows. One row was a large line of bowls, and another row was a line of small dishes, followed by a row of a small bowl, in this case order.à When the two female officers came into the bedroom and put the table, they were holding a big yellow food container.à Her tea cups were made by pure white jade, and tea trays and lids were gold. Empress Dowager Ci Xi would not eat with other people.à When she began to eat, she always ordered the eunuchs to brought silver chopsticks, spoons, etc., and then said: Im sorry you have to stand up when you are having your meal, but these are the rules set by our ancestors. I can not break the rules, even the Queen can not sit in front. Im sure if the foreigners know how we treat the woman in the palace, they would certainly think that we are barbarians. But you will soon find that I practice in front of them is completely different, they do not see merely who we are. Many people think that Empress Dowager Ci Xi was a bad woman in the Chinese history. However, she also had her success. à First of all, Ci Xis struggles are worth for us to learn. In Qing Dynasty, nobody can be greater than her. When she was a child, she had already known that using money to bribe eunuch to be close to emperor. After she lived in the palace, she could deal with a lot of complicated things in correct and experienced ways. Then, she gave a birth to a child who was the only son of her husband-Xian Feng emperor. She was a really clever woman that no other concubines could have babies for the emperor. Secondly, Empress Dowager Ci Xi could deal with things without hesitation. Before Xian Feng emperor dead, he told 9 ministers to control Ci Xis rights. However, Empress Dowager Ci Xi didnt afraid of them. She used the hatreds between the ministers to turn the scale. Finally, she took helm of the state and she controlled her son, which was called attended to state affairs. In addition, she usually deals with things without hesitation, such as 1898 Reform period. Thirdly, Empress Dowager Ci Xi ended feudal society in a quick way. The feudal society in China had lasted for more than 2000 years. It was too long and serious to China to develop capitalism, which made China poor and fall behind other countries in Qing Dynasty. However, Empress Dowager Ci Xi was a luxurious woman and she leaded a luxurious phenomenon around the country. She reduced the money of the government, which leaded to the feudal society in China was ended almost 30 years in advance. In the position of Qing government, Empress Dowager Ci Xi was a guilty person, but in the position of the development of history, she helped China to end the feudal society in a quick way. Fourthly, Ci Xis luxurious hobbies-the Chinese feast and Peking opera, which developed Chinese culture. She loved the two things and many foreigners were interested in imperial banquet. The Chinese feast finally fixed many different styles of cooking. Its unique in the world. She loved Peking Opera and she often heard opera in her palace. In this way, many foreigners could have chances to come into contact with Peking Opera. The secrets and culture of Peking Opera could be spread. So that, Empress Dowager Ci Xi made contributions to Chinese culture. Fifthly, hobbies of Empress Dowager Ci Xi improved the society in the process of modernization of China. Was Empress Dowager Ci Xi an old-fogy? If we find the answer from the Chinese history book, we may say she was, because she suppressed the Chinese reform. However, the time she was in power was a high communicated period with western countries. During this period, she certainly learned a lot from western countries. She imported many new things from foreign to China. Electric lights, automobiles, photos, movies and so on. We think that all of them were completed by courage from Empress Dowager Ci Xi, so we have to admit that she was a wise woman. At last, Empress Dowager Ci Xi brought us a famous world culture heritage-the Summer Palace. When we travelled in the Summer Palace, guiders usually told us that Empress Dowager Ci Xi spent the expense of navy in building the Summer Palace in1888, which leaded that China had failed in the Sino-Japanese War. Who knew that the Summer Palace would be a famous imperial garden where must be visited by foreigners. So, Empress Dowager Ci Xi was not only a guilty person all the time, she also had her ability and success. There is no perfect man or woman in the world. Anybody has good aspect meanwhile he or she has the bad side. No one is absolute bad or good. So, is Empress Dowager Ci Xi good or bad? Everyone has his or her own idea.
Sunday, January 19, 2020
DNA Report :: Biology
Many people have heard about this mysterious DNA molecule but donââ¬â¢t know much about it (what it is, where itââ¬â¢s located, what it does, etc.) In this report it will state the basics and investigate this mysterious molecule: deoxyribonucleic acid. DNA is a thin chainlike molecule found in almost every cell (Rubenstein, 2006), and is used in developing and functioning all known living organisms (ââ¬Å"Wikipediaâ⬠, 2009). DNA is a Hereditary Material in a human body, (ââ¬Å"U.S. Nationalâ⬠, 2009), genomes determine hereditary (Rubenstein, 2006). The main goal for DNA is long-term storing of information (ââ¬Å"Wikipediaâ⬠, 2009). Basically DNA is biological information exchanged from adult to child through reproduction (ââ¬Å"National Humanâ⬠, 2008). DNA is formed in the nucleus of a cell (ââ¬Å"National Humanâ⬠, 2008). Most DNA is found in the nucleus and a small amount is found in the Mitochondria. When DNA is found in the nucleus it is considered to be Nuclear DNA and when DNA is found in the Mitochondria it is considered Mitochondrial DNA (ââ¬Å"U.S. Nationalâ⬠, 2009). Humans always get 50% of DNA from your mom and 50% of DNA from your dad through reproduction; although only Mitochondrial DNA is from your mom because during fertilization egg cells only keep Mitochondria (ââ¬Å"National Humanâ⬠2008). Sometimes DNA can be found in bacterial cells and in viruses (Rubenstein, 2006). DNA is made of many different resources found in a human body; chemicals, bases, and more. Deoxyribonucleic acid is made of three basic chemical building blocks; a Phosphate group, a Sugar group, and 1 of 4 nitrogen bases. DNA is made of 3 billon bases (National Human, 2008), 99% of these bases are the same in all humans (ââ¬Å"U.S. Nationalâ⬠, 2009), and the order and amount of the bases determines that humans unique self (Rubenstein, 2006). Bases are connected by hydrogen bonds, base pairing is very specific; Adenine only with Thymine and Cytosine only with Guanine (ââ¬Å"Comptonsâ⬠, 2008). Each DNA that contains instructions, that makes protein, is considered a gene; gene size varies from 1 thousand bases to 1 million bases (ââ¬Å"National Humanâ⬠, 2008). A gene carries genetic information during reproduction (ââ¬Å"Wikipediaâ⬠,2009). DNA consists of thousands of chemical units called nucleotides (Rubenstein, 2006). Nucleotides are linked together by covalent bonds; linking phosphate of one to sugar of the next (ââ¬Å"Comptonsâ⬠, 2008). Like genes the exact amount and order of Nucleotides varies, making the person only themselves (Rubenstein, 2006).
Saturday, January 11, 2020
Managing Workforce Diversity Essay
When we say diversity this refers to differences within the organization. This includes gender or sexual orientation, nationality, physical condition, family status, religious orientation and cultural differences or cultural background. An organization or a company may have diversities on their employees as well as the culture itself. Many companies have done so much effort to embrace diversity however; there are still some who are not given equal treatment or being valued because of being different. This is maybe because of the impression that, anyone who is perceived as different is likely to have a difficult time contributing to company goals and experiencing personal growth. Most companies nowadays conduct diversity training to eliminate values, stereotypes and managerial practices that inhibit employeesââ¬â¢ personal development and to allow employees to contribute to organizational goals regardless of being diversified. In managing diversity, involves creating an environment that allows all employees to contribute to organizational goals and experience personal growth. This environment includes access to job as well as fair and positive treatment to all employees. This is to provide an environment which allows employees to feel comfortable. This may require the company to change its culture to drive performance and enables employees in becoming a result oriented one. Diversity can enhance the performance of the company when the organization itself has an environment which promotes learning from diversity. Success of an organization through diversity requires it to be viewed as an opportunity for employees to learn from each other how to better accomplish their work, to be provided with a supportive and cooperative organizational culture, and be taught leadership and process skills that can facilitate effective team functioning. Managing Diversity through Adherence to Legislation Diversity can be managed through adhering to legislation. We have laws which protect people from discrimination either because of their diversity. Companies can definitely managed diversity by promoting or creating policies to protect the employees. In such cases, discrimination will be eliminated or abuse to such will be prevented. This will increase the morale of theà employees knowing that they are being cared for. But at some point, if merely adhering to employment laws may result to frustration leading to minorities and women leave the organization. This is due to adhering only and lack of giving more opportunities to these minorities. Managing Diversity through Diversity Training Program Diversity training refers to training designed to change employee attitudes about diversity and/or to help employees develop skills needed to work with a diverse workforce. To successfully manage a diverse workforce, companies need to ensure that Employees understand how their values and stereotypes influence their behavior toward people of a different gender, ethnicity, race or religion Employees gain an appreciation of cultural differences among themselves. Behaviors that isolate or intimidate minority group members improve. Below are some Diversity Training Programs which a company may conduct. Attitude Awareness and Change Programs ââ¬â focus on increasing employeesââ¬â¢ awareness of differences in cultural and ethnic background, physical characteristics that influence behavior towards others. Behavior-Based Programs ââ¬â focus on changing the organizational policies and individual behaviors that inhibit employeesââ¬â¢ personal growth and productivity. Cultural Immersion ââ¬â refers to the process of sending employees directly into communities where they have to interact with persons from different cultures, races, and/or nationalities. Diversity exists and is very apparent whichever industry one may belong. What is most important is that everyone is given equal opportunities and is not being discriminated because of their minorities or being different. Policies should be observed to encourage and develop the skills of the employees. Diversity will allow company to grow if given importance as it may influence one from the other. For as long as the organization knows the ins and outs of the employees would best benefit the organization allowing personal growth and valuing once role in the organization.
Friday, January 3, 2020
Thursday, December 26, 2019
The Shot Boundary And Classification Of Digital Video Essay
Shot boundary and classification of digital video is most important step for effective management and retrieval of video data. Shot transitions include abrupt changes and gradual changes. Recent automated techniques for detecting transitions between shots are highly effective on abrupt transitions. But finding gradual transition is major challenge in the presence of camera and object motion. In this paper, different shot boundary detection technique has studied. The main focused on to differentiated motion from various video effects noise, illumination changes, gradual transition, and abrupt transition. Specially, the paper focuses on dissolve detection in the presence of camera and object motion Keywords: Shot boundary, Gradual transition, Abrupt Transition, Video Retrieval I.INTRODUCTION: The advances in the data capturing, storage, and communication technologies have made vast amounts of video data available to consumer and enterprise applications [1]. However, interacting with multimedia data, and video in particular, requires more than connecting with data banks and delivering data via networks to customers, homes or offices. We still have limited tools and applications to describe, organize, and manage video data. The fundamental approach is to index video data and make it a structured media. Manually generating video content description is time consuming and thus more costly to the point that itââ¬â¢s almost impossible. This is because of the structure of video data,Show MoreRelatedDissertation-Viral Marketing27075 Words à |à 109 PagesKapil Gupta Viral marketing of digital products using social media Dissertation presented for the Degree of Masters of Business Administration at the University of Edinburgh Business School, May 2011 Acknowledgements I would like to thank my supervisor, Tony Kinder, for all of the help and guidance he has given me over the course of the project, from the initial idea through the research and writing stages through to the conclusion. It would have been impossible to complete this projectRead MoreReasons For The Sexualization Of Culture3852 Words à |à 16 Pagesdesiresââ¬â¢ and commodifying human bodies. For example, many advertisements in media and on the streets contain what is called the ââ¬Ëporn lookââ¬â¢. Sex-related talk shows become an entertainment. Pornography, such as sexually explicit images, texts, novels, and videos, is accessible online and often appears in magazines and other media. Jane Juffer (1998) observes that many cable TV advertisements and drama shows have a common theme of beautiful women pursuing pleasure through shopping. Another study by RosalindRead MoreMarketing and E-commerce Business65852 Words à |à 264 PagesInsight on Business: We Are Legion Insight on Technology: Think Your Smartphone Is Secure? Insight on Society: Bitcoin Case Study: Online Payment Marketplace: Goat Rodeo CHAPTER 6 E-COMMERCE MARKETING AND ADVERTISING CONCEPTS Opening Case: Video Ads: Shoot, Click, Buy Insight on Business: Are the Very Rich Different From You and Me? Insight on Technology: The Long Tail: Big Hits and Big Misses Insight on Society: Every Move You Take, Every Click You Make, Weââ¬â¢ll Be Tracking You Case Study:Read MoreManaging Information Technology (7th Edition)239873 Words à |à 960 Pagesacknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within the text. Microsoftà ® and Windowsà ® are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or affiliated with the Microsoft Corporation. Copyright à ©2012, 2009, 2005, 2002, 1999 Pearson Education, Inc., publishing as PrenticeRead MoreInstructor Manual37126 Words à |à 149 Pagesthe ideas contained in here are totally original. Thanks much to all of you for spending so much time discussing how you do things in class and allowing me to share your ideas in this manual. F. Robert Jacobs i TABLE OF CONTENTS Introduction Videos included on the student DVD Additional pedagogical resources that come with the book Chapter Outlines, Tips, Case Teaching Notes and Extra Cases Chapter 1 ââ¬â Operations and Supply Chain Management Internet Exercise: Harley-Davidson Motorcycles WyattRead MoreBusiness Journalism in India26104 Words à |à 105 PagesIndia has expanded so dramatically in the last few years, theyre far better known in public life, among the Indian public as well. * There are many channels of distribution for journalism, including business journalism. People get news through video, audio, Internet, print. * It is increasingly becoming a multimedia interactive world. * In an era of fragmentation of media outlets, itââ¬â¢s going to be more important than ever for business journalists to pull it all together, to provide theRead MoreExploring Corporate Strategy - Case164366 Words à |à 658 Pagesimportant subsidiary foci (where appropriate). In general, the sequence of cases is intended to mirror the chapter sequence. However, this should not be taken too literally because, of course, many of these cases cover a variety of issues. The ââ¬Ëclassiï ¬ cationââ¬â¢ provided is therefore guidance only. We expect readers to seek their own lessons from cases, and tutors to use cases in whichever way and sequence best ï ¬ ts the purpose of their programmes. Where cases have been chosen to illustrate the issuesRead MoreMarketing Management130471 Words à |à 522 Pageslogical fashion. For example, bowing and a strong desire to avoid the loss of face are unified in their manifestation of the importance of respect. (2) Culture is learned rat her than being something we are born with. (3) Culture is manifested within boundaries of acceptable behavior. For example, in American society, one cannot show up to class naked, but wearing anything from a suit and tie to shorts and a T-shirt would usually be acceptable. Failure to behave within the prescribed norms may lead toRead More_x000C_Introduction to Statistics and Data Analysis355457 Words à |à 1422 Pages6 Interpreting and Communicating the Results of Statistical Analyses 61 Activity 2.1 Designing a Sampling Plan 63 Activity 2.2 An Experiment to Test for the Stroop Effect 64 Activity 2.3 McDonaldââ¬â¢s and the Next 100 Billion Burgers 64 Activity 2.4 Video Games and Pain Management 65 Graphing Calculator Explorations 69 3 Graphical Methods for Describing Data 75 3.1 Displaying Categorical Data: Comparative Bar Charts and Pie Charts 76 3.2 Displaying Numerical Data: Stem-and-Leaf Displays 87 Read MoreAccounting Information System Chapter 1137115 Words à |à 549 Pagesphone? With a cell phone/PC combination device? What do you do when youââ¬â¢re on your cell phone? What do you expect to be doing in five years? Newer models of cell phones contain a myriad of applications, including video cameras, digital music players, television remote features, and digital recording. For example: 1. The E-wallet function virtually turns a cell phone into a credit card or debit card. Such a cell phone can buy items from a vending machine or convenience store, pay for train tickets
Wednesday, December 18, 2019
Bullying Is A Universal Epidemic - 1976 Words
INTRODUCTION Bullying is a universal epidemic that is affecting an extraordinary number of school aged adolescence children in countries of the United States to Japan (Elsea et al., 2003). The specific number of children being bullied may be greater than what is published by sources because many children fail to report these issues due to fear of embarrassment and rejection (Unnever Cornell, 2004). It can also have drastic effects on the bully and victim which can appear to be life long consequences. Many researchers have labeled bullying a school related issue only. Bullying just recently began to gain attention from a system-wide of researchers in the 1980ââ¬â¢s (Olewus, 1993). Some individuals are unaware that bullying is also a familyâ⬠¦show more contentâ⬠¦Olweus (1993) defined bullying as a behavior that leaves a child ââ¬Å"exposed, repeatedly and over time, to negative actions on the part one or more other studentsâ⬠(p.9). He furthered explained a ââ¬Å"negative actionà ¢â¬ as a behavior that ââ¬Å"intentionally inflicts, or attempts to afflict, injury or discomfort upon anotherâ⬠(p.9). A negative action can be carried out verbally, as in teasing, name calling, or in physical forms such as pushing, hitting and making gestures. The behaviors listed above have been distinguished into two separate types of bullying, direct and indirect bullying. Direct bullying consists of open and physical attacks on a victim, while indirect bullying includes social isolation and intentional exclusion from groups. The three characteristics that must be present to label bullying, according to Olweus (1993) are harmful intent, imbalanced of power of strength, and repetition of negative actions. Researchers Scaglione and Scaglione (2006) suggest for the particular generation, bullying doesnââ¬â¢t necessarily involve those three factors described by Olweus (1993). They believe that children bully other children with the same strength and power. Also, they mention children who bully may not have the intention of harming another individual. CHARACTERISTICS OF BULLIES AND VICTIMS Whereas, bullies may differ in the type of aggression they use, most bullies share
Tuesday, December 10, 2019
Java-Whitepaper free essay sample
This white paper compares C++/Qt with Java/AWT/Swing for developing large-scale, real-world software with graphical user interfaces. References are made to independent reports that examine various aspects of the two toolsets. 1 A Comparison of Qt and Java 1. What Do We Compare? When selecting an environment for a large software development project, there are many aspects that must be considered.The programming language is one of the most significant aspects, since its choice has considerable impact on what other options are available. For example, in a GUI development project, developers will need a GUI library that provides ready-made user interface components, for example, buttons and menus. Since the selection of the GUI library itself has a large impact on the development of a project, it is not uncommon for the GUI library to be chosen first, with the programming language being determined by the languages for which the library is available. Usually, there is only one language per library. Other software components like database access libraries or communication libraries must also be taken into consideration, but they rarely have such a strong impact on the overall design as the GUI libraries. In this white paper, the objective is to compare the C++/Qt environment with the Java/AWT/Swing environment. In order to do this in the most useful way, we will begin by comparing the programming languages involved, i. e. C++ and Java, and then compare the two GUI libraries, Qt for C++ and AWT/Swing for Java. 2. Comparing C++ and Java When discussing the various benefits and drawbacks of particular programming languages, the debate often degenerates into arguments that are based on personal experience and preference rather than any objective criteria. Personal preferences and experience should be taken into account when selecting a programming language for a project, but because it is subjective, it cannot be considered here.Instead we will look at issues such as programmer-efficiency, runtime-efficiency and memory-efficiency since these can be quantified and have been examined in scientifically conducted research, although we will also incorporate information based on the practical exerience of projects that have been implemented in our own company. 2. 1. Programmer-efficiency Programmer-efficiency describes how efficiently (i. e. how quickly and accurately) a programmer with a given degree of experience and knowledge can implement a certain set of requirements in a particular programming language, including debugging and project setup time.Since developer salaries are one of the primary cost factors for any programming project, programmer-efficiency greatly affects the 2 A Comparison of Qt and Java cost-efficiency of the project. To some extent, programmer-efficiency is also determined by the tools available. The main design goal of Java is increased programmer-efficiency compared to other general-purpose programming languages, rather than increased memory- or runtime-efficiency. Java has several features designed to make it more programmer-efficient.For example, unlike C++ (or C), the programmer does not have to explicitly free (give back) allocated memory resources to the operating system. Freeing unused memory (garbage collection) is handled automatically by the Java runtime system, at the expense of memory- and runtime-efficiency (see below). This liberates the programmer from the burden of keeping track of allocated memory, a tedious task that is a major cause of bugs. This feature alone should significantly increase the programmer-efficiency of Java programmers, compared to C++ (or C) programmers.Research shows that in practice, garbage collection and other Java features, do not have a major influence on the programmer-efficiency. One of the classic software estimation models, Barry Boehmââ¬â¢s CoCoMo1 predicts the cost and schedule of a software project using cost drivers which take into account variables like the general experience of a programmers, the experience with the programming language in question, the targeted reliability of the program, etc. Boehm writes that the amount of effort per source statement was highly independent of the language level.Other research, for example, A method of programming measurement and estimation by C. E. Walston and C. P. Felix of IBM2, points in the same direction. Both the reports cited here pre-date the advent of Java by many years, although they seem to reveal a general principle that the sophistication of a general-purpose programming language has, compared with other aspects, like the experience of the developers, no significant influence on the overall project costs. There is more recent research that explicitly includes Java and which supports this hypothesis.In An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl3, Lutz Prechelt of the University of Karlsruhe, describes an experiment he conducted in which computer science students were assigned a particular design and development task and asked to implement the specification provided in any of the languages C, C++, or Java which they could freely choose according to their personal preferences (the other languages were examined in a different part of the research project). The data gathered shows almost the same results for C++ and Java (with C running third in most aspe cts).This is also backed up by our own experience: if programmers can choose their favorite programming language (which is usually the one they have most experience of), programmers with the same level of experience (measured for example, in years of programming experience in general) achieve about the same programmer-efficiency. Another interesting aspect that we noted (but which is not yet supported by any formal 3 A Comparison of Qt and Java research) is that less experienced developers seem to achieve somewhat better results with Java, medium-experienced developers achieve about the same results with both programming languages, nd experienced developers achieve better results with C++. These findings could be due to better tools being available for C++; nevertheless this is an aspect that must be taken into account. An interesting way to quantify programmer-efficiency is the Function Point method developed by Capers Jones. Function points are a software metric that only depend on the functionality, not on the implementation. Working from the function points, it is possible to compute the lines of code needed per function point as well as the language level which describes how many function points can be implemented in a certain amount of time.Intriguingly, both the values for the lines of code per function point and the language level are identical for C++ and Java (6 for the language level, compared with Cââ¬â¢s 3. 5 and Tclââ¬â¢s 5, and 53 for the lines of code per function point, compared with Cââ¬â¢s 91 and Tclââ¬â¢s 64). In conclusion: both research and practice contradict the claim that Java programmers achieve a higher programmer-efficiency than C++ programmers. 2. 2. Runtime-efficiency We have seen that Javaââ¬â¢s programmer-efficiency appears to be illusory. We will now examine its runtime efficiency. Again, Prechelt provides useful data.The amount of data he provides is huge, but he arrives at the conclusion that a Java program must be expected to run at least 1. 22 times as long as a C/C++ program. Note that he says at least; the average runtime of Java programs is even longer. Our own experience shows that Java programs tend to run about 2-3 times as long than their equivalent C/C++ programs for the same task. Not surprisingly, Java loses even more ground when the tasks are CPU-bound. When it comes to programs with a graphical user interface, the increased latency of Java programs is worse than the runtime performance hit.Usability studies show that users do not care about whether a long running task takes, say, two or three minutes, but they do care when a program does not show an immediate reaction to their interaction, for example when they press a button. These studies show that the limit of what a user accepts before they consider a program to be unresponsive can be as little as 0. 7 seconds. Well return to this issue when we compare graphical user interfaces in Java and C++ programs. An explanation about why Java programs are slower than C++ is in order.C++ programs are compiled by the C++ compiler into a binary format that can be executed directly by the CPU; the whole program execution thus takes place in 4 A Comparison of Qt and Java hardware. (This is an oversimplification since most modern CPUs execute microcode, but this does not affect the issues discussed here. ) On the other hand, the Java compiler compiles the source code into bytecode which is not executed directly by the CPU, but rather by another piece of software, the Java Virtual Machine (JVM). The JVM in turn, runs on the CPU.The execution of the bytecode of a Java program does not take place in (fast) hardware, but instead in (much slower) software emulation. Work has been undertaken to develop Just in Time (JIT) compilers to address Javaââ¬â¢s runtime efficiency problem, but no universal solution has yet emerged. It is the semi-interpreted nature of Java programs that makes the compile once, run anywhere approach of Java possible in the first place. Once a Java program is compiled into bytecode, it can be executed on any platform which has a JVM.In practice, this is not always the case, because of implementation differences in different JVMs, and because of the necessity to sometimes use native, non-Java code, usually written in C or C++, together with Java programs. But is the use of platform-independent bytecode the right approach for crossplatform applications? With a good cross-platform toolkit like Qt and good compilers on the various platforms, programmers can achieve almost the same by compiling their source code once for each platform: write once, compile everywhere.It can be argued that for this to work, developers need access to all the platforms they want to support, while with Java, in theory at least, developers only need access to one platform running the Java development tools and a JVM. In practice, no responsible software manufacturer will ever certify their software for a platform the software hasnt been tested on, so they would still need access to all the relevant platforms. The question arises why it should be necessary to run the Java Virtual Machine in software; if a program can be implemented in software, it should also be possible to have hardware implement the same unctionality. This is what the Java designers had in mind when they developed the language; they assumed that the performance penalty would disappear as soon as Java CPUs that implement the JVM in hardware would become available. But after five years, such Java CPUs have not become generally available. Java automatically de-allocates (frees) unused memory. The programmer allocates memory, and the JVM keeps track of all the allocated memory blocks and the references to them. As soon as a memory block is no longer referenced, it can be reclaimed. This is done in a process called garbage collection in which the JVM periodically checks all the allocated memory blocks, and removes any which are no longer referred to. Garbage collection is very convenient, but the trade offs are greater memory consumption and slower runtime speed. . With C++, the programmer can (and should) delete blocks of memory as soon as they are no longer required.With Java, blocks are not deleted until the next garbage collection run, and this depends on the implementation on the JVM being used. Prechtelt provides figures which state that on average ( ) and with a confidence of 80%, the Java programs consume at least 32 MB (or 297%) more memory than the C/C++ programs (. .. ). In addition to the higher memory requirements, the garbage collection process itself requires processing power which is consequently not available to the actual application functionality, leading to slower overall runtimes.Since the garbage collector runs periodically, it can occasionally lead to Java programs freezing for a few seconds. The best JVM implementations keep the occurrence of such freezes to a minimum, but the freezes have not been eliminated entirely. When dealing with external programs and devices, for example, during I/O or when interacting with a database, it is usually desirable to close the file or database connection as soon as it is no longer required. Using C++ââ¬â¢s destructors, this happens as soon as the programmer calls delete.In Java, closing may not occur until the next garbage collecting sweep, which at best may tie up resources unnecessarily, and at worst risks the open resources ending up in an inconsistent state. The fact that Java programs keep memory blocks around longer than is strictly necessary is especially problematic for embedded devices where memory is often at a premium. It is no coincidence that there is (at the time of writing) no complete implementation of the Java platform for embedded devices, only partial implementations that implement a subset.The main reason why garbage collection is more expensive than explicit memory management by the programmer is that with the Java scheme, information is lost. In a C++ program, the programmer knows both where their memory blocks are (by storing pointers to them) and knows when they are not needed any longer. In a Java 6 A Comparison of Qt and Java program, the l atter information is not available to the JVM (even though it is known to the programmer), and thus the JVM has to manually find unreferenced blocks. A Java programmer can make use of their knowledge of when a memory block is not needed any longer by deleting all references that are still around and triggering garbage collection manually, but this requires as much effort on the part of the programmer as with the explicit memory management in C++, and still the JVM has to look at each block during garbage collection to determine which ones are no longer used. Technically, there is nothing that prevents the implementation and use of garbage collection in C++ programs, and there are commercial programs and libraries available that offer this.But because of the disadvantages mentioned above, few C++ programmers make use of this. The Qt toolkit takes a more efficient approach to easing the memory management task for its programmers: when an object is deleted, all dependant objects are automatically deleted too. Qtââ¬â¢s approach does not interfere with the programmerââ¬â¢s freedom to delete manually when they wish to. Because man ual memory management burdens programmers, C and C++ have been accused of being prone to generate unstable, bug-ridden software.Although the danger of producing memory corruption (which typically leads to program crashes) is certainly higher with C and C++, good education, tools and experience can greatly reduce the risks. Memory management can be learned like anything else, and there are a large number of tools available, both commercial and open source, that help programmers ensure that there are no memory errors in the program; for example, Insure++ by Parasoft, Purify by Rational and the open source Electric Fence.C++s flexible memory management system also makes it possible to write custom memory profilers that are adapted to whichever type of application a programmer writes. To sum up this discussion, we have found C++ to provide much better runtime- and memory-efficiency than Java, while having comparable programmer-efficiency. 2. 4. Available libraries and tools The Java platform includes an impressive number of packages that provide hundreds of classes for all kinds of purposes, including graphical user interfaces, security, networking and other tasks.This is certainly an advantage of the Java platform. For each package available on the Java platform, there is at least one corresponding library for C++, although it can be difficult to assemble the various libraries that would be needed for a C++ project and make them all work together correctly. However, this strength of Java is also one of its weaknesses. It becomes increasingly difficult for the individual programmer to find their way through the huge APIs. For any given task, you can be almost certain that somewhere, there is 7A Comparison of Qt and Java functionality that would accomplish the task or at least help with its implementation. But it can be very difficult to find the right package and the right class. Also, with an increasing number of packages, the size of the Java platform has increased considerably. This has led to subsets e. g. , for embedded systems, but with a subset, the advantage of having everything readily available disappears. As an aside, the size of the Java platform makes it almost impossible for smaller manufacturers to ship a Java system independent from Sun Microsystems, Javaââ¬â¢s inventor, and this reduces competition.If Java has an advantage on the side of available libraries, C++ clearly has an advantage when it comes to available tools. Because of the considerable maturity of the C and C++ family of languages, many tools for all aspects of application development have been developed, including: design, debugging, and profiling tools. While there are Java tools appearing all the time, they seldom measure up to their C++ counterparts. This is often even the case with tools with the same functionality coming from the same manufacturer; compare, for example, Rationalââ¬â¢s Quantify, a profiler for Java and for C/C++. The most important tool any developer of a compiled language uses, is still the compiler. C++ has the advantage of having compilers that are clearly superior in execution speed. In order to be able to ship their compilers (and other tools) on various platforms, vendors tend to implement their Java tools in Java itself, with all the aforementioned memory and efficiency problems. There are a few Java compilers written in a native language like C (for example, IBMââ¬â¢s Jikes), but these are the exception, and seldom used. 3. Comparing AWT/Swing and QtSo far, we have compared the programming language Java and the programming language C++. But as we discussed at the beginning of this article, the programming language is only one of the aspects to consider in GUI development. We will now compare the packages for GUI development that are shipped with Java, i. e. AWT and Swing, with the cross-platform GUI toolkit, Qt, from the Norwegian supplier, Trolltech. We have confined the comparision on the C++ side to the Qt GUI toolkit, since unlike MFC (Microsoft Foundation Classes) and similar toolkits, This seems to contradict Javaââ¬â¢s cross-platform philosophy and may be due to the the initial AWT version being reputedly developed in under fourteen days. Because of these and a number of other problems with the AWT, it has since been augmented by the Swing toolkit. Swing relies on the AWT (and consequently on the native libraries) only for very basic things like creating rectangular windows, handling events and executing primitive drawing operations. Everything else is handled within Swing, including all the drawing of the GUI components. This does away with the problem of applications looking and behaving differently on different platforms. Unfortunately, because Swing is mostly implemented in Java itself, it lacks efficiency. As a result, Swing programs are not only slow when performing computations, but also when drawing and handling the user interface, leading to poor responsiveness. As mentioned earlier, poor responsiveness is one of the things that users are least willing to tolerate in a GUI application. On todayââ¬â¢s standard commodity hardware, it is not unusual to be able to watch how a Swing button is redrawn when the mouse is pressed over it.While this situation will surely improve with faster hardware, this does not address the fundamental problem that complex user interfaces developed with Swing are inherently slow. The Qt toolkit follows a similar approach; like Swing, it only relies on the native libraries only for very basic things and handles the drawing of GUI components itself. This brings Qt the same advantages as Swing (for example, applications look and behave the same on different platforms), but since Qt is entirely implemented in C++ and thus compiled to native code; it does not have Swingââ¬â¢s efficiency problems.User interfaces written with Qt are typically very fast; because of Qts smart use of caching techniques, they are sometimes even faster than comparable programs written using only the native libraries. Theoretically, an optimal native program should always be at least as fast as an equivalent optimal Qt program; however, making a native program optimal is much more difficult and requires more programming skills than making a Qt program optimal. Both Qt and Swing employ a styling technique that lets programs display in any one of a number of styles, independent of the platform they are running on.This is possible because both Qt and Swing handle the drawing themselves and can draw GUI elements in whichever style is desired. Qt even ships with a style that emulates the default look-and-feel in Swing programs, along with styles that emulate the 9 A Comparison of Qt and Java Win32 look-and-feel, the Motif look-and-feel, andââ¬âin the Macintosh versionââ¬â the MacOS X Aqua style. 3. 2. Programming Paradigms In Qt and Swing While programming APIs to some extent are a matter of the programmers personal taste, there are some APIs that lend themselves to simple, short, and elegant application code far more readily than others.
Subscribe to:
Posts (Atom)