Menu Close

Use of Visualization Tools and Active Learning Approach for C Programming Course

Course: Programming for Problem Solving  

Class: First Year

Department: Information Technology

Author: Prof. Ashwini B. Patil

Abstract:

Programming languages are a vital domain for Computer and Information Technology engineering. The programming languages like C, C++, Java, Python, Mobile Application Development, and Web Technologies are important programming courses in CSE and IT curriculum. Understanding the programming courses includes a basic understanding of the syntax of programming language, logical & critical thinking to solve the problem, use of various editors to write and execute the program. Effective delivery of the programming course creates a great deal of influence on student’s interest in programming and software development. The students lose their interest in programming due to the inefficient delivery of these courses which leads to a gap in technical competency required by the IT sector.  The current Covid 19 pandemic exposed the limitation of traditional teaching methods for programming courses. Teaching such programming courses on online mode becomes a big challenge for faculty by considering the skillset required to inculcate amongst the students for learning programming courses. The primary objective of this paper is to overcome these challenges by the effective use of a pedagogical approach for teaching the programming courses. The various active learning methods and tools are discussed in this paper that was used to teach the programming language. The result shows that implementation of such methods & tools you can retain the interest of students for programming courses and thus increase their performance and improve the skillset required in IT industry.

Classroom Challenges while teaching System Programming course:

The students who are learning programming first time have a lot of fear in their minds and this will lose their confidence level while doing programs.

Teaching programming courses has a lot of challenges, especially for first-year C programming courses.  The first engineering students come from different backgrounds, some of them are having a problem with communication skills, less confidence, unfamiliar with friends, having traditional learning experience using paper -pen, less exposure to computer skills, and having just remembering skills rather than applying skill [8][9].

At first-year level, some students are having anxiety about Computer Systems [9]. They are facing a problem right from starting of computer, installing software on the computer, use of Input-output devices. This makes a challenging task for a teacher to prepare the students to deal with such kind of issues and then teach them programming concept.

Following are the common challenges or issues that the students face while learning programming courses:

  1. Difficulty in handling computer system
  2. Recalling the syntax of programming language
  3. Development of logic to solve the given problem by applying programming concepts
  4. Analytical skills to detect the syntax and logical errors in the program.
  5. Analytical skill to predict the output of a given program

The students find it hard to gather the essential data and are unconscious of what is to be achieved. Many students have inadequate consciousness of the connection between theory and data. They are unaware that results can be interpreted from theory and vice-versa. As a result, they come across hard to understand the outcome which they get. These consequences lead students to experience discouragement. [10][11]

Introduction:

Programming language knowledge requires problem analysis, logical thinking, employing the use of algorithms & flowcharts to solve the problem, assembling the program using the proper syntax of programming language, program debugging skills to remove syntax & logical errors, and executing the program to get the desired output. Also, students should have program analysis skills to predict the output of the given program.

Only traditional teaching is not sufficient for programming courses to inculcate the above skills among the students.

While learning programming, students have several difficulties such as understanding how memory can be allocated to variables, how values of variables go on changing during execution, how to recognize and resolve the syntax & logical errors if any. To overcome these difficulties, it is essential to make a change in the teaching methodology and increasing the use of many interactive tools for better delivery of programming courses.

While solving the problem using programming language, if students has the model on how programming problems can be solved then it will benefits them [1]. So it is important to incorporate the visual demonstration to the students about how the program works, how we can solve the problem using a programming language. The main goal of programming courses is to develop the ability of coding and debugging among students [7].

Concerning to the figure 1 of the learning pyramid/ cone of learning by National Training Laboratory; it is clear that 75% of concepts get retain if students can practice it by doing and nearly 90% get retain if they teach others.

Fig. 1: Learning Pyramid

So doing the practice and hands-on practical session is very helpful for a better understanding of any course.

Active learning is an extremely important aspect of learning programming courses [2].

Active learning tools/techniques help to improve critical thinking and strong technical competency in their profession [4].

There are various active learning techniques used in Teaching and Learning the programming courses,

  • Summary writing
  • Collaborative Learning
  • Reciprocal Teaching
  • Problem based Learning
  • Stump Your partner
  • Use of visualization tools
  • Pair Programming
  • Short Quizzes
  • Project-Based Learning
  • Filliped classroom
  • Group Discussion and Question Answer
  • Brainstorming
  • Prediction of the output of the given program
  • Use of MOOCs Courses

