Development of ViewJ - a Visualization Builder for Object Oriented Programming Development Environment

Vijayakumar Shanmugasundaram

Concordia College, Moorhead, MN, USA

Paul Juell

North Dakota State University

Fargo, ND, USA

Nanda Lucky Jayasuriya, and James Benson

Concordia College, Moorhead, MN, USA

{jayasunl, jdbenson}@cord.edu

Abstract: We are developing ViewJ, a tool that creates pictures/visualizations so that the student can see and study what their program is actually doing. ViewJ is an interactive tool. The user interface provides VCR-like control of the program trace allowing the viewer to replay, stop and play in slow motion. We have created this tool for Java, and plan to extend it to other popular object oriented programming languages. This tool is intended to ease the process of learning how to program in an object-oriented language. It is our goal to provide a learning tool that will enable students to more successfully learn how to write object-oriented programs. ViewJ will provide visualizations of the running program. Another important goal of this project is to supplement the classroom teaching methods in our computer programming classes.

Introduction

We have developed visualizations for teaching object oriented programming to first year students (Juell, Shanmugasundaram, Denton, 2002, Shanmugasundaram, 2003, Juell, Shanmugasundaram, 2004). The visualizations do help the students. However, it can be hard for the students translate these static, pre-made images to corresponding images for their own program while learning trying to concentrate on writing code. We want to aid their efforts by providing visualization tools in the programming environment. The existing development environments are all either text based or have a very limited visual component. In the past we tried to help students in the learning process by creating number of visualizations to explain different concepts of object-oriented programming. These visualizations are hand coded and particularly useful in explaining a particular OO concept. Our tests on the effectiveness of these visualizations (Juell, Shanmugasundaram, Denton, 2002) suggested that the interaction of students with their code and the visualizations would aid effective learning. Hence, we are building ViewJ- an interactive tool that will allow students to watch visualizations of their own program running.

Overview of ViewJ

We are developing ViewJ - a tool that creates pictures/visualizations so that the student can see and study what their program is actually doing. ViewJ is an interactive tool. We are working on the alpha version of ViewJ. We want to do the following procedure iteratively: develop ViewJ, get it tested in classroom for its statistically significant effectiveness, and then make improvements on ViewJ. As far as we know, this is the first time that developing a tool to learn object-oriented programming based directly on classroom (statistically significant effectiveness) evaluation is undertaken. We are interested in collecting both qualitative and quantitative assessment of this tool. Our driving force for the development of ViewJ is finding the effectiveness of learning of object-oriented programming using visualization in statistically significant way. Another important driving force for us is that we want to provide visualizations at every stage or level in the process of learning of object oriented programming. That is, the tool should facilitate providing visualizations at ever stage or level in the process of learning. After evaluation of the existing tools, we realized that most of the tools provide visualizations in a limited way and not at every stage and level in the process of learning. Moreover, only very few of these tools were tested for statistically significant effectiveness. There is an overhead cost of learning object oriented programming in using the existing tools as students are forced to migrate to another environment after the initial use of these tools. We want to avoid this overhead cost with ViewJ. Some tools like BlueJ suggest an alternate way of testing the class program without writing the testing program (main method). We strongly believe in writing the test program (main method). We want to help the students to get it executed and viewed with the help of visualizations at every level. We feel that this strategy will help students understand object oriented programming better. We want to keep the user interfaces of ViewJ simple and easy to master. Viewj will be freely available after we have tested it.

Goals

The following are the goals of developing ViewJ:

a)Viewj should simulate the programming environment/good programming practices of industry in the learning environment of object-oriented programming

b)Providing visualizations using ViewJ at every stage or level of development of object-oriented programming

c)Providing visualizations for every error or remark during compiling and debugging

d)Multi level visualizations – showing every thing involved in the development of the object-oriented programming in one window

e)Providing narrative comments or remarks created by ViewJ (not student’s comments) about the student’s program during execution

f)Providing VCR controls for viewing the visualizations of the running program

g)Reducing the overhead cost of mastering the use of tool and then migrating to another tool

h)Use of feed back from statistically significant effectiveness testing of Viewj for further improvement

In industry programmers use various diagrams (visual aids) for the creation of their application programs at different stages of the development (at design, programming and testing level). Some of these are: class diagrams, use case diagrams, interaction diagram, and ER diagram. We want to stimulate the programming environment/good programming practices of the industry when the students’ start learning object oriented programming. We want to include the necessary features in our tool so that the students have the similar experience as in industry when using high development tools. However, the industrial tools are not designed for education. Hence, we will have to develop Viewj – an educational tool.

