Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
PROGRAMMING 1.doc
Скачиваний:
36
Добавлен:
12.11.2018
Размер:
1.99 Mб
Скачать

Internet: Voice recognition takes off

You don't need a sophisticated cell phone to surf the Internet when you're on the road - just your own voice. That's the idea behind a new breed of voice service that is popping up all over the place.

Subscribers (1) …… a toll-free phone number and use spoken (2) ……. to listen to anything from weather conditions to stock quotes, or flight information to news stories. Half a dozen of these services - such as Audiopoint, BeVocal, TellMe and TelSurf Networks - have already gone live or are testing their systems.

These launches are all happening because two crucial technologies have come of age. (3) ……. software from companies such as Lucent, Nuance and Speechworks can now understand a wide range of accents and diction without having to be trained to a specific voice. And computer languages such as VoiceXML make it as easy to write voice services as (4) ……. has made it to write web pages. With (5) ……. , the human voice becomes a substitute for a computer mouse and the spoken command for a click. It doesn't, however, call up conventional web pages, but content which is specially composed for a telephone: sound clips, numbers, music, spoken texts.

7. Look at the groups of words and decide what part of speech each word is. Then complete the sentences with the correct word.

compile compiler compilation

1. Programs written in a high-level language require ……. , or translation into machine code.

2. A ……. generates several low-level instructions for each source language statement.

3. Programmers usually ……. their programs to create an object program and diagnose possible errors.

program programmers programming programmable

4. Most computer ……. make a plan of the program before they write it. This plan is called a flowchart.

5. A computer ……. is a set of instructions that tells the computer what to do.

6. Converting an algorithm into a sequence of instructions in a programming language is called …

bug debug debugger debugging

7. New programs need ……. to make them work properly.

8. Any error or malfunction of a computer program is known as a …….

9. The best compilers usually include an integrated ……. which detects syntax errors.

8. In the word debug the prefix de- is used. This prefix means 'to reverse an action'. Here are a few more examples.

defrost debrief declassify decode decompose decentralize

Write down the base form of each verb. What do the verbs mean in your language? And what do the verbs with de- mean?

Can you think of any more verbs with de- in English?

READING PRACTICE SECTION

Programming languages.

There are over 200 problem-oriented languages. Most of the languages are oriented to­ward the particular application areas of business or science (math). The most common of them are COBOL, FORTRAN, PL/I, RPG, BA­SIC, and PASCAL. It is very difficult to determine what are the most popular of modern programming languages. Some languages are very popular for particular kinds of applications (e.g., COBOL is still strong in the corporate data center, often on large mainframes, FORTRAN in engineering applications, and C in embedded applications), while some languages are regularly used to write many different kinds of applications.

FORTRAN is oriented toward solving prob­lems of a mathematical nature. The name FORTRAN comes from the combination of the words ‘formula translation’. The version of FORTRAN IV has been designed as algebra-based programming language. Any formula or those mathematical relationships that can be expressed algebraically can easily be expressed as a

FORTRAN instruction. FORTRAN is the most commonly used language for scientific applications.

COBOL was the most widely used business-oriented pro­gramming language. Its name is an acronym for Common Business-Oriented Language. COBOL was designed to solve prob­lems that are oriented toward data handling and input-output operations. Of course, COBOL can perform arithmetic opera­tions as well, but its greatest flexibility is in data handling. CO­BOL also was designed as a self-documenting language. Self-documenting languages are those that do not require a great deal of explanation in order to be understood by someone reading the program instructions. The self-documenting aspect of CO­BOL is made possible by its sentencelike structure and the very generous maximum symbolic field-name length of 30 charac­ters. With a field-name length of up to 30 characters, the name can clearly identify the field and its purpose.

BASIC is the acronym for beginner's all-purpose symbolic instruction code. It was developed in Dartmouth College as an easy-to-learn programming language for students and inexperienced programmers and used as a teaching language. Its key design goal is simplicity. BASIC has become a very popular language in systems where many users share the use of a computer through terminals and it has become a universal language for personal computers. The language BASIC is mathematically oriented, that is, its typical use is to solve problems of a mathematical nature. Because BASIC programs are usually executed from a terminal or microcomputer where input is entered through a keyboard and printed output is relatively slow, problems of a business nature requiring large volumes of input-output data are usually not practical.

PASCAL was invented in 1970 in Switzerland. It was named after the mathematician Blaise Pascal, who invented one of the earliest practical calculators. PASCAL is a mathematically oriented programming language and, as such, is most commonly used in mathematics, engineering, and computer science departments of colleges and universities. This language is somewhat unusual in that it was designed to be a structured language. This means that the program must be written in logical modules which are in turn called by a main controlling module.