We can make use of such active learning techniques for better delivery of programming courses. These techniques inculcate the computational thinking process among the students [5]. The active participation of students in the learning process is very important to improve the logical thinking and problem-solving ability of students, thus they can do programming using any programming language [3]. Using the pair programming technique, students can overcome the fear of programming by practicing programs with their friends, which makes learning more productive [6].

Project-Based Learning has proved to get better learner preservation, amplify the long-term interest, and increase presentation in design programming courses. Usually, while schooling a programming language, students have to be specified comprehensive instructions to arrive with improved understanding and problem-solving capability. The noteworthy purpose of PBL activity is to extend competent technological skills for students’. The principle of such projects mainly lies in increasing students perception in the actions of technical exploration and consciousness of the character and practices of technical investigation within their particular discipline. The programming concepts delivered are proposed to take the form of mini-project. This procedure allows the students to work and feel like scientists. In practice, within the timescale of the B. Tech. program, it is a difficult job since a lot of students find this move from the usual process of learning to open-ended project-based learning hard. The students have a need of grounding and hold up if they are to build a large amount of knowledge. The academic information gained by the students is inadequate when implementing a project [10][11].

  • Teaching Methodology for Programming Courses:

Understanding of any programming language includes various stages like an introduction to the concept, the syntax of programming language, understanding of problem statement, design the solution, implementation of the program, test the program for syntax error, execute the program to get desired output with suitable test cases as shown in fig. 2.

Fig. 2: Stages of Learning Programming Course

The stages to understand the programming language concepts are given in following table 1,

Table 1: Stages of Learning Programming Course with an explanation.

The students can achieve the expected outcomes such as problem-solving, designing algorithms & flowcharts, implementation of programs [5].

  • Active learning technique for C Programming Course:

As this course is at first-year engineering level, we need to focus on appropriate active learning methods to tackle the challenges mentioned above.

Following are some active learning techniques that we have used in C Programming course:\

Summary Writing

At the end of every lecture, we asked the students to write the summary of programming syntax taught during the lecture. This will improve their memorizing skills.

Demonstration of concepts

In programming courses, teaching the theoretical concepts is not enough, we give more focus on the demonstration of concept on different editors like DevC++ or TurboC by demonstrating the actual implementation of the concepts.

Word cloud exercise

The Word Cloud option from PoolEverywhere.com is used during the lecture. During this activity, the students are asked to post the new words that they learned during the lecture on the word cloud.

E.g Suppose the topic of the lecture is Keyword in C programming. Then at end of the lecture, students simply post the different keywords that they learn from C Programming. This will increase their remembering skills.

Short Quizzes through Polls or Kahoot

The student’s attention span for the lecture is 10 to 15 min. So it is very essential to engage the student by doing some activity. So we have planned Short Quizzes on online interactive tools such as Polleverywhere and Khoot during the lecture to ensure the learning of concepts by students [19][20].

The MKCL clicker software is also used for the conduction of quizzes during classroom teaching. Using the MKCL clicker software it is possible to conduct the quiz in the classroom and collect the pool from the student. Students can use their mobiles to answer the questions.

Such kinds of quizzes and polls during lectures are used to get feedback about the understanding level of the student.

Stump your partner

During the classroom teaching, we have used Stump your partner activity as shown in fig.3, where students are supposed to give one problem statement based on taught concepts, to the student sitting next to him/her, and so on. Then the students will be given some time to write a C program on the problem that can be given by his/her partner.

At the end of this activity, the teacher will ask any of the students to come in front and write the code on the board to explain it. This kind of activity helps to build critical thinking among students about the applicability of the concept to solve the problem.

Problem-based learning by writing Algorithm and Flowchart

For the programming course, problem-based learning is very important. For the C Programming course we have total of 10 experiments for the lab sessions. During the lab sessions, we are given 14-15 problem statements to the students of different complexity levels for each experiment. Two lab sessions (i.e 4 hr) were given to students to implement this code for this given problem statement.

Steps in problem based learning for C Programming course at FY Level is shown in fig. 4:

Use of visualization tools like Raptor, Python Tutor

Raptor Tool:

