SlideShare una empresa de Scribd logo
1 de 22
Prof. Dr. M. A. Pasha
Chairman
Department of CS & IT
University of Sargodha
Computer Programming
Computer programming is not just programming
language syntax and using a development
environment. At its core, computer programming is
solving problems.
Key Objectives should be:
 Making students able to apply an appropriate problem-

solving method for developing an algorithmic solution
to a problem.
 Making students aware of some of the basic ethical
issues confronting computing professionals.
Phases of Problem Solving
Phases of Computer Programming
Problem-Solving Phase

1. Analysis and Specification. Understand (define) the
problem and what the solution must do.
2. General Solution (Algorithm). Specify the required data
types and the logical sequences of steps that solve the
problem.
3. Verify. Follow the steps exactly to see if the solution really
does solve the problem.
Implementation Phase
1. Concrete Solution (Program). Translate the algorithm (the general
solution) into a programming language.
2. Test. Have the computer follow the instructions. Then manually check the
results. If you find errors, analyze the program and the algorithm to determine
the source of the errors, and then make corrections.
Maintenance Phase
1. Use. Use the program.
2. Maintain. Modify the program to meet changing requirements or to correct
any errors that show up while using it.
Example
Problem: Calculate volume of a box of given dimensions
(width, length, height).
 The first step to solving any problem is to decompose the
problem description (syntactic analysis)
 Identify all of the nouns in the sentence (Determine the

volume of a box of given dimensions (width, length, height).
 Eliminate redundant or irrelevant information ( box,
dimensions). Rule of Thumb: eliminate the most general
items.
 Divide the remaining nouns into two categories; Input and
Output




Inputs: width, length, height
Output: volume

 Identify all of the verbs in the problem statement (processes).
 Calculate
Example (cont.)
 Link your inputs, processes, and output

Input
width
length
height

Processing
Calculate

Output
volume

 Use external knowledge to complete your solution

Volume = width * length * height
Example (Cont.)
Algorithm Development using Pseudo code
Get length, width, height
Compute volume
volume = length * width * height
Store volume
Display volume
Example 2 (Decision Making)
Example 3: Looping
Convince students not to Adopt
Shortcut
Types of Programmers
Types of Students:
 Stoppers: In problematic situation, simply stop and

abandon all hope of solving the problem on their own
 Movers: In problematic situation, keep trying,
modifying their code and use feedback about errors
effectively
 Tinkerers: they are extreme movers. They cannot track
their program, make changes more or less randomly, and
like stoppers do not progress very much in their task.
Characteristics of Novice
Programmers (Cont.)
 Limited to surface knowledge of programs and

generally approach programming "line by line" rather
than at the level of bigger program structures.
 Spend little time in planning and testing code, and
when necessary, try to correct their programs with
small local fixes instead of more thoroughly
reformulating programs.
 The knowledge of novices tends to be context specific
rather than general , and
 Often fail to apply correctly the knowledge they have
obtained.
Where Lies the Problem?
 The main source of difficulty does not seem to be the

syntax or understanding of concepts, but rather basic
program planning.
 A student can explain what does a pointer do, but still
fails to use it appropriately in a program.
 Students may know the syntax and semantics of
individual statements, but they do not know how to
combine these features into valid programs.
Approaches to Teaching
Programming
 Bottom-up: predominantly focuses on teaching of the

details of syntax and implementation of data structures
concepts. (Stereotype approach)
 Top-down: focuses on understanding the abstractions of
classical data structures regardless of their physical
implementation.
 Hard for stereotype teachers to think about the abstract

behavior of the implemented structures.
 Uses components rather than their implementation enable
students to do “interesting” things much earlier than they can
in the B-Up-Approach.
 A program is a collection of large components interacting
with each other rather than a single very long sequence of
basic instructions.
Four Approaches to Teaching
Computer Programming
Code Analysis
2. Building Blocks
3. Simple Units
4. Full systems
1.
Code Analysis
 Learners learn to analyze and understand existing

code prior to producing their own.
 Learners read and understand programming logic
before writing their own. This approach is based on
the use of pseudocode so it is not programming
language dependent.
 The ability to explain programming logic and code
appears to be a prerequisite for the ability to write
code. ( Campbell and Bolker, 2002); Kölling and
Rosenberg, 2001)
Building Blocks
 Learning syntax and semantic before developing

serious application.
 Learners develop an understanding of individual
