algorithm first, syntax later approach for teaching programming to ...

39 downloads 358 Views 180KB Size Report
Computer programming has been identified as a difficult course both to teach and ... results indicates that the novices and beginning students of programming ...
ALGORITHM FIRST, SYNTAX LATER APPROACH FOR TEACHING PROGRAMMING TO NOVICES IN TANZANIAN UNIVERSITIES: A CASE OF TUMAINI UNIVERSITY Josephat O. Oroma, Timothy Wikedzi, Fredrick Ngumbuke, Herbert Wanga Tumaini University – At Iringa (TANZANIA) [email protected], [email protected], [email protected], [email protected]

Abstract Computer programming has been identified as a difficult course both to teach and learn. It is even more difficult to learners in developing countries because they are faced with more additional factors deterring learning, which are embedded within the academic, socio-economic and natural environments as well as cultural diversity that makes the teaching and learning of these courses that originate from the western-world (developed countries) more challenging in developing countries, like Tanzania and Africa in general. The difficulties are remarkably reflected in the poor performance and the high failure rates in computer programming courses. While there are a number of pedagogical innovations that were tried but the outcomes are still far from satisfactory, previous studies indicates that the difficulties are due to students lack of generic skills, inadequate pedagogical approaches that dwells more on programming language syntax than on real problem solving (algorithm), inadequately qualified academic staff as well as the students motivational orientation. This study therefore focuses on exploring the role and the potentials of algorithms (flowchart) in teaching computer programming to novices in a preparatory programming course, at Tumaini University, Iringa University College. The results indicates that the novices and beginning students of programming benefit more by using flowchart as the algorithm design method and generally in an environment where emphasis on syntax is reduced and problem solving emphasized. Keywords: Algorithm, syntax, approach, teaching, computer programming, novices.

1

INTRODUCTION

Tumaini university, Iringa University College (TU-IUCo) is the oldest private university in Tanzania[1], located in Iringa, in southern Tanzania, it was established in 1993 [2] as a Lutheran Seminary that was offering Diploma in Theology [3] and in 1996, it was transformed and expanded into a university offering several diploma and degree, and now masters study programs under various faculties such as faculty of Theology, Business and Economics, Social Sciences, Law, Science and Education [3]. TUIUCo realized the importance of technology enhanced learning as early as 1999 [4] and then incubated the plan to start and develop it over a period of more than ten years. In the beginning of the process there were no ICT facilities but thereafter, the university started to gradually establish its ICT capacity by building a computer lab, setting up a local area network, setting up a dedicated ICT support directorate [4] and training ICT technical staff, and the acquisition of internet, and then ICT courses were integrated in all other study programs. TU-IUCo then started a contextualized Bachelor of Science in information technology (BSc IT) program in 2007 [5] after it was realized that the current ACM/IEEE standard curriculum would not work in a developing country that is faced with additional challenges within the academic, socioeconomic and natural environments. The academic environment, which this paper focuses on, brings forth concerns such as unsuitable pedagogical methods, inadequately qualified academic staff, student motivational orientation, the wider educational system, learning styles, and communication patterns while the socioeconomic environment puts forward issues surrounding procurement process [1], the situational and rampant poverty and the natural environment deals with issues such as unfavourable conditions such as unstable electricity, high temperatures that dangerous to the computers because the university cannot afford air conditioners for cooling and the extremely dusty environments during summer. All these factors act together in combination and create an environment not conducive in promoting teaching and learning of a course that is technical in nature. A contextualized BSc IT was preferred because in many cases, most universities starting a new BSc IT program usually duplicate the curriculum from a developed country where technology has a long history in education and general use, and the graduates are actually relevant to that context. Our case was different. We wanted our graduates to be relevant to our local environment and communities, and therefore the curriculum was based on six principles. It

Proceedings of EDULEARN12 Conference. 2nd-4th July 2012, Barcelona, Spain.

4259

ISBN: 978-84-695-3491-5