Rapid Algorithmic Prototyping Tool for Ordered Reasoning (RAPTOR) is a freely available tool designed by Martin C. Carlisle, Terry Wilson, Jeff Humphries, and Jason Moore.  This tool is used for designing and execution of the flowchart. Students can visualize the execution of the flowchart using the RAPTOR tool. It has a very simple GUI which has drag and drop features [12].

The Raptor following windows:

  1. Symbol panel: It consists of different symbols used to draw the flowchart.
  2. Main panel: This is the main drawing section where the students can design the flowchart.
  3. Intermediate result panel: It shows intermediate values of a variable while execution.
  4. Input window: It is used to give input.
  5. Output window: Used to display the output

Fig. 5 shows the use of the raptor tool:

Problem statement: counting the number of digits in the given number.

Benefits of using raptor tool:

Students can

  • Draw the flowchart for the given problem
  • Execute the flowchart
  • Visualize the execution of flowchart, understand how the values of variable get changes, and see the final output
  • Verify the correctness of the solution by executing the designed flowchart.
  • Python Tutor:

Students can write/implement the C code, but sometimes they are unable to explain the working flow of the implemented program. They cannot able to explain how memory is allocated to variables, array; how values of variable get changed during the execution of the program; how function call get occurs; how the structure works; how pointer works.

The use of visualization tools helps the students to understand the concepts in a better way. Python Tutor is one the freely available visualization tool through which students can understand what exactly happens when the code gets executed line by line. It is web-based tool which allows to write the code in a various language like C, C++, Java, JavaScript, Python, Ruby, and visualize the execution of code line by line [13].

Problem Statement: Find the factorial of the number.

Fig. 6 shows the screenshot of the python tutor visualization tool, which consist of the main program window (Where we can write our code), output window (where output gets displayed), memory window- heap and stack (where it shows how memory is allocated to the variables used in the program) and arrow (Red arrow: shows statement going to execute and Green arrow: show statement get executed).  There are a few more options shown at the bottom like First, Last, Prev, and Next through which we can control the flow of execution.

As you can see in the above code, the loop was used to find the factorial of a number, where the value of iteration variable ‘i’ go on changing from 1 to number and you will get final output displayed on output window as shown in fig.7.

Using the Python Tutor we can able to see the visualization of how the program gets executed. So using such a tool helps the students to understand the concepts easily and increase their interest in learning the programming languages.

Pair Programming for a lab session

In Pair programming, two students work in pair during the lab session to solve the given problem statements. This technique is very helpful to FY students because programming is new to them and they have a lot of fear in their minds while working during lab. Sometimes they are not able to recall the syntax.

In the pair programming, two students who perform the same experiment sit together on a single computer. Both write an algorithm and draw the flowchart with discussion. For implementing the code, one student can write the code on the computer (Programmer role) and other students help him/her to implement the code with syntax (Helper role). Discussion among these students helps to build the confidence level, remove programming fear from their mind and they can able to complete the given task.

There is role switching in pair programming i.e after the first program gets completed, the role of programmer and helper get changed. So, both get equal chance to a write and execute the program on the computer.

Program analysis to detect the syntax and logical errors

In this kind of activity, the readymade C program was given to students and ask them to detect the syntax and logical errors in the given program. This will improve the analytical & logical

skill of the students. Fig. 8 shows one example of this activity.

Program analysis to predict the output of given code

In this activity, the correct C code (without syntax and logical errors) was given to the students to predict the output. Students need to check the code line by line, need to analyze how the values of variables in the program go on changing while processing the code line by line. This is MCQ based activity, where 4 outputs were given to students as shown in fig. 9. They need to predict the correct output out of given. This kind of activity improves the analytical skill of students.

Half coding exercises

The half-cooking code exercise also helps the students to improve their logic building, where the code with some missing lines was given to students. They need to complete the code as per the given problem statement. For example, complete the given C code by fill in the blanks with correct logic to find the reverse of the number as shown in fig. 10.

Evaluation of Laboratory experiments:

Programming courses require more focus on Lab session, we have kept 4 hr week for lab implementation.

