Design of a Beginners’ Programming Language with a Focus on Novel Interaction Techniques Fraser McKay School of Computing University of Kent [email protected] Keywords: POP-II.A. novices, POP-III.B. new language, POP-III.C. cognitive dimensions POP-IV.B. user interfaces, POP-VI.E. computer science education research

Abstract This project aims to investigate new interaction styles in teaching computer programming. There is often little overlap between text-based and visual programming languages. The intended outcome of this project is the design and implementation of a new programming language with focus on novel interaction techniques, which combines the benefits of different existing languages. Evaluating the HCI in current novice programming systems (Scratch, Alice, Greenfoot) has led us to propose new heuristics for these kinds of tools. Cognitive models of viscous interactions in block-based and textbased languages have also been compared. Early prototypes have been created, with some preliminary evaluations being used to refine the ideas. 1. Introduction This PhD concerns the development of a new beginners’ programming language, tentatively aimed at students beginning to program in early secondary school, beginning around age 12. The project is in its first year. There are various novice programming tools used real-world teaching, but the three major systems in this user space are Scratch, Alice and Greenfoot. Scratch and Alice are not true “visual languages” (not that they claim to be), but provide a drag-and-drop interface for building a program in “blocks”. Informally, programming editors can be sketched along two axes: the balance of mouse and keyboard input, and the perpendicular axis from textual to graphical presentation. The proposal here is for a tool that fits somewhere in the upper-left quadrant of that graph, where we have the speed and flexibility of text (or text-like) input, but the student benefits from the editor visualising the structure of the program and providing passive feedback as code is written (Figure 1). Evaluating the HCI in current novice programming systems (including Scratch, Alice and Greenfoot) has led us to propose new heuristics for these kinds of tools. Cognitive models have been constructed which explore the differences between block-based and text-based languages, and these have, in turn, fed into the development of the heuristics. With these in mind, we have also begun to design early prototypes of notations, and to form high-level ideas about the language’s underlying model, though this is unlikely to be radically different from mainstream object-oriented models. 2. Background There are a range of languages and environments used in novice programming. As well as Scratch, Alice, and so on, mainstream languages like Java, Visual Basic and Python are sometimes used – albeit in a novice environment like Greenfoot. Greenfoot is a beginners’ environment for Java, a mainstream textual language. Greenfoot programs are entered as text from the keyboard, whereas block programs are usually controlled with the mouse. Scratch and Alice provide such a drag-anddrop interface for building a program Lego-like “blocks”. There are less common interactions as well – Kodu (Anderson et al.) is a system that uses an Xbox 360 controller to enter the program.

PPIG, University of York, 2011

www.ppig.org

Keyboard

Direct manip.

Visual – Mindstorms Blocks – Scratch, Alice Text – Java, Basic Target space

Text

Code presentation

Graphics

2

Programmer input Figure 1 – Input vs. presentation 2.1. Interaction in novice systems Pane & Myers (1996) documented 29 heuristics, grouped under eight of Nielsen’s (1994) more general heuristics, as categories. Pane & Myers’ heuristics are based on novice programming studies up until 1996. The intervening years have seen a number of new systems. Tools like Scratch or Alice are markedly different in interface terms to the examples Pane & Myers had to draw on. Non-text, entry-level programming is also opening up for mobile platforms (Google’s App Inventor) and games consoles (Anderson et al.). The interactions used by a games console and its controller seem very different to those we would use when typing a BASIC or Pascal program. Ko, Myers & Aung (2004) identified six learning barriers in programming – design barriers, understanding barriers, etc. – and proposed, as part of their solution, some broad heuristics. They too note that Pane & Myers’ heuristics cover some, but not all, of the known problems. They begin to propose some simple heuristics, derived from their user study, but believing these are still too general, end up in proposing heuristics for a specific scenario (their “factory” metaphor). 2.2. Error prevention Research in programming education shows the extent to which “trivial mechanics” of syntax – braces, semicolons, etc. – interfere with students’ learning of higher-level programming concepts. Syntax errors occur frequently in novice programs, as seen in Robins, Haden & Garner (2006). Maloney et al. (2010) observe that a child playing with plastic Lego bricks will not encounter error messages – either the blocks fit together, or they don’t. A design following the engineering principle of “Poka Yoke” (error-proofing) can only be manipulated in a certain way (Shingō, 1986). Scratch, Alice and similar languages very tightly constrain the programmer’s ability to introduce syntax errors. However, a programmer who edits a text program might – legitimately – introduce temporary syntax errors as the program passes through various intermediate states. Jadud (2006) noted how some students moved to a different part of the program when they encountered an error, leaving what they were working on incomplete. Birnbaum and Goldman (2005) show that the program does not need to be in a run-ready state after every intermediate edit. In preventing errors, the block-based languages make editing an existing program more viscous. 2.3. Viscosity As part of this PhD’s new work, semi-automated Cog Tool models (John, Prevas, Salvucci, & Koedinger, 2004) have been used to compare the viscosity of adding, modifying, moving and deleting code in text-based and block-based teaching languages. Figure 2 shows the reduced viscosity in Java PPIG, University of York, 2011