PL/I stands for Programming Language I. It was designed as a general-purpose language incorporating features similar to COBOL for data handling instructions and features similar to FORTRAN for mathematical instructions. PL/I is much more than a combination of the good features of both COBOL and FORTRAN, as it has many capabilities that are unique. Yet, although PL/I is one of the most versatile and the most powerful of the programming languages, it is not the most commonly used. COBOL and FORTRAN have been available for a longer period of time than PL/I, and many more users work with these languages.

C is used to write system software, graphics and commercial programs. C++ is a general-purpose programming language, one of the first Object Oriented languages. It is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. C++ was developed from the С language. It was designed as a systems programming language with features that make it easy to control the computer hardware efficiently. It was

used to produce the Microsoft Windows operating system. It is portable, i.e. programs written in C++ can be easily adapted for use on many different types of computer systems.

Visual Basic is a programming environment, not simply a language. It uses the language BASIC, a simple language developed to make it easy for people to learn how to program. Visual Basic has predefined objects such as dialog boxes, buttons, and text boxes, which can be chosen from a toolbox and dragged across the screen using the mouse and dropped into the required position. BASIC programming code is attached to form

a complete program. Visual Basic is used to write general purpose applications for the Windows operating system. The language not only allows programmers to create simple graphical user interface (GUI) applications, but can also develop complex applications.

Delphi is similar to Visual Basic. It is also a programming environment for developing programs for the Windows operating system. It has predefined objects that can be chosen from a toolbox. In Delphi, however, the code attached to the objects is written in a form of Pascal. You can think of Delphi as a kind of 'Visual Pascal'. Like Visual Basic, it is often used for general purpose programs.

Java Steaming Coffee Cup – the Java Technology logo

Java is a programming language developed by Sun Microsystems which is specially designed to run on the web. When you see a web page that uses Java, a small program called 'applet' is executed automatically. Java applets are programs that are embedded in other applications, typically in a Web page displayed in a Web browser. Java applets let you watch animated characters and moving text, play music and interact with information on the screen.

Java is an object-oriented language similar to C+ + , but it is more dynamic and simplified to eliminate possible programming errors.

A Java program is both compiled and interpreted. First the source code (file

with a Java extension) is compiled and converted into a format called bytecode (file with .class extension), which can then be executed by a Java interpreter. Compiled Java code can run on most computers because there are Java interpreters, known as Java Virtual Machines, for most operating systems, including MacOS, Windows, or UNIX.

One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any supported hardware/operating-system platform. One should be able to write a program once, compile it once, and run it anywhere. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or in a Web browser for Java applets.

There are open source tools like applet2app which can be used to convert an applet to a stand alone Java application. This has the advantage of running a Java applet in offline mode without the need for internet browser software.

Java is multi-threaded. A Java program can have multiple threads (parts), i.e. many different things processing independently and continuously.

People are excited about Java because it lets you create moving images and animated drawings. You can also create graphical objects (e.g. bar charts, graphs, diagrams) and new 'controls' (e.g. buttons, check boxes, pushbuttons with special properties). A web page that uses Java can have inline sounds that play in real-time, music that plays in the background, cartoon style animations, real-time video and interactive games.

One alternative technology is ActiveX, the Microsoft product for including multimedia effects on web pages. Another competitor is Macromedia's Shockwave, a plug-in that lets you animate pictures, add sound and even make interactive pages so that people can play games on websites.

JavaScript is a simplified form of the Java language. It is powerful and easy to use. JavaScript was influenced by many languages and was designed to look like Java, but to be easier for non-programmers to work with. Scripts are small programs that can be used to perform simple tasks or tie other programs together. JavaScript is designed for use inside webpages. It can enable a webpage to respond to a mouse click or input on a form. It can also provide a way of moving through webpages and produce simple animation.

Duke, Java's mascot.

1. Decide if the statements are true or false and correct the false ones.

  1. FORTRAN is oriented toward solving prob­lems of a mathematical nature.

  2. Java was invented by Microsoft.

  3. COBOL can not perform arithmetic opera­tions.

  4. Small applications written in Java are called 'animations'.

  5. BASIC was named after a famous mathematician.

  6. With the interpreter, a program is first converted into Java bytecodes.

This C program tells the computer to print the greeting 'good morning'

  1. Java is not compatible with most computing platforms.

  2. The Java language is single-threaded, one part executing at a time.

  3. You can think of Java as a kind of 'Visual Pascal'.

  4. Java doesn't let you watch animated characters on your webpages.

  5. VB is considered difficult to learn and use, because of its graphical development features.

  6. ActiveX and Shockwave are not real competitors for Java.

2. Complete the table:

Language

Type of language

Characteristics

Use

BASIC

COBOL

FORTRAN

PASCAL

C++

PL/I

HTML

Java

JavaScript

Visual Basic

Delphi

