SlideShare a Scribd company logo
The Pseudo code
Programming Process
Code Complete
Author : Steven C. McConnell.

Prof. Asha N

1
Summary of Steps in Building Classes
and Routines




Creating a general
design for the class is an
iterative process
class creation can be a
messy process for all the
reasons that design is a
messy process

Prof. Asha N

2
Steps in Creating a Class




Create a general design for the class
Construct each routine within the class
Review and test the class as a whole

Prof. Asha N

3
Steps in Building a Routine


creating a routine—
designing the routine,
checking the design,
coding the routine,
and checking the
code

Prof. Asha N

4
Pseudo code for Pros




“pseudocode” – English-like notation for
describing how an algorithm, a routine, a
class, or a program will work
Pseudocode Programming Process (PPP)
defines a specific approach to use
pseudocode to streamline the creation of
code within routines.

Prof. Asha N

5
Contd…
guidelines for using pseudocode





Use English-like statements that precisely
describe specific operations.
Avoid syntactic elements from the target
programming language.
Write pseudocode at the level of intent.
Write pseudocode at a low enough level that
generating code from it will be nearly automatic.

Prof. Asha N

6
Contd…


Example of Bad Pseudocode
increment resource number by 1
allocate a dlg struct using malloc
if malloc() returns NULL then return 1
invoke OSrsrc_init to initialize a resource for the operating system
*hRsrcPtr = resource number
return 0

Prof. Asha N

7
Contd…


Example of Good Pseudocode
Keep track of current number of resources in use
If another resource is available
Allocate a dialog box structure
If a dialog box structure could be allocated
Note that one more resource is in use
Initialize the resource
Store the resource number at the location provided by the caller
Endif
Endif
Return TRUE if a new resource was created; else return FALSE

Prof. Asha N

8
Constructing Routines Using the PPP


the activities involved in constructing a
routine
1.
2.
3.
4.
5.

Design the routine
Code the routine
Check the code
Clean up leftovers
Repeat as needed

Prof. Asha N

9
1. Design the Routine













Check the prerequisites
Define the problem the routine will solve
Name the routine
Decide how to test the routine
Think about error handling
Think about efficiency
Research functionality available in the standard libraries
Research the algorithms and data types
Write the pseudocode
Think about the data
Check the pseudocode
Try a few ideas in pseudocode, and keep the best (iterate)

Prof. Asha N

10
2. Code the Routine

Prof. Asha N

11
3. Check the Code







Mentally check the routine for errors
Compile the routine
Step through the code in the debugger
Test the code
Remove errors from the routine

Prof. Asha N

12
4. Clean Up Leftovers


take several cleanup steps to make sure that the
routine’s quality is up to your standards









Check the routine’s interface
Check for general design quality
Check the routine’s data
Check the routine’s statements and logic
Check the routine’s layout
Check the routine’s documentation.
Remove redundant comments

Prof. Asha N

13
5. Repeat Steps as Needed


If the quality of the routine is poor, back up to the
pseudocode. High-quality programming is an
iterative process, so don’t hesitate to loop through
the construction activities again.

Prof. Asha N

14

More Related Content

What's hot (20)

PPTX
Introduction of c programming
Tarun Sharma
 
PPTX
structured programming
Ahmad54321
 
PPTX
Introduction to Algorithm
ChristopherEsteban2
 
PPTX
DeadLock in Operating-Systems
Venkata Sreeram
 
PDF
R - mean, median and mode
Learnbay Datascience
 
PPTX
Relational model
Dabbal Singh Mahara
 
PPT
Intermediate code generation (Compiler Design)
Tasif Tanzim
 
PDF
Software Engineering - Ch1
Siddharth Ayer
 
PPTX
Importance of software engineering
SRM Easwari engineering college, Ramapuram, Chennai
 
PPTX
C++ Overview PPT
Thooyavan Venkatachalam
 
PPT
CSCI-383 Lecture 3-4: Abstraction
JI Ruan
 
PPTX
Basic Input and Output
Nurul Zakiah Zamri Tan
 
PPTX
Loop(for, while, do while) condition Presentation
Badrul Alam
 
PPTX
data types in C programming
Harshita Yadav
 
PPTX
Function in C program
Nurul Zakiah Zamri Tan
 
PPTX
4.3 techniques for turing machines construction
Sampath Kumar S
 
PPTX
Functions in C
Kamal Acharya
 
PPTX
Bootstrapping in Compiler
Akhil Kaushik
 
PPT
Introduction to c#
OpenSource Technologies Pvt. Ltd.
 
Introduction of c programming
Tarun Sharma
 
structured programming
Ahmad54321
 
Introduction to Algorithm
ChristopherEsteban2
 
DeadLock in Operating-Systems
Venkata Sreeram
 
R - mean, median and mode
Learnbay Datascience
 
Relational model
Dabbal Singh Mahara
 
Intermediate code generation (Compiler Design)
Tasif Tanzim
 
Software Engineering - Ch1
Siddharth Ayer
 