We should provide visualization at every level or stage of learning object oriented programming. We list the following as requirements of an effective visualization environment tool for learning object oriented programming:

  1. Overall picture level (UML class diagrams)
  2. Conceptual level (Visualizations to show the internal state of object, behavior, and identity)
  3. Statement level (Visualizations to show at memory level)
  4. Compiling level (Visualizations to show the errors)
  5. Testing level (Multi level visualizations in one window)

Hagan, D., & Markham, S. (2000) used surveys and interviews to collect data on student backgrounds, perceptions and attitudes towards BlueJ. One of the responses included: "the error messages are not very helpful in the compiler". Students normally get frustrated reading the text comments or errors or remarks provided by the compilers during compiling and debugging their program. Displaying error messages with visualizations showing the mistakes or bugs during compiling and debugging would help students enjoy programming. This approach would definitely ease the pressure on the students. Patterson, Kölling, and Rosenberg (2003) points out that the students consider testing boring. In addition the lack of good tools to support testing is a serious problem in teaching of testing in introductory courses. We feel that our visualization will make the testing process more in Multi level visualizations – showing every thing involved in the development of the object-oriented programming in one window - will be an interesting way of testing their programs. Our visualizations are multi-level and show the class program, testing program (main method), and movie like display of visualizations at the trace of code, display of results and the narrative comments (produced by ViewJ and not by students) in one window.

Students are expected to provide comments for their programs, but the current tools do not use these comments. We will provide the comments to help understand the program as annotations while program is being executed. We want ViewJ to provide annotations (not the comments of students) explaining about the concepts involved about that particular line of their program being executed. When students prepare for the exams, they would like to review some of their own programs quickly and repeatedly. Providing VCR controls for viewing the visualizations of the running program would help them to prepare for their exams well. Moreover students have different speed levels in learning. VCR tools would provide different speeds (Juell, P., & Sreekantaradhya, M 2003).

Students using some object oriented programming environment often abandon it after some time. Most of the tools adopt different approaches, which require students to transit to another tool. We don’t want them to be forced to migrate to another environment after crossing the initial hurdle of learning the object oriented programming using ViewJ. We strongly believe in the effectiveness of visualization in learning object oriented programming (Juell, Shanmugasundaram, Denton, 2002, Shanmugasundaram, 2003, Juell, Shanmugasundaram, 2004). However, Stasko, J.T. and Lawerence, A (1998) estimate that in the last two decades more than hundred and fifty software visualization prototypes and systems have been built. Only few attempts are made to systematically evaluate them to ascertain their effectiveness. He laments that if the systems are not evaluated and shown to be effective, what is the point of building them. Hence, we want the Viewj get tested in the classroom for its statistically significant effectiveness and use the feedback for improving the ViewJ.

Features Found in Competing Technologies

The process of learning object oriented programming includes learning about the overall picture of classes (UML diagrams), their relationships, state, behavior, and identity of objects of the classes. It is important for students to understand object oriented programming at an overall level, and a conceptual level. Moreover, when students develop object oriented programs, they need to learn the processes of writing the code, compiling, writing the testing program, getting the programs tested and executed. Understanding these processes and the relationship of these processes put lot of pressure on students. We believe in providing help at all levels of learning – overall level, conceptual level, and process level or statement level. We want visualizations as aiding tool at all these levels. We looked at a number of available tools to see how well they meet our needs.

BlueJ

Kölling, M., Quig, B., Patterson, A. & Rosenberg, J (2003) hypothesized that lack of appropriate learning tools is one of the main factor that made object orientation more complicated. There are a limited number of different builders/developing tools for developing object-oriented programs. Kölling, M., & Rosenberg, J (2001) proposed an approach for developing java programs with ‘objects first approach’ and developed a development tool – BlueJ. To some extent BlueJ is successful in aiding the development of java programs, especially with the beginners. However, there are some known problems. Kölling, M., Quig, B., Patterson, A. & Rosenberg, J (2003) lists the following as potential problems of BlueJ:

a)Occasional reluctance of students to leave BlueJ behind

b)Organization of the transition out of BlueJ (Need to migrate to another environment)

c)Some students who learnt OO with the help of BlueJ are weak in traditional areas such as data structures and algorithms, and the competent use of control structures, algorithmic thinking, recursion.