3. Answer these questions about special features of the languages:

  • Which language uses a system of tags?

  • Which languages are designed to be used inside webpages?

  • Which language was used to write the Windows operating system?

  • What computer language is called a portable one?

  • What is HTML used for?

  • Which languages can only be used in the Windows operating system?

  • Which language cannot be used for writing programs?

GRAMMAR PRACTICE SECTION

Relative clauses.

1. Match the sentences with the explanations. There are moor than one explanation to each sentence.

1. The people who/that work next door make a lot of noise.

a. Defining clauses give information which cannot be left out because it gives important information about the subject.

2. The programmer whose work was the best got the job in the company.

b. Non-defining clauses give extra information. This is separated from the main sentence by commas.

3. No one knows by whom the program was written. (formal)

c. Which and that refer to things. That is less formal than which, and some people prefer to use which.

4. It was the same administrator whom I had addressed before. (formal)

d. That is also used to refer to people in speech and informal writing in defining clauses.

5. The man we spoke to gave us instructions.

e. Who and whom refer to people.

6. That was the easiest task I’ve ever had!

f. We use whom in formal speech and writing to introduce an object clause.

7. The man that we spoke to gave us instructions.

g. Whom is used after a preposition in formal language.

8. Delphi, which is similar to Visual Basic, is also a programming environment for developing programs for the Windows operating system.

h. In informal language people prefer to use who, or that, instead of whom.

9. The man who writes programs for us doesn’t have special education.

i. Whose means ‘of whom’.

10. The purpose of programming is to create a program that demonstrates a certain desired behaviour.

j. Subject clauses refer to the subject of the sentence.

11. The language which is mathematically oriented is typically used to solve problems of a mathematical nature.

k. Object clauses refer to the object.

l. We cannot leave out the relative pronoun in non-defining clauses.

m. We can leave out the relative pronoun in defining clauses which are object clauses.

n. We cannot leave out the relative pronoun in defining clauses which are subject clauses.

o. We can leave out the relative pronoun after a superlative.

2. Rewrite each pair of sentences as one sentence forming relative clauses. Match the sentences with the explanations from the previous exercise.

1. Programming is the process of preparing a set of coded in­structions. The set of in­structions enables the computer to solve specific prob­lems or to perform specific functions.

2. The programs are lists of instructions. Instructions will be followed by the control unit of the CPU.

3. There are two kinds of errors or bugs. The programmers must deal with them.

4. There are syntax errors. They prevent the language processor from successfully translating the source program to object program code.

5. We use symbolic languages. They are easier to understand.

6. Most programming languages are purely textual. They use sequences of text including words, numbers, and punctuation, much like written natural languages.

7. Programming languages have progressed from machine-oriented languages that use strings of binary 1s and 0s to prob­lem-oriented languages. Prob­lem-oriented languages use common mathematical and/or English terms.

8. The boy’s idea was taken. He decided not to share his ideas with anyone.

9. My friend bought a new mobile phone. He didn’t know how to operate it.

10. The languages used to create Web documents are called markup languages. They use instructions (markups) to format and link text files.

11. I’ve never used this program. It’s the best!

12. The administrator’s files were lost. He had to do the work again.

13. I spoke to our programmer. He gave me good advice how to do the work.

14. Bill Gates has become a successful businessman. He didn’t have special education at the beginning of his carrier.

15. John Warner Backus was an American computer scientist. He submitted a proposal to his superiors at IBM to develop a more practical alternative to assembly language for programming their IBM 704 mainframe computer in late 1953.

16. C is a general-purpose computer programming language.

It was developed in 1972 by Dennis Ritchie to be used by UNIX operating system.

17. William Henry “Bill” Gates III is an American business magnate, philanthropist, author and chairman of Microsoft. He was born in October 28, 1955.

18. Microsoft is a software company. It was founded by Bill Gates and Paul Allen.

19. Bill Gates stepped down the position as chief executive officer in January 2000. He announced that he would be transitioning from full-time job at Microsoft to part-time work to full-time work at Bill & Melinda Gates Foundation in 2006.

20. I found my friend’s files in the system. He gave me a reward.

SPEAKING/WRITING PRACTICE SECTION

1. Complete the chart below with notes about the different stages in your 'computer history'.

For example: 1985: First used computer at school. Add more boxes to the chart if you want to.

Possible stages:

  • first computer game

  • first computer lesson at school/college

  • first programming language learnt

  • first software used

  • first computer course/qualification

  • first job involving computer

  • first steps on the Internet

Ask a partner about their computer history. For example:

'When did you first ...? 'How long ago did you ...?' How old were you when you ...?

Tell the rest of the class about your partner. Do most people in your group have similar computer histories?

2. Describe this diagram showing how Java works.

3. Try to find the information about any recently developed programming languages (e.g. used to interact with the Internet through voice recognition) or the one that has not been described above. Make a report about it. Specify its development history, main characteristics and uses.

