Skip to content
Publicly Available Published by Oldenbourg Wissenschaftsverlag April 12, 2016

5Code – An Integrated Programming Environment for Beginners

  • Markus Dahm

    Markus Dahm studied at RWTH Aachen and Imperial College London, conducting research in user centered design in health care. At T-Systems he managed projects for mobile systems. Currently he is professor in informatics and software ergonomics at Hochschule Düsseldorf. His research in human computer interaction currently focusses on support for learning as well as teaching informatics.

    EMAIL logo
    , Frano Barnjak

    Frano Barnjak earned his BSc. Media Informatics at HS Düsseldorf and is currently student of MSc Media Informatics. He is working on master thesis about collaboration over the Web.

    and Moritz Heilemann

    Moritz Heilemann earned his BSc. Media Informatics at HS Düsseldorf and is currently student of MSc Media Informatics.

From the journal i-com

Abstract

Based on experience in teaching programming, we developed the integrated development environment (IDE) 5Code especially to support beginners. As a first step, a simple, understandable formula was developed how to advance from the problem to the program in 5 operative steps:

r e a d i t g e t i t t h i n k i t n o t e i t c o d e i t .

In order to reduce the cognitive load of the learners effectively, 5Code was designed such that all 5 steps are permanently presented, accessible and executable. Thus, learners are provided with the entire programming context from presentation of the task via own notes and annotations to the code area. Learners can mark and annotate any part of the given task’s text; these annotations can be edited as notes with own comments. Furthermore, the notes can be dragged into the code area, where they are shown as comments in the coding language. Any modifications in the comments are synchronized between notes and code. 5Code is implemented as a web-application. It is used in university introductory courses on object oriented programming.

1 Introduction and Motivation

1.1 From Problem to Program

It is a fairly common experience that beginners in the field of programming face bigger problems than just the syntax and semantics of programming languages (cf. [3, 8, 12]). A statement like “I know how to code a while loop, I just don’t know when to use it” shows typical trouble. The greater challenge, which is essentially the new concept to understand, internalize and apply, is the procedure that leads from the problem to the program solving it [2, 13]. Standard procedures already described in abundance in the form of software engineering methods in the large. However, for beginners a representation must be found, which does not itself raise new questions and distract from the novices’ problems of programming in the small.

Difficulties of beginners emerge in early stages, i. e. when dealing with the procedural aspects of programming, but the considerations made here are also valid for teaching object-oriented programming (OOP). The additional problems that encompass the understanding of OOP, as described for example in [3, 12, 21], even add to the more fundamental obstacles how to advance from the problem to the solution. Unlike, for example in in [21] or [3], OOP concepts were not in focus when developing 5Code, which nevertheless also helps understanding programming the OO way.

For teaching the basic OO concepts, other representations and visualizations (e. g. the DOOM principle [6] were developed, which are not elaborated here.

1.2 Cognitive Load

The cognitive load according to Sweller and Chandler [4] in solving tasks is very high for novice programmers (see also [3, 21]): Using their limited working memory which includes the cognitive context, they must simultaneously keep 1) the task itself, 2) their understanding of the task, 3) the semantic and 4) syntactic definitions of the used programming language. This defines the base context in which they must 5) develop a solution concept which they need to 6) type as correctly formatted and error free code, meanwhile 7) making correct use of the (complex) IDE (see Figure 1).

Figure 1 
            Cognitive load for programmers.
Figure 1

Cognitive load for programmers.

Unlike experts, beginners cannot rely on corresponding consolidated schemes and mental models in long-term memory and learned plans (see [3, 19]) to assist their problem solving. Thus, the cognitive load comprises at worst all seven areas and is therefore typically very high for most novice programmers.

1.3 Context is Often Lost

This cognitive overload can be observed repeatedly in lab session: after the first, often only superficial, reading of the task, novices tend to plunge immediately into the realm of coding (as the perceived most important part of their activity) and they remain in this narrow context. By focusing on the implementation in code, the actual task vanishes rather quickly from the working memory and thus from the cognitive context. In the best case, they check the task from time to time. However, not rarely they write code that has only remote connections to the task or the topic of the session. Many beginners lose themselves in their code, often frustrated that they cannot find a proper solution. In this situation it becomes more and more difficult to develop an idea or a concept of how to arrive at a fitting solution, hence their uncertainty grows – a vicious circle. These general shortcomings in problem solving was already described by e. g. [17].

This situation is further aggravated by the technical environment in that every integrated development environment (IDE) supports only working with code – in the form of program text or as graphical blocks. The task itself is never part of an IDE, it has to be opened in a separate program or must be carried on additional paper. Ideas or notes, the learner must additionally write and keep on paper or in separate files. Although one can write down notes in the code in the syntax of comments, this behaviour is never actively offered, let alone enforced by the IDE. It is up the learner himself to find the mental discipline to write down his concepts before coding them. This focussing on code applies unfortunately not only to expert IDEs but also to learning environments for novice programmers, as we show in the next chapter.

2 Existing IDEs for Beginners

There exist a number of programming IDEs for beginners which employ a variety of approaches, most of which strive to lower the barriers to learning. A good overview can be found in [10, 14, 18, 20, 22], they show examples how this can be achieved:

  1. Simplify the Language → e. g. Logo, Basic

  2. Prevent Syntax Errors → offer only valid elements, e. g. in a menu or graphically

  3. Construct Programs Using Objects → e. g. Scratch

  4. Create Programs Using Interface Actions → direct manipulation

