0
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 ...
Phases of Problem Solving
Phases of Computer Programming
Problem-Solving Phase

1. Analysis and Specification. Understand (define) the
problem and w...
Example
Problem: Calculate volume of a box of given dimensions
(width, length, height).
 The first step to solving any pr...
Example (cont.)
 Link your inputs, processes, and output

Input
width
length
height

Processing
Calculate

Output
volume
...
Example (Cont.)
Algorithm Development using Pseudo code
Get length, width, height
Compute volume
volume = length * width *...
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...
Characteristics of Novice
Programmers (Cont.)
 Limited to surface knowledge of programs and

generally approach programmi...
Where Lies the Problem?
 The main source of difficulty does not seem to be the

syntax or understanding of concepts, but ...
Approaches to Teaching
Programming
 Bottom-up: predominantly focuses on teaching of the

details of syntax and implementa...
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 ...
Building Blocks
 Learning syntax and semantic before developing

serious application.
 Learners develop an understanding...
Simple Units
 Learners master solutions to small problems before

applying the learned logic to more complex problems.
 ...
Full systems
 Learners design a solution to a non-trivial problem and the

programming concepts and language constructs a...
What is Required?
 The art of programming includes
 knowledge of programming tools and languages,
 problem-solving skil...
Pedagogical Guideline
 Teacher-centred learning: the teacher transmit knowledge








and students are passive rec...
Any Question Please
Upcoming SlideShare
Loading in...5
×

Teaching of computer programming

483

Published on

Computer programming is the heart of computing education. It is a fundamental skill that all computing students are required to learn. However, programming courses are generally considered among the most difficult course and often have the highest dropout rates. The main concern is what concerns of computing faculty is to improve students’ motivation in getting involved in meaningful programming activities. This requires special skills to teach programming. A teacher training workshop was arranged at Directorate of Staff Development for newly inducted Computer Science teachers. The workshop covers various approaches proposed in literature for teaching computer programming. Some useful guidelines have also been suggested. These are the slides of this workshop.

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
483
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
26
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Teaching of computer programming"

  1. 1. Prof. Dr. M. A. Pasha Chairman Department of CS & IT University of Sargodha
  2. 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.
  3. 3. Phases of Problem Solving
  4. 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. 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. 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. 7. Example (Cont.) Algorithm Development using Pseudo code Get length, width, height Compute volume volume = length * width * height Store volume Display volume
  8. 8. Example 2 (Decision Making)
  9. 9. Example 3: Looping
  10. 10. Convince students not to Adopt Shortcut
  11. 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. 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. 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. 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. 15. Four Approaches to Teaching Computer Programming Code Analysis 2. Building Blocks 3. Simple Units 4. Full systems 1.
  16. 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. 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. 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. 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. 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. 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
  22. 22. Any Question Please
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×