Friday, May 22, 2020

Programming Languages Comparison

Since the 1950s, computer scientists have devised thousands of programming languages. Many are obscure, perhaps created for a Ph.D. thesis and never heard of since. Others became popular for a while then faded due to lack of support or because they were limited to a particular computer system. Some are variants of existing languages, adding new features like parallelism- the ability to run many parts of a program on different computers in parallel. Read more about What is a programming language? Comparing Programming Languages There are several ways to compare computer Languages but for simplicity, well compare them by Compilation Method and Abstraction Level. Compiling to Machine Code Some languages require programs to be transformed directly into Machine Code- the instructions that a CPU understands directly. This transformation process is called compilation. Assembly Language, C, C, and Pascal are compiled languages. Interpreted Languages Other languages are either Interpreted such as Basic, Actionscript, and Javascript, or a mixture of both being compiled to an intermediate language - this includes Java and C#. An Interpreted language is processed at runtime. Every line is read, analyzed, and executed. Having to reprocess a line every time in a loop is what makes interpreted languages so slow. This overhead means that interpreted code runs between 5 - 10 times slower than compiled code. The interpreted languages like Basic or JavaScript are the slowest. Their advantage is not needing to be recompiled after changes and that is handy when youre learning to program. Because compiled programs almost always run faster than interpreted, languages such as C and C tend to be the most popular for writing games. Java and C# both compile to an interpreted language which is very efficient. Because the Virtual Machine that interprets Java and the .NET framework that runs C# are heavily optimized, its claimed that applications in those languages are as fast if not faster as compiled C. Level of Abstraction The other way to compare languages is level of abstraction. This indicates how close a particular language is to the hardware. Machine Code is the lowest level,  with Assembly Language just above it. C is higher than C because C offers greater abstraction. Java and C# are higher than C because they compile to an intermediate language called bytecode. How Languages Compare Fast Compiled Languages Assembly LanguageCCPascalC#Java Reasonably Fast Interpreted PerlPHP Slow Interpreted JavaScriptActionScriptBasic Machine Code is the instructions that a  CPU  executes. Its the only thing that a CPU can understand and execute.  Interpreted  languages need an application called an  Interpreter  that reads each line of the program source code and then runs it. Interpreting Is Easier Its very easy to stop, change and re-run applications written in an interpreted language and that is why theyre popular for learning programming. There is no compilation stage needed. Compiling can be quite a slow process. A large Visual C application can take from minutes to hours to compile, depending on how much code has to be rebuilt and the speed of memory and the  CPU. When Computers First Appeared When computers first became popular in the 1950s, programs were written in machine code as there was no other way. Programmers had to physically flip switches to enter values. This is such a tedious and slow way of creating an application that higher level computer languages had to be created. Assembler: Fast to Run- Slow to Write! Assembly language is the readable version of Machine Code and looks like this Mov A,$45 Because it is tied to a particular CPU or family of related CPUs, Assembly Language is not very  portable  and is time-consuming to learn and write. Languages like C have reduced the need for Assembly Language programming except where RAM is limited or time-critical code is needed. This is typically in the  kernel  code at the heart of an Operating System or in a video card driver. Assembly Language Is the Lowest Level of Code Assembly Language is very low level; most of the code just moves values between the  CPU  registers and memory. If you are writing a payroll package you want to think in terms of salaries and tax deductions, not  Register  A to Memory location XYZ. This is why higher level languages like C,  C#  or  Java  are more productive. The programmer can think in terms of the problem domain (salaries, deductions, and accruals) not the hardware domain (registers, memory, and instructions). Systems Programming With C C was devised in the early 1970s by Dennis Ritchie. It can be thought of as a general purpose tool- very useful and powerful but very easy to let bugs through that can make systems insecure. C is a low-level language and has been described as portable Assembly language. The syntax of many scripting  languages is based on C, for example,  JavaScript, PHP, and ActionScript. Perl: Websites and Utilities Very popular in the  Linux  world, Perl was one of the first web languages and remains very popular today. For doing quick and dirty programming on the web it remains unrivaled and drives many websites. It has though been somewhat eclipsed by  PHP as a web scripting language. Coding Websites With PHP PHP  was designed as a language for Web Servers and is very popular in conjunction with Linux, Apache, MySql, and PHP or LAMP for short. It is interpreted, but pre-compiled so code executes reasonably quickly. It can be run on desktop computers but is not as widely used for developing desktop applications. Based on C  syntax, it also includes  Objects  and Classes. Pascal  was devised as a teaching language a few years before C but was very limited with poor string and file handling. Several Manufacturers extended the language but there was no overall leader until Borlands Turbo Pascal (for Dos) and Delphi (for Windows) appeared. These were powerful implementations that added enough functionality to make them suitable for commercial development. However, Borland was up against the much bigger Microsoft and lost the battle. C: A Classy Language! C or C plus classes as it was originally known came about ten years after C and successfully introduced Object Oriented Programming to C, as well as features like exceptions and templates. Learning all of C is a big task- it is by far the most complicated of the programming languages here but once you have mastered it, youll have no difficulty with any other language. C#: Microsofts Big Bet C#  was created by  Delphis architect Anders Hejlsberg after he moved to Microsoft and Delphi developers will feel at home with features such as Windows forms. C#  syntax  is very similar to  Java, which is not surprising as Hejlsberg also worked on J after he moved to Microsoft. Learn C# and you are well on the way to knowing  Java. Both languages are semi-compiled so that instead of compiling to machine code, they compile to  bytecode  ( C# compiles to  CIL  but it and Bytecode are similar) and are then  interpreted. Javascript: Programs in Your Browser Javascript  is nothing like Java, instead, its a  scripting  language based on C syntax but with the addition of  Objects  and is used mainly in browsers. JavaScript is interpreted and a lot slower than  compiled  code but works well within a browser. Invented by Netscape it has proved very successful and after several years in the doldrums is enjoying a new lease of life because of  AJAX; Asynchronous Javascript and XML. This allows parts of web pages to update from the server without redrawing the entire page. ActionScript: A Flashy Language! ActionScript  is an implementation of JavaScript but exists solely within Macromedia Flash applications.  Using vector-based graphics, it is used mainly for games, playing videos and other visual effects and for developing sophisticated user interfaces, all running in the browser. Basic for Beginners Basic  is an acronym for Beginners All-purpose Symbolic Instruction Code and was created to teach programming in the 1960s. Microsoft has made the language their own with many different versions including VBScript for websites and the very successful  Visual Basic. The latest version of that is VB.NET and this runs on the same platform  .NET  as C# and produces the same CIL bytecode. Lua is a free scripting language written in C that includes garbage collection and coroutines. It interfaces well with C/C and is used in the games industry (and non-games as well) to script game logic, event triggers, and game control. Conclusion While everyone has their favorite language and has invested time and resources in learning how to program it, there are some problems that are best solved with the right language. E.G you wouldnt use C for writing web apps and you wouldnt write an Operating System in Javascript. But whichever language you choose, if its C, C or C#, at least you know youre in the right place to learn it.