was designed to be context-sensitive, problem-based, practically oriented, interdisciplinary, of international standards, and based on research [6] Our contextualized BSc IT program has ever since its inception, undergone and continues to undergo constant curriculum review in order to address numerous challenges within the program, and resolve several ambiguous issues that were identified from the beginning, and during the program development process. Such issues included tensions derived from students’ uncertainty about IT as a field [7] and their differing perceptions of IT education, teachers’ widely varying teaching approach and other staff members’ lack of experience on university level teaching as well as their unfamiliarity with standards of quality education [7] other than an observed difficulty in computer programming courses which had a general poor performance and a significantly high failure rate, basically resultant from inappropriate learning strategy, different kind of motivation to learn programming [3], technical aspects, undesirable communication patterns, lack of proper feedback channels, widely varying cultural and educational backgrounds as well as the university culture and practices. This programming problem also had its roots not only in the learning styles and motivation of the students, but also in the group tendencies whereby students preferred to work in large groups of up to six members. All assignments including individual assignments were done in group. This became a disadvantage because members of the group who were not very familiar with programming were not participating but depending on those who were more competent in the course, in order to pass the course and therefore learning was by only those who participate in the class activities. This therefore gave rise to the urgent need to improve the problem in the programming course which was consequently identified during the BSc IT program development. We soon found out that, groups larger than three tend to allow and promote free-riding, so working in pairs was encouraged [8], and the normal lecture hours were increased from the normal 3 hours a week to 5 hours (3 for normal lectures and 2 for supervised class exercises) which then seemed to have motivated the students. We then later introduced a preparatory programming course in first semester for all new students enrolled on the BSc IT program which the aimed at developing their problem solving and analytical skills, and the teaching of this preparatory programming course is based on algorithm construction and design, using flowchart in an environment that eliminates too much focus on language syntax and puts more emphasis on problem solving by teaching computer programming while following the program development life cycle.

1.1

Learning programming is challenging

An introductory programming course has the potential to be a dominant learning prospect for students to develop and advance their problem solving skills, their ability to analyse and strategize on designing methods, in addition to enhancing their thinking capacities as well as a systematic approach to providing solutions to programming challenges, although Crews and Ziegler argues that, in practice, this goal is difficult to achieve [9]. From our experience at Tumaini University, the problems of computer programming seems the same with others documented from other universities worldwide, but this goal can be achieved with our approach of the programming preparatory course which has no course prerequisite, other than a general computer knowledge, and it is designed for the absolute novice and a beginning student with neither prior advance computer background no programming experience. A big learning challenge is witnessed in the subsequent semester where there is an introductory programming, taught using Java and based on the Java language syntax, the preparatory programming course therefore serves as a basic foundation course to the new students, to give them a fundamental concepts of programming and to act as a motivator for the programming course in the following semester. It is taught only using algorithm design and construction and basing on the program development life cycle in order to make the learners recognize that, programming is a series of activities undertaken in phases and in sequence of steps. But in most cases, due to the factors within the academic environment, such as the inadequate pedagogical methods, poor learning strategies and coupled with the university traditions has rendered the teaching of these courses more difficult not only at TU-IUCo, but also at numerous other universities in Tanzania and other developing countries, most especially in Africa. The difficulties usually stem from a combination of factors, but in summary they are discusses below.

1.2

The main problem areas

During the program development period and the curriculum review process, several issues were identified for improvement as mentioned above. The first programming course, “introduction to object oriented programming – with Java had registered numerous problem spanning from low motivation,

4260

poor studying approaches by the learners, unsuitable pedagogical methods, the educational and university culture and traditions, bureaucratic processes, coupled with poor communication channels in the organizational structure, group work tendencies, and poor feedback mechanism. All these factors together with other environmental factors put the students in a situation where learning programming was more challenging. This challenge in learning programming was reflected in the general poor performance and high failure rate in the course at an alarming level. Within the contextualized BSc IT program curriculum at Tumaini University, previous studies have identified a number of problems which are attributed to the above problems, but in general there are basically five main problem areas associated with difficulties in learning computer programming within the Tumaini University academic environment, as well as various other universities in developing countries.

1.2.1

Too much emphasis on teaching syntax

In most of the universities in Tanzania, Tumaini inclusive, and in other developing countries in Africa as well, the preparation for teaching computer programming usually is a tradition and practice that begins by selecting a programming language to teach programming to the new students, and then the teaching is followed by being focused on the syntax of that particular programming language. More time and emphasis is commonly put on teaching programming according to the syntax of that programming language and not problem solving or on teaching the core programming concepts which is based on the program development life cycle as a process, comprising of about five important steps. We have proposed moving away from the tradition of teaching language syntax and platform in this introductory programming course referred to as “Introduction to programming fundamentals” because programming languages usually have so many syntax rules and requires so much overhead code for a typical CS1 of a few dozen to a few hundred lines [11]. Teaching programming basing on the program development life cycle is however, advocated for because it clearly describes programming as a set of activities undertaken in a sequence and in a series of steps. The cycle which begins with i) problem identification and analysis, ii) Designing a solution plan, iii) constructing an algorithm, iv) implementing the algorithm, v) testing and debugging. When the teaching of computer programming is based on the above cycle, it helps the novice learners to understand the course as a series of activities done in phases and in sequence thereby making them able to translate problems into working programs. However, this is usually omitted and therefore, students do not experience programming as a combination of analysis, design, implementation and debugging [9].

