02 Es26 Lab - Errors

  • Uploaded by: Wilmarc
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View 02 Es26 Lab - Errors as PDF for free.

More details

  • Words: 389
  • Pages: 11
Errors 2

Program Development Process Problem or Task check it

make list

Requirements List design algorithm

verify

Algorithm verify

code program

Program test and debug

Debugging •

programming errors are called bugs and the process of tracking them down and correcting them is called debugging.

3 Kinds of Errors ١. Syntax Errors • Syntax refers to the structure of a program and the rules about that structure. • The compiler will detect the error and the program won't even compile. At this point, the programmer is unable to form an executable program that a user can run until the error is fixed.

3 Kinds of Errors ١. Runtime Errors ٢. - appear when we run the program ٣. These errors are also called exceptions because they usually indicate that something exceptional (and bad) has happened.

3 Kinds of Errors ١. Semantic Errors • - also called logic errors • The program will run successfully in the sense that the computer will not generate any error messages, but it will not do the right thing.

Semantic Errors • •

It will do what you told it to do. The problem is that the program you wrote is not the program you wanted to write. The meaning of the program (its semantics) is wrong

Experimental debugging •



debugging is one of the most intellectually rich, challenging, and interesting parts of programming. In some ways, debugging is like detective work. You are confronted with clues, and you have to infer the processes and events that led to the results you see.

Experimental Debugging •

Debugging is also like an experimental science. Once you have an idea what is going wrong, you modify your program and try again. If your hypothesis was correct, then you can predict the result of the modification, and you take a step closer to a working program.

Experimental Debugging •

For some people, programming and debugging are the same thing. That is, programming is the process of gradually debugging a program until it does what you want. The idea is that you should start with a program that does something and make small modifications, debugging them as you go, so that you always have a working program.

Reference •

Downey, A., et.al. How to Think Like a Computer Scientist: Learning with Python. GNU Free Documentation License:2002. http://www.greenteapress.com/thinkpython/thinkCSpy/

Related Documents


More Documents from "Wilmarc"

Mscsgradapp
May 2020 8
09 Es26 Lab - Loops 2
May 2020 14
11 Es26 Lab - Arrays
May 2020 14
08 Es26 Lab - Loops
May 2020 6
13 Es 26 - Strings
May 2020 4