Importance of software engineering
SRM Easwari engineering college, Ramapuram, Chennai
 
C++ Overview PPT
Thooyavan Venkatachalam
 
CSCI-383 Lecture 3-4: Abstraction
JI Ruan
 
Basic Input and Output
Nurul Zakiah Zamri Tan
 
Loop(for, while, do while) condition Presentation
Badrul Alam
 
data types in C programming
Harshita Yadav
 
Function in C program
Nurul Zakiah Zamri Tan
 
4.3 techniques for turing machines construction
Sampath Kumar S
 
Functions in C
Kamal Acharya
 
Bootstrapping in Compiler
Akhil Kaushik
 

Viewers also liked (20)

DOC
Pseudocode
Guy09
 
PPTX
Introduction to Pseudocode
Damian T. Gordon
 
PPT
Pseudocode basics
kiran_kaur
 
PPTX
Algorithm and pseudo codes
hermiraguilar
 
PPT
4a searching-more
Shahzad Ali
 
PDF
Pseudocode By ZAK
Tabsheer Hasan
 
PPT
Basic concepts
Huma Ayub
 
PPTX
Pseudocode
Harsha Madushanka
 
PPTX
Pseudocode
grahamwell
 
PDF
Defencive programming
Asha Sari
 
PDF
Integration
Asha Sari
 
PDF
Design in construction
Asha Sari
 
PPTX
Variables
Maha Saad
 
PPT
A Guideline to Test Your Own Code - Developer Testing
Folio3 Software
 
PDF
高品質軟體的基本動作 101 + 102 for NUU
Su Jan
 
PDF
Code tuning techniques
Asha Sari
 
PPTX
Java scriptcore brief introduction
Horky Chen
 
PDF
程序员发展漫谈
Horky Chen
 
PDF
Coding Style
Hung-Wei Liu
 
PPT
代码大全(内训)
Horky Chen
 
Pseudocode
Guy09
 
Introduction to Pseudocode
Damian T. Gordon
 
Pseudocode basics
kiran_kaur
 
Algorithm and pseudo codes
hermiraguilar
 
4a searching-more
Shahzad Ali
 
Pseudocode By ZAK
Tabsheer Hasan
 
Basic concepts
Huma Ayub
 
Pseudocode
Harsha Madushanka
 
Pseudocode
grahamwell
 
Defencive programming
Asha Sari
 
Integration
Asha Sari
 
Design in construction
Asha Sari
 
Variables
Maha Saad
 
A Guideline to Test Your Own Code - Developer Testing
Folio3 Software
 
高品質軟體的基本動作 101 + 102 for NUU
Su Jan
 
Code tuning techniques
Asha Sari
 
Java scriptcore brief introduction
Horky Chen
 
程序员发展漫谈
Horky Chen
 
Coding Style
Hung-Wei Liu
 
代码大全(内训)
Horky Chen
 
Ad

Similar to The pseudocode (20)

PPTX
softwaree construction and development scd
Sami Mughal
 
PPTX
PCCF UNIT 1.pptx
DivyaKS12
 
PPTX
introduction to computing & programming
Kalai Selvi
 
PPSX
Ds02 flow chart and pseudo code
jyoti_lakhani
 
PPTX
Algorithm,Pseudocode,Flowchart.pptx
DrThenmozhiKarunanit
 
PDF
DAA Unit 1.pdf
Nirmalavenkatachalam
 
PPTX
Programming C ppt for learning foundations
ssuser65733f
 
PDF
Unit 1-problem solving with algorithm
rajkumar1631010038
 
DOCX
Chapter 2(1)
TejaswiB4
 
PPTX
Unit 1 c programming language Tut and notes
achiver792
 
PDF
ICP - Lecture 6
Hassaan Rahman
 
PPTX
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
PPT
Data Structures- Part1 overview and review
Abdullah Al-hazmy
 
PPT
3 algorithm-and-flowchart
Rohit Shrivastava
 
PPTX
Algorithm and pseudocode conventions
saranyatdr
 
PPT
Program design and problem solving techniques
Dokka Srinivasu
 
PPT
Ch1 principles of software development
Hattori Sidek
 
PDF
Procedural Programming Unleashing Algorithmic Power Theophilus Edet
goforkveum
 
PPTX
Week10 final
Irfan Ali Memon
 
PPT
Intro to prog
Chaffey College
 
softwaree construction and development scd
Sami Mughal
 
PCCF UNIT 1.pptx
DivyaKS12
 
introduction to computing & programming
Kalai Selvi
 
Ds02 flow chart and pseudo code
jyoti_lakhani
 
Algorithm,Pseudocode,Flowchart.pptx
DrThenmozhiKarunanit
 
DAA Unit 1.pdf
Nirmalavenkatachalam
 
Programming C ppt for learning foundations
ssuser65733f
 
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Chapter 2(1)
TejaswiB4
 
Unit 1 c programming language Tut and notes
achiver792
 
ICP - Lecture 6
Hassaan Rahman
 
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Data Structures- Part1 overview and review
Abdullah Al-hazmy
 