1.2.2

Little focus on problem solving

It has been the traditional practice of our universities, and other in developing countries to teach computer programming without laying much focus on teaching problem solving skills to the beginning students, as stated above in the previous section, but they start straight away by teaching syntax. The practice has been that, in the semester that students are to take a computer programming course, the lecturer identifies a programming language then makes a course outline, and starts to conduct classes while basing on the syntax of the selected programming language, and while ignoring to integrate elements of problem solving and program development life cycle. For the case of Tumaini, the first programming paper was taken in the second semester. This taught using Java programming language since the cause itself is called introduction to object oriented programming using Java. The course has registered a number of problems including the students ganging up against one of the course lecturers at one point in time. For example, Richard [12] acknowledges that, perhaps the most obvious way to improve problem solving performance is to teach the basic skills. The general procedure is to analyse each problem into the cognitive skills needed for solution and then systematically teach each skill to mastery. His assumption is in line with our approach of teaching computer programming basing on the program development life cycle that is undertaken in series of steps and phases, while using flowchart as the algorithm to find solutions to the programming problems. He foes ahead to narrate that, although a focus on teaching the basic skills may seem to be the most straightforward way to improve problem solving performance, the results of research clearly demonstrates that knowledge of basic skills is not enough.

1.2.3

Inadequate support for experiencing program sequence

Most university’s traditions have a practice that programming is taught to students during lectures only. Out of lecture hours, there is no more lecturer support to students and since most students do

4261

not have their own computers so as to have hands on practice. The lack of lecturer assisted practical exercises sessions leads them to have low motivation in this course. This problem therefore leads to students to have inadequate learning activities to experience programming as series of statements to perform actions in a predefined sequence. In other words, the inadequate support to the beginning students so that they can experience programming as a sequence, leads them to have misconceptions in the course. They fail to relate the programming statement into the output of the program therefore missing to understand the program execution process. Students often do not see programming as a sequence of steps that must be executed one at a time. Rather, they view programming as a collection of statements that execute when necessary [9]

1.2.4

Inappropriate learning style

It is important for learners to adopt a suitable learning strategy. In some cases, a teacher must identify students learning abilities and guide them in adopting a learning style that suits their abilities, and different courses requires different approaches and styles of learning. Very crudely, deep is good, surface is bad, and we should teach in a way that encourages students to adopt a deep approach, although achieving this is not so easy [10]. There are two kinds of learning styles, that is to say, deep learning which is defined as the critical analysis of new ideas, linking them to already known concepts and principles, and leads to understanding and long term retention of concepts so that they can be used for problem solving in unfamiliar contexts [10]. Deep learning exercises understanding and application of the acquired knowledge in real life, while surface learning which refers to the tacit acceptance of information and memorization as isolated and unlinked facts [10] In our case at Tumaini, it was identified quiet early that the learning styles that our students are familiar with and employ as the major learning approach is surface learning strategies which exercises memorization for short periods of time and not acquisition of knowledge and information retention, as opposed to deep learning that emphasizes understanding of underlying core concepts, knowledge and information retention for a very long time. Our students spend so much energy in trying to memorize code snippets, and when it fails, they resort to other means of passing exams or just give up and start to think that it is the course that is very difficult. At the end of it, they perform poorly or fail completely, which makes them lose motivation to continue studying any other programming course in the future.

1.2.5

Motivational inclination

Motivation is the stimulation to act towards a result. Motivation is also the inspiration to act in order to achieve a desirable outcome. The types of motivation are based on the different goals and reasons that give rise to an action [14]. There are essentially two kinds of motivation identified within the academic environment. Extrinsic motivation, which is doing something because it leads to a separable outcome, while intrinsic motivation on the other hand and in contrast, is doing something because it is inherently interesting or enjoyable [14]. The kind of motivation that is required to study computer programming and generally necessary in education is intrinsic motivation because it gives the desire and the inner drive to set learning goals, and objectives and self-initiate activities directed towards these goals, while keeping track of the learning progress, and as noted by [14], intrinsic motivation therefore results in high quality learning and creativity. A significant number of the learners do not know why they are studying computer programming. Previous studies [3] indicates that many of our students possess more extrinsic motivation and less intrinsic motivation and the level and amount of the motivation varies widely among them. This usually leads to the students performing learning activities without clear objectives to direct their actions, with no goal to achieve as well as with disinterest, with an attitude of unwillingness, resistance and laidback attitude because they are outwardly propelled to take action. For example, a large number of the students have revealed that; they are studying IT program because it was the only way to get 100% loans board money, others stated that a relative (e.g. a father, mother, brother or sister) advised them to take IT, while a significant number also revealed that since it’s a new field, the job market is not yet saturated due to few number of graduates.