Sunday, May 10, 2020

Child Labour In Pakistan - Free Essay Example

Sample details Pages: 2 Words: 609 Downloads: 3 Date added: 2019/04/16 Category Society Essay Level High school Tags: Child Labour Essay Did you like this example? According to International Labour Organization child labour is well-defined a work that has the potential to destroy childrens childhood. This make a huge impact on their self-respect and it is also very dangerous for their growing physical body moral and mental progress. And interferes with their education either by not sending them to attend schools giving up school prematurely without giving them primary education and driving them to combine school attendance and hard work. Don’t waste time! Our writers will create an original "Child Labour In Pakistan" essay for you Create order now there is another side and that is called child work we will talk about this later but according to ILO its be contingent upon age of the child type and hours of work performed working circumstances as well as the growth stage of individual countries. But before we get in to this lets look why child labour exist? Child labours have effects on almost 150 million children worldwide. The sequence of poverty is one of the biggest contributing factors to child labour in todays world. Children are forced to do job into a unsafe physically demanding jobs because many poor households use the majority of their income on food and in some countries its been reported to forcing parents to send or sell their children into the workforce in order to make ends meet. Other issues include culture and tradition market demand poor implementation of legislation and barriers to education. Today farming remains one of the most dominant sectors of child labor with accounting for 59 percent of child laborers worldwide. These children have been forced to give up school sports play and sometimes even their families and homes to work under unsafe harmful unhealthy and abusive circumstances. Many children are engaged in paid and unpaid forms of work worldwide to get some money for their families. Now lets look where Pakistan stands? Pakistan ranked one of the top ranked countries in child labour and it is a sad truth of Pakistan and unfortunately it prevails in many forms in the country. According to a survey directed by the federal bureau of statistics out of the probably 40 million children in Pakistan approximately 19 million are working as child labourers. this is unacceptable given that a principle of policy in Pakistan is to deliver free and good education and make Pakistan a free illiteracy country in many cases the parents of child labour do not have enough money to educate their childrens or they believe that education does not lead to marketable skills and the hands that should be holding pens and books are being used to lift heavy weights of bricks or changing heavy tyres of cars at auto repair shops. The government and even the local citizens of Pakistan should play their part in removing child labour from Pakistan and provide these children with better opportunities. And I believe every child in Pak istan in fact all over the country has a right to be educated he has the right to enjoy his childhood and play freely. Lets see what is child work? Not all work done by children should be measured as a child labour that is to be targeted for elimination childrens or teenagers contribution in work that does not effect on their health personal development and interfere with their education is generally observed as being something positive. This includes activities such as serving their parents around the home supporting in a family business or making some pocket money after school hours and during school holidays. These kinds of actions contribute to childrens progress and to the welfare of their families they deliver them with skills and experience and help to prepare them to be creative and productive members of society during their mature life.

