Going beyond visualisation: Using Java to learn Java over the webPeter E. JonesElectrical and Electronic Engineering The University of Western Australia |
We are applying the Java programming language to create a tutorial on the language itself. It is to give more than visualisation of programming concepts, that is, to go beyond visualisation and engage the learner with interactive opportunities. Java provides multi-platform interactive programming combined with just-in-time delivery over the Web. This move away from traditional methods needs care in avoiding pitfalls and adverse effects on the quality of learning. The conventional classroom-based lecture and tutorial with support from closed computer laboratories is proving expensive in terms of physical resources. We also need to provide for lifelong self-education ability in addition to providing for immediate career skills. Our project takes advantage of the Web, the commodity status of personal computing, the intranet within a campus and the Internet for distant access. In using Java within a browser we have been able to provide a measure of interaction to allow the learner to evaluate and assess for themselves their level of understanding. We also provide visualisations and exercises to further enhance the learner's experience. One obvious problem is that the educator needs to have access to programming support, which may not be required with an authoring system.
We are applying Java to give not only visualisation of programming concepts but to go beyond that to engaging the learner with interactive opportunities. Our motivation came from student comment. They were concerned over the abstract nature of some of the lectures. These were in units of the Information Technology stream of a four-year B.E. degree. We believe that only by making the learner remain active can they develop a deeper understanding. This move away from traditional methods needs care in avoiding pitfalls and adverse effects on the quality of learning. Student feedback indicates they would prefer on-line learning as complementary and not as a replacement for the traditional lectures and tutorials.
It is too easy to become dazzled by the Web's click-to-see and be entrapped in mindless futzing. However, the Web is growing at a rate that suggests that in the developed countries there will be almost universal connectivity in the early part of the next century (Lewis, 1996). The Web allows students to remain at home or at work and access up-to-date course materials. Many courses are already offered over the Internet, for example see Globewide Network Academy at: http://uu-gna.mit.edu:8001/uu-gna/index.html. With the almost universal adoption of Java into browsers and operating systems we wanted to explore its use in providing more interactive multimedia tutorials.
Our earlier attempts at using Hypercard (Jones and Ritchie, 1998) for a tutorial on operating systems failed to live up to the promise of interactive supporting material for the abstract nature of the lectures. It suffered from several of the common failures for such material. Later on, we tried using Visual Basic and more recently the Authorware system from Macromedia (Ritchie and Jones, 1997). But what we wanted was to use the strengths of having a computer animate algorithms and allow students to experiment with programs. We wanted to get away from using the computer as a page-turner of a difficult to read display for long streams of text. Screen displays at 72 pixels to the inch do not compare favourably with textbooks that may have resolutions of more than 1,000 lines per inch. Typically, with conventional textbooks on programming languages, a learner needs to go through many secondary tasks on a computer away from the book and so lose sight of their original objective, besides taking much valuable time.
Another factor is that the closed computer laboratories to support conventional classroom-based lectures and tutorials are proving expensive in terms of physical resources and there are difficulties in coping with rapidly changing times. We need to plan to take advantage of the converging technologies as well as to take account of the changes in the needs of our customers - that is our students, the funding bodies as well as industry and commerce. Additionally, we need to provide for lifelong self-education ability in addition to providing for immediate career skills.
It is now common to place lecture notes, slides, tutorials and answers on the Web. This may give the illusion of providing additional choices for student learning. An advantage, of course, is that authors can make such material more interactive than paper by providing links to related material and giving various means of navigating. But there is the constant problem of dangling references. For the on-line material to compete with paper, authors need to prepare resources that complement. For instance, animation may provide insights not available from text alone. Or, the student can be encouraged to experiment with an interactive system to gain new insights. Questions with feedback can check for understanding and provide feedback.
Distance learning has a long history and has used many of the earlier non-computing technologies. However, the use of the Web has provided a multimedia mix of vision (still and moving images), audio (speech, music and sounds), virtual and augmented reality. Much of the adoption of these newer forms in distance education has been augmenting what were often poor analogies of textbooks with visualisation.
Hypertext goes back to Vannevar Bush's idea of a Memex (Bush, 1945). Ted Nelson coined the term "hypertext" in 1965. This initially meant the non-linear reading of text in a computer system, but now includes other media types. Tim Berners-Lee initiated the World Wide Web in 1991. He developed the hypertext transfer protocol (HTTP), the hypertext mark-up language (HTML) and a character-mode user interface for accessing distributed documents. With the launch of the graphical Web browser "Mosaic" from the University of Illinois' National Center for Supercomputing Applications (NCSA) in June 1993, anyone who could point and click could navigate the web.
Since the start of personal computers in the early 1970s, their performance has continued with an almost geometric improvement in most features. At the same time there was the move to a graphical user interface using the mouse as its pointer. Modems have increased in speed with downloads at up to 56 kb/s, with ASDL technologies holding the promise of speeds close to that on LANs. The final instalment in this group of enabling technologies is a language that could be used to write one version of a program and run it everywhere - that is Java.
Java allows you to create either small downloadable programs ("Applets") or standalone applications. The Sun Java Development Kit (JDK) comes with an Applet viewer as an alternative to using a browser. Browsers use an extension to HTML to specify the Applet code to be loaded as:
where the width and height are parameters that specify the size of the area within the browser's window to be used by the Applet.<APPLET code="myApplet.class" width=100 height=200> optional - some other HTML for non-Java-enabled browsers </APPLET>
Most of the syntax is from C/C++. The designers of Java have kept out features present in C/C++ that are problematical for learners and professional programmers. For example, there are no explicit pointers, instead Java uses recursive data structures. Another related issue is the management of memory allocation - in Java this is taken care of by the system. Array access is another common source of problems in C/C++ and Java has made this safer by providing automatic runtime bounds checking. Strings too are a class with a separate class for alterable strings and again are less trouble than the array of char found in C/C++. A Boolean type has been added, removing another set of problems caused by the use of integer values of zero for false and non-zero for true in C/C++.
Java is architecture neutral, in other words it is not solely aimed at one platform. It has a platform independent graphics model - the Abstract Window Toolkit (AWT). Java provides for exception handling and is multi-threaded. Unlike C++ it uses single inheritance, although packages and interfaces provide some of the functionality of multiple inheritance. All variables are initialised to a default value and this avoids another common problem. All the sizes of the low-level types are fully defined and are independent of the platform. The advantages of these features are that both the learner and the accomplished user can concentrate on higher-level abstractions. The advanced features of multi-threading and exceptions can then be used in course units of later years such as those on operating systems or concurrent programming.
There remains some concern over issues in human-computer interaction (HCI) with the addition of Java to Web pages. Will this browser interface be the sole doorway to computing for many users? The question is then on the usability issues of this form of interface. Additional aspects of the use of history bookmarks, navigation issues such as open URL, back, forward, goto, links on a page, special buttons on a page, navigation using graphic maps, within the page scrolling, within the screen with multiple browser windows etc. What is the user's mental model? One page is one screen is impoverished. The recent addition of frames, forms and dynamic pages makes even this simple model break down. We need to be careful not to disregard all the hard won lessons from both the HCI and the hypertext communities.
Figure 1: Browser on JavaLin
The tutorial is accessed using a web browser, as can be seen in Figure 1, using Netscape's Communicator on a Macintosh computer. It provides for simple navigation using a frame with a list of contents and a next/previous section navigation button. The location and toolbar could also be hidden to reduce the temptation to browse and to increase the amount of screen space for the tutorial. We decided against having a separate navigation window as that may have cluttered the screen. The normal colour change in link status within the contents frame acts as an aide-memoire.
Figure 2: Controlling execution of a for-loop
The learner can view the execution of a fragment of Java by means of an applet. It is used to display the source instructions, as in the example of a for-loop in Figure 2. A panel below the source shows the values of the control variable changing. Finally, the lower panel allows the user to control the applet by either single stepping, that is executing one statement at a time, or to allow it to run at a controlled speed. The panel with the source is updated to highlight which statement is being executed.
Figure 3: User interaction with the mouse
Another applet is the one shown in Figure 3. Here the user can click anywhere in the grey box and see a message to indicate the mouse event and its location. There are other applets to show more advanced aspects of Java such as how to animate with graphics, how to use the elements of the user interface such as buttons and finally to show the operation of threading or concurrent execution of Java.
Figure 4: Exercise controlled with a Java applet
At the end of many sections an applet is used to give an opportunity to take part in a question-and-answer session before moving on. This is shown in Figure 4 where the user selects answers by clicking on the radio-buttons and then pressing the "Submit" button to have the applet check the answer. If it is correct, then the feedback is only that the message near the button is changed to "Correct!". If it is wrong, then the message "Try again" is briefly shown and then replaced with the try-counter. Admittedly this is far too simple. The advantage that we are demonstrating is that the client is performing the check and no load is presented to the network or to the server.
An early small study has shown that students develop a better understanding of concepts using the tutorial than through similar material presented using printed material. We feel that it has appropriate complexity in its multimedia environment; that the learner is active; the curriculum is appropriate; navigation is obvious; learner feedback is provided in answering exercises and interacting with applets; the learner is always in control; and finally that our learners were motivated when they used the tutorial. In fact, they became quite competitive!
Learning a second programming language (Walker and Schach, 1996) seemingly still needs to be taught, as it cannot be reliably assimilated. It is possible that a low cost method would be to use a tutorial such as ours rather than have a normal lecture unit.
One major problem with using a programming approach to the creation of the tutorial is that an author either has to be a competent Java programmer or has access to someone who is. There are several ways to create the HTML material, it can even be generated directly from some applications or at the least their output run through a converter application.
Sun Microsystems have recently granted the project a Netra server and six JavaStations to further develop the tutorial and we are in the process of creating an open access laboratory. This will be in addition to student access to the tutorial over the campus intranet and via modems from home.
Finally, it is a pleasure to acknowledge the work of Mr. L. S. Tan in creating the tutorial and in contributing to the design of the Java classes as well as conducting the evaluation.
Flanagan D. (1997). Java in a Nutshell. Second edition. O'Reilly and Associates Inc.
Jones, P. E. and Ritchie, G. J. (1998). Comparing development tools for multimedia courseware. In Black, B. and Stanley, N. (Eds), Teaching and Learning in Changing Times, 142-148. Proceedings of the 7th Annual Teaching Learning Forum, The University of Western Australia, February 1998. Perth: UWA. http://lsn.curtin.edu.au/tlf/tlf1998/jones.html
Lewis. T. (1996). The Next 10,0002 Years: Part II. IEEE Computer, 29(5), 78-86.
Naps, T., Bergin, J., Jimenez-Peris, R., McNally, M. F., Patino-Martinez, M., Proulx, V. K. and Tarhio, J. (1997). Using the WWW as the Delivery Mechanism for Interactive, Visualization-based instructional modules. Conference on Integrating Technology into Computer Science Education, (ITiCSE'97), Uppsala, Sweden, June 1997, pp.13-26.
Ritchie, G. J. and Jones, P. E. (1997). On-line Tutorial for Electronic Circuits - Does it Compete with Traditional Tutorials? ASCILITE'97, Annual Conference of the Australian Society for Computers in Learning in Tertiary Education, Curtin University of Technology, Western Australia, Dec. 8-10, 1997, pp.511-515.
Walker, K. P. and Schach, S. R. (1996). Obstacles to Learning a Second Programming Language: An Empirical Study. Computer Science Education, 7, 1-20.
Author: Peter E. Jones Electrical and Electronic Engineering The University of Western Australia Nedlands WA 6907 Phone: +61 8 9380 3100 Fax: +61 8 9380 1065 Email: peterj@ee.uwa.edu.au Please cite as: Jones, P. E. (1998). Going beyond visualisation: Using Java to learn Java over the web. In C. McBeath and R. Atkinson (Eds), Planning for Progress, Partnership and Profit. Proceedings EdTech'98. Perth: Australian Society for Educational Technology. http://www.aset.org.au/confs/edtech98/pubs/articles/jones-p.html |