4. Try to find out more about Java applets at http:/java.sun.com. Make a report including as many pictures as possible.

5. Using the power of your imagination try to think of possible future computer programs.

What will they be used for? How will they help make our lives easier?

In your opinion, what will the program writing process in future be like? How will it be improved?

FUN AND GAMES SECTION

Complete the crossword filling in the words.

Java

ACROSS

2. If a piece of software can run on any OS, it is ……. independent.

5. A competitor to Java, developed by Adobe.

6. Java and C++ are both examples of ……. -oriented languages.

8. The name of a Java application which runs automatically on a web page.

1

3

4

2

5

7

6

8

DOWN

1. Java is used to create ……. objects (bar charts, diagrams, etc.) which are more interactive than the standard versions.

3. Java is multi- ……. , which means that a Java program can have multiple parts operating at the

same time; this saves on CPU power.

4. Java ……. was created for use on mobile devices.

7. When Java source code is compiled, it is converted into bytecode, with a file extension ………

HUMOR SECTION

What does each of the cartoons imply? Why is it funny, in your opinion? Explain its humor.

An IBM customer had trouble installing software and rang for support. "I put in the first disk, and that was OK. It said to put in the second disk, and had some problems with the disk. When it said to put in the third disk, I couldn't even fit it in..."

The user hadn't realized that "Insert Disk 2" implied removing Disk 1 first.

Programming language acronyms

BASIC: Boring And Shamelessly Idiotic Coders BASIC: Badly Assembled, Severely Illogical Code BASIC: Beginner's Algorithms for Seemingly Infinite Confusion BASIC: Bill's Attempt to Seize Industry Control C: Confusing COBOL: Completely Obsolete Business Oriented Language COBOL: Completly Outdated, Badly Overused Language COBOL: Compiles Only Because Of Luck COBOL: Coded Only By Obsessed Lunatics

8. Original programmer, having cashed his royalty check, is nowhere to be found. 9. Newly-assembled programming team fixes almost all of the 137 bugs, but introduces 456 new ones.

LAWS OF COMPUTING

A computer program will always do what you tell it to do, but rarely what you want it to do.

COMPUTER TERMS

PROGRAMS - Those things you used to look at on your television before you hooked your computer up to it.

MURPHY’S COMPUTER LAWS

  • Any given program, when running, is obsolete.

  • Any given program costs more and takes longer each time it is run.

Real programmers don't comment their code. If it was hard to write, it should be hard to understand.

  • If a program is useful, it will have to be changed. 90% of a programmer errors come from data from other programmers.

  • If a program is useless, it will have to be documented.

  • The longer it takes to download a program the more likely it won't run.

  • Failure is not an option, it's included with the software.

  • A hardware failure will cause system software to crash, and the customer engineer will blame the programmer.

  • A program that compiles on the first run has an error in the algorithm.

  • A program will work the way you think is should only when you don't care if it does.

  • The chances of a program doing what it’s supposed to do are inversely proportional to the number of lines of code used to write it.

  • Make it possible for programmers to write programs in English, and you will find that programmers can not write in English.

  • Software bugs are impossible to detect by anybody except the end user.

  • A program generator creates programs that are more buggy than the program generator.

  • Debugging is at least twice as hard as writing the program in the first place. So if your code is as clever as you can possibly make it, then by definition you're not smart enough to debug it.

  • Every non trivial program can be simplified to one line of code, and it will contain a bug.

  • A patch is a piece of software which replaces old bugs with new bugs.

  • A program is good when it's bug free - which is impossible.

  • Bugs will appear in one part of a working program when another 'unrelated' part is modified.

  • Bugs mysteriously appear when you say, "Watch this!" If you call another programmer over to see if he knows what's wrong the bug disappears.

  • The worst bugs in your program will show up only during the final review.

  • The number of bugs always exceeds the number of lines found in a program.

10. Original programmer sends underpaid testing department a postcard from Fiji. Entire testing department quits.

11. Company is bought in a hostile takeover by competitor using profits from their latest release, which had 783 bugs.

12. New CEO is brought in by board of directors. He hires a programmer to redo program from scratch.

13. Programmer produces code he believes is bug-free….

Programmers at a cocktail party

7. Users find 137 new bugs.

Software development cycle

1. Programmer produces code he believes is bug-free. 2. Product is tested. 20 bugs are found. 3. Programmer fixes 10 of the bugs and explains to the testing department that the other 10 aren't really bugs.

4. Testing department finds that five of the fixes didn't work and discovers 15 new bugs. 5. Repeat three times steps 3 and 4.

6. Due to marketing pressure and an extremely premature product announcement based on overly-optimistic programming schedule, the product is released.

FORTRAN: Files Only Run Through Right At Never-neverland LISP: Lots of Insanely Stupid Parentheses PASCAL: Programmers Against Structured Code And Language

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]