3 algorithm-and-flowchart
Rohit Shrivastava
 
Algorithm and pseudocode conventions
saranyatdr
 
Program design and problem solving techniques
Dokka Srinivasu
 
Ch1 principles of software development
Hattori Sidek
 
Procedural Programming Unleashing Algorithmic Power Theophilus Edet
goforkveum
 
Week10 final
Irfan Ali Memon
 
Intro to prog
Chaffey College
 
Ad

Recently uploaded (20)

PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
PPTX
Different types of inheritance in odoo 18
Celine George
 
PPTX
How to Manage Expiry Date in Odoo 18 Inventory
Celine George
 
PPTX
SD_GMRC5_Session 6AB_Dulog Pedagohikal at Pagtataya (1).pptx
NickeyArguelles
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
PDF
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
PPTX
Building Powerful Agentic AI with Google ADK, MCP, RAG, and Ollama.pptx
Tamanna36
 
PDF
I3PM Industry Case Study Siemens on Strategic and Value-Oriented IP Management
MIPLM
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
PDF
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
PPTX
Marketing Management PPT Unit 1 and Unit 2.pptx
Sri Ramakrishna College of Arts and science
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
Different types of inheritance in odoo 18
Celine George
 
How to Manage Expiry Date in Odoo 18 Inventory
Celine George
 
SD_GMRC5_Session 6AB_Dulog Pedagohikal at Pagtataya (1).pptx
NickeyArguelles
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
Building Powerful Agentic AI with Google ADK, MCP, RAG, and Ollama.pptx
Tamanna36
 
I3PM Industry Case Study Siemens on Strategic and Value-Oriented IP Management
MIPLM
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Introduction presentation of the patentbutler tool
MIPLM
 
Horarios de distribución de agua en julio
pegazohn1978
 
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
Marketing Management PPT Unit 1 and Unit 2.pptx
Sri Ramakrishna College of Arts and science
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 

The pseudocode

  • 1. The Pseudo code Programming Process Code Complete Author : Steven C. McConnell. Prof. Asha N 1
  • 2. Summary of Steps in Building Classes and Routines   Creating a general design for the class is an iterative process class creation can be a messy process for all the reasons that design is a messy process Prof. Asha N 2
  • 3. Steps in Creating a Class    Create a general design for the class Construct each routine within the class Review and test the class as a whole Prof. Asha N 3
  • 4. Steps in Building a Routine  creating a routine— designing the routine, checking the design, coding the routine, and checking the code Prof. Asha N 4
  • 5. Pseudo code for Pros   “pseudocode” – English-like notation for describing how an algorithm, a routine, a class, or a program will work Pseudocode Programming Process (PPP) defines a specific approach to use pseudocode to streamline the creation of code within routines. Prof. Asha N 5
  • 6. Contd… guidelines for using pseudocode     Use English-like statements that precisely describe specific operations. Avoid syntactic elements from the target programming language. Write pseudocode at the level of intent. Write pseudocode at a low enough level that generating code from it will be nearly automatic. Prof. Asha N 6
  • 7. Contd…  Example of Bad Pseudocode increment resource number by 1 allocate a dlg struct using malloc if malloc() returns NULL then return 1 invoke OSrsrc_init to initialize a resource for the operating system *hRsrcPtr = resource number return 0 Prof. Asha N 7
  • 8. Contd…  Example of Good Pseudocode Keep track of current number of resources in use If another resource is available Allocate a dialog box structure If a dialog box structure could be allocated Note that one more resource is in use Initialize the resource Store the resource number at the location provided by the caller Endif Endif Return TRUE if a new resource was created; else return FALSE Prof. Asha N 8
  • 9. Constructing Routines Using the PPP  the activities involved in constructing a routine 1. 2. 3. 4. 5. Design the routine Code the routine Check the code Clean up leftovers Repeat as needed Prof. Asha N 9
  • 10. 1. Design the Routine             Check the prerequisites Define the problem the routine will solve Name the routine Decide how to test the routine Think about error handling Think about efficiency Research functionality available in the standard libraries Research the algorithms and data types Write the pseudocode Think about the data Check the pseudocode Try a few ideas in pseudocode, and keep the best (iterate) Prof. Asha N 10
  • 11. 2. Code the Routine Prof. Asha N 11
  • 12. 3. Check the Code      Mentally check the routine for errors Compile the routine Step through the code in the debugger Test the code Remove errors from the routine Prof. Asha N 12
  • 13. 4. Clean Up Leftovers  take several cleanup steps to make sure that the routine’s quality is up to your standards        Check the routine’s interface Check for general design quality Check the routine’s data Check the routine’s statements and logic Check the routine’s layout Check the routine’s documentation. Remove redundant comments Prof. Asha N 13
  • 14. 5. Repeat Steps as Needed  If the quality of the routine is poor, back up to the pseudocode. High-quality programming is an iterative process, so don’t hesitate to loop through the construction activities again. Prof. Asha N 14