www.ppig.org

3

(with Greenfoot), compared to Alice and to Scratch. In particular, the block-based languages are more viscous when it comes to modifying the contents of a statement, and moving a statement or block from one part of the program to another. In the radar diagrams, a smaller area is less viscous. Points across the four axes represent the viscosity in the four tasks above – lower values mean that the task is less viscous.

Figure 2 – Greenfoot and block languages 3. New heuristics Since this project is still in its first year, one of the largest outputs so far has been a provisional set of heuristics for evaluating novice programming tools. The thirteen heuristics are in four subsets - those that apply to the “feel” of the system, the mental model, program presentation, and code interaction (Figure 3). 3.1. Rationale Pane & Myers’ (1996) described heuristics for evaluating novice programming systems. One drawback of Pane & Myers heuristics is simply their length. Because they are organised along Nielsen’s system, the categorisation is not always clear-cut, and there is some duplication between categories. Having initially attempted to evaluate Scratch, Alice and Greenfoot with existing heuristics, we found it hard to say clearly where a given problem lay amongst the categories. Some appear to fit more than one heuristic, while others do not seem to have a natural home and must be “shoe-horned” into Nielsen’s scheme. The new heuristics build on previous heuristics, the literature on novice programming, cognitive dimensions of programming generally, and new evaluations of novice tools. 3.2. Discussion Several iterations of the heuristics have been looked at, resulting in the following thirteen: 1 2 3 4 5 6 7 8 9 10 11 12 13

The system should be engaging to the right audience-level of learners The system should be non-threatening in its approach and feel The system’s language and model should avoid redundancy The system’s underlying model should use abstractions appropriate for the given learners a. The model and the language should ensure [internal] consistency with themselves b. The user interface should be consistent, as with any usability The user interface should present salient information with good visibility The user interface should use secondary notations, but carefully The user interface should maintain simplicity and clarity in its presentation a. For reading and comprehension, the presentation should use human-centric syntax b. For entry and modification, the interaction should take into account human-centric syntax The interaction should allow user freedom in the order of doing things The system should minimize viscosity at the level of editing individual statements The system should avoid errors, or use soft fails The system should provide timely and constructive feedback

PPIG, University of York, 2011

www.ppig.org

4

These heuristics were demonstrated with evaluations of Scratch, Java and Visual Basic, as summarized in a paper we hope to complete shortly. Viscosity, for example, can be seen when trying to move a statement block in Scratch. Cryptic symbols like braces { } and semicolons ; are not what we would consider “human-centric” when they are used as delimiters in Java programs. Text-based languages often have broadly similar secondary notations, where font style and colour are used to emphasise particular keywords or identifiers. Scope is sometimes highlighted in these languages. The Greenfoot/BlueJ code editor uses background “boxes” of colour to show scope. In some editors, emphasis would be placed on bracket or brace pairs, to make scope easier to see.

Figure 3 – Heuristics in four sets In addition to a preliminary paper regarding the heuristics, the next step would seem to be a wider validation with other evaluators – the method used by Sears (1997), for example. Separately, we have begun to map relationships between the heuristics in our sample systems. It has been suggested that we produce a version of the heuristics as HCI patterns, and we have already produced a draft of the heuristics phrased as questions, based on specific examples from real systems. 4. Towards a new system -1. Prototypes 2. Deciding language structures 3. Next few steps? 5. Acknowledgements My supervisor is Michael Kölling at the University of Kent. Sally Fincher suggested using patterns, and approaches to validation. Michael Kölling sketched the first version of the graph in Figure 1.

PPIG, University of York, 2011

www.ppig.org

5

6. References References Anderson, E., Cheng, L., Coy, S., Gibson, B., MacLaurin, M. & Tabak, J.Kodu. Retrieved 30/05, 2011, from http://research.microsoft.com/en-us/projects/kodu/ Birnbaum, B. E., & Goldman, K. J. (2005). Achieving flexibility in direct-manipulation programming environments by relaxing the edit-time grammar. IEEE Symposium on Visual Languages and Human-Centric Computing, 259-266. Jadud, M. C. (2006). Methods and tools for exploring novice compilation behaviour. Proceedings of the Second International Workshop on Computing Education Research, 73-84. John, B. E., Prevas, K., Salvucci, D. D., & Koedinger, K. R. (2004). Predictive human performance modeling made easy. Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, 462-470. Ko, A. J., Myers, B. A., & Aung, H. H. (2004). Six learning barriers in end-user programming systems. IEEE Symposium on Visual Languages and Human Centric Computing, 199-206. Maloney, J., Resnick, M., Rusk, N., Silverman, B., & Eastmond, E. (2010). The scratch programming language and environment. ACM Transactions on Computing Education (TOCE), 10(4), 16. Nielsen, J. (1994). Heuristic evaluation. In J. Nielsen, & R. L. Mack (Eds.), Usability inspection methods (pp. 25-62). New York: John Wiley & Sons. Pane, J. F., & Myers, B. A. (1996). Usability issues in the design of novice programming systems. No. 96-132). Pittsburgh, Pennsylvania: Carnegie Mellon University. Robins, A., Haden, P., & Garner, S. (2006). Problem distributions in a CS1 course. Proceedings of the 8th Austalian Conference on Computing Education, 165-173. Sears, A. (1997). Heuristic walkthroughs: Finding the problems without the noise. International Journal of Human-Computer Interaction, 9(3), 213-234. Shingō, S. (1986). Zero quality control: Source inspection and the poka-yoke system Productivity Press.