Strategy for Lab Sessions:

  • Analyze the given problem statement.
  • Design an algorithm and flowchart for given statement.
  • Write the pseudo code for logic building.
  • Write C program by following the standard coding convention.
  • Compile the program to resolve the errors and execute
  • Separate 200 pages note book need to maintain to

              – Write the algorithm, flowchart and executed program.

              – List the errors that you come across.

  • For each Practical 16 problem statements will be given to students (2 slots)
  • Some Program with errors will be given and ask the students to debug these errors.

Following are the Rubrics for Programming for Problem Solving Lab,

Expt.Basic Level 1 (1-10)Average Level 2 (11-25)Good Level 3 (26-40)Very Good Level 4 (41-60)
Algorithm and flowchartStudents can explain orally- the algorithm and flowchart along with need. Also, able to write symbols used in flowchart.Students can write algorithm and draw the flowchart for problem statement (for sequential solution) Student can write algorithm and draw the flowchart for problem statement (for sequential solution, branching)Students can write algorithm and draw the flowchart for problem statement (for sequential solution, branching and looping)
Basics of C LanguageStudents can explain orally- structure of C program, data types in C, operator in C, and I/O statements in CStudents can write the syntax of variable declaration, operators, I/O statements in C. Also, able to write algorithm, flowchart to solve the given problem.Students can write algorithm, flowchart and ‘C’ programs for simple problem statement using I/O statements, different operators   and able to remove the syntax errors.Students can write algorithm, flowchart and ‘C’ programs for simple problem statement using I/O statements, different operators   and able to remove the syntax and logical errors to get correct output.
Control statement- Decision making and branchingStudents can explain need of branching statement and list out types of branching statements.Students can write the syntax of if, if else, nested if else and ladder else if C. Also, able to write algorithm, flowchart to solve the given problem.Students can write the ‘C’ programs using simple if, if else and able to remove the syntax error.Students can write the ‘C’ programs using nested if else, ladder else if non-conditional branching statements and able to remove the syntax as well as logical error to get the correct output.
Control statement- Decision making and loopingStudents can explain need of looping statement and list out types of looping statements.Students can write the syntax of for, while and do while in C. Also, able to write algorithm, flowchart to solve the given problem.Students can write the ‘C’ programs using for, while, do while loop and able to remove the syntax error.Students can write the ‘C’ programs using nested for, while, do while statements and able to remove the syntax as well as logical error to get the correct output.
FunctionStudents can define function orally – need of function, all elements of function, prototypes of function and method of parameter passing: call by value  Students can write the syntax of elements of function for all prototypes. Also, able to write algorithm, flowchart to solve the given problem.Students can write the ‘C’ programs using standard library function and user defined function and able remove the syntax error.Students are can write the ‘C’ programs using standard library function and user defined function and able remove the syntax as well as logical error to get the correct output.
1D arrayStudents can define 1D array orally – use of 1D array, declaration, and initialization of 1D array.Students can write the syntax of 1D array. Also, able to write algorithm, flowchart to solve the given problems on 1D array.Students can write the ‘C’ programs using 1D array and able remove the syntax error.Students are can write the ‘C’ programs using 1D array and able remove the syntax as well as logical errors to get the correct output.
 2D arrayStudents can define 1D array orally – use of 2D array, declaration, and initialization of 2D array.Students can write the syntax of 2D array. Also, able to write algorithm, flowchart to solve the given problems on 2D array.Students can write the ‘C’ programs using 2D array and able remove the syntax error.Students are can write the ‘C’ programs using 2D array and able remove the syntax as well as logical errors to get the correct output.  
String handlingStudents can define string orally – use of string, declaration, and initialization of string.Students can write the syntax of string. Also, able to write algorithm, flowchart to solve the given problems on string.Students can write the ‘C’ programs using string and able remove the syntax error.Students are can write the ‘C’ programs using string and able remove the syntax as well as logical errors to get the correct output.
PointerStudents can understand the need of pointer. Also, they should know syntax of declaration and initialization of pointerStudents can implement C program which will demonstrate the pointer declaration, initialization of pointer, chain of pointer concepts.Students can implement C program which demonstrate passing entire array to function concept using pointer.Students can implement C program for arrays, strings using pointer. They should implement C programs demonstrating call by address concept.
StructureStudents can understand the need of structure. Also, syntax of structure definition and structure variable declaration and initialization. Students should able to differentiate between array and structure.Students can implement C program which will define structure, declare, and initialize simple structure variables at compile and run time.Students can define structure, declare, and initialize array of structure variables at compile and run time. They can work with structure pointer for given problem.  Students can implement C program using methods of passing structure to functions, array of structure, nested structure, and structure pointer.
  • Attainment of Course:

Class: FY BTech (20-21 Sem-I) of B.Tech. in CSIT 2020-2024 curriculum.  

  Sl No.CO CodeCO StatementISE Threshold %ESE Threshold %Threshold based  Attainment %   
1CO1Explain the basic terminology and concepts of c programming language.60.00 %60.00 %89.83 %  
2CO2Construct the algorithm and draw flow chart to solve the problem.60.00 %60.00 %87.73 %   
3CO3Write a c programs to solve given problems60.00 %60.00 %89.32 %   
4CO4Examine the given c program to remove the logical & syntax errors and predict the correct output60.00 %60.00 %88.64 %    
Table 2: CO attainment of PPS course (2020-21 Sem-I)

The Fig. 11 Shows the CO attainment of Academic Year 2020-21.

Fig. 12 shows the CO Attainment Comparison of Academic Year 2019-20 and 2020-21 for PPS course. The graph shows the improvement in the attainment of Cos.

  • Outcomes of active learning techniques used for this course:

Students are able to,

  • Comprehend the programming concepts
  • Use modern tools and software for better understanding of programming courses
  • Correlate the theoretical concepts to practical.
  • Remember the concept easily
  • Enhance practical implementation.
  • Become an active learner
  • Work in team
  • Conclusion:

The IT industry demands for graduates with sound technical competency in programming domain. Therefore, the effective delivery of programming courses is very important which play vital role for creating the interest among the students to learn the programming languages. Use of visualization tools and activity-based learning for programming courses is very essential for inculcating the required programming skills among the students

  • References:

[1] Settle, A., Vihavainen, A., & Miller, C. S. (2014). Research directions for teaching programming online. In Proceedings of the International Conference on Frontiers in Education: Computer Science and Computer Engineering (FECS) (p. 1). The Steering Committee of The World Congress in Computer Science, Computer Engineering and Applied Computing (WorldComp).

[2] Srinivasan, S., &Centea, D. (2018, October). An active learning strategy for programming courses. In Interactive Mobile Communication, Technologies and Learning (pp. 327-336). Springer, Cham.

[3] Derus, S. R. M., & Ali, A. Z. M. (2014). Integration of visualization techniques and active learning strategy in learning computer programming: a proposed framework. International Journal on New Trends in Education and Their Implications, 5(1), 93-103.

[4] Duffany, J. L. (2015, July). Active learning applied to introductory programming. In XIII Latin American and Caribbean Conference for Engineering and Technology.

[5] Jaithavil, D., &Kuptasthien, N. AN ADAPTIVE ALGORITHM FOR LEARNING COMPUTER PROGRAMMING COURSE. In The 15th International CDIO Conference.

[6] Gorvankolla, A. K., Navya, R., &Smitha, G. R. Adopting gile Technology in Learning C Programming.

[7]  Liu, S., Chen, Z., & Tang, J. (2013, June). The Improved Methods of Teaching Practice Based on C Language Programming. In International Conference on Education Technology and Management Science (ICETMS 2013) (pp. 1361-1364).

[8] Lathigara, A., Tanna, P., & Bhatt, N. (2021). Activity Based Programming Learning. Journal of Engineering Education Transformations, 34, 499-506.

[9] Thorat, S. A., &Kshirsagar, D. P. (2021). Developing Logic Building, Problem Solving, and Debugging Programming Skills Among Students. Journal of Engineering Education Transformations, 34, 402-406.

[10] Namratha M , Rekha G.S , Syed Akram 1 2 3, Selva Kumar S4, Jyothi S Nayak5, Active Learning Approach for Python Programming, Journal of Engineering Education Transformations ,volume 32 , No. 1, July 2018, ISSN 2349-2473, eISSN 2394-1707.

[11] Geetha Kiran Annegowda 1, Mohana Lakshmi J2, Student Centric Pragmatic Approach to Impart Concepts of Python Applications Programming, Journal of Engineering Education Transformations, Volume 34 , No. 1, July 2020, ISSN 2349-2473, eISSN 2394-1707.

[12]  https://raptor.martincarlisle.com/

[13]  http://pythontutor.com/