SlideShare a Scribd company logo
Implementation Program Development Techniques
Program Development AIM Highlight a number of techniques and tools available to the software developer to assist in code generation. These resources will help to reduce the number of errors in the final product. First we will look what makes a well developed solution and what are the errors that may occur.
The Structured Approach As mentioned before the function of the translator is to report any syntax errors. However, just because a program is syntactically correct it doesn’t mean that it is free of errors. Following a structured approach to developing programs, particularly complex one’s is a way of improving the level of ‘correctness’ in a program.
Structured Approach The structured approach promotes the following concepts: Use of a clear modular structure. One logical task per subroutine. Appropriate Documentation. Error free code is more likely to be produced under these circumstances.
Modular Structure The use of modularisation is the breaking down of the program into smaller more achievable sub-programs. (Top-down) Each module is tested independently and is only included into the project once it is error free. What are two examples of modelling diagrams that show the top-down approach?
One Logical Task What do we mean? Making sure that each sub-program only has one task. e.g. Print, Save, Update. If sub-programs are complex then they become harder to debug. Restricting sub-programs to one task also enhances the reusability of the code.
One Logical Task Example In a program that requires THREE processes to be carried out. Read an array from file Sort the array Print the array Each process is a logical task and should therefore be created as a sub-program.
Appropriate Documentation Clear documentation within the code, such as comments, appropriate identifier names and indenting of control structures will help in the understanding of the logic of the code. Identifier naming is when you give a variable or constant an intrinsic or meaningful name.
Errors There are three types of errors. Syntax Logic Run-time Syntax errors are detected by the translator. Run-time and logic errors occur when the code is executed.
Syntax Syntax errors are any errors that prevent the translator from converting the source code into machine code. Examples of syntax errors include: typing mistakes, incorrect punctuation and spelling mistakes. Most syntax errors are picked up in the process of syntactical analysis within translation.
Logic Errors Are errors in the design of code that result in incorrect output. Examples include continuos loops and incorrect calculations. i.e. Sum = Num1+Num2/2 Logic errors are the most difficult to detect and can only be identified through desk checking or peer checking.
Run-Time Errors Caused through the inability of the computer to perform a task. The error or bug is usually linked to a software or hardware problem. Possible sources of run-time errors include: Incorrect BIOS settings Incorrect use or settings of hardware drivers Application software.
Run-Time Errors Errors in the software are due to: Division By Zero errors  – This process is not defined by mathematics so it cannot be completed by a computer. i.e. Finding the average of a list if the list is empty. Arithmetic Overflow  – Occurs when a value is outside ranges (-32768 to 32767) or there are to many calculations for the processor. Accessing inappropriate memory locations  – occur when assign a value to identifier that doesn’t exist.
Techniques for Detecting Errors 1. Stubs A stub is a small routine which is yet to be coded into the solution. The use of stubs allows high level modules to be tested. Stubs do not perform any real processing they only simulate processing will occur. Stubs are used to determine if parameters are passed and modules are called.
Techniques for Detecting Errors 2. Flags Are used to indicate that a certain condition has been met. (Boolean) Flags are usually used in the termination of a loop. However in debugging they are used to signify that an event has occurred correctly.
Techniques for Detecting Errors Debugging Output Statements Is a statement inserted as a line of code to display the value of variables at a particular point in the execution of a program. This allows the programmer to monitor the contents of variables to determine the precise point at which an error has occurred.
Activity 1 You are writing a function that sorts an array of data. Unfortunately you have a number of problems. Discuss how the following techniques could be used to isolate the source of errors in your sort function. Stubs Flags Debugging Output Statements.
Some Important Points If the function includes calls to other modules these modules could be replaced with stubs where values returned can be known. Temporary flags could be used to identify whether or not particular statements have been executed. Debugging output statements could be used to show the contents of variables at crucial points during operation.
Peer Checking Errors often occur that are impossible to correct for the original programmer. Colleagues are able to see the problem from a fresh point of view. Many software development companies require each individual module to be peer checked and formally signed off.
Desk Checking Is the process of working through a module by hand. Highlights the contents of each variable and the changes that occur when data is inputted. Often called a structured walkthrough. The process of working through the code statement by statement helps to make the logic clear.
Activity 2 Below is a function that will perform a linear search of an array in VB. Public Function Linear(Search(), FindItem) As Boolean Dim Lower, Upper, Count Linear = True Lower = LBound(Search) Upper = UBound(Search) Count = Lower WHILE Count < Upper IF Search(Count) = SearchItem THEN Linear = True Count = Upper END IF Count = Count + 1 END Function
Activity 2 Below is the array that is to be searched. Animals(0) = “Frog” Animals(1) = “Dog” Animals(2) = “Cat” Animals(3) = “Cow” Animals(4) = “Ant” To perform a desk check a call routine is entered i.e. Linear(Animals(), “Frog”)
Activity 2 The desk check for  Linear(Animals(), “Frog”)  call is reproduced below: 5 4 True Frog 0 4 0 Frog True Search (Count) Count Upper Lower FindItem Linear
Activity 2 Now perform the desk check for  Linear(Animals(), “Cat”)  call is reproduced below: Search (Count) Count Upper Lower FindItem Linear
Activity 2 Now perform the desk check for  Linear(Animals(), “Cat”)  call is reproduced below: 5 4 True Cat 2 Dog 1 Frog 0 4 0 Cat True Search (Count) Count Upper Lower FindItem Linear
Activity 3 There are actually 2 errors in this program, what are they? The function always returns TRUE regardless of the existence of the search item. Should be set to false. The identifier used as the second parameter is called Finditem yet within the code it is SearchItem.
Activity 4 “If every path and every boundary condition have been tested and the output matches exactly the expected output then surely the code must be free of errors.”  This statement is not true why?
Activity 4 Unexpected inputs with different data types or ranges can cause errors. Mathematical errors such as division by zero. Arithmetic errors can occur when the code is logically correct. Communication errors in regards to validating data sent from outside devices.
Software Tools for Detecting Errors in Code Most software development environments include tools to assist the programmer in the task of isolating errors in source code. The following three tools are commonly available to assist in the detection of logic and run-time errors. Breakpoints Program Traces Single Line Stepping
Breakpoints Are used to temporarily halt the execution of the code. Once the execution has stopped it is possible to view the current value of variables. By adding breakpoints at strategic points in the code it is possible to locate the source of the error.
Program Traces Tracing in terms of error detection, refers to tracking the execution of statements and recording the changing contents of variables. Many software environments produce a trace file. The file maintains a log of all the transactions that have taken place.
Single-Line Stepping Is the process of halting the execution after each statement is executed. After each step, the values of variables can be displayed and minor changes made. This process can become monotonous. However, variations are provided which allow users to step over functions which may be error-free.
Activity 5 “A subroutine is under development that reads a sequential file of records. As each record is read various calculations are made. A logic error exists as some calculations are incorrect.”  Explain how the use of single line stepping could be used to isolate the problem.
Activity 5 First set up a series of breakpoints to allow the viewing of relevant variables contents. Start the single line stepping process with the watch window open. Progressively step through the code observing the changes occurring in the window watch. The records affected by the logic error should now be identifiable.

