
Java--Meets Eclipse An IDE for Teaching Java Following the Object-later Approach Lorenzo Bettini1;∗ and Pierluigi Crescenzi2;† 1Dipartimento di Informatica, University of Turin, Turin, Italy 2Dipartimento di Ingegneria dell’Informazione, University of Florence, Florence, Italy Keywords: DSL, Java, IDE, Eclipse, Xtext, EMF. Abstract: In this paper, we introduce a new Eclipse-based IDE for teaching Java following the object-later approach. In particular, this IDE allows the programmer to write code in Java--, a smaller version of the Java language that does not include object-oriented features. For the implementation of this language we used Xtext, an Eclipse framework for implementing Domain Specific Languages; besides the compiler mechanisms, Xtext also allows to easily implement all the IDE tooling mechanisms in Eclipse. By using Xtext we were able to provide an implementation of Java-- with all the powerful features available when using an IDE like Eclipse (including debugging, automatic building, and project wizards). With our implementation, it is also straightforward to create self-assessment exercises for students, which are integrated in Eclipse and JUnit. 1 INTRODUCTION The Java-- IDE is available as an open source project at https://github.com/Lorenzo Java-- is an application that allows undergraduate stu- Bettini/javamm. dents to learn programming by using a smaller ver- We also provide an Eclipse update site and pre- sion of Java without object-oriented features. This configured Eclipse distributions with Java-- installed, way, students can focus on the basic programming for several architectures. concepts without being distracted by complex con- In the following we will use the term Java-- for structs. The original implementation of Java-- comes denoting both the smaller version of the Java language without any IDE; it provides a GUI, but without the and the application (with or without IDE) for writing advanced tooling mechanisms that are typical of an code in this language. IDE like Eclipse. In this paper, we introduce a new implementation 1.1 Educational Motivation of Java-- that includes a full-featured Eclipse-based IDE. Our IDE provides an Eclipse based editor with Every undergraduate program in computer science in- syntax highlighting, navigation, code completion and troduces its first-year students to programming. Even error markers, not to mention automatic integrated if choosing the most suitable First Programming Lan- building and debugging. This way, the students will guage (in short, FPL) to be taught is still an active de- immediately become familiar with Eclipse. bate topic, there is a general agreement on the fact that By using our implementation of the IDE for such a choice has a significant influence on students’ Java--, it is straightforward for the teachers to cre- learning performances (see, for example, (Koulouri ate exercise projects that students can use for self- et al., 2014)) and, clearly, on the development of stu- assessment. The teacher can rely on existing frame- dents’ programming abilities, both in terms of the works such as JUnit, which is already integrated in programming style and in terms of the coding tech- Eclipse. niques they will adopt during their professional life. ∗ Some common factors that are taken into account Author partially supported by MIUR (proj. CINA), Ate- while choosing the FPL might be its simplicity, its in- neo/CSP (proj. SALT), and ICT COST Action IC1201 BETTY. dustry relevance, its programming paradigm, and the †Author partially supported by MIUR under PRIN available development tools (see, for example, (Pears 2012C4E3KT national research project “AMANDA Al- et al., 2007; Mason and Cooper, 2014)). gorithmics for MAssive and Networked DAta”. As shown in (Farooq et al., 2014), in 2011 C++, Bettini L. and Crescenzi P.. 31 Java–Meets Eclipse - An IDE for Teaching Java Following the Object-later Approach. DOI: 10.5220/0005512600310042 In Proceedings of the 10th International Conference on Software Paradigm Trends (ICSOFT-PT-2015), pages 31-42 ISBN: 978-989-758-115-1 Copyright c 2015 SCITEPRESS (Science and Technology Publications, Lda.) ICSOFT-PT2015-10thInternationalConferenceonSoftwareParadigmTrends Java, and Python were the most frequently used FPLs, programmers can interactively evaluate simple ex- with Python gaining more and more popularity (see, pressions, execute program statements, define vari- for example, (Leping et al., 2009)). This latter trend ables and methods, and invoke methods. Inspired by has been confirmed in the last three years, as wit- JOSH, which was based on a command line interac- nessed, for example, in (Guo, 2014), where the top tion, the Java-- application (see Section 2) has been 39 computer science departments (as ranked by U.S. successively developed and used at the University of News in 2014) have been considered, and, for each Florence, along with an Italian text book (Crescenzi, department, the CS0 and CS1 courses have been ana- 2015). This application allows the user to perform the lyzed in order to determine which language was used. same tasks of JOSH through a simple Graphical User In particular, 8 (respectively, 5) of the top 10 depart- Interface (GUI), which contains three tabbed panels ments, and 27 (respectively, 22) of the top 39 de- that allow the user to edit the code, see any mis- partments teach Python (respectively, Java) in intro- takes that the Java compiler detected, and look at the ductory computer science courses. Python, Java, and standard output (Cecchi et al., 2003). Successively, C++ turn out to be also among the most “lucrative” Java-- has been extended with a self-assessment mod- programming languages, as stated in (Nisen, 2014), ule, which allows the user to implement one or more where the author analyses the data compiled (start- methods solving simple problems, immediately veri- ing from thousands of American job ads) by Burning fying the correctness of the proposed solution (Bettini Glass with Brookings Institution economist Jonathan et al., 2004; Crescenzi et al., 2006). Rothwell, in order to determine which language might As already said, the development of JOSH and of get the worker the best salary. Java-- referred to the “structured programming before A framework to evaluate several existing pro- object oriented programming” teaching paradigm, as gramming languages, for their suitability as an appro- described in (Gibbons, 1998). According to this priate FPL, has been proposed in (Farooq et al., 2014). paradigm the first part of a CS1 course should be By applying this framework to Ada, C, C++, C#, For- taught in order to develop skills with the usual low- tran, Java, Modula-2, Pascal, and Python, the authors level procedural mechanism, that will allow students show that Java obtains the overall highest score and, to gradually build up programs from primitive types thus, conclude that it is the most suitable program- and basic control structures. Only at a later stage stu- ming language (followed by Python and Ada). Even dents should implement object features and test ob- by considering the “demand in industry” and “easy jects, and, thus, be exposed to the conceptual load re- transition” parameter more important than the other lated to the new abstract data type issues. Moreover, parameters, Java turns out to be the language with as stated in (Lewis, 2000), it is worth observing that highest score (followed by Python and C#). the object oriented approach does not abandon typi- As observed in (Koulouri et al., 2014), even if Java cal concepts of a procedural approach: indeed, it aug- has been widely used as a FPL, its complexity “may ments and strengthens them, since implementing an be overwhelming for learners”. In particular, one of object almost always requires a good knowledge of the main complexity sources of this language is the structured programming. Finally, not having objects fact that it is “heavily coupled with object-oriented in a language does not necessarily decrease its edu- concepts”, thus making more difficult to implement cational power and usability; for example, Process- an object-later strategy. A typical example of such ing (Reas and Fry, 2014), a programming language complexity is the implementation of the well-known and a development environment initially created to “hello, world” program, which would require, in ad- teach programming, allows the programmer to eas- dition to the print statement, the definition of a class, ily do professional computer graphic and animations containing a main method (with its “strange” syntax, without object-oriented constructs. both in terms of modifiers and in terms of parame- Even though Java-- allows the programmer to in- ters). teract with a GUI, that includes some features, such as Several tools have been proposed in order to deal syntax coloring, typical of an Integrated Development with the complexity of Java for novice programmers Environment (in short, IDE), this application can- (see Section 4). Some of them were designed in or- not be considered an IDE, since it lacks many other der to teach basic programming concepts (such as features, such as compiler and debugger integration, primitive data types, arrays, control structures, meth- build automation, code completion, and easy naviga- ods and recursion), before exposing the students to tion to definitions. On the other hand, all existing Java classes and objects. An example of such tools is IDEs (such as Eclipse and Netbeans) require the pro- JOSH (Diehl, 2003), which is a Java interpreter de- grammer to deal, since the very beginning, with the signed to ease teaching Java to beginners. With JOSH object-oriented programming paradigm. That is why, 32 Java--MeetsEclipse-AnIDEforTeachingJavaFollowingtheObject-laterApproach in this paper, we propose a new Eclipse-based IDE (see Section 3), that has the same features of Java--, and, thus, allows the programmer to experiment with the basic programming concepts (without necessarily knowing any notion of object-oriented programming), and that, at the same time, has all the advantages of Figure 1: Writing a simple program with the original Java-- being an IDE (see Section 3.1).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-