PPIG, University of York, 2011

www.ppig.org

Design of a Beginners' Programming Language with a ...

This PhD concerns the development of a new beginners' programming language, ... is also opening up for mobile platforms (Google's App Inventor) and games.

352KB Sizes 3 Downloads 179 Views

Recommend Documents

Design of a Beginners' Programming Language with a ...
Greenfoot programs are entered as text from the keyboard, whereas block programs are usually controlled with the mouse. Scratch and Alice provide such a drag-and- drop interface for building a program Lego-like “blocks”. There are less common int

A BDI Agent Programming Language with Failure ...
Department of Computer Science & Information Technology .... As a consequence, achievement event-goals enjoy, by default, a certain degree of commitment ...

TsPyC: A Programming Language Supporting ...
programming languages should have the ability to be customised using .... semantic tree represents the intended meaning of the code in a form which can be ...

A language of aspect oriented programming (AOP) as ...
describe behaviours of distributed systems at an abstract level or to capture requirements in early development stages with a clear, graphical, and intuitive ...

c programming language for beginners pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. c programming ...

Towards a 3D Virtual Programming Language to Increase Number of ...
twofold: (1) provide an early-stage Virtual Reality 3D BBP proto- ... In the year 1983/1984, 37% of CS degrees ... The CS degrees awarded to women have.

A language of aspect oriented programming (AOP) as ...
c. bMSC M. bMSC Ma. Abstract. The notion of aspect looks promising for handling cross- cutting concerns earlier in the software lifecycle, up from programming ...

Towards a 3D Virtual Programming Language to Increase Number of ...
in CS, such as the study performed at Georgia Tech [19]. Our work shows one available ... stages (high school and freshmen college students). Once students ..... Mom, let me play more computer games: They improve my mental rotation skills.

pdf-0734\learning-processing-a-beginners-guide-to-programming ...
... and Interaction (2008). Page 3 of 9. pdf-0734\learning-processing-a-beginners-guide-to-pr ... on-morgan-kaufmann-series-in-computer-graphics-b.pdf.

pdf-133\web-design-a-beginners-guide-second ...
on the topics of Photoshop, web design, and Mac OS. Page 3 of 7. pdf-133\web-design-a-beginners-guide-second-edition-by-wendy-willard.pdf.

Automatic derivative method for a computer programming language
Oct 19, 2007 - pile a Higher-Order Functional-Programming Language with a First. Class Derivative Operator to Ef?cient Fortran-like Code”, Jan. 5,. 2008 ...

Hop, a Language for Programming the Web 2.0
white spaces. Hence the corresponding Hop program of the HTML document of Figure 1 is written as in Figure 2. . . .

(*PDF*) Programming Language Pragmatics By #A# ...
latest developments in programming language design, including C & C++11, Java 8, C# 5, Scala, Go, Swift,. Python 3, and HTML 5* Updated treatment of ...

Automatic derivative method for a computer programming language
Oct 19, 2007 - 04/overloading-haskell-numbers-part-2.html. T.F. Coleman, A. Verma, “ADMIT-l: Automatic Differentiation and. MATLAB Interface Toolbox,” Mar ...

IndiGolog: A High-Level Programming Language for ... - Springer Link
Giuseppe De Giacomo, Yves Lespérance, Hector J. Levesque, and Sebastian. Sardina. Abstract IndiGolog is a programming language for autonomous agents that sense their environment and do planning as they operate. Instead of classical planning, it supp

The C programming Language
A preprocessing step performs macro substitution on program text, inclusion of other .... Chapter 1 is a tutorial on the central part of C. The purpose is to get the ...... As an illustration of some of the bit operators, consider the function getbit

The C programming Language
3. The for statement. 4. Symbolic Constants. 5. Character Input and Output. 1. .... assignment or a function call, can be a statement. Pointers provide for .... The only way to learn a new programming language is by writing programs in it. The first 

The C programming Language
developed, since both the system and most of the programs that run on it are written in C. The language, however, is not tied .... Most can be written in C, and except for the operating system details they conceal, are ... Chapter 7 describes the sta

Design of a Medical Image Database with Content ...
The architecture of the proposed image database system is multi-tier and allows easy ..... It provides tools to access the file system where images and their ...