More Related Content

PPTX
software cost factor
PPT
Algorithms and flowcharts
PPT
PPT
Lecture 4
DOC
Flow charts
PPTX
Flowchart Grade 10
PPTX
Algorithm and Flowcharts
PPTX
Programming flowcharts for C Language
software cost factor
Algorithms and flowcharts
Lecture 4
Flow charts
Flowchart Grade 10
Algorithm and Flowcharts
Programming flowcharts for C Language

What's hot (20)

PPT
Chap3 flow charts
PPTX
Flowchart
PPTX
Fundamentals of-algorithm
PPT
Flowchart - Introduction and Designing Tools
PPT
Uml1 concepts
PPTX
Algorithm and flowchart2010
PDF
MINIMIZING THE COMPLEXITY EFFECTS TO MAS ARCHITECTURES DESIGN BASED ON FG4COM...
PPTX
Chapter 6 algorithms and flow charts
PPTX
Flow control in computer
PPTX
SOFTWARE ENGINEERING ppt
PDF
Flow charts
PPTX
Flow chart
PPTX
Algorithm and flowchart
PDF
CMIS 330 WEEK 4 SDD
PDF
Introduction to computer_lec_03
PDF
Spm software effort estimation
PDF
Flow Chart @ppsc(2)
PPTX
Designmethodology1
PPTX
What is a flowchart
Chap3 flow charts
Flowchart
Fundamentals of-algorithm
Flowchart - Introduction and Designing Tools
Uml1 concepts
Algorithm and flowchart2010
MINIMIZING THE COMPLEXITY EFFECTS TO MAS ARCHITECTURES DESIGN BASED ON FG4COM...
Chapter 6 algorithms and flow charts
Flow control in computer
SOFTWARE ENGINEERING ppt
Flow charts
Flow chart
Algorithm and flowchart
CMIS 330 WEEK 4 SDD
Introduction to computer_lec_03
Spm software effort estimation
Flow Chart @ppsc(2)
Designmethodology1
What is a flowchart
Ad