BuleJ provides an alternate way of testing the class programs to ease the pressure on the students. The students do not write test programs (main method) to test their class programs. BlueJ provides a testing environment. There is a possibility that this testing environment led to the weakness of students in the traditional areas of programming. These traditional areas include data structures and algorithms, and the competent use of control structures, algorithmic thinking, and recursion. BlueJ provides visualization only at an overall level (UML diagrams) but not at every level of learning. BlueJ does not deal with the identity of the object. Since BlueJ is intended as an introductory learning environment, there is a need for students to migrate from BlueJ to some other environment.

Alice – 3D

Dann, W., Cooper, S., & Pausch, R (2003) stresses the importance of object in OO programming and identifies that each object has state, behavior, and identity. They point out that drawing traditional memory maps to explain objects create confusion and boredom in students. They have created a program visualization tool Alice - 3D Interactive Graphics Programming Environment that focuses on objects while teaching about behavior and state. This tool has provision for visualization of character-level methods (object methods) and world-level methods (static methods). To some extent, Alice helps in teaching inheritance. Alice also provides for visualizing the state of variables in an object. It should be noted that the identity of an object is totally ignored. One of the problems of teaching Java with Alice is that the students do not develop a detailed sense of syntax, even with the C++/Java syntax switch turned on, as they only drag the statements/expressions into the code window. The students do not get the opportunity to experience such errors as mismatched braces, missing semicolons, etc (Cooper, S., Dann, W., & Pausch, R 2003). Cooper, S., Dann, W., & Pausch, R (2003) conducted an effectiveness test and their results show that the students who took the Alice-based course did better in CS1 than the total group, and significantly better than the students who were of a similar background. But it should be pointed out that these students take an additional course (using Alice) than the regular CS1 course. This is an expensive overhead. Alice does not address the identity of objects and does not provide any visualization at memory level.

DrJava

DrJava is a programming environment for Java. This environment has a simple interface based on REPL – “read-eval-print loop.” It helps students to develop, test, and debug Java programs. This tool has provisions for braces checking, consistently updating the highlighting comments and quotations, testing the code without writing the main method, and without recompiling repeatedly the class code. It is purely a text-based environment and does not use visualization. Students need to depend upon the text comments for debugging the programs. (Allen, E., Cartwright, R., & Stoler, B 2002).

Java Power Tools

Proulx, V., Raab, R., & Rasala, R (2002) presents another approach – Objects first with GUIs. These GUIs help students to understand OO programming in incrementally controlled environment. The authors have used some visualization for students to interact with and learn the OO programming at conceptual level. The authors ignore the identity of the object. Moreover, the students need to migrate to another environment as the students learn in a controlled environment. We believe the GUIs could be hard to understand by beginning students.

VisMod

VisMod visualizes the execution of programs in Modula-2 (Jimenez-Peris, R., Patino-Martinez, M., & Parcios-Martinez, J. 1999). It allows students to develop and visualize their programs at statement level. It provides only text-based comments when compiled. Moreover it does not provide any narrative comments (explaining the concepts related to that particular line of code) to accompany the visualization when the program is executed. It should be noted that VisMod supports programs in Modula-2, which is currently not a popular language like Java.

BeanShell

BeanShell is another tool - a Java source interpreter written in Java. This tool executes standard Java statements and expressions. This tool also uses the Java reflection API to provide runtime-interpreted execution of Java statements and expressions. This tool runs in four modes: command line, console, applet, and remote session server (BeanShell, 2003). This tool does not provide visualizations.

IBM Rational Rose

Based on all of the essential elements of UML modeling, the Rational Rose XDE family (IBM Rational Rose, 2003) provides common tools for analysts, architects, designers, and implementers to create and maintain UML models of the software project. They support forward and reverse engineering of code. This is an expensive tool for education purposes both in terms of money and time in learning to use, but a powerful tool from the industrial development point of view. It does not address the learning problem.

Jbuilder

Jbuilder is another powerful and expensive tool to develop Java programs. This tool has provision for quickly generating a UML model of a project to visualize code, making it easy to examine, analyze, and communicate design information. It has also provision for refactoring to efficiently rename classes, methods, fields, and packages and for moving classes and packages automatically, and more (JBuilder, 2003). It takes lot of efforts from students in terms of money, energy to learn to use this tool.

Summary of the supports of Competing Technologies

BeanShell, IBM Rational Rose, Jbuilder are commercial builders which are very expensive both in terms of money and time for students to learn. It is important to take into account the details of the support provided by them especially when one is developing a similar tool for educational purposes, as today’s students will be the future developers. VisMod is for currently not a popular language like Java. The fact that the VisMod supports visualizations at statement level is an important one from the students’ point of view. The details of the support provided by these different builders are shown in Table 1.