Wednesday, May 6, 2020

The last chapter of the novel ‘The Crucible’ Free Essays

‘Here. Now. It’s all clear,’ whispered Abigail coarsely, choking back a cough. We will write a custom essay sample on The last chapter of the novel ‘The Crucible’ or any similar topic only for you Order Now Mercy squeezed through the small gap in the fence to join Abigail the other side. Together, grasping each other’s hands for comfort, they darted through the trees, into the forest that served as a barrier between the sea and Salem. They ran along a faint path of trampled grass, till they arrived at a clearing, the same clearing where they and the others had danced six months ago. They stopped at the edge, panting for breath, with the moonlight streaming in through the gap in the trees illuminating the way ahead. They gazed around in silence, till Mercy sniggered. ‘I was just rememb’rin’ the time we danced, and Parris,’ she paused, smiling in amusement, ‘and Parris, he saw me dancin’ naked!’ ‘Aye, and dear Betty,’ said Abby, ‘she were too young, we should never have let her come.’ ‘That were wierdish, though. She lay on her bed, frozen, whimp’ring for her Mama. Aye, that were wierdish.’ ‘Mary meant to tell-I know it. I remember her words even now, ‘Witchery’s a hangin’ error’, ‘it’s a sin to conjure’,’ Abby imitated, with a likeness that caused Mercy to shiver with remembrance as it all came back to her head. ‘Did you hear what happened to Tituba? She left the courtroom with Sarah Good, shoutin’ to a cow ‘Take me home, Devil; Devil take me home.’ She told them all that the Devil, ‘him be pleasure-man in Barbados!† Mercy laughed, as Abby ran through the trees shouting charms in Tituba’s Barbados accent. ‘You beg me conjure, come, make charm with me!’ Abby shrieked, violently swaying over an imaginary fire, as Tituba had done, calling out the names of the ingredients as she plucked them from the air. She beckoned to Mercy in a low whisper, ‘Come try Tituba’s charm, come drink to kill Goody Proctor.’ ‘Abby, you’ll make me dream corruptions soon, and yourself,’ said Mercy, with a serious tone to her voice. ‘You make me think I did see spirits, that I did see that yellow bird, on the beam, behind the rafter in the court room.’ ‘Come on Mercy, you’re harder than that,’ teased Abby, ‘if I hadn’t seen your face, I would have thought you were Mary Warren.’ Mercy playfully punched Abby in the arm. Abby lay there shivering as the cold night breeze passed through the forest, whistling through the trees. The events of the last six months ran through her head, it was only the spring when they had danced. The bluebells had gone now, but the memories hadn’t. The trial had taken its toll on Abby, her face was pale and the bags under her eyes grew each day. The days that went on forever in the courtroom, tirelessly questioned, till they got the answer they wanted, truth or not. She still had the guilt feeling in her, that Proctor’s death was not meant to happen, and that she could have stopped it. But she forced this to the back of her mind, but it haunted her when her mind was still, each night, and slowly, it was wearing her down. She looked over at Mercy, whose large figure was stretched out on the grass beside her, her mouth wide open, loudly inhaling the cold air. Mercy was a tough girl, she had to be to work at the Putnams’, yet had a conscience but Abby kne w that it could easily be convinced by some persuasive talking. She slowly drifted into doze but was easily awoken by the first light of dawn. She leapt up, knowing they had to be out of the region fast, or else they would be caught, made to return and punished. Within minutes, Mercy and Abby were running through the trees till they were out in the open fields at least three miles from Salem. ‘We’ll have to stop for some food at a farm, else we’ll never make it to Andover,’ Mercy said. ‘When the sun rises over those hills,’ said Abby pointing to the East where the red, early morning light was focused. ‘Then we’ll find the nearest farm, and get somethin’ till last us till tonight.’ They walked for an hour, hardly talking. Their shoes pounded on the dirt track road, with an urgency that urged them to walk faster. They reached a turning to a farm, and turned down. ‘I’m goin’ to talk to the farmer,’ said Abby, taking control. ‘Stay a few metres back, but still in view.’ Abby strided on up to the door and beat her fist on it, before Mercy could argue. ‘Good Sir, we have been travellin’ for over a week now, and our bodies are weak. We had to leave our small village as Mercy, this girl here, she was found guilty of traffickin’ with spirits.’ Abby’s voice deliberately started to crackle, as if attempting to hold in her tears but not very successfully. ‘She was so weak; I felt I couldn’t leave her to run away by herself, if she didn’t, she would have had to face the rope, and I care for her, I do.’ ‘Aye,’ the farmer said, nodding. ‘And so you gave all up for this sinner here.’ ‘Aye, ’tis right good Sir. My name will be soiled in these parts, but Mercy would never have made it to Boston by herself. I felt it my duty as a friend.’ A tear dropped from Abby’s eye, and she made no attempt to wipe it away. ‘I’m sure my wife will have some spares for you,’ said the farmer, smiling kindly down at her. ‘But she won’t like you sharing it with your friend, she will never help the devil in any way. Goody Jones, do you have any left of yesterday’s pie?’ ‘Aye, of course, I’ll bring it to you right away,’ called a voice from within the small old building. Within moments, a small plump lady had appeared, with a kind smile, and welcoming eyes, like her husband’s. ‘Oh, how long have you been travelling, child?’ she asked, looking at Abby, ‘you’ll need to get some of this down you soon. Here let me wrap it up in a cloth.’ She disappeared again, for a moment, ferreted around in some drawers, and appeared with a patterned cloth to wrap up the pie. ‘Here you go. And safe journey.’ ‘Safe journey,’ called the two of them, as Abby turned round and started to walk towards Mercy. She stopped at the sight of Mercy’s face. It was tense with anger, and as red as the fresh berries on the bush nearby. ‘Abigail Williams, how dare you? You lied, you lied, I never-‘ she broke off in anger. Her eyes could have shot like arrows. Her body was stiff and started to shake. ‘We had to get food, I had to,’ Abby replied defiantly. ‘You lied,’ repeated Mercy, spitting the words out as if they were poisonous. ‘You had to leave too, Abigail Williams, we left as you could not walk through the village without hearing your soiled name mentioned, and people running from your face. It were not my fault we had to leave, Abby, ’twas yours as well. Tell them that, Abby, tell them that you caused the death of John Proctor, and mark it Abby, mark it, Elizabeth is sure to hang once her baby is born.’ Mercy was almost shouting by now. Abby kicked a stone in the road. ‘Look we had to get food,’ she explained, knowing she shouldn’t have, but never prepared to admit. ‘I’m goin’ to Andover, and then to Boston. I don’t care about you, I saved you Mercy from the judges, I saved you, and this is how you repay me? Well Mercy Lewis, you go by yourself and I’ll go by myself and we’ll see who gets there in the end.’ ‘Fine, I can manage myself, I’m eighteen now, older than you, and you never helped, just caused problems. ’twas your fault we danced, you begged Tituba to conjure, because of you, Abigail Williams, the whole country’s talkin’ witchcraft.’ At this, Abby turned her back on Mercy and strode down the dirt track, her eyes focused on the skyline ahead, not turning to look back, at Mercy’s aghast face. She smiled a tight, forced smile, but she was happy, Mercy was shocked. Mercy’s face was frozen in horror, the words had just come out of her mouth, she knew, although she was older than Abby, she couldn’t look after herself, and Abby could. It was Abby’s imagination that had lied them through, it was Abby’s determination that would get her to Boston, it was Abby who could look after herself, not Mercy. She could never give in to Abby, so she turned dejectedly back down the long straight road and started to walk the long way back to Salem. She dragged her feet on the ground, wishing she hadn’t said anything. She was tempted to run after her, but it was too far, and that was exactly what Abby wanted. Abby, meanwhile, was far in the distance. She sat down on a boulder by the side of the road to rest her aching feet. She closed her eyes and thought of Boston. She imagined the skyline view, the way it had always been described. A big town, busy with people, no one would know her name, or what she had done. She was about to start a new life. She could smell all the market fish, and could hear the buzz of noise from the inhabitants. The place was alive with colour, she had left Salem, and its old wooden buildings, her mud covered clothes, faded in time. Her life seemed awash of brown and grey, but now as she thought ahead, she dreamt of the exciting new start, about to begin. How to cite The last chapter of the novel ‘The Crucible’, Papers