Viewers also liked (11)

PPT
16 implementation techniques
PPT
15 implementing architectures
PPTX
The software Implementation Process
PDF
What Makes Great Infographics
PDF
Masters of SlideShare
PDF
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
PDF
You Suck At PowerPoint!
PDF
10 Ways to Win at SlideShare SEO & Presentation Optimization
PDF
How To Get More From SlideShare - Super-Simple Tips For Content Marketing
PDF
How to Make Awesome SlideShares: Tips & Tricks
16 implementation techniques
15 implementing architectures
The software Implementation Process
What Makes Great Infographics
Masters of SlideShare
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
You Suck At PowerPoint!
10 Ways to Win at SlideShare SEO & Presentation Optimization
How To Get More From SlideShare - Super-Simple Tips For Content Marketing
How to Make Awesome SlideShares: Tips & Tricks
Ad

Similar to S D D Program Development Tools (20)

PPTX
Debugging
PPTX
Debugging
PPT
Code Analysis-run time error prediction
PPTX
Cp 111 lecture 2
PPTX
Computer programing 111 lecture 2
PPTX
Error detection recovery
PPT
Error Correction Techniques
PPTX
Debbuging
PPTX
The Art of Debugging.pptx
PDF
Debugging.pdf
PPT
Software coding &amp; testing, software engineering
PDF
Chapter 1
PPTX
Debugging Approaches.pptx
PDF
Debugging in Software Engineering SE Unit-4 Part-6.pdf
PPTX
Computational thinking
PPT
CPP10 - Debugging
PDF
(1.4) Identifying and Correcting Errors - PDF.pdf
PDF
Week8
PPTX
SDD error types and detection
PPTX
Software Testing
Debugging
Debugging
Code Analysis-run time error prediction
Cp 111 lecture 2
Computer programing 111 lecture 2
Error detection recovery
Error Correction Techniques
Debbuging
The Art of Debugging.pptx
Debugging.pdf
Software coding &amp; testing, software engineering
Chapter 1
Debugging Approaches.pptx
Debugging in Software Engineering SE Unit-4 Part-6.pdf
Computational thinking
CPP10 - Debugging
(1.4) Identifying and Correcting Errors - PDF.pdf
Week8
SDD error types and detection
Software Testing

More from gavhays (19)

PPT
Data types
PPT
End user development
PPT
Representation Of Data
PPT
N301 Designing Circuits
PPT
Integer Representation
PPT
Binary Arithmetic
PPT
Understanding Flip Flops
PPT
Programming Hardware Devices
PPT
Plp
PPT
Electronic Circuits
PPT
Boolean Algebra
PPT
Sdd Maintenance Of Software Solutions
PPT
Sdd Documentation
PPT
Testing Software Solutions
PPT
Reporting On The Testing Process
PPT
SDD Translation
PPT
The Role Of The Cpu
PPT
Sdd Syntax Descriptions
PPT
Interface Design
Data types
End user development
Representation Of Data
N301 Designing Circuits
Integer Representation
Binary Arithmetic
Understanding Flip Flops
Programming Hardware Devices
Plp
Electronic Circuits
Boolean Algebra
Sdd Maintenance Of Software Solutions
Sdd Documentation
Testing Software Solutions
Reporting On The Testing Process
SDD Translation
The Role Of The Cpu
Sdd Syntax Descriptions
Interface Design

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Big Data Technologies - Introduction.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Dropbox Q2 2025 Financial Results & Investor Presentation
Chapter 3 Spatial Domain Image Processing.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Review of recent advances in non-invasive hemoglobin estimation
Big Data Technologies - Introduction.pptx

