Saturday, January 25, 2020

Advantages And Disadvantages Of Optimisation Techniques

Advantages And Disadvantages Of Optimisation Techniques We have to use different techniques to optimise our website. Our main focus will be on how to reduce the size of the webpage and script execution time. This, in turn, will definitely improve the user experience as well as reduce the load on the servers. The images and graphical interfaces occupy the maximum storage size on the webpage. Therefore we need to compress the images and the scripts in an effective manner that wont affect functionality and quality of the website. First we need to simplify the design of the website, reducing the number of HTTP requests. JavaScript and CSS can be minified by removing comments and space characters from the code. Furthermore we can make java script and CSS external which can be cached by the browser. Post Load and Pre Load components can be set, which will make the user experience better by initially loading the important content and then loading the remaining content. Ultimately we can optimise loops which will reduce the script execution time. Specific Optimisation Techniques to be used for the Website The different optimisation techniques are: Minimise HTTP requests Add an expiry or a cache control header Put scripts at the bottom Remove duplicate scripts Make Ajax cacheable Post load components Pre load components Make JavaScript and CSS external Reduce DNS Lookups Minimise HTTP requests The majority of the time taken when a page is loading is a result of HTTP requests. Reducing the number of components will thus reduce the number of HTTP requests required to render the page. This is the key to faster loading pages. Combined files are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all CSS into a single stylesheet. Discussing the decisions for each page We will use some techniques which will be applicable on all the pages. Style sheets will be placed at the top and scripts at the bottom of the webpage. AJAX, JavaScript and CSS made cacheable. CDN servers will be used and redirects, 404 errors, and empty image source avoided. GET will be used for AJAX requests and also make efficient use of pre and post load components. The complete JavaScript code and CSS will be minified. The Home page is the one which should be fast, attractive and interactive. The Home page will make up the rapport of your website. In order to make it attractive we need to use different images, CSS, graphical interfaces and flash content. Images and graphical interfaces are bigger in size so we will scale them and try to convert them into a more suitable format such as Portable Network Graphics (.png). The users login page, discussion page, upload page and modify page will be much simpler than home page but they will contain lots of videos and images with the description. Thus, we can just remove the white space characters from their code reducing the size of the webpage and optimising the images. Videos are too big in size so we will not upload it on our server. We will use YouTube or other free video upload sites and embed the link on our webpage. Product Catalogue will contain all the images of the product that can be searched and sorted by category and brands. The loops will be optimised for faster search and sorting. Business information, current employees and product information will contain the detailed textual description with images of what we do, what we sell and who works in our company. All this information is static, so we will cache the information and optimise the images. Q2. Client side security issues are an extremely important component of any web-based application. Introduction Client side security is one of the most important topics in internet security. All the information which has been downloaded from servers is stored on the clients machine. All the site preferences as well as your login details are stored as cookies on the local machine and we need to keep those files safe from hackers. We use different antiviruses and firewalls on the local machine, however they are not as efficient as they should be. JavaScript and AJAX are the most vulnerable languages for most of the current web-based exploits like Trojans, viruses, etc. [1] (Uta Priss, 2012, Advanced Client-Side Security:What many users do not know, From http://www.upriss.org.uk/awt/lec4a.pdf) In this document we will look at the major threats, type of client side attacks and some strategies for minimising those risks. Problem Domain Nowadays internet is a basic necessity of day to day life. We are so dependent on internet these days. Everything from paying our electricity bills to international business meetings we do online. All our bank details are on our local machine which is vulnerable to hackers. For this reason do we need a secure system to work safely online. Whenever we use internet our local system stores the information from the server which contains your preferences, form data and the history of the webpages you viewed. How do hackers operate..? Hackers try to bypass the firewall and gain inappropriate access to local host resources. There are more chances to breach the security of the firewall when the hacker and the host are on the same network because request for resources originating within the network can be trusted more than request originating from outside the network. (Bidgoli Hossein , Wiley John Sons, (2006) Hanew Jersey, John Wiley Sons) Issues One of the most widely used languages for website development, JavaScript, is not secure. JavaScript is an open scripting language which means anyone can manipulate it and change its function. The JavaScript security model attempts to protect the user from websites that may be malicious and is not designed to protect the website owner. It cant protect data sent from the browser to the server and there are limits on what the page author can control via JavaScript whilst it is being executed within the browser. The success of JavaScript is also however the reason why attackers have targeted and leveraged the technology as a means to compromise the systems and reek untold grief for clients. JavaScript has been used to perform attacks that involve redirects, downloading of content, or even revealing details about a victims system.[2] Now we will discuss some attack strategies such as XSS (Cross Site Scripting), CSRF (Cross Site Request Forgery) and introduce some prevention measures to i mprove the security of the website. XSS Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected into the otherwise benign and trusted websites. Cross-site scripting (XSS) attacks occur when an attacker uses a web application to send a malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user in the output it generates without validating or encoding it. An attacker can use XSS to send a malicious script to an unsuspecting user. The end users browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by your browser and used within that site. These scripts can even rewrite the content of the HTML page. Prevention measures: Validate, filter, and sanitise all input Process output response stream data through encoding Many modern browsers will attempt to detect an XSS attack and notify the user CSRF CSRF (Cross-Site Request Forgery) is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. With a little help of social engineering (like sending a link via email/chat), an attacker may force the users of a web application to execute actions of the attackers choosing. A successful CSRF exploit can compromise end user data and operation in the case of a normal user. If the targeted end user is the administrator account, this can compromise the entire web application. Prevention measures: Implement strong XSS mitigations Use Tokens to verify expected user actions Hidden form value fields E.g., RoR ASP.Net MVC provide framework support Use POST for any actions that alter data on server side Is the idempotent web paradigm for HTTP GET compromised? Check HTTP Referrer Most modern browsers include features to palliate the following attacks: Phishing Attacks Spyware Malicious websites Adware Destruction or corruption of data or configuration Theft of configuration information Installation of malware Theft of information and identification (Oriyano Sean-Philip and Shimonsk Robert,(2012)Client Side Attacks and Defense, USA, Elsevier, Pg 130) Conclusion In summary, we discussed the major client side scripting attacks, preventive measures and the most vulnerable languages. Client side scripting attacks are effective in taking the personal information of the user. However, if we play smart we can extenuate and avoid those attacks in the first place by making some changes in our firewall settings and not clicking on suspicious links. Prevention is always preferred over a cure for the problems being faced for a normal user in this unprotected web environment. As programmers, we should make appropriate use of the AJAX commands and code the website in such a way as to make it more reliable and harder to alter. Lastly, JavaScript is the most popular language and will remain so in coming years. In light of this, we should make efficient use of the primary functions and the libraries to make it less vulnerable to attacks.

Friday, January 17, 2020

Bend it like Beckham Essay

All cultures have different ways of showing respect and how there life is. In Bend it Like Beckham director Gurinder Chadha shows us the Indian life with the character Jessminda. Jessminda’s dreams are more important than her culture so she does not want to be the typical traditional Indian girl her parents want her to be; it sets the tone of depressed, troubled, and motivated. Jessminda changes throughout the story. At first she is really depressed because she wants to play soccer but her parents won’t let her. The reason why they won’t let her is because her culture is against her playing a boy sport that shows body parts her culture is against showing. The author shows us the tone of depressed by having Jessminda act sad and rude towards her parents. Also he shows the tone of depressed by having calm sentimental music playing. For example, ff she follows her culture her parents will be happy and she will have to give up scholarships that she could have. If she plays soccer her parents will be mad at her but she will get what she’s been wanting. Then her best friend, Jules stops talking to her because she sees Jess kiss there soccer coach, Joe. The reason her friend got mad is because Jess knew Jules and there soccer coach. The author uses this fight with her friend to show more depression that Jessminda is going through. He shows by putting them together and have them argue and he angles the camera close up to show their emotions as there talking. Culture is a big part of our lives but do we always follow it or would we rather follow our dreams? Jess starts to become daring which makes her start getting in trouble. She does what she has to just so she can play in soccer games. For example her parents and sister leave but she acts like she is sick so she doesn’t have to go with them but once they leave she goes to play in a soccer game but her dad had to go back to the house and finds out that she isn’t home. He then goes to where her game is and watches her play. Her parent’s hate that she wants to play soccer but her dad sees how much she likes it but she’s sneaking out to go play. By the author putting in this scene, he is showing that sometimes people have to do what they need to just to get what they want. He shows us the process of Jessminda lying to her parents and going and playing the game. This shows that she is a troubled girl who will show how much she likes something that means something to her. Everyone has those moments when we have to sneak away to do something that we really want to do. In addition another example of her being troubled is when she starts falling in love with their coach. She knows her culture only allows Indian woman to date Indian boys that the family accepts. Her falling for Joe is risking her life and his. The author shows us being troubled by having them two alone, dark nights so they fall in love. She does spend a lot of time with Joe but only because he is her soccer coach. Everyone has moments when we do things that changes us as a person. Jess becomes motivated to playing soccer. If it wasn’t for her coach she would of quit right in the beginning when her parents told her she couldn’t play. The problem is if she doesn’t play she won’t get the scholarships she can get and she won’t go on to college. So her coach talks to her and tells her if she just plays this championship game she will have a scholarship because they will be out there watching how they play. The author uses this to show that there are chances out there. Another problem is that her sister’s wedding lands on the day of the championship game, and her parents will not let her miss her sister’s wedding. She is sad that she can’t go but until her dad sees that she is talking to the guy her parents want her to marry and he sees what’s going on. They then tell her dad that the championship game is going on and she’s missing it so he tells them to go. This example shows confident by Chadha having her dad give her a chance to play. She then goes to the game and gets more motivated that when she gets there Jules is happy to see her so they could play together. She then played and ended up making the winning goal. After the game the person who was watching them to see if they can get there scholarships went up to them and offered them there scholarships. While he is watching them play Chadha keeps having the camera go to him to show how he reacts to good or bad plays. The camera angles help shows motivation and confidence by they keeps repeating his reaction. Chadha has good parts and bad parts to get us thinking. If it wasn’t for her coach Joe she would have given up her dream to respect her culture but now she has a scholarship that leads her to a better successful life. Cultures are what people believe in and that they follow but sometimes there’s a negative side in our culture that cannot always be followed. Everyone changes as a person good or bad and have different types of attitudes towards what he or she wants or has. Jessmindas dreams were more important to her that she went against her culture but her dad accepted it.

Thursday, January 9, 2020

Human Ethical Obligations Of Animals - 864 Words

â€Å"Like most people, I am conflicted about our ethical obligations to animals,† (Hal Herzog, ‘Animals like Us’, 2011). Everyone has a definition of abuse towards animals especially depending on the situation everyone asks the same questions, â€Å"When is it okay to hit an animal?† While training your animal? When they use your new laptop as a chew toy? Showing any signs of abuse towards animals can cause a lack of trust with the animal, can cause more harm than good, and show any psychological problems the abuser might have. When you hit an animal it automatically creates a lack of fear with the animal. Hitting an animal will create a barrier between you and the animal and a majority of the time an animal just knows to flinch or run and hide when you raise your hand to it. A lot of the time when they pee on the floor or eat something they are not supposed to they do not realize it. If they have to pee then they will pee, and hitting them confuses them and invokes fear into them. Animals face a multitude of abuse from verbal, psychological, to physical just like humans do. From hitting them with your hand, a newspaper, throwing them outside, or just yelling at them can affect them while they grow, and in the end all it will do is make them resent and fear you. â€Å"Psychology Today† calls psychological abuse the silent killer, and there were studies done by psychology today that shows that emotional harm is actually far more hurtful than any physical pain, and that most animals wouldShow MoreRelat edEssay What Moral and Ethical Obligations do Humans Have to Animals1492 Words   |  6 PagesThe exponential rise in earth’s human population since the industrial revolution has put a heightened pressure on food production word wide. The global population reached approximately 7.2 billion in 2013 (United Nation News Centre, 2013) and consequentially the requirement for eggs and poultry has also substantially increased (Pluhar, 2010). As a result of this elevated demand for food, there has been a shift in the way agricultural practices operate to produce the large quantities of meat and eggsRead MoreThe Ethical Theories Of Utilitarianism And Kantian Ethics Essay1650 Words   |  7 Pageswill be discussing an article about a woman who starved her two horses. I will address the issue about whether or not the woman’s action was ethical. I will use the two ethical theories of utilitarianism and Kantian ethics to support my argument. I will also suggest a different course of action the woman could have taken to be justified, through both ethical theories. The article follows the story about an Australian woman who breached her duty of care to two horses that she owned (Emery, 2016).Read MoreAnimal Cruelty Every year, the RSPCA (Royal Society for the Prevention of Cruelty to Animals) takes1200 Words   |  5 PagesAnimal Cruelty Every year, the RSPCA (Royal Society for the Prevention of Cruelty to Animals) takes in close to 50,000 reports of animal mistreatment in Australia and about 150,000 in England and in Wales (RSPCA, 2013). However, these figures do not include the cases when mistreatment is not reported which, according to the RSPCA, happens almost as often as the ones recorded (RSPCA, 2013). Maltreatment occurs when an animal is tormented or harmed, imprisoned or transported from one place to anotherRead MoreThe Ethical Treatment of Animals Essay539 Words   |  3 Pagesbelieve in the ethical treatment for all animals is an ethical obligation by all humans. We have come to an era that we believe that all humans should be treated equally and fairly. Well, what about our other living, breathing counterparts? They deserve to live their life as they choose in quality and in the pursuit of happiness. Just as Europeans came and took over Northern Americas land and resources on the Indians. We have al so taken over the land and resources from all of the animals. TheRead MoreA Change Of Heart About Animals950 Words   |  4 PagesAnimals have similar characteristics to humans in terms of their physical and psychological states, thus we have a moral obligation to free them from unnecessary pain. More ethical alternatives to animal testing are more cost-effective, quicker and more reliable. Contrary to what we might think, animals share similar characteristics with us in terms of their physical and psychological states. Jeremy Rifkin, author of twenty books on the impact of scientific and technological changes on the societyRead MoreThe Four Primary Ethical Principles1293 Words   |  6 PagesThe Four Primary Ethical Principles in Human Research Psychology is the scientific study of behavior and mental processes (Feldman, 2013, p.5). The simplistic definition is actual very complex, as it includes a persons thought, emotions, perceptions, reasoning process, memories, and their biological activates that maintain their bodily functions (Feldman, 2013, p.5). Psychologists use the scientific method in order to describe, predict, and explain human behavior (Feldman, 2013, p.5). This is doneRead MoreThe Ethical Teachings Of Judaism1390 Words   |  6 PagesEnvironmental ethics is the attempt to define a system of values to guide humans in the way that they treat the natural world. In Judaism, humankind are viewed as having an extremely significant relationship with the environment and Jews believe that God created the earth and everyone on it. Therefore because of this, it is important as adherents of Judaism to take care of the environment and use God’s creation sustainably. The midrash states that once the world is des troyed the damage is irreparableRead MoreThe Land Ethic By Aldo Leopold1055 Words   |  5 PagesPersonifying the Land â€Å"We can be ethical only in relation to something we can see, feel, understand, love, or otherwise have faith in†- Aldo Leopold, A Sand County Almanac (251) Aldo Leopold is on the forefather of modern environmentalism. His book, A Sand County Almanac, is based on the notion of viewing land as a community and as a commodity. In the chapter â€Å"The Land Ethic†, Leopold invokes a rethinking of our relationships to our world and is based on the principle that ethics are â€Å"a processRead MoreEssay about Humane Treatment of Animals1419 Words   |  6 PagesHumane Treatment of Animals Animal testing is a necessity in todays society. This topic receives a lot of attention worldwide. There are many people who feel that risking an animals well being is cruel and inhumane. They may be right; however, Im taking a utilitarian approach on this topic and saying that the greater good for majority of people wins. At this day in age we cannot simply stop testing animals until another way is discovered. The application of animals to test a large number ofRead MoreThe Influence of Human Conduct on Belief in God Essay example1212 Words   |  5 PagesThe Influence of Human Conduct on Belief in God Jewish ethics are not systematic, but organic, and the term ethics is not to be found in literature. They grew out of different situations; Jewish literature does not mention ethics. Judaism is often described as an ethical monotheism -- a religion worshipping one God, with strong concern for issues of right and wrong in the world. For Judaism, all ethical issues ultimately flow from the nature of God -- his righteousness

Wednesday, January 1, 2020

Does Il Semble Que Need the Subjunctive

The term il semble que  means it appears that or it seems that in French, and it requires the subjunctive. Examples Il semble quil le fasse.It seems that he does it. Il semble que  tu  sois malheureux.It seems youre unhappy. To learn whether to use the subjunctive when saying it seems to me that, study the phrase il me (te, lui...) semble.