1.2.6

Technical issues

The technical issues are concerned with the fact that when the number of students was increased from 27 in the first (2007) admission to 30 in the second admission [8] in 2008, the total number of students then rose to 57. Again in the third admission, the number of enrolled students jumped to 50 bringing the total number of students in the IT department to 107. During this period, our facilities began to deteriorate such as mice and keyboard began to malfunction, some computer’s power supplies were blown off due to unstable power and therefore rendering it functionless [8], vandalism

4262

was also witnessed where computer parts, such the mice, keyboards and in some cases hard drives were stolen by students while in extreme cases, projectors hanging in lecture theatres’ ceilings were brutally removed together with the cage in which they are locked. Whereas the number of students increased many folds, the number of computers did not, which actually increased the computer-tostudent ratio from about 1:2 to over 1:5 and our computer laboratories were constantly being attacked by viruses rendering some computers functionless. For example, one of our computers teaching laboratories that was having 40 computers but at one time, only 18 could be used during lectures. The rest were either attacked by virus or was vandalized.

1.3

Using Flowcharts to enhance learning

The proposed solution in the students’ difficulties in learning computer programming was identified as moving away from the traditional learning environments where lectures and learning activities limits students in cramming the syntax of a particular programming language in favour of an environment that involves teaching programming as a series of steps while emphasizing the use of algorithmic design environment using flowcharts to sharpen the learners problem solving skills, an ability that is crucial in learning computer programming. Flowcharts were selected in our case because 1) it involves minimal syntax, and by reducing the focus on programming language syntax, we are able to increase the effort spent on problem analysis and solution design [9], 2) flowcharts are programming language independent, they are a universal representation tool, that doesn’t put focus on the syntax of any specific programming language. 3) Flowcharts are easier than structured codes. Designing flowcharts have been identified to be easier to introductory programming students than writing and modifying structured program codes. When learning/teaching algorithms, a useful visualization and design tool to use before coding is the flowchart [13] This solution was adopted because in the recent years computer programming was identified as the main problem of our BSc IT students. The first programming course was taken in the second semester and the programming language is java. This meant that, all the teaching in this course was based on the java syntax. The course registered a high number of failures, numerous students were so demotivated while others were willing to change study program. That is when we decided to adopt the preparatory programming course in first semester and integrate algorithmic method design as the sole mode of teaching this course that seems so difficult to most students. We have tried several experiments in this course and found out that the outcome is desirable.

2

METHODOLOGY

This study was conducted on 36 subjects who were in first semester of year one. At this period (semester one), they (beginning students) usually do not take any programming course. But due to the general poor performance and high failure rate in the semester that follows, the faculty decided to put in place a preparatory programming course in the very first semester for all new students enrolled in the BSc IT program. The preparatory is named “Introduction to Programming Fundamentals” (no programming prerequisite) and is aimed at introducing novices with no prior exposure to computers, to th computer programming. The study was conducted in the 11 week of a 17weeks semester, and a 4 hours (3hours normal lecture, 1 hour practical exercises) a week course. The students had already been taught control statements, repetition and flowcharts had been used to illustrate both cases to explain the semantics of conditional statements and loops. The study tested three algorithms that were graded with varying levels of difficulties as simple, medium and difficult. The simple algorithm had two conditions, the medium algorithm had four conditions while the one considered difficult, had six algorithms. Each flowchart th

In getting the average time, only 6 students were selected at random but at an interval of the 6 to submit his/her answer sheet. From the time the test started to the time it ended, when the first student th th th th th th submitted, the time was noted, then the 6 , then the 12 , 18 , 24 , 30 and the 36 student’s time for submitting the answer sheet was recorded and averaged.

3

RESULTS AND ANAYSIS

The results from the mid-term test which was conducted during a regular lecture schedule, where each of the learners was assigned three different algorithms and in each algorithm, each subject was to present, first using flowchart and then later present the same algorithm using the actual program

4263