pieces before combining the pieces to create meaning.
 Language constructs are introduced and understood
one at a time, in isolation, before combining them.
 By combining basic constructs into simple units that
solve small well-defined problems, learners can create
toolboxes of useful and reusable code fragments.
Simple Units
 Learners master solutions to small problems before

applying the learned logic to more complex problems.
 The simple units approach is analogous to learning to
speak a language from a phrase book with a limited
vocabulary.
Full systems
 Learners design a solution to a non-trivial problem and the

programming concepts and language constructs are
introduced only when the solution to the problem requires
their application.
 For example, a 2-player game of tic-tac-toe could serve as
an introductory problem. To produce this, learners would
need to demonstrate skills in decomposition
(understanding the problem), handling inputs from the
keyboard, displaying outputs in some format, tracking
turns (variables/ assignments), determining availability of
position (selection/conditional), and identifying a winning
move (repetition). The language constructs would be
introduced only when that part of the problem needs to be
solved. (Duke, et al, 2000; Sattar & Lorenzen, 2009).
What is Required?
 The art of programming includes
 knowledge of programming tools and languages,
 problem-solving skills, and
 effective strategies for program design and implementation.
 Visualization: Programmers can build solutions both in their
minds and on a computer.
 Skills: code analysis (tracing and explaining), in

understanding block behaviours (tracing and explaining),
in constructing simple units (writing), in combining
simple units to create full systems (writing), debugging.
 Constructivism (Ben-Ari , 1998), Learning theory and
pedagogical methods support this idea.
Pedagogical Guideline
 Teacher-centred learning: the teacher transmit knowledge








and students are passive recipients; teachers put more
emphasis on the knowledge itself rather than developing
students’ learning skills.
Student –centered learning focuses on the students’
learning; knowledge is constructed by students and the
teacher is only a facilitator (Harden and Crosby 2000).
Peer learning methods
Group work
Peer tutoring
E-learning
Any Question Please

Más contenido relacionado

La actualidad más candente

Syllabus for digital citizenship
Syllabus for digital citizenshipSyllabus for digital citizenship
Syllabus for digital citizenshiploraevanouski
 
Meda5400TechnologyIntegrationPlanning(TIP)Model
Meda5400TechnologyIntegrationPlanning(TIP)ModelMeda5400TechnologyIntegrationPlanning(TIP)Model
Meda5400TechnologyIntegrationPlanning(TIP)ModelMichelle Childress
 
Cybernetical Mathematics Teaching Interventions,
Cybernetical Mathematics Teaching Interventions, Cybernetical Mathematics Teaching Interventions,
Cybernetical Mathematics Teaching Interventions, arammann
 
Marcus Thompson Multimedia Principle
Marcus Thompson Multimedia PrincipleMarcus Thompson Multimedia Principle
Marcus Thompson Multimedia PrincipleMarcus Thompson M.Ed.
 
Integrating an intelligent tutoring system into a virtual world
Integrating an intelligent tutoring system into a virtual worldIntegrating an intelligent tutoring system into a virtual world
Integrating an intelligent tutoring system into a virtual worldParvati Dev
 
Intelligent tutoring systems (ITS) for online learning
Intelligent tutoring systems (ITS) for online learningIntelligent tutoring systems (ITS) for online learning
Intelligent tutoring systems (ITS) for online learningBrandon Muramatsu
 
View Accepted Proposal
View Accepted ProposalView Accepted Proposal
View Accepted Proposalcsungwoo
 
Students’ Perception about Fundamental Programming Course Teaching and Learning
Students’ Perception about Fundamental Programming Course Teaching and LearningStudents’ Perception about Fundamental Programming Course Teaching and Learning
Students’ Perception about Fundamental Programming Course Teaching and Learningrahulmonikasharma
 
Design concept and consideration
Design concept and considerationDesign concept and consideration
Design concept and considerationJazzyzee
 
Learn Basics Of Instructional Design
Learn Basics Of Instructional DesignLearn Basics Of Instructional Design
Learn Basics Of Instructional DesignJagdeepKaur70
 
Need analysis for the development of a microcontroller instructional module p...
Need analysis for the development of a microcontroller instructional module p...Need analysis for the development of a microcontroller instructional module p...
Need analysis for the development of a microcontroller instructional module p...journalBEEI
 
NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT (UNIT 5) - TEACHING MACHINES AN...
NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT  (UNIT 5) - TEACHING MACHINES AN...NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT  (UNIT 5) - TEACHING MACHINES AN...
NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT (UNIT 5) - TEACHING MACHINES AN...EqraBaig
 
Educational Equity and Tech
Educational Equity and TechEducational Equity and Tech
Educational Equity and TechJesse Kennedy
 
Teacher toolkit Pycon UK Sept 2018
Teacher toolkit Pycon UK Sept 2018Teacher toolkit Pycon UK Sept 2018
Teacher toolkit Pycon UK Sept 2018Sue Sentance
 
Technology Integration in the ES Math Classroom
Technology Integration in the ES Math ClassroomTechnology Integration in the ES Math Classroom
Technology Integration in the ES Math Classroomstrifman
 
Microteaching (Critical Thinking - adapted for 1st Year JC Students)
Microteaching (Critical Thinking - adapted for 1st Year JC Students)Microteaching (Critical Thinking - adapted for 1st Year JC Students)
Microteaching (Critical Thinking - adapted for 1st Year JC Students)Mark Chia
 
Recent developments in CS education research Jul 18
Recent developments in CS education research Jul 18Recent developments in CS education research Jul 18
Recent developments in CS education research Jul 18Sue Sentance
 

La actualidad más candente (19)

Syllabus for digital citizenship
Syllabus for digital citizenshipSyllabus for digital citizenship
Syllabus for digital citizenship
 
Meda5400TechnologyIntegrationPlanning(TIP)Model
Meda5400TechnologyIntegrationPlanning(TIP)ModelMeda5400TechnologyIntegrationPlanning(TIP)Model
Meda5400TechnologyIntegrationPlanning(TIP)Model
 
Cybernetical Mathematics Teaching Interventions,
Cybernetical Mathematics Teaching Interventions, Cybernetical Mathematics Teaching Interventions,
Cybernetical Mathematics Teaching Interventions,
 
Educational Technology - Computer based instruction
Educational Technology - Computer based instructionEducational Technology - Computer based instruction
Educational Technology - Computer based instruction
 
Marcus Thompson Multimedia Principle
Marcus Thompson Multimedia PrincipleMarcus Thompson Multimedia Principle
Marcus Thompson Multimedia Principle
 
Integrating an intelligent tutoring system into a virtual world
Integrating an intelligent tutoring system into a virtual worldIntegrating an intelligent tutoring system into a virtual world
Integrating an intelligent tutoring system into a virtual world
 
Intelligent tutoring systems (ITS) for online learning
Intelligent tutoring systems (ITS) for online learningIntelligent tutoring systems (ITS) for online learning
Intelligent tutoring systems (ITS) for online learning
 
View Accepted Proposal
View Accepted ProposalView Accepted Proposal
View Accepted Proposal
 
Students’ Perception about Fundamental Programming Course Teaching and Learning
Students’ Perception about Fundamental Programming Course Teaching and LearningStudents’ Perception about Fundamental Programming Course Teaching and Learning
Students’ Perception about Fundamental Programming Course Teaching and Learning
 
Design concept and consideration
Design concept and considerationDesign concept and consideration
Design concept and consideration
 
Learn Basics Of Instructional Design
Learn Basics Of Instructional DesignLearn Basics Of Instructional Design
Learn Basics Of Instructional Design
 
Need analysis for the development of a microcontroller instructional module p...
Need analysis for the development of a microcontroller instructional module p...Need analysis for the development of a microcontroller instructional module p...
Need analysis for the development of a microcontroller instructional module p...
 
NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT (UNIT 5) - TEACHING MACHINES AN...
NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT  (UNIT 5) - TEACHING MACHINES AN...NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT  (UNIT 5) - TEACHING MACHINES AN...
NON-BROADCAST MEDIA - REPROGRAPHIC EQUIPMENT (UNIT 5) - TEACHING MACHINES AN...
 
Educational Equity and Tech
Educational Equity and TechEducational Equity and Tech
Educational Equity and Tech
 
Teacher toolkit Pycon UK Sept 2018
Teacher toolkit Pycon UK Sept 2018Teacher toolkit Pycon UK Sept 2018
Teacher toolkit Pycon UK Sept 2018
 
Technology Integration in the ES Math Classroom
Technology Integration in the ES Math ClassroomTechnology Integration in the ES Math Classroom
Technology Integration in the ES Math Classroom
 