Also, an IDE can provide a framework that takes some necessary boilerplate coding away from the student, e. g. BlueJ, Greenfoot, Kara, Squeak and Java-Hamster. Some even allow for the programming of hardware to control machines, robots and the like, e. g. Lego Mindstorms and Kano. These IDEs make it easier to test programms and also provide a means of easy graphical output, both features enhancing the users’ satisfaction.

Many of these approaches can be historically linked to Logo and related microworlds which form the basis of today’s IDEs. Current variants profit strongly from advances in the last ten years regarding

  1. hardware → performance

  2. graphics → visualisation

  3. interaction → concepts of usage

  4. internet → platform independence, availability, collaboration

  5. computer games → gamification

Learning with microworlds gets you quick results, in this regard, they are better suited than traditional, complex IDEs to gain an access to coding, what can be done and what can be achieved by programming. They are therefore quite suitable for younger students, a rating that shows also in the colourful and playful design of these IDEs (e. g. Scratch as shown in Figure 2).

Figure 2 
          Screenshot from scratch.mit.edu.
Figure 2

Screenshot from scratch.mit.edu.

The main goal of these IDEs is to introduce young children to the world of programming – no piece of cake, given that programmers are still widely regarded as geeks and / or nerds, mostly not in a good sense. Many microworlds also support those who invested time and effort even more in that they provide a community, which provides contact to others, likeminded students. In these communities, they find solutions for their problems and inspiration for own projects. Even better and even more important, they find that they are not alone, that there are many others who like what they are doing in programming.

Massive Open Online Courses (MOOCs) also offer some form of IDE, e. g. KhanAcademy.com, Codecademy.com and Code.org for online development of software. Code.org is quite similar to Scratch in appearance and functionality and provides tasks in story form to be attractive and induce motivation.

However, the knowledge, which can be acquired using these IDEs and microworlds, is specialised and limited. If e. g. children are taught to construct a program using direct manipulation of objects, they are not (yet) fit to write such a program with a traditional programming language. [14] also show results in this light. What is missing most is the teaching of a method, of how to work with the problem to arrive at a working program. All these systems just support coding and testing. There are at best hints to think about the problem and how a solution might look like. In no way is the process of working with the problem, writing or painting own solutions described, nor is supported in any way by the microworld itself. Even commenting code is hardly supported in graphical microworlds such as scratch. All that is supported – and therefore subtly enforced is a method of trial an error. This is not bad in that it fosters concentration and stamina. However, it is bad when students learn that this is the given way to go in programming.

All these aspects make most microworlds not quite suitable for older students, be it in their final years in school or in starting years in university. For those audiences, different approaches should be taken that include not only quick and dirty coding and testing but also an idea of method, of the necessity of analysis and design before coding. Approaches for older beginners should be as much as possible supported by an IDE – both to emphasise the entire process of programming and to relieve the students as much as possible from the additional burden of a complex tool.

3 Didactic Goals

The major didactic goals of the concept of 5Code are therefore, 1) to support the students when they learn and apply the path from problem to program, 2) to reduce the cognitive load and 3) to make the entire context available throughout working on this path.

Firstly, beginners shall not just produce code that somehow does something, which is a common misconception. Instead, they shall work through all the necessary steps of analysis and design before the actual “coding”. When in the course of the semester the tasks become more and more challenging, students shall be both aware of and practised in a complete approach.

In order to, secondly reduce the cognitive load of learners, they are made aware explicitly that, when solving tasks, not all the activities and requirements must be tackled at the same time – in the simplified context of the lab work but also in the “real world”. On the contrary: The separation of work into individual phases or steps relieves the worker and thus makes it possible to execute each step successfully.

Based on the phases or areas of responsibility used in software engineering such as analysis, design, implementation (see [1]), a simplified representation for beginners of this methodology was developed, in which the path from problem to program is described in in five steps [6]. Unlike specialized termini such analysis or design that are unknown to beginners, simple verbs are employed to express the activities of the learners themselves:

r e a d i t g e t i t t h i n k i t n o t e i t c o d e i t

Surprisingly, perhaps, is first step, “read it”. However, the experience from many years of teaching shows that many students very often only skim the given tasks, read them not fully or not to the end at all. The explicit naming of the reading act shall prevent this. Attention is also drawn to the order of steps “get it” and “think it”. By means of writing down their thoughts, students shall learn to verbalize them at first in their mother tongue rather in their own words than in the formal programming language. Thus, the semantics of the solution is separated from its formal syntax. Only eventually, program code shall be written – as the very last step. In order constantly remind the students in the lab, the tutors wear shirts that show these steps (Figure 3).

Figure 3 
          T-shirts showing 5 steps – RGTNC.
Figure 3

T-shirts showing 5 steps – RGTNC.

A methodical approach is everyday practise for experts. However, beginners cannot rely on an expert’s experience, schemes and plans (see e. g. [7, 19]) and therefore require explicit rules in order to learn through repeated use.

Finally, the third goal of 5Code is to provide the complete context: task + analysis + design + implementation simultaneously within the IDE. The five steps shall be carried out integrated with each other – as opposed to using a different tool for each step as it is necessary with current tools. This shall reduce the cognitive and organizational effort as much as possible.

4 5Code – The IDE with Complete Context

Especially rule-oriented beginners rely heavily on the tools they use (cf. [5], p. 81). As shown above, IDEs commonly used in practical exercises unfortunately offer functionality only for coding and possibly testing. The steps before are not supported. It requires the learner’s own initiative to keep the given task in parallel to the IDE as well as jotting down own notes to assist his understanding and for planning the solution. This requires both dedication as well as additional methodological and cognitive effort, as several tools and even multiple media (software, paper) must be applied.

4.1 Structure and Procedure