code. Each of the six answer sheets for each subject was then graded by awarding a point for each of the three outputs that were correct. Figure 1 shows the correctness of the subjects with regard to the three levels of algorithms. From Figure 1, we can see that the correctness is almost the same while using algorithms in solving the three levels of algorithms. The time score were the average number of seconds that the subjects took in order to complete all the three outputs. Figure 2 shows the average time taken by the subjects in completing all the each set of the algorithms

4

DISCUSSIONS AND CONCLUSIONS

Basing on the results of this study, the researchers therefore confirm that novices and beginning students in computer programming learn more by the use of flowchart as the method for designing and constructing the algorithm in teaching the course, than by learning in an environment where more emphasis is put on the programming language syntax and the actual program codes, and less emphasis on problem solving. Teaching the course, while emphasizing the program development life cycle has proved fruitful since the learners have been able to translate the real world problems into sequence of steps that algorithms were designed and constructed for in order to provide solutions to. The new learners also made considerably few errors, and were visibly more excited, more confident, more motivated as well as spent less time in designing programs using flowcharts than when writing the actual program codes that had relatively more errors in addition to taking more time, while again a few of the learners did not complete writing the actual program codes. Reducing the focus on the use of programming languages syntax seem to have played a positive role in making the learners put more efforts in concentrating on problem solving and design aspects of programming. The study also revealed that, the more the level of the difficulty of the algorithm, the more time the learners took in writing the program codes meanwhile the difference in time taken on constructing an algorithm with

4264

the flowchart, is low and when the difficulty of the algorithm was increased from one level to the next (as in simple, medium and difficult) and the increase in time taken was relatively slow and gradual. In conclusion therefore, the researchers end by saying that, problem identification and analysis, solution design and algorithm construction and design are the most important learning activities that preparatory programming courses should present to students. But the current learning environment puts more focus on the language syntax which narrows these opportunities from the learners the use of flowcharts as the algorithmic design method helps the new learners in better understanding the structured program codes.

REFERENCES [1]

Apiola, M., Tedre, M., Oroma, J. O. (2011). Improving Programming Education in Tanzania: st Teachers’ and Students’ Perceptions. 41 ASEE/IEEE Frontiers in Education Conference

[2]

Jyri, K. (2006). Building ICT Facilities for Education in a Developing Country. Analysis of an ICT Project at Tumaini University/Iringa University College 2000-2004

[3]

Oroma, J. O., Wanga, H., Ngumbuke, F. (2012). Challenges of Teaching and Learning Computer Programming in Developing Countries: Lessons from Tumaini University.

[4]

Tedre, M., Ngumbuke, F., and Kemppainen, J. (2010). Infrastructure, Human Capacity, and High Hopes: A Decade of Development of e-Learning in a Tanzanian HEI.

[5]

Tedre, M., Bangu, N., and Nyagava, S, I. (2009). Contextualized IT Education in Tanzania: Beyond the Standard IT Curricula. Journal of Information Technology, Volume 8, 2009.

[6]

Bangu, N., Haapakorpi, R., Lund, H. H., Myller, N., Ngumbuke, F., Sutinen, E., and Vesisenaho, M. (2007). Information Technology Degree Curriculum in Tanzanian Context. In P. Cunningham and M. Cunningham (Eds), Proceedings of IST Africa 2007 Conference, Maputo, Mozambique, th th May 9 -11

[7]

Tedre, M., Bangu, N. (2009). Implementing a Contextualized IT Curriculum: Changes through th Challenges. 9 Koli Calling International Conference on Computing Education Research, November 2009

[8]

Tedre, M., Pasanen, T., McIntyre, Dan., Oroma, J. O., Ngumbuke, F., Sutinen, E. [2012]. Four Years of IT Education in Tanzania. Published in IST-Africa conference proceedings. May 2012

[9]

Crews, T., Ziegler, U. (n.d). The Flowchart Interpreter for Introductory programming Courses.

[10]

n.n. (n.d). Deep and Surface learning Approaches

[11]

Bloch, A. S. (2000). Scheme and Java in the First year

[12]

Mayer, E. R. (1998). Cognitive, Metacognitive and Motivational Aspects of Problem Solving.

[13]

Chen, S., Morris, S. (2005). Iconic Programming for Flowcharts, Java, Turing, etc.

[14]

Richard M. Ryan and Edward L. Deci. (2000). Intrinsic and Extrinsic Motivations: Classic Definitions and New Directions. Contemporary Educational Psychology 25, 54-67.

4265