Microteaching (Critical Thinking - adapted for 1st Year JC Students)
Microteaching (Critical Thinking - adapted for 1st Year JC Students)Microteaching (Critical Thinking - adapted for 1st Year JC Students)
Microteaching (Critical Thinking - adapted for 1st Year JC Students)
 
Recent developments in CS education research Jul 18
Recent developments in CS education research Jul 18Recent developments in CS education research Jul 18
Recent developments in CS education research Jul 18
 
Econ
EconEcon
Econ
 

Similar a Teaching of computer programming

The I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningThe I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningSue Sentance
 
SULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notesSULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notesSULTHAN BASHA
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2ITNet
 
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptxSOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptxSanthanalakshmiSelva2
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5Alok Jain
 
Determining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice ProgrammersDetermining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice ProgrammersWaqas Tariq
 
Programming of c++
Programming of c++Programming of c++
Programming of c++Ateeq Sindhu
 
CS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdf
CS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdfCS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdf
CS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdfTitoMido1
 
Ppt about programming in methodology
Ppt about programming in methodology Ppt about programming in methodology
Ppt about programming in methodology Vaishnavirakshe2
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++KurdGul
 
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...ijpla
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai1
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai
 
Java@intro to programming
Java@intro to programmingJava@intro to programming
Java@intro to programmingArvin Buendia
 
Programming Theory
Programming TheoryProgramming Theory
Programming Theoryiarthur
 

Similar a Teaching of computer programming (20)

The I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningThe I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and Questioning
 
SULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notesSULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notes
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2
 
Cp 111 lecture 2
Cp 111 lecture 2Cp 111 lecture 2
Cp 111 lecture 2
 
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptxSOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
 
Brochure curriculum (1)
Brochure curriculum (1)Brochure curriculum (1)
Brochure curriculum (1)
 
Determining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice ProgrammersDetermining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice Programmers
 
Programming of c++
Programming of c++Programming of c++
Programming of c++
 
CS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdf
CS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdfCS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdf
CS251 Intro. to SE [Lec. 0 - Course Introduction & Plan] Spring 2022.pdf
 
Ppt about programming in methodology
Ppt about programming in methodology Ppt about programming in methodology
Ppt about programming in methodology
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
 
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
Java@intro to programming
Java@intro to programmingJava@intro to programming
Java@intro to programming
 
17 pcds syllabus
17 pcds syllabus17 pcds syllabus
17 pcds syllabus
 
Unit 1 OOSE
Unit 1 OOSEUnit 1 OOSE
Unit 1 OOSE
 
Programming Theory
Programming TheoryProgramming Theory
Programming Theory
 

Último

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Último (20)

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