S D D Program Development Tools

  • 2. Program Development AIM Highlight a number of techniques and tools available to the software developer to assist in code generation. These resources will help to reduce the number of errors in the final product. First we will look what makes a well developed solution and what are the errors that may occur.
  • 3. The Structured Approach As mentioned before the function of the translator is to report any syntax errors. However, just because a program is syntactically correct it doesn’t mean that it is free of errors. Following a structured approach to developing programs, particularly complex one’s is a way of improving the level of ‘correctness’ in a program.
  • 4. Structured Approach The structured approach promotes the following concepts: Use of a clear modular structure. One logical task per subroutine. Appropriate Documentation. Error free code is more likely to be produced under these circumstances.
  • 5. Modular Structure The use of modularisation is the breaking down of the program into smaller more achievable sub-programs. (Top-down) Each module is tested independently and is only included into the project once it is error free. What are two examples of modelling diagrams that show the top-down approach?
  • 6. One Logical Task What do we mean? Making sure that each sub-program only has one task. e.g. Print, Save, Update. If sub-programs are complex then they become harder to debug. Restricting sub-programs to one task also enhances the reusability of the code.
  • 7. One Logical Task Example In a program that requires THREE processes to be carried out. Read an array from file Sort the array Print the array Each process is a logical task and should therefore be created as a sub-program.
  • 8. Appropriate Documentation Clear documentation within the code, such as comments, appropriate identifier names and indenting of control structures will help in the understanding of the logic of the code. Identifier naming is when you give a variable or constant an intrinsic or meaningful name.
  • 9. Errors There are three types of errors. Syntax Logic Run-time Syntax errors are detected by the translator. Run-time and logic errors occur when the code is executed.
  • 10. Syntax Syntax errors are any errors that prevent the translator from converting the source code into machine code. Examples of syntax errors include: typing mistakes, incorrect punctuation and spelling mistakes. Most syntax errors are picked up in the process of syntactical analysis within translation.
  • 11. Logic Errors Are errors in the design of code that result in incorrect output. Examples include continuos loops and incorrect calculations. i.e. Sum = Num1+Num2/2 Logic errors are the most difficult to detect and can only be identified through desk checking or peer checking.
  • 12. Run-Time Errors Caused through the inability of the computer to perform a task. The error or bug is usually linked to a software or hardware problem. Possible sources of run-time errors include: Incorrect BIOS settings Incorrect use or settings of hardware drivers Application software.
  • 13. Run-Time Errors Errors in the software are due to: Division By Zero errors – This process is not defined by mathematics so it cannot be completed by a computer. i.e. Finding the average of a list if the list is empty. Arithmetic Overflow – Occurs when a value is outside ranges (-32768 to 32767) or there are to many calculations for the processor. Accessing inappropriate memory locations – occur when assign a value to identifier that doesn’t exist.
  • 14. Techniques for Detecting Errors 1. Stubs A stub is a small routine which is yet to be coded into the solution. The use of stubs allows high level modules to be tested. Stubs do not perform any real processing they only simulate processing will occur. Stubs are used to determine if parameters are passed and modules are called.
  • 15. Techniques for Detecting Errors 2. Flags Are used to indicate that a certain condition has been met. (Boolean) Flags are usually used in the termination of a loop. However in debugging they are used to signify that an event has occurred correctly.
  • 16. Techniques for Detecting Errors Debugging Output Statements Is a statement inserted as a line of code to display the value of variables at a particular point in the execution of a program. This allows the programmer to monitor the contents of variables to determine the precise point at which an error has occurred.
  • 17. Activity 1 You are writing a function that sorts an array of data. Unfortunately you have a number of problems. Discuss how the following techniques could be used to isolate the source of errors in your sort function. Stubs Flags Debugging Output Statements.
  • 18. Some Important Points If the function includes calls to other modules these modules could be replaced with stubs where values returned can be known. Temporary flags could be used to identify whether or not particular statements have been executed. Debugging output statements could be used to show the contents of variables at crucial points during operation.
  • 19. Peer Checking Errors often occur that are impossible to correct for the original programmer. Colleagues are able to see the problem from a fresh point of view. Many software development companies require each individual module to be peer checked and formally signed off.
  • 20. Desk Checking Is the process of working through a module by hand. Highlights the contents of each variable and the changes that occur when data is inputted. Often called a structured walkthrough. The process of working through the code statement by statement helps to make the logic clear.
  • 21. Activity 2 Below is a function that will perform a linear search of an array in VB. Public Function Linear(Search(), FindItem) As Boolean Dim Lower, Upper, Count Linear = True Lower = LBound(Search) Upper = UBound(Search) Count = Lower WHILE Count < Upper IF Search(Count) = SearchItem THEN Linear = True Count = Upper END IF Count = Count + 1 END Function
  • 22. Activity 2 Below is the array that is to be searched. Animals(0) = “Frog” Animals(1) = “Dog” Animals(2) = “Cat” Animals(3) = “Cow” Animals(4) = “Ant” To perform a desk check a call routine is entered i.e. Linear(Animals(), “Frog”)
  • 23. Activity 2 The desk check for Linear(Animals(), “Frog”) call is reproduced below: 5 4 True Frog 0 4 0 Frog True Search (Count) Count Upper Lower FindItem Linear
  • 24. Activity 2 Now perform the desk check for Linear(Animals(), “Cat”) call is reproduced below: Search (Count) Count Upper Lower FindItem Linear
  • 25. Activity 2 Now perform the desk check for Linear(Animals(), “Cat”) call is reproduced below: 5 4 True Cat 2 Dog 1 Frog 0 4 0 Cat True Search (Count) Count Upper Lower FindItem Linear
  • 26. Activity 3 There are actually 2 errors in this program, what are they? The function always returns TRUE regardless of the existence of the search item. Should be set to false. The identifier used as the second parameter is called Finditem yet within the code it is SearchItem.
  • 27. Activity 4 “If every path and every boundary condition have been tested and the output matches exactly the expected output then surely the code must be free of errors.” This statement is not true why?
  • 28. Activity 4 Unexpected inputs with different data types or ranges can cause errors. Mathematical errors such as division by zero. Arithmetic errors can occur when the code is logically correct. Communication errors in regards to validating data sent from outside devices.
  • 29. Software Tools for Detecting Errors in Code Most software development environments include tools to assist the programmer in the task of isolating errors in source code. The following three tools are commonly available to assist in the detection of logic and run-time errors. Breakpoints Program Traces Single Line Stepping
  • 30. Breakpoints Are used to temporarily halt the execution of the code. Once the execution has stopped it is possible to view the current value of variables. By adding breakpoints at strategic points in the code it is possible to locate the source of the error.
  • 31. Program Traces Tracing in terms of error detection, refers to tracking the execution of statements and recording the changing contents of variables. Many software environments produce a trace file. The file maintains a log of all the transactions that have taken place.
  • 32. Single-Line Stepping Is the process of halting the execution after each statement is executed. After each step, the values of variables can be displayed and minor changes made. This process can become monotonous. However, variations are provided which allow users to step over functions which may be error-free.
  • 33. Activity 5 “A subroutine is under development that reads a sequential file of records. As each record is read various calculations are made. A logic error exists as some calculations are incorrect.” Explain how the use of single line stepping could be used to isolate the problem.
  • 34. Activity 5 First set up a series of breakpoints to allow the viewing of relevant variables contents. Start the single line stepping process with the watch window open. Progressively step through the code observing the changes occurring in the window watch. The records affected by the logic error should now be identifiable.