Programming made easy
Transferring knowledge effectively largely depends on the teaching methodology followed. Teaching programming is more difficult than teaching any other course because of its inherent complexities. So the programming course demands a special teaching methodology.
Computer Science is relatively a new discipline in our educational institutions at tertiary level. Although it is an optional subject, a few students are encouraged to take this subject at higher secondary level. Even those who take this course and get good grades fail to demonstrate their basic programming skills. This reflects the weakness of most of the educational institutions that offer computer science at HSC level without assessing their capabilities in this context.
Most of the colleges suffer from lack of efficient computer teachers and adequate lab facilities. Besides, there are gaps in the curriculum of HSC Computer Science course too. So, unlike developed countries where Computer Science has been introduced at school level, our students get introduced to it, especially the programming course, in a true sense at the university level.
Keeping the above reality in mind, the instructors of the programming course at university level must realise that they are opening up new windows of relatively complex knowledge for the learners.
Learning programming languages needs to look into two different aspects, namely syntax and semantic. Syntax means the rules or grammar of the programming language in which the program is to be written. Semantic is the logic that should be followed for solving problems. Though, for acquiring programming skill, one should give importance to both syntax and semantic, semantic should get priority in learning technique.
Observation suggests that teaching the syntax of the programming language first frequently leads the first-time learners of programming towards utmost frustration. This is because, unlike natural languages, programming languages follow strict grammatical rules and computers do not accept even a minor mistake in program codes.
Due to this rigidity of programming languages learners sometime becomes panicky. However, writing of the code becomes easier if the students learn the semantic aspects of the program first. So, while teaching a programming course, the instructor must give emphasise on semantic aspects of the problems.
In general, writing a program should go through a two-phase process -- problem solving and implementation.
In the problem-solving phase, we need to focus on analysis and specification, which define the problem and identify the inputs and outputs. After that we need to design the logic for solving the problem. This logic, or general solution for solving the problem, is called the algorithm, or inherent semantic, of the program to be written.
The first half of the semester can be spent on teaching semantics or algorithms for different problems without using any programming language. For teaching algorithm, the instructor should introduce flow-chart or pseudo-codes to the students so that they may be able to solve problems, using these tools, with pen and paper. The problems should be interesting yet challenging for the students.
A problem can be solved in different ways. So, in designing the algorithm, students may follow different approaches, which should be encouraged. However, the instructor should explain the merits and demerits of different approaches of the solutions for the same problem.
The implementation phase translates the algorithm into a programming language (code). In this phase, the learners should be introduced to the editor of the concerned programming language and its different features (e.g. selection statements, loop-structure, arrays, function). Besides, the instructor at this stage must explain the hardware aspects of the computer following the prevalent von-Neumann architecture of computers. Learning about memory and processors gives a clear conception in writing codes as the programs run on the machine.
After learning about the editor of the programming language and the computer architecture, the students should translate their algorithms for different problems into code. The instructor must ensure that the learners follow the divide and conquer approach in writing the code. A large problem should be broken into smaller pieces, called modules, using different features of the language (e.g. procedure, function, class) so that they can be solved individually.
When a program is completed, it should be tested through inputting different test data. This practice will help them much in their future programming endeavours.
Constant practice is essential for becoming an efficient programmer. Arranging mini- programming competition among the learners will definitely help in this regard. Besides, assigning group and individual programming projects to the students is also essential for improving their programming skills.
Which language should be selected as a tool for the first time learners? So far, different programming paradigms have been introduced. Among them, procedural and object oriented paradigms are widely used to teach the first programming course. Many prefer C as a first programming course and many others advocate for Java or C# (following the object orientation).
The writer is strongly in favour of C or any other procedural language as the first programming language because it is easier to follow the logical construct of the procedural language. If a programmer is conversant with the procedural language it will not be difficult for him/her to switch to other programming paradigms, including object oriented ones.
Finally, it can be argued that programming is creative work. To be an expert programmer the learner must develop a passion for it. To instil passion for programming into the psyche of the learners, the instructor must adopt appropriate teaching methodology.
Comments