Teaching of computer programming

  • 1. Prof. Dr. M. A. Pasha Chairman Department of CS & IT University of Sargodha
  • 2. Computer Programming Computer programming is not just programming language syntax and using a development environment. At its core, computer programming is solving problems. Key Objectives should be:  Making students able to apply an appropriate problem- solving method for developing an algorithmic solution to a problem.  Making students aware of some of the basic ethical issues confronting computing professionals.
  • 4. Phases of Computer Programming Problem-Solving Phase 1. Analysis and Specification. Understand (define) the problem and what the solution must do. 2. General Solution (Algorithm). Specify the required data types and the logical sequences of steps that solve the problem. 3. Verify. Follow the steps exactly to see if the solution really does solve the problem. Implementation Phase 1. Concrete Solution (Program). Translate the algorithm (the general solution) into a programming language. 2. Test. Have the computer follow the instructions. Then manually check the results. If you find errors, analyze the program and the algorithm to determine the source of the errors, and then make corrections. Maintenance Phase 1. Use. Use the program. 2. Maintain. Modify the program to meet changing requirements or to correct any errors that show up while using it.
  • 5. Example Problem: Calculate volume of a box of given dimensions (width, length, height).  The first step to solving any problem is to decompose the problem description (syntactic analysis)  Identify all of the nouns in the sentence (Determine the volume of a box of given dimensions (width, length, height).  Eliminate redundant or irrelevant information ( box, dimensions). Rule of Thumb: eliminate the most general items.  Divide the remaining nouns into two categories; Input and Output   Inputs: width, length, height Output: volume  Identify all of the verbs in the problem statement (processes).  Calculate
  • 6. Example (cont.)  Link your inputs, processes, and output Input width length height Processing Calculate Output volume  Use external knowledge to complete your solution Volume = width * length * height
  • 7. Example (Cont.) Algorithm Development using Pseudo code Get length, width, height Compute volume volume = length * width * height Store volume Display volume
  • 10. Convince students not to Adopt Shortcut
  • 11. Types of Programmers Types of Students:  Stoppers: In problematic situation, simply stop and abandon all hope of solving the problem on their own  Movers: In problematic situation, keep trying, modifying their code and use feedback about errors effectively  Tinkerers: they are extreme movers. They cannot track their program, make changes more or less randomly, and like stoppers do not progress very much in their task.
  • 12. Characteristics of Novice Programmers (Cont.)  Limited to surface knowledge of programs and generally approach programming "line by line" rather than at the level of bigger program structures.  Spend little time in planning and testing code, and when necessary, try to correct their programs with small local fixes instead of more thoroughly reformulating programs.  The knowledge of novices tends to be context specific rather than general , and  Often fail to apply correctly the knowledge they have obtained.
  • 13. Where Lies the Problem?  The main source of difficulty does not seem to be the syntax or understanding of concepts, but rather basic program planning.  A student can explain what does a pointer do, but still fails to use it appropriately in a program.  Students may know the syntax and semantics of individual statements, but they do not know how to combine these features into valid programs.
  • 14. Approaches to Teaching Programming  Bottom-up: predominantly focuses on teaching of the details of syntax and implementation of data structures concepts. (Stereotype approach)  Top-down: focuses on understanding the abstractions of classical data structures regardless of their physical implementation.  Hard for stereotype teachers to think about the abstract behavior of the implemented structures.  Uses components rather than their implementation enable students to do “interesting” things much earlier than they can in the B-Up-Approach.  A program is a collection of large components interacting with each other rather than a single very long sequence of basic instructions.
  • 15. Four Approaches to Teaching Computer Programming Code Analysis 2. Building Blocks 3. Simple Units 4. Full systems 1.
  • 16. Code Analysis  Learners learn to analyze and understand existing code prior to producing their own.  Learners read and understand programming logic before writing their own. This approach is based on the use of pseudocode so it is not programming language dependent.  The ability to explain programming logic and code appears to be a prerequisite for the ability to write code. ( Campbell and Bolker, 2002); Kölling and Rosenberg, 2001)
  • 17. Building Blocks  Learning syntax and semantic before developing serious application.  Learners develop an understanding of individual pieces before combining the pieces to create meaning.  Language constructs are introduced and understood one at a time, in isolation, before combining them.  By combining basic constructs into simple units that solve small well-defined problems, learners can create toolboxes of useful and reusable code fragments.
  • 18. Simple Units  Learners master solutions to small problems before applying the learned logic to more complex problems.  The simple units approach is analogous to learning to speak a language from a phrase book with a limited vocabulary.
  • 19. Full systems  Learners design a solution to a non-trivial problem and the programming concepts and language constructs are introduced only when the solution to the problem requires their application.  For example, a 2-player game of tic-tac-toe could serve as an introductory problem. To produce this, learners would need to demonstrate skills in decomposition (understanding the problem), handling inputs from the keyboard, displaying outputs in some format, tracking turns (variables/ assignments), determining availability of position (selection/conditional), and identifying a winning move (repetition). The language constructs would be introduced only when that part of the problem needs to be solved. (Duke, et al, 2000; Sattar & Lorenzen, 2009).
  • 20. What is Required?  The art of programming includes  knowledge of programming tools and languages,  problem-solving skills, and  effective strategies for program design and implementation.  Visualization: Programmers can build solutions both in their minds and on a computer.  Skills: code analysis (tracing and explaining), in understanding block behaviours (tracing and explaining), in constructing simple units (writing), in combining simple units to create full systems (writing), debugging.  Constructivism (Ben-Ari , 1998), Learning theory and pedagogical methods support this idea.
  • 21. Pedagogical Guideline  Teacher-centred learning: the teacher transmit knowledge      and students are passive recipients; teachers put more emphasis on the knowledge itself rather than developing students’ learning skills. Student –centered learning focuses on the students’ learning; knowledge is constructed by students and the teacher is only a facilitator (Harden and Crosby 2000). Peer learning methods Group work Peer tutoring E-learning