Back to the Basics: Bringing Flowcharts Back into the Classroom

advertisement
Back to the Basics: Using Flowcharts in the Classroom
Mark S. Hall
Assistant Professor of Computer Science
Computer Science, Engineering, Physics & Astronomy (CSEPA)
University of Wisconsin – Marathon County (UWMC)
University of Wisconsin - Colleges
Wausau, WI 54401
mark.hall@uwc.edu
Abstract
Students struggle with developing algorithms to solve problems. Languages that are used in
introductory courses introduce syntax issues that create additional problems for students. With
the advent of the internet, more and more students are visual learners and languages that are textbased like Java and C++ do not help these students. Learning programming skills are very similar
to learning mathematical skills in that students learn more if asked to write more programs. The
numbers of in-class programming activities that can be accomplished in a single lecture are
limited to the syntactical nature of the current language of choice.
Textbooks introduce pseudocode and flowcharts as design tools to assist in the development of
algorithms. Yet the use of the standard flowchart template along with paper and pencil can be a
very frustrating & cumbersome process. The Visual Logic application uses flowchart symbols to
help students create algorithms to solve problems electronically. This tool aids in the cyclical
nature of the algorithm development process as changes can be made rapidly to test new ideas.
This rapid development also allows instructors and/or students to develop more algorithms
individually, or in groups, in a single lecture.
Page 1 of 9
1 Introduction
Shackelford and LeBlanc [1] previously observed that the use of a particular programming
language in an introduction to computing course tends to “annoy and distract attention” for
students away from finding an algorithm that solve a particular problem. From my seven years of
Computer Science teaching experience, it has been my observations that students in my classroom
struggle to create the algorithms to solve programming problems that I assign, let alone handle the
nuances of learning the syntax of any formal programming language. As the frustrations mounted
for me as I taught programming courses, I kept searching for ways to help students become more
successful writing algorithms to solve simple problems, let alone any complex ones. Despite my
“preaching” of using the design tools of pseudocode and flowcharts (that are documented in most
textbooks) prior to coding, I knew, and students were always confirm, that these words went in
one ear and out the other. During my travels, I found an electronic flowcharting tool (Visual
Logic) that allowed algorithms to be created using common flowchart symbols, and that allowed
the algorithm to be executed to verify a valid solution. Classroom observation and antidotal
evidence supports that the use of this tool did improve student’s algorithm solving abilities.
1.1 Background
The thirteen 2-year University of Wisconsin (UW) Colleges serve students over the entire state of
Wisconsin [2]. The Computer Science (CS) program in the UW Colleges is designed to be easily
transferable to the 4-year institutions within the UW System. The nationwide decline in CS
enrollments reported in the 2003-2004 Taulbee Survey [3] has affected the UW System, and has
been particularly hard on the 2-year UW – Colleges (UWC), which are relatively small colleges,
with a combined enrollment of approximately 12,00 students. In addition, the majority of our
students are in the bottom 60% of their high school rank. The majority of our students enroll to
prove that they can achieve at the University level in order to be accepted at a 4-year University.
1.2 Enrollment Issues
A trend of declining enrollment in Computer Science (CS) is being felt at the 2-year University of
Wisconsin (UW) Colleges, as is the case nationally. UWMC is the third largest two-year campus
in the UW Colleges [4]. A course titled CPS 110 Introduction to Computer Science (Visual
Basic.Net) is offered for non-majors, and the majority of those students, provide the pool of
students that need to be recruited to help the enrollment numbers for the core Computer Science
classes that are offered.
The initial enrollment for the past five sections of the CPS 110 courses that I have taught
consisted of 7, 8, 15, 17, and 7 students. It is safe to say that those are NOT the numbers that were
active in the classroom at the end of the semester. The loss of these potential students for the core
Computer Science courses were very troubling. Many research articles have documented that
students struggle with learning the syntax of programming languages. Something needed to be
done to recruit and then retain these students.
2 Flowcharts as a Design Tool
Page 2 of 9
The main problems students have in this course are their inability to be able to solve problems.
The lack of critical thinking skills hinders their ability to be successful when writing basic
algorithms to solve problems. In fact, that is the hardest part of writing any programming
assignment for beginning students. Once the algorithm is found, for most students, the
implementation of the algorithm in any language is relatively simple.
2.1 Designing Algorithms and Critical Thinking Skills
As I looked at the guidelines established by the UW Colleges for teaching the general concepts for
this course, the emphasis that course coverage for designing algorithms should take at least a
minimum of two hours. And the reality is that every programming assignment typically forces
students to design a totally different algorithm. In order to be successful in this course, for the
students and the professor, somehow, someway, the critical thinking skills of students have to be
improved. Improvements in critical thinking along with the understanding of the basic control
structures will allow students to be successful writing simple programs using any language.
2.2 Flowchart Template
The majority of any 40+ Computer Science professors remember the day when their college
professors enforced algorithm design by mandating that CS students turn in their flowcharts
which represented the solution to a problem. Flowcharts, along with pseudo-code were
recognized as design “tools” that students could use to create a successful algorithm. Syllabi
specified that the flowchart template was a mandatory purchase at the local campus bookstore
(Figure 1).
Figure1: Flowchart Template
These professors also remember assignments that started out looking like majestic creations of
art, and turned into crumpled balls of paper used as basketballs to shoot at the closet wastebasket.
Any change to an algorithm meant erasing and modifying the flowchart symbols that were
“squished” onto a sheet of paper. After several changes, the paper was no longer useable, and
the complete algorithm had to be re-drawn from the beginning. The frustration levels of future
CS leaders rose to all-time levels.
Yes, flowcharting can be a very valuable visual tool that supported algorithmic design. But the
tool was very primitive and very time-consuming. Is there a better way to use the same concept
but make it electronic and interactive which would aid students to develop successful algorithms
that proved to be solutions to problems? Yes, there is!
Page 3 of 9
In an attempt to improve the success of algorithm design by the students, I recently began using
the Visual LogicTM Flowchart Simulation Tool [5] introduced by Thad Crews and Chip
Murphy, which is distributed with their textbook, Programming Right From the Start with
Visual Basic.Net. Visual LogicTM allows students to develop algorithms that incorporate
fundamental programming concepts using the flowcharting symbols electronically making it very
easy to make changes to the algorithm. The unique attribute to this software is that the flowchart
is executable so that the students can quickly and easily test their algorithm. Once their algorithm
has been tested, then they can start the implementation of the algorithm using Visual Basic.
2.3 Related Work Using Flowcharting Tools
A structured flowchart editor (SFC) was developed by Tia Watts in 2003 [6]. SFC allows the user
to develop a flowchart. In addition, the tool always displays a textual representation of the
flowchart in either a C or Pascal-like syntax. A disadvantage of the tool was that the user is
required to copy and paste the textual representation into a text editor in order to make any
changes to get a complete program.
BACCII++, an iconic programming language, was developed by Calloni and Bagert (1997) [7].
BACCII++ was used to supplement their CS1/CS2 sequence which used C++. Students who used
both BACCII++ and C++ were found to perform better than those students who only used C++.
Code can be generated by the tool for any one of five text-based languages (including Pascal and
C++) once the algorithm has been developed.
To eliminate the shortfalls that these tools created where students had to debug the textual code,
Crews and Zeigler (1998, 1999) developed the FLINT program [8]. The FLINT program forces
students to use top-down design, and then design flowcharts for each sub module. These
flowcharts are then executed within the FLINT program.
2.4 Visual Logic
Visual Logic uses VB.NET syntax with an emphasis on designing and developing graphical,
event-driven programs. Key introductory Computer Science concepts that can be introduced with
the use of this tool includes the use variables, input, assignment statements, output, relational
operators, boolean operators, the control structures of sequence, selection and repetition, sub and
function procedures, arrays, and files.
The easiest way to show the Visual Logic tool is visually. Figure 2 depicts the flowchart for the
legendary Hello World program that seems to be introduced in most introductory programming
textbooks.
Page 4 of 9
Figure 2: Hello World Flowchart
Visual Logic displays output using a MsgBox (Figure 3) or via a console window (Figure 4).
Figure 3: MsgBox
Figure 4: Console Window
The insertion of flowcharting symbols is done via a pull-down menu (Figure 5).
Figure 5: Symbol Menu
Page 5 of 9
Figure 6 shows the flowchart for a basic algorithm that given two numbers will calculate the sum,
difference, product, quotient, and average of those two numbers.
Figure 6: Basic Algorithm Flowchart
3 Using Visual Logic
Since Visual Logic uses VB.Net syntax, it is a natural fit for introductory programming courses
that are taught using Visual Basic.Net. The introductory programming course consists of two
credits of programming and one credit of basic computer concepts.
3.1 In-class Exercises
For every major concept introduced, I try to create two to three Visual Logic programs, by myself
with student help, or by a student with student help, or by letting students work in groups, or
individually. These programs are not graded but provide an instructor with plenty of opportunities
to discuss algorithms and possible pitfalls for each algorithm introduced, including the use of
“bad” data.
Page 6 of 9
3.2 Out-of-class Programming Assignments
I will usually assign one or two problems where students will turn in Visual Logic solutions.
Then I will assign another problem where students must create two solutions, one using Visual
Logic, and then a solution using Visual Basic .Net which implemented the Visual Logic design.
Thus I am forcing students to use a design tool prior to actual coding in Visual Basic.
4 Visual Logic Results
4.1 Student Survey
In order to assess the value of using Visual Logic, I created a survey which I administered to the
students that were enrolled in my Spring and Fall 2006 courses. The survey consisted of 5
questions each with a five-point scale (1-Strongly Disagree 3-Neutral 5-Strongly Agree). Table 2
shows the questions and the average scores.
Survey Question
1) I had few problems learning how to use
VL to create my programs.
2) VL helped me to develop and improve my
problem solving skills.
3) VL helped me to better understand how
computer programs operate.
4) I had few problems getting my programs
to run in VB once I had created them in VL.
5) I enjoyed programming in VL.
Spring 2006
Fall 2006
4.7
4.8
4.4
4.6
4.7
4.6
3.8
4.2
4.8
4.9
Table 2: Visual Logic Survey Results Survey Questions
The survey results support that students do not have problems using Visual Logic and that
students also felt that the tool helped them to develop and improve their problem solving skills. In
addition, students also enjoyed using the tool which should help increase their use of the tool to
design algorithms.
4.2 Instructor Observations
The use of Visual Logic has allowed me to rapidly create algorithms that cannot be done in the
same amount of time if I just used the Visual Basic .Net language. Syntax is not a problem for the
students. Visual Logic is primarily used to cover the control structures of sequence, selection, and
repetition. This tool has allowed me to cover more algorithms and more unique algorithms
quicker and with less student frustration. At times in the lecture part of the course, every student
in interacting with Visual Logic which keeps them focused and entertained.
Since I teach at a small school with lower enrollments, I will never have enough students to ever
attempt proper research to test how effective the use of this Visual Logic tool aids in the learning
Page 7 of 9
of these concepts for the students. However, I have plenty of antidotal evidence from the student
statements that allow me to have confidence that the tool is effective. Students state that they
enjoy using Visual Logic as they can modify algorithms quickly to get immediate feedback.
Students have stated that when they are using Visual Logic in the classroom, they never have a
chance to get bored or fall asleep since they are being engaged.
Two semesters ago, when I assigned the last Visual Basic programming assignment for the
semester, I had a unique experience with a female student. After reading the specifications for the
assignment, she blurted out that this assignment would be easier to do in Visual Logic than Visual
Basic. As I looked at her, I could see some frustration in her expression. I quickly reminded her
that flowcharts are a design tool that can always be used to aid in the development of algorithms
so she could use Visual Logic.
4.3 Problems using Visual Logic
Any attempt to solve complicated algorithms is really not aided by the use of Visual Logic. A
complex algorithm results in a complex flowchart which cannot be viewed on the screen without
the use of horizontal and vertical scroll bars in order to see the entire algorithm. There is a
“feature” in Visual Logic that hampers use in the classroom. The for loop allows variables to be
used for the start, finish and step values. However, if the step value is negative, the counting loop
does not work as expected.
5 Conclusions
The use of a flowchart application like Visual Logic provides an easy-to-use tool for students and
instructors to experiment with developing algorithms quicker. Antidotal evidence from students
supports the use of the flowcharts for designing algorithms, but only if done electronically. The
visual nature of flowcharts allows for students to understand the control flow in their programs
which makes it easier and less frustrating for them to solve problems.
Antidotal evidence also indicates that teaching programming using an electronic flowcharting
program like Visual Logic helps students develop their problem solving skills better than teaching
programming using languages like Java, C++, or Visual Basic. However, the use of Visual Logic
is just one of many tools that instructors can use to help students comprehend the many concepts
in introductory Computer Science courses.
Classroom observation and antidotal evidence supports that “forcing” students to use this tool did
improve their algorithm solving abilities. And as an instructor, the tool allows quicker
development of algorithms during lectures that allow more problems to be solved during each
lecture and during the semester. Flowcharts have been around for many decades and have been
specified as a design tool for many textbooks. The use of Visual Logic allows students to easily
and quickly use flowcharts as a design tool. Students now can design algorithms using flowcharts
without the side effect of the tool increasing their frustration level. From my point of view,
Visual Logic aids student learning for introductory Computer Science concepts.
Page 8 of 9
References
[1] Shackelford, R., and LeBlanc, R. Introducing Computer Science Fundamentals Before
Programming. Proceedings of FIE ’97, 285-289.
[2] UW System, Two-Year Campuses
http://www.wisconsin.edu/campuses/twoyear.htm
[3] Zweben, S., 2003-2004 Taulbee Survey, Computing Research News, Vol. 17/No.3, May 2005.
http://www.cra.org/CRN/articles/may05/taulbee.html
[4] UW - Colleges
http://www.uwc.edu/
[5] Visual LogicTM - Textbook Version 1.0.0.101 - ©2004 Vanguard Computer Systems
[6] Watts, T. (2003). SFC - A Structured Flow Chart Editor Version 3. Faculty Poster
SIGCSE 2003. Available at: http://www.cs.sonoma.edu/~tiawatts/SFC/.
[7] Calloni, B. (1997). Iconic Programming Proves Effective for Teaching the First Year
Programming Sequence. Proceedings of the 28th SIGCSE Symposium, 262-266.
[8] Crews, T., and Ziegler, U. (1998). The Flowchart Interpreter Programming Courses.
Proceedings of FIE '98, 307-312.
Page 9 of 9
Download