Types of errors

Содержание

Слайд 2

Look through the code and write on chat what is wrong here?

Look through the code and write on chat what is wrong here?

Слайд 3

Look through the code and write on chat what is wrong here?

Look through the code and write on chat what is wrong here?

Слайд 4

Look through the code and write on chat what is wrong here?

Look through the code and write on chat what is wrong here?

Слайд 5

No output

Look through the code and write on chat what is wrong

No output Look through the code and write on chat what is wrong here?
here?

Слайд 6

Look through the code and write on chat what is wrong here?

Look through the code and write on chat what is wrong here?

Слайд 7

Types of errors

Learning objectives
12.5.3.1 describe execution errors at programme startup  
12.5.3.5 describe a syntax error

Types of errors Learning objectives 12.5.3.1 describe execution errors at programme startup
in a programme code 
12.5.3.6 describe a logic error in a programme code 

12.1C: System testing 

Слайд 8

Learners will be able to:

Know what different types of programming errors can occur.
Describe different

Learners will be able to: Know what different types of programming errors
error types.
Be able to recognise errors in program code.
Apply skills to fix the error.
Combine this as part of the testing approach.

Слайд 9

Activity 2. Group work (7 min)

Task: Complete the mindmap on topic of

Activity 2. Group work (7 min) Task: Complete the mindmap on topic
error types together
Review the text material about error type,
Discuss in group and highlight 3 features that distinguish it from other types
Give 2 specific examples with code
Share your information with class using mindmap
Error types
Syntax Errors (1-group)
Logical Errors (2-group)
Run-time Errors (3-group)
Latent Errors (4-group)

https://www.mindmeister.com/ru

Слайд 10

Syntax Errors

Spelling mistakes
Missing out quotes
Missing out brackets
Using upper case

Syntax Errors Spelling mistakes Missing out quotes Missing out brackets Using upper
characters in key words e.g. IF instead of if
Missing out a colon or semicolon at end of a statement
Using tokens in the wrong order
Undeclared function definitions
Undeclared variable definitions

Слайд 11

Run-time Errors

Infinite Loop
Memory De-allocation
Datatype mismatch
Logical errors
Type-checking errors

Run-time Errors Infinite Loop Memory De-allocation Datatype mismatch Logical errors Type-checking errors

Слайд 12

Logical Errors

Incorrect Logic
Improper Algorithm to code translation
Miscalculations
Infinite loops

Logical Errors Incorrect Logic Improper Algorithm to code translation Miscalculations Infinite loops

Слайд 13

Formal logic (also known as “mathematical logic”) is the flavor of logic that

Formal logic (also known as “mathematical logic”) is the flavor of logic
comes to mind when we speak about computers. It’s based on “propositions” or “Boolean variables” that can be either true or false. 

IF the user is logged in, AND the user has the correct permissions, THEN show the user the configuration page.

IF this exception is uncatchable, OR we haven't provided a way to handle it, THEN crash.

Слайд 14

Case 1

Case 2

What is the difference?
Why do we have such error?

Case 1 Case 2 What is the difference? Why do we have such error?

Слайд 15

Exception

An exception is an object that describes an error or unexpected

Exception An exception is an object that describes an error or unexpected
behaviour of a script/code.
User defined functions and classes can also throw exceptions.
Exceptions are a good way to stop a function when it comes across data that it cannot use.

Слайд 16

Latent Errors

Latent Errors are the ‘hidden’ errors that occur only when a

Latent Errors Latent Errors are the ‘hidden’ errors that occur only when
particular set of data is used.
For example:
result = (a+b)/(c-d);
An error occurs only when c and d are equal because that will make remainder zero (divide by zero error). Such errors can be detected only by using all possible combinations of data.

Слайд 17

How to find and fix errors in the system?

Debugging is the process

How to find and fix errors in the system? Debugging is the
of finding errors in the source code (detection), understanding why they occurred (diagnosis) and correcting them. Errors are found through error messages generated by the program or the operating system or because the program does not behave as expected.
Desk checking or dry running is the process of checking an algorithm for errors. You do this by pretending to be a computer and executing the steps in the algorithm one by one, while keeping a record or track of the results.
Trace table is a very useful tool which allows you to see the state of your algorithm with as much details as you wish. Each row of the table shows the state of one step in the algorithm and each column shows the value of a variable at that step. The trace table allows you to check the algorithm for errors.

Слайд 18

Practice 1. Individual work (3 min)

Find the errors and fix them. Parts

Practice 1. Individual work (3 min) Find the errors and fix them.
4 - 7
https://www.canyoucompute.co.uk/errors.html

Слайд 19

Activity 3. Individual work

Worksheet 1
Worksheet 2

Activity 3. Individual work Worksheet 1 Worksheet 2

Слайд 20

Reflection

Do conclusion on the topic of the lesson. Write 3 sentences at

Reflection Do conclusion on the topic of the lesson. Write 3 sentences
least on teachers padlet wall.
What remained unclear for you?

https://padlet.com/

Слайд 21

Pair work

Each student writes some lines of code containing a syntax or

Pair work Each student writes some lines of code containing a syntax
logical error for their partner to debug.
Partner finds and fixes this errors.

Слайд 22

Useful links

https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-errors-issues
https://www.stickyminds.com/article/logic-and-software-testing
https://www.geeksforgeeks.org/php-types-of-errors/
https://www.geeksforgeeks.org/errors-in-cc/

Useful links https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-errors-issues https://www.stickyminds.com/article/logic-and-software-testing https://www.geeksforgeeks.org/php-types-of-errors/ https://www.geeksforgeeks.org/errors-in-cc/
Имя файла: Types-of-errors.pptx
Количество просмотров: 54
Количество скачиваний: 0