Студопедия.Орг Главная | Случайная страница | Контакты | Мы поможем в написании вашей работы!  
 

Task 11. Read the text on the page below and complete the table



  Text A Text B Text C
  Type of error        
  Definition        
  Example        
Ways to avoid or deal with this kind of error      

System errors affect the computer or its peripherals. For example, you might have written a program which needs access to a printer. If there is no printer present when you run the program the computer will produce a system error message. Sometimes a system error makes the computer stop working altogether and you will have to restart the computer. A sensible way of avoiding system errors is to write code to check that peripherals are present before any data is sent to it. Then the computer would warn you by a simple message on the screen, like ‘printer is not ready or available’.

Syntax errors are mistakes in the programming language (like typing PRNIT instead of PRINT). Syntax errors cause the program to fail. Some translator programs won’t accept any line that has syntax errors. Some only report a syntax error when they run the program. Some languages also contain special commands such as debug, which will report structural errors in a program. The programming manual for the particular language you’re using will give details of what each error message means.

Logic errors are much more difficult to detect than syntax errors. This is because a program containing logic errors will run, but it won’t work properly. For example, you might write a program to clear the screen and then print ‘hello’. Here is a code for this:

10 Message

20 PRINT ‘Hello’

30 CLS

40 END

The code has a logic error in it, but the syntax is right so it will run. You can get rid of logic errors from simple programs by ‘hand-testing’ them or doing a ‘dry run’ which means working through each line of the program on paper to make sure it does what you want it to do. You should do this long before you type in the code.


Task 12. Read the quotations about ‘programming’ below. Discuss with other students what point you think each quotation is trying to make and whether you agree with it.

· Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook)

· To understand a program you must become both the machine and the program. (Alan J. Perlis)

· Perhaps if we wrote programs from childhood on, as adults we'd be able to read them. (Alan J. Perlis)

· It is easier to change the specification to fit the program than vice versa. (Unknown)

· One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. (Elbert Hubbard)

· Those parts of the system that you can hit with a hammer are called hardware; those program instructions that you can only curse at are called software. (Anonymous)

· The most harmful error of any program will not be discovered until the program has been in production for at least six months. (Troutman's programming postulates)

· Real programmers never work from 9 to 5. If any real programmer is around at 9 a.m., it’s because they were up all night. (Some computer geek)





Дата публикования: 2015-09-17; Прочитано: 1368 | Нарушение авторского права страницы | Мы поможем в написании вашей работы!



studopedia.org - Студопедия.Орг - 2014-2024 год. Студопедия не является автором материалов, которые размещены. Но предоставляет возможность бесплатного использования (0.007 с)...