To avoid this extra effort and thus free cognitive capacity to solve and to learn unhindered, 5Code provides the user with the entire context of all 5 steps in three panes as parts of a single browser window (Figure 4).

Figure 4 
            5Code-window: read it → get it → think it → note it → code it.
Figure 4

5Code-window: read it → get it → think it → note it → code it.

This structure ensures that learners do not need additional program windows, papers or files for the given task as well as for self-written notes. Instead, all artefacts are presented simultaneously, in every step. The entire context of the process always remains visible and directly accessible. When solving the task, in principle, the user works his way through the different panes from left to right.

4.2 Reading and Understanding

In the left pane, the given task is always visible. Since the task does not disappear into another program window when the learner writes notes or code, the task is present throughout the entire process and can be checked at any time. Hence, the learner does not have to memorize the parts of the task he is on; his cognitive load is thus reduced.

To support understanding the task, like in any text editor, any part of the text can be selected, which helps focussing this part. As long as the piece of text is selected, the learner can enhance the selection with a type and thus make it a marker. Currently these standard types are available: Generic marker (marker 1–3), which only highlights the selection in three colours without further significance, like a textmarker on paper. Furthermore, the learner can specify the marker in more detail to give himself a hint concerning the role the selected text could have. These implementation-oriented marker types are data, process, function, class. Each type comes with its own colour.

Many learners add short texts when analysing the text of task on paper. This is a valuable step toward understanding the task and is therefore supported in 5Code: A simple click on the marker opens a dialog (Figure 5). Initially the text of the marker is copied into the dialog; it can then be edited and expanded by the learners own musings and hints towards the implementation. Furthermore, in the head of the dialogue, the type of the marker can be set via a dropdown box.

Figure 5 
            Marker dialog.
Figure 5

Marker dialog.

By providing these markers and the possibility to type and annotate them, the phase of analysis with its operative steps read it and get it are well supported by 5Code.

The operational concept is very similar to the traditional work with pen, textmarker and paper, as well as work with common text software. There are even some web-services such as an annotation facility for web pages [9]. Therefore this functionality is easy to understand and easy to use. Moreover, 5Code provides singular benefits in that the markers can be edited and reused in the following steps.

4.3 Planning the Solution and Writing it Down

In current IDEs, the learner can write own considerations and hints usual only directly into the code window in the syntax of comments of the programming language. However, beginners should as long as possible refrain from actually writing code. This way they are encouraged to actually carry out the necessary preparatory steps prior to coding – and not to skip thinking in favour writing any code. Therefore, 5Code provides the explicit possibility to take and manage notes in a separate window: the note window in the middle of the browser.

A note may simply be entered as text at the top of the list of notes, as it is common for list-oriented software. This new note is then appended to the list as a generic note (Figure 6).

Figure 6 
            Directly entered note.
Figure 6

Directly entered note.

Furthermore, a note is automatically created when marking a part of text of the task: The highlighted text of the task is initially adopted as the title of the note. All notes are shown in a vertical list as shown in Figure 7.

Figure 7 
            Markers in the given task and connected hierarchical notes.
Figure 7

Markers in the given task and connected hierarchical notes.

Notes can be moved and thus sorted via drag&drop. Firstly, the order of the notes can be changed. Additionally, notes can be arranged hierarchically, thus reflecting the logical relations between them. So you can, e. g. first individually identity and mark text snippets describing data, control structures, and other requirements of the task text with the appropriate type. After that you order the resulting notes in a fashion that they can be implemented in the next step. The final arrangement of the notes then corresponds to the learner’s own logical order of understanding, independently of the structure of the given task.

In order not to lose the overview within an extensive lists of notes, nested notes can be displayed or hidden away, a feature known as folding e. g. in file system explorers within the operating system or music software.

A learner can use his notes also as a todo list: If a task that has been defined by a note is completed, he can tick off the note in the list; the note then appears grayed out. Additionally, the list, can also be filtered by status: active, completed or both, so you can see at a glance, what is already done and what needs yet to be done.

4.4 Coding – Typing, Dragging, Testing and Roundtrip Engineering

Thus prepared by the steps reading, understanding, planning and noting, the learner can now (finally) start coding the solution. The coding part of 5Code currently supports Java, but is language independent and was also adapted for HTML / CSS / Javascript. The editor provides a number of comfort features as syntax highlighting, automatic indenting, folding, line numbering, bracket matching and tabs for multiple classes or files. These features do not hinder but assist the learning of how to read and write code in that they show structure and provide overview.

Deliberately not offered are advanced features such as auto completion, code generation and auto correction, although they are valuable tools that enhance the productivity of experts. But novices to programming must understand and learn these routine activities, no tool should take over these tasks for them. Learning by doing is only possible if the tool does not magically take over a part of the thinking process. Likewise, learners must make their own mistakes so that they can learn from them; an IDE that autocorrects simple errors or offers only valid functions or variables in the given context seems to be helpful but interferes with the learning process (see [16]).

However, 5Code does offer substantial support when coding. One of the usually least favoured tasks is the commenting of code. Learners who work systematically by highlighting text parts in the given tasks and produce notes which they enhance with their own descriptions will be rewarded: Their written thoughts and hints can be directly transferred into the code. Each note can simply be dragged and dropped into the Code window to the desired location: The title and comment of the note are inserted as line-comment (//) into the code; notes of the type function or class are added as javadoc-style comments (/ ** * /) as shown in Figure 8.

Figure 8 
            Drag and drop a note from List into Codeeditor.
Figure 8

Drag and drop a note from List into Codeeditor.

The process of program development is often iterative, even for smaller tasks. For example, frequently only when actually coding it transpires that some information on data values or functionality are missing in comments or need to be corrected. 5Code helps by keeping markers, notes and code comments consistent: Each change to a note in the list of notes or via the marker dialogue is automatically made to the corresponding comment in the code editor. Likewise, any changes of a comment in the code editor, can be found in the respective note (Figure 9). All markers, notes and derived code comments share a single data model and are this automatically synchronised. This feature is called “roundtrip engineering” and can be found only in highly complex CASE-tools – and in 5Code: Here, the learner needs to write comments and thoughts only once, be it when reading and exploring the task, when writing and managing notes or when, finally, writing code. 5Code thus decreases both the cognitive and the mechanical complexity of typing a comment multiply and keeping it consistent across multiple phases of the development process. A welcome additional benefit is the clearly depicted connection between ideas of early stages and code in the final phase.

Figure 9 
            Marker → Note ← synchronized with → Code Comment.
Figure 9

Marker → Note ← synchronized with → Code Comment.

4.4.1 Java Code

Java programs can be compiled, started and stopped at the click of a button at the bottom of the code editor (Figure 10).

Figure 10 
              Code-Functions: start, stop, compile, step through errors, options.
Figure 10

Code-Functions: start, stop, compile, step through errors, options.

Text-output to System.out and System.err is displayed in the terminal window below the code editor. Special Unicode-characters can be used to create simple graphical output, typically for a game board or table views. In addition, the cursor can be moved across the screen via a subset of VT100-commands. The terminal window also transfers all keys typed to the usual System.in Stream.

Dealing with coding errors is an important part of the learning-by-doing experience; the error management of 5Code is therefore quite elaborate. Firstly, the compiler’s error messages are shown plainly on the terminal window. In order to support novices in dealing with errors – to enable them to learn from their errors – all errors are additionally displayed directly in the code editor in the tab and in the line in which they occurred, marking the line beneath the line number. The compiler’s error description is shown in a tooltip of the error marker (Figure 11). The arrows allow to advance to the position of the next and the previous error respectively.

Figure 11 
              Error management.
Figure 11

Error management.

4.4.2 Javadoc Integration

To be able to comprehensively comment one’s code is also a professional requirement of a programmer. In java, the standard notation is javadoc, which is also the name of a tool that is a part of the JDK. This tool derives specially denoted comments (within /** and */) from the code and automatically produces a comprehensive set of HTML pages that describe the code, its structure and its purpose – according to the programmer’s input. This procedure is supported by 5Code in that the tool javadoc can be called via a dialogue that allows the configuration of the most important settings. The resulting HTML pages are shown in a new browser tab. Should any problems arise, e. g. when the settings are incorrect, the messages of javadoc are shown in the terminal window.

4.4.3 Web Code

Since 5Code is a web-based application, it natively supports coding for the web. The steps of analysis and design are the same as with programming in Java, only the coding part is different. The web code consists of .html-, .css- and javascript code in different tabs in the code editor. Each code type is supported with the respective kind of syntax highlighting.

Web code does not need to be compiled and executed because the code can be interpreted and displayed directly in the browser that also presents the 5Code client. This is done both below the editor window (as a preview) and also in an additional browser window.

Since there is no compiler, there are no error messages to be dealt with. If necessary, and fitting to the course level, the complex developer tools of the browser itself can be employed to inspect and debug the web code.

4.5 Preparation and Evaluation by Teachers

Teachers and professors are provided with a number of means of preparation and evaluation.

Tasks can be created and edited using popular WYSIWYG features for formatting, images or links can be integrated. If tasks are already available as formatted text, e. g. in MS Word, they can copied & pasted including formatting.

As e. g. [15] clearly show, it is useful especially for novice programmers, not to leave them alone with a text problem, but to lead them with additional references to “the right path”. In 5Code these hints need not be included in the text of the task itself, blowing up the amount of text and rendering it less understandable. Markers in the text can give hints, these can be enhanced in the associated notes and their annotation by text that seems helpful, yet not revealing too much of the solution.

In addition, you can provide code bits for learners, thus giving them e. g. a code frame to be filled out, methods and classes they can make use of but not need to code themselves. This keeps the students on the desired track, frees them from unnecessary typing and assists them in focussing on the intended topics. These helper code snippets can be provided in the same tab as the students’ solution or in additional tabs.

Task text, note list and code tabs are provided to the students in one single project. So, all parts of a given problem are delivered and worked upon together; no parts can get lost, all parts remain in synch.

Projects are managed in a familiar looking view (figure 12) on the dashboard of 5Code. Here, projects can be grouped in user defined folders. Folders can be made accessible to a select group of students by providing them with an access code that 5Code generates for the teacher.

Figure 12 
            Dashboard – managing projects.
Figure 12

Dashboard – managing projects.

In the dashboard, teachers can additionally open each project as it was saved by each student. This makes it possible to review, annotate and mark the students’ work. Online submission, assessment and correction is therefore supported.

5 Implementation as a Web Application

5.1 Technical Requirements

A major technical requirement for the development of 5Code was to support all operating systems in order to expand the audience range. Therefore, the decision of a Web-App implementation was a practicable solution with additional advantages:

  1. Fast deployment of new 5Code-Versions thru updates over a central webserver

  2. Users can work in both the laboratory and at their computer at home without an external Flash drive to transport their work

  3. 5Code can be used on mobile and hybrid devices like mobile phones and tablets

  4. The development of the user interfaces is easier and can make use of innovative new Web-APIs

Besides these advantages, there are risks in terms of security, availability, performance, etc.:

  1. Different Web-Browsers use different HTML / JavaScript / CSS implementations, which must be taken into account. So the development process become more complex.

  2. Since javascript is not remarkably performant, computationally intensive functions on the web-client must be implemented with caution to minimize delays for the user

  3. Network disconnections can happen at any time. The user may not lose data due to offline period, which calls for an intelligent storage of user date both locally and on the server.

5.2 Node.js as Server

The 5Code backend uses Node.js as the application server. The server code is written in JavaScript and accesses system resources such as file system and external processes by means of specialised APIs. JavaScript runs on a virtual machine based on V8. Applications based on Node.js therefore run on Windows, Linux and even on single board computers such as the Raspberry Pi.

Since 5Code is written both in the front- and in the backend in JavaScript, his results in advantages in the client-server communication and the design of the software architecture: Node.js uses a “non-blocking I / O” interface to minimize the delay of I / O operation. File system, database and external process operation are used asynchronously, so intensive I / O operations are not blocking the entire 5Code-Application-Server. This is particularly important in the 5Code backend system, because Java source code must be stored, compiled and even executed such that the running code is responsive to the user.

5.3 Develop Applications and Execution

5Code supports the development and test of both Java- and HTML-based applications. The integrated code editor (based on the CodeMirror library) allows working with source code in multiple tabs. The structure of the source code is limited to a single folder (or single package in Java), which is sufficient for beginners. Complex file operations are thus avoided, the user just stores all tabs at once without having to worry about file system operations. The editor also supports common features such as syntax highlighting for many languages, search&replace, undo&redo operations.

Similar to other IDEs, the overall structure that denotes the working context of a user is a project. A project comprises three parts that correspond directly to the three panes in the browser:

  1. The given task

  2. The user’s notes

  3. The user’s code

A specialty of 5Code is the connectedness of all three parts via notes. Notes can be defined and appear in all three parts. A common model contains the text, type and options of each note, a special controller and view is responsible for creation, display and editing of the note in all three pars respectively.

A teacher can create a project as either a Java-project or a Web-project. These types are identical in the task- and the notes-part and differ only in the code-section.

5.3.1 Java Projects

For Java-projects, the code editor uses syntax highlighting specially for the programming language. Then the user wants to run and test the code, it is transferred to the server, it is compiled using the JDK on the server and the resulting classes are finally executed on the server.

Node.js provides a special interface to create and run child-processes like java applications. The System.out and .err-streams of the java application are handled such that the output is sent to the client software of 5Code, which in turn displays the sent chars on the terminal window below the code window. These streams are working asynchronous, additional data flow avoids overload both in the browser and on the 5Code-Server.

5.3.2 Web Projects

The web code consists of .html-, .css- and javascript code in different tabs in the source editor, each provides the respective kind of syntax highlighting. Web code does not need to be compiled and executed because the code can be interpreted and displayed directly in the browser that also presents the 5Code client. However, the created web project files are transferred to the 5Code-Server to provide a special URL like https://5code.de/webProjects/index.html to display the application in a different window of the browser. Alternatively, a presentation in an I-frame in the 5Code-IDE is possible which replaces the terminal window of Java projects.

The transferred html, css and JavaScript content are not written to the server’s hard drive, but are kept as temporarily objects in the server memory, this enhancing the performance of the system.

5.4 Client-Server Communication

The communication between client (browser) and the 5Code server are handled by the library “Socket.io”. Socket.io is based on the Web-Socket Protocol and allows event based communication between Web-Browsers, Servers and is also implemented in native libraries for Android and IOS. The main benefit of the Web-Socket Protocol is the undocking from the HTTP-Protocol, so a lot of unused HTTP-header data vanish and the communication is efficient. Therefore, Web-Sockets are essentially used in interactive applications like 5Code.

We are using Web-Sockets for the entire communication between the user and the 5Code backend. Some of these communication events are: saving source code, file upload or the communication between the executed Java-program with the user.

5.5 Working Offline

Most Web-Apps need a persistent internet connection to communicate with the Web-App backend. This is necessary not only for storing and for retrieving data but also for extended functionality; 5Code uses the backend also for compiling and executing Java source code. However, the quality of a user’s internet connection is not always constant, e. g. when the user is using multiple providers such as DSL home and at university. Mobile connections are prone to change drastically in bandwith and availiability, especially when 5Code is used in public transport.

5Code respects these use cases and thus offers an offline usage function: users can choose to work in Online or in Offline mode. The main difference between Offline and Online mode is the availability of the mentioned server functionalities.

The main implementation challenge is not only the reconnect of the Client-Server communication, it is primarily the user authentication and the reconnect to the correct project and user database record. The user authentication is handled via persistent cookie session IDs. Each ID identifies a user-object on the server, which contains references to the user profile, user role, project database connection and status flags. This structure is bound to a Web-Socket and is rebuilt when a reconnect happens.

5.6 Performance and Persistence

Since the 5Code backend executes not only the server’s code but also the students’ Java code on the server in a sandbox, performance is important. Table 1 shows special use cases in which special actions are taken to provide the necessary performance of the interactive application:

Table 1

Performance considerations.

Behaviour of user program CPU-Usage on the server Special action
Program delivers no output High: E. g. the Program is in an infinite loop or computes a complex calculation Terminate program after 5 minutes
Program delivers a lot of output, e. g. in a loop High: Parsing and delivering the output by the server’s communication processes Pause the program and send the output to the Browser of the user. When the browser finished the output, continue the program execution.
or
Terminate the program after it created more than 1000 output lines.

Compiling Java source code can also increase the server load, but this is mostly irrelevant, since compiling terminates always and cannot be an infinity loop.

The 5Code backend stores all persistent user and system data in a file based database. One main requirement from the beginning was to build 5Code as easy as possible for users and the server administrator. Therefore, to avoid a complex installation and administration of a DBMS, such as Oracle, MySQL or MongoDB, we decided to use plain json files to store all data. This simple approach is very feasible in our context since the only operations are storage, retrieval and update of project data, no complex search operations are necessary.

Since all data of each project (task, notes and code tabs) are stored in one single file, each project is guaranteed to be consistent. This is important especially in 5Code due to the internal references between task, node and code, which are thus kept intact.

5.7 Security

Since 5Code is a web application, it is unfortunately prone to be attacked by anyone who is able to access the server. Security is therefore an important part of the implementation concept.

To ensure the security of a web application, the first step is to verify all communication channels that receive information from the user. 5Code uses a strict validation of incoming data through a validation on object schema. This schema defines the range of values of every data transmission type. Thus, an attacker can only transmit valid parameter to a 5Code-Backend function and is unable to insert other values to compromise the server.

The second security step is to use a secure HTTPs connection and to validate the webserver configuration over security services like “SSL-Labs”. However, even in the unlikely case of an intrusion into the 5Code server, it should not be possible to compromise the entire server. For this reason, the 5Code-Service is not running with “root” privileges on the host system. Since Node.js requires these rights to open webserver ports and other functions on startup, a two-way system is employed, where only when starting the server, all “root”-requiring functions allocate the required resources. Immediately thereafter, the main-process change his “UID” and revokes its root-privilege.

6 Evaluation and Further Development

5Code was used in the course Object Oriented Programming 1 in the first semester of a media informatics degree program with 90 and 113 participants throughout. The use was evaluated through multiple channels.

During the lab work hours, the students were observed by the tutors with regard to their working style and there handling of 5Code. This direct observation gave differentiated results: Especially the completely inexperienced students took the integrated processing gladly. Those who had already worked in the school or in training with “real” IDEs, 5Code likened it but missed some expert features (which were deliberately not offered, see chap. 4.4).

Students were also interviewed during the semester in online surveys. In each case, nine questions were asked via SurveyMonkey plus an evaluation of pragmatic and hedonistic qualities with AttrakDiff [11].

6.1 First Year Evaluation

Poll U1 – After 5 weeks of work with command line and a simple text editor: experiences with IDEs had about 2 / 3 of the participants (eclipse: 35 %, Visual Studio: 27 %), and 1 / 3 of “a little” or no experience. Half of those with previous knowledge had taught themselves, the other half had learned in school / education. Nearly 1 / 3 worked with a paper printout of the task, the others directly with the PDF file. 85 % of PDF users made virtually no own notes, although both marks and notes in PDF files are possible, and coded directly. Half of the paper users made marks or notes. Working with multiple windows found 1 / 4 to be cumbersome. On the other hand half found it desirable to link tasks, notes and code digitally. Both pragmatic and hedonic qualities of very simple tools such as command line and a simple text editor were rated neutral via AttrakDiff.

Poll U2 – 6 weeks after the first experiences with U1 5Code:

The AttrakDiff results show an improvement in the hedonic qualities, although technical difficulties have affected the assessment of pragmatic quality negatively. According the SurveyMonkey questionnaire, 30 % used marks in the task, 26 % made use of specific types of labels (e. g. loop, branch, …), 38 % supplemented own brief comments, at least 25 % even longer comments. 3 / 4 stated that 5Code helps reading comprehension. The hierarchical order of notes was used by 38 %, the ticking off of notes by 1 / 4. 2 / 3 always use the task window to refresh their memory. 60 % say that 5Code helps reflection and writing of notes. 90 % say that 5Code helps in coding. Approximately 1 / 4 use linking notes and code and evaluate it as very practical. 61 % would recommend to continue using 5Code, of which 32 % in any case. A further 26 % recommend 5Code with severe restrictions, which mainly referred to the elimination of technical “teething problems”.

Many suggestions were included in the ongoing development during the current semester and were already available for the next poll U3.

Poll U3 – After a further 5 weeks of experience with 5Code: This survey was numerically unsuitable for evaluation because there were (in the last week of the semester) too few returns. According to observations of the tutors there have been a lot of positive feedback, which is also supported by the further improved rating of the pragmatic and hedonic qualities in AttrakDiff. All initial problems could be eliminated, which meant that now 3 / 4 recommend the future usage 5Code. Approximately 1 / 4 of the students remained critical, especially because as felt patronized and would prefer to use a familiar IDE – but these are less than 50 % of the 2 / 3 of students with previous knowledge, the other half was satisfied. Particularly positively noted was the new design and the customizable themes in the code window (about 1 / 3 used immediately a “night design”), the folding of notes and the improved error management.

6.2 Second Year Evaluation

In the following year, a renewed and refurbished version of 5Code was used in the lab work with 113 students.

Poll U4: Again, the baseline survey was conducted after 5 weeks of work with command line and a simple text editor. experiences with IDEs had about 3 / 4 of the participants (eclipse: 32 %, Visual Studio: 31 %), where 1 / 5 claim “a little” experience and 1 / 4 “rather good” and “very good” knowledge. Those with experience are 40 % self-taught, 60 % learned programming in education. Only 1 / 6 worked with a paper printout of the task, the other directly in the PDF file. 89 % claim to keep the task only in mind when solving it. Even paper users make hardly any marks or notes. 51 % admitted to mostly coding directly without any notes. However, 37 % sometimes add comments in the code – not many, given that commenting is required. After all, 32 % at least sometimes makes separate notes on paper. This way of work was quite all right for 30 %, however, 45 % found it at least rather cumbersome to work with many media and windows, half of those admitted that therefore they wrote less comment than they felt they should. 30 % wished for a better integration of task and own notes, 24 % wanted to also integrate notes and code.

Pragmatic qualities of the simple tools in use were rated via AttrakDiff as neutral (0 on a scale from –3 to +3), hedonic qualities were rated as –0.5.

Poll U5 was conducted after 6 weeks of work with 5Code.

When working with the given task, 37 % used the marking of text, 15 % made us of type-specific marking (class, control, data, etc.). In addition, 37 % added short comments, 15 % added longer comments. 37 % also added sketches on paper, but only 2 % used a printed version of the task. 78 % found the support in this phase helpful, ranging from “a bit” (54 %), “quite” (22 %) to “a lot” (2 %).

Notes were used to a variety of ends: “adding own comments” and “ticking off notes” (24 % each), “getting an overview” and “hierarchical structuring” (30 % each). The feature of the drag and drop of notes into the code was announced in emails and documents regarding the use of 5Code and was additionally demonstrated in the lecture. Still, surprisingly, only 15 % made use although this relieves the students from having to type comments twice. 63 % said that they were “a bit” helpful, for 12 % “quite helpful” and for 5 % “very helpful”.

When it finally came to coding, 76 % used the given task in the same window for reference, 27 % used their own markers and 15 % used their notes as comments in the code. Only 27 % claimed to use the error management, which is astounding since errors in coding are the norm. 22 % changed the theme for the display colours. 58 % found the support in coding “a bit” helpful, 24 % “quite” and none “very” helpful.

40 % found it “rather convenient” to be able to work in the integrated environment of 5Code, 15 % said this to be “very convenient”. To be able to add annotations directly when reading the task was valued as practical by 44 %, 22 % wrote more comments this way. The connection of task and notes was valued as practical by 27 %, the connection of notes and code by 17 %.

5Code was rated overall “a bit” helpful by 20 %, “quite helpful” by 61 % and “very helpful” by 15 %. 88 % recommended the use of 5Code in former lab work (39 % without reservation, 39 % with few reservations).

Both Pragmatic and hedonic qualities of 5Code were rated via AttrakDiff as positive / neutral (0.5 on a scale from –3 to +3).

7 Conclusion and Outlook

The integrated programming environment 5Code explicitly and specifically supports all 5 steps from problem to program:

read it → get it → think it → note it → code it.

This is achieved by the integration of the complete context over all five steps in one single application. Students start with reading the given task, adding markers plus own notes and comments to arrive at coding and testing. Since all these parts of the context are permanently visible, the students’ cognitive load is lowered, enabling them to focus more on solving the task in an organised manner.

The implementation as a web application makes the management of the application itself, the given tasks and students’ solutions as easy as possible for schools, colleges and universities. Moreover, 5Code can be used independently of the hardware and software available to learners.

5Code was used for two years in a programming laboratory for 90 and 110 students respectively in their first semester and evaluated in this context. During the first year, many important suggestions were fed back, many of which are currently implemented. Improvements in both the design and functionality were achieved, resulting in a good acceptance in the second year. In the second year, the IDE as such was well received. The integration of all phases was applauded as an advantage over the multitude of traditional tools and as an advantage over the media breaks between notes on paper and code. More notes were taken and more comments were written with 5Code than with the basic setup of pdf-files, texteditor and command line. The features of marking, annotating and converting notes to comments improved the overall methodical style of the students. This is certainly leading into the right direction. Some of those students with previous knowledge were missing advanced productivity features such as code completion. Their wishes will not be fulfilled for didactic reasons: Students shall learn how to write code themselves from scratch, including all possibilities to make errors – in order to learn from their own errors

However, quite a few students each year are hard to convince that writing down thoughts, design and comments before the actual coding is an essential competence in programming. Hence, many criticisms concern the special window for writing down of notes and the notes themselves: they are rated as “not necessary”, or “too complicated”, they “should be left out altogether”. Although the amount of preparatory work and commenting has increased with the use of 5Code, it appears that the current concept of dealing with notes is not yet the optimal form. Therefore, we will experiment with other concepts that make annotating before coding even easier.

The results of the evaluation also show the special situation of designing the user experience of a tool for students: Defining a didactically beneficial usage for a learning tool is not at all the same as constructing an IDE for experts. The usual usability goal would be to make the usage of 5Code as easy and as supportive as possible. On the other hand, it is an explicit design goal not to provide student users with every possible feature such as auto-completion because simply selecting correct code from drop-down boxes does nothing to achieve the desired effect of learning by doing.

The concept of the 5 steps from problem to solution is not a speciality of programming, it should therefore not be too difficult to transfer it to other teaching areas. Especially those courses that work with texts could also benefit from the approach of 5Code, e. g. German, English, Philosophy, Economics or History classes: The classic paper based work of analysis, annotation and essay could easily be adapted to an integrated tool for all these phases; the only difference being that the result uses not a programming language but a natural language.

About the authors

Prof. Dr.-Ing. MSc Markus Dahm

Markus Dahm studied at RWTH Aachen and Imperial College London, conducting research in user centered design in health care. At T-Systems he managed projects for mobile systems. Currently he is professor in informatics and software ergonomics at Hochschule Düsseldorf. His research in human computer interaction currently focusses on support for learning as well as teaching informatics.

Frano Barnjak

Frano Barnjak earned his BSc. Media Informatics at HS Düsseldorf and is currently student of MSc Media Informatics. He is working on master thesis about collaboration over the Web.

Moritz Heilemann

Moritz Heilemann earned his BSc. Media Informatics at HS Düsseldorf and is currently student of MSc Media Informatics.

References

[1] Balzert, H. Lehrbuch der Softwaretechnik: Basiskonzepte und Requirements Engineering, Spektrum Akademischer Verlag, Heidelberg, 2009.10.1007/978-3-8274-2247-7Search in Google Scholar

[2] Bloom, B. S., Taxonomie von Lernzielen im kognitiven Bereich. Beltz Verlag, Weinheim 1976.Search in Google Scholar

[3] Börstler, J., Objektorientiertes Programmieren – machen wir irgendwas falsch?, In: Sigrid Schubert (Hrsg.), Didaktik der Informatik in Theorie und Praxis, INFOS 2007, (LNI), P-112, Köllen Verlag, Bonn, 2007.Search in Google Scholar

[4] Chandler, P., Sweller, J.: Cognitive load while learning to use a computer program. Applied Cognitive Psychology. 10, 1996, S. 151–170.10.1002/(SICI)1099-0720(199604)10:2<151::AID-ACP380>3.0.CO;2-USearch in Google Scholar

[5] Dahm, M., Grundlagen der Mensch-Computer-Interaktion, Pearson, München, 2005.Search in Google Scholar

[6] Dahm, M., Skript zur Vorlesung „Objektorientierte Programmierung 1 und 2“, HS Düsseldorf, 2011.Search in Google Scholar

[7] Dreyfus, Stuart, E., Dreyfus, Hubert, L., A Five-Stage Model of the Mental Activities Involved in Directed Skill Acquisition”, Washington, DC: Storming Media.Search in Google Scholar

[8] Ford, M, Veneme, S, Assessing the Success of an Introductory Programming Course, Journal of Information Technology Education, Volume 9, 2010.10.28945/1182Search in Google Scholar

[9] Genius.com, http://genius.com/web-annotator, 03. 01. 2016.Search in Google Scholar

[10] Gross, P. & Powers, K. Evaluating assessments of novice programming environments. Proceedings of the first international workshop on Computing education research (ICER ’05). ACM (2005), 99–110.10.1145/1089786.1089796Search in Google Scholar

[11] Hassenzahl, M., Burmester, M., & Koller, F. AttrakDiff: Ein Fragebogen zur Messung wahrgenommener hedonischer und pragmatischer Qualität, In: Ziegler, J. & Szwillus, G. (Hrsg.), Mensch & Computer 2003, S. 187–196, B. G. Teubner, Leipzig, 2003.10.1007/978-3-322-80058-9_19Search in Google Scholar

[12] Hubwieser, P., A smooth way towards object oriented programming in secondary schools. In: Benzie D., Iding M. (Hrsg.): Informatics, Mathematics and ICT: a ‘golden triangle’. IFIP WG 3.1 & 3.5 Working Conference CD proceedings, IFIP & College of Computer and Information Science, NE University Boston, Mass., USA, 2007, S. 1–11.Search in Google Scholar

[13] Hubwieser, P., Didaktik der Informatik, Springer, Berlin, 2007.Search in Google Scholar

[14] Kelleher, C. & Pausch. R. Lowering the Barriers to Programming: A Taxonomy of Programming Environments and Languages for Novice Programmers. ACM Computing Surveys 37, 2 (2005), 83–137.10.1145/1089733.1089734Search in Google Scholar

[15] Kirschner, P., Sweller, J, Clark, R, Why Minimal Guidance During Instruction Does Not Work, EDUCATIONAL PSYCHOLOGIST, 41 (2), S. 75–86, Taylor & Francis, USA, 2006.10.1207/s15326985ep4102_1Search in Google Scholar

[16] Gluck, M., Mercado, E., Myers, C., Lernen und Gedächtnis: Vom Gehirn zum Verhalten, Spektrum Akademischer Verlag, Heidelberg, 2010.Search in Google Scholar

[17] McCracken, M., Kolikant, Y., Almstrum, V., Laxer, C., Diaz, D., Thomas, L., et al. (2001). A multi-national, multi-institutional study of assessment of programming skills of first-year CS students, ACM SIGCSE, Bulletin 33 (4), S. 125–140.10.1145/572139.572181Search in Google Scholar

[18] McIver, L. Evaluating Languages and Environments for Novice Programmers. Workshop of the Psychology of Programming Interest Group 14 (2002), 100–110.Search in Google Scholar

[19] Saifoulline, P., Hemberger, Ch, Kognitive Kernkompetenzen zum Aufbau fundierter mentaler Modelle für die Bearbeitung komplexer Planungsprobleme, Journal Psychologie des Alltagshandelns / Psychology of Everyday Activity, Vol. 4 / No. 2, university press, Innsbruck 2011, S. 31–44.Search in Google Scholar

[20] The History of Turtle Robots. Valiant Technologies. http://roamerrobot.tumblr.com/post/23079345849/the-history-of-turtle-robots.Search in Google Scholar

[21] Williams, J. S., A Computer Learning Environment for Novice Programmers That Supports Cognitive Load Reducing Adaptations an Dynamic Visualisations of Computer Memory, Dissertation, Paper 574, Univ. of Wisconsin, Milwaukee, 2014.Search in Google Scholar

[22] Wikipedia, http://de.wikipedia.org/wiki/Erziehungsorientierte_Programmiersprachen, https://en.wikipedia.org/wiki/List_of_educational_programming_languages, 03. 01. 2016.Search in Google Scholar

Published Online: 2016-04-12
Published in Print: 2016-04-01

© 2016 Walter de Gruyter GmbH, Berlin/Boston

Downloaded on 27.4.2024 from https://www.degruyter.com/document/doi/10.1515/icom-2016-0002/html
Scroll to top button