Motivating Students in Component-based Programming Courses

3 downloads 81190 Views 4MB Size Report
of Component-Based Programming course was to practically explain the ... of CBP, we think that it is best to root the CBP habits in early student grades, therefore we strived to introduce our course in the fourth semester of the undergraduate computer science ..... 2Can be found online on http://gamestudio.kpi.fei.tuke.sk/.
Motivating Students in Component-based Programming Courses Jaroslav Porubän1 , Michaela Baˇcíková2 , Jana Št’astná3 Technical univeristy of Košice Department of Computers and Informatics Letná 9, Slovakia Emails: {jaroslav.poruban1 , michaela.bacikova2 , jana.stastna3 }@tuke.sk

Abstract—Component-based programming is predicted to become mainstream practice in software engineering in the next few years. Students need to get familiar with modern programming approaches such as this one, but including the topic into curricula is not a simple task. This paper presents our approach to teaching component-based programming. The goal of Component-Based Programming course was to practically explain the concept of program components and outline their benefits in software development. Students could try on their own how the initial design of software influenced stages of development when component-based approach was applied. To preserve students’ engagement into the topic we utilised teaching by game development, an approach already successfully applied to Object-Oriented Programming course. We also describe the individual motivational factors we implemented in the course.

I. I NTRODUCTION When comparing to object-oriented programming or librarybased programming approaches, component-based programming (CBP) offers higher reusability and better modular structure with greater flexibility [1]. CBP is predicted the mainstream practice in software engineering in the next few years. It is perceived as extremely important, therefore necessary for graduates of a computer science study program, who should be familiar with the concept of components and learn to create component-based software. CBP is usually taught to college students majoring in computer science [2], [1], [3], [4], [5] and industry professionals, usually with previous training on OOP and fundamental software engineering principles [1]. Considering the importance of CBP, we think that it is best to root the CBP habits in early student grades, therefore we strived to introduce our course in the fourth semester of the undergraduate computer science study program. However, to include the CPB concept into curricula is a challenging task - the more when it is for undergraduates who just barely learned how to create objectoriented software. In the current practice, we identified two main forms of teaching CBP: • large-scale form - collaborative learning on large projects, similar to corporate projects, • small-scale form - small systems in form of CRUD applications. The disadvantages of the large-scale form is the difficulty of the given task. To alleviate the impacts of this disadvantage

on students, the course is usually taught to masters and custom framework is developed, such as Pidesco by Santos [2], where the students collaboratively create different parts of the whole system. Despite that master students are usually more skilled in programming than undergraduates and efforts to make the tasks as simple as possible by providing a thorough documentation and consultations and applying CBP principles such as interfaces, information hiding modelling, this task is still described as time-demanding and difficult. In fact, the task is so large, it has to be divided into teams, while not all of the students get a programming assignment. Santos reports multiple cases of accidental committing an incorrect code, therefore multiple teams had to be assigned with the task of testing other students’ code. While we agree that such education model could teach the students about corporate work, we argue on the motivational factors of such a set-up. We wanted the students to work on a large-scale solution, because we think it is inevitably necessary for understanding the CBP principles. On the other side, we did not want to drag all their efforts to the difficult tasks and as a result, become demotivated by the unattainability of the task, which would hinder our efforts to teach them the CBP principles. For these reasons, it was important to select an appropriate project size and not to impede the students with collaboration. When teaching undergraduates, the small-scale form is usually applied to teach CBP. For example, Parrish et al. [6] describe providing thorough tutorials when developing a simplified point-of-scale CRUD system with orders. It is apparent, that such a small assignment is often insufficient to explain all the fundamental principles of CBP with all the relevant technologies. Parish et al. themselves only explained a simple client-server architecture in their course [7], [8]. The goal of our course was to explain the following principles of CBP: • • • • •

components, client-server architecture, services and interfaces, J2EE technologies, large-scale web applications.

The topic of the assignment is as important as its difficulty. Motivation is an important goal for educators, maybe as important as teaching cognitive or professional skills - increase in

students’ interest for a subject leads to increased competency perceptions and, eventually, success in academic domains [9]. In many courses, common and known topics are selected such as IDE [2] or CRUD [6]. From the point of view of familiarity, such topics are appropriate, but from the motivation point of view, the topics do not introduce any advantages. We decided to select game design as the assignment. Game design is one of the strongest motivational factors in teaching software development, proved to significantly increase understanding, involvement and complex problem solving skills [9]. In this paper we describe the course set-up, other motivational factors beside game design we incorporated into the course curriculum and related technical support and materials necessary for the students to complete the course. The course was very successful when relating to both student motivation and results. II. T HE C OURSE C OMPONENT-BASED P ROGRAMMING Teaching programming by means of games gradually gains tradition at the Department of Computers and Informatics. The course Component-Based Programming (CBP) builds on similar teaching approaches as the Object-Oriented Programming (OOP) course, taught to our undergraduates a semester before CBP, but aims at somewhat different goals. In the OOP course, students were implementing a game and the primary focus was on the concept of objects, fundamental principles of object-oriented programming (e.g. encapsulation, inheritance, polymorphism), design patterns and good programming habits. In CBP we utilized the motivating approach of the OOP course [10], [11], but the course aims at explaining the concept of program components and outlining their benefits in software development by utilising modern Java technologies like JDBC (Java Database Connectivity), JPA (Java Persistence API), EJB (Enterprise Java Beans) and JSF (Java Server Faces). The experience in the OOP course formed solid foundations for the CBP course. The assignment, with which students should have presented understanding of the subject, was to implement a componentbased web application consisting of a game component and a service component (Section II-B). The secondary intention was to create a game portal GameStudio for bringing together students’ solutions and show the full power of component programming, but also improving their motivation (Section III-B). A. Organization of the Course CBP is a standard course taught at the Department of Computers and Informatics, designed for second-year undergraduate students of the study programme Informatics. The course is taught in the summer semester and is organised into 13 weeks with a lecture taking 90 minutes and a seminar also 90 minutes each week. The students receive 6 credits1 for the course at the end of semester, after submitting and presenting a programming 1 Credits are equivalent to ECTS[12] standards with 60 credit points per year.

assignment and passing the final exam. The assignment makes up 30% of the overall credit and the remaining 70% is granted for the final examination. The exam is oriented on students’ practical programming skills. Students acquire credit for their • assignment - divided into 3 submissions during the semester (2 of them are partial, the last is final), each of them rated 8 points, • activity and attitude to work during seminars, rated 6 points (more in Section III-G). Lectures are not compulsory and are aimed at practical demonstration of component-based software implementation, illustration of programming best practices and also explanation of principles behind the applied technologies. Compulsory seminars start with a short discussion about the tasks of the particular week. After that the students proceed with the implementation of their project and have an opportunity for individual consultations. Within the semester there are 3 seminars reserved for the presentation of partial (or final) submissions - milestones (Section II-C). In the process of game implementation, the students learned and practised the following: • software analysis and modelling, • development of components as reusable code units, • advanced Java (Java EE), • web application development, • using database systems in Java applications, • code quality, best programming practices • and Unit testing. B. The Assignment At the beginning of the course each student in a study group is assigned with: • a logical game or a card game that (s)he is supposed to implement, • one of three services serving for: (i) adding a game as a favourite, (ii) commenting on a game, (iii) rating a game. Students are provided with general instructions and evaluation criteria that the final game should meet in order to acquire the desired score. The instructions - tutorials - are designed to lead the students when designing and developing their game and service, but since the game assignments vary from student to student, the instructions could not be too specific. Students have to figure out the game logic on their own. The implementation of such an assignment is of a higher difficulty, but on the other hand, it provides freedom for creative solutions. To offer some guidance in the realm of unknown, the lectures present exemplary implementation of a game Minesweeper along with a sample score service for the game. The students can download the presented source code in multiple Git branches (one for each lecture). The sample code aims to help them with the initial configurations of the project, introduce them with the technologies that were unfamiliar to them and, moreover, teach them the best practices of programming in a practical way.

C. Partial Submissions Partial submissions directed the students to work on their projects continually, so it is not possible to implement all the code in a hurry, shortly before the deadline. Students who did not pay adequate attention to partial submissions risked earning fewer points than required. The key moments milestones - relevant to submissions are tied with incremental incorporation of new technologies into the project, so it is essential for the students to take care of project configurations early. We decided to divide the project into three main milestones representing the fundamental steps of creating a componentbased solution. In the following text, we describe the particular milestones and the most important tasks the students need to accomplish in order to reach them and submit their work for evaluation. Milestone 1 The task of the first milestone is to create a console-based game and one of the three assigned services (section II-B). In specific, the first milestone includes the following tasks: •





• • • •

Familiarizing with development environment - our students are using IntelliJ IDEA for the first time, therefore the first task is to familiarize and to learn the most common IDE shortcuts. The game model - identifying the key entities and behaviour of the game, outlining the game logic and creating a conceptual model of the game. The game core - implementing key entities and the game logic in accordance with the model. The fundamental part was a separation of the game core from services and the console user interface, since it has to be replaced by a web interfaces in the future. Unit testing - getting familiar with Unit testing and verification of the game core functionality. Console user interface Playable, working game - the game has to be playable in the console. It represents the future game component. Services and database - To create a service, it is necessary to configure a database system and create the database for storing the data obtained from the service and thus to get familiar with JDBC. The service represents a finished component.

Milestone 2 The goal of the second milestone was to move the created services to a server, with the game using them as a client. The steps of the second milestone were the following: •

• •

Server and database - configuring the Glassfish server together with the database server. This task is essential for students’ further work. JPA - implementing the service as a component using JPA and deploying it to the created server. Game as a client - implementing the client side of the service and incorporating it into the game.

Milestone 3

The last task was to transform the game client into a web game component, running and playable in web, including the following steps: • Moving the game core to the server - necessary for the web graphical user interface implementation. • Configuring the server-side project for the purpose of JSF. • Creating a web-based game - creating an eye-catching and user-friendly graphical user interface in a form of a JSF game component. In all milestone submissions mentioned above we also evaluated the quality of the submitted source code, e.g. separation of intentions in the code[13], meaningful names of fields and methods, code formatting, method complexity, placement of classes into proper packages, etc. These evaluations were done manually, directly at the particular milestone seminar and the students had to defend their milestone assignment by themselves. D. Individual Approach Every student in a group worked on a different game and during the development (s)he could face different obstacles. Seminars gave space for each student to discuss those problems with the lecturer. Participants of the CBP course worked at their own pace. There was no need to wait for the last student in the group in order to proceed with the next task that followed. Knowledgeable students were not slowed down and those less skilled had room for consultations, so they could forge through the issues and catch up with others. While the students implemented their code during seminars, we also observed their progress and made notes, e.g. using Google Docs to write down on which task each student was working on and also for marking bonus points for activity. We tried to help the students to deal with project configuration problems or issues in source code, but students always implemented the code on their own. During the seminars, we also checked the code quality in the early stages of the development: the earlier they get rid of their bad programming habits the better. III. S TUDENT M OTIVATION In courses such as CBP, there is a very strong probability of students being discouraged by the high complexity of the created solution. The quantity of used technology, implementation of both server and client, rest and web services, databases, everything in one project along with the task of creating their own game can seem to be a bit overwhelming for a second year bachelor student. For this reason, a strong motivation is very necessary for the students and just one motivating factor is often not enough. In the following sections we will describe the individual motivational factors we implemented in our curriculum. A. Learning by Game The main task during the course is to create a playable custom game with a web graphical user interface [14]. Since our second year bachelors were previously creating only simple

C. Publication of the Results On-line

Fig. 1. GameStudio main page

programs, creating a game is a strong motivating factor[15]. We also have games in some previous courses such as OOP, but here the games have instructions in a tutorial form and a pre-prepared code. In CBP, for the first time in their study, the students are creating something new, from the scratch and, what matters the most, something of their own and funny. The game topic also offers a large room for creativity. Every student will get: • one game assignment from a pre-prepared list, • a description of a game play and • a link to the game on-line. Students, who like challenges, have the possibility to choose either from a list of "more difficult games" or their own game approved by the lector. Many skilled students gladly chose this option. B. Joint Work on Something Large To fully show the power of component programming, we created the concept of GameStudio2 (shown in Fig. 1). GameStudio is an on-line game portal, where every student can have their game published for everybody to play, provided that they adhere to our specification and create a functional solution. This is only possible thanks to the games and services being created as components. Without components, such an integration of games would be much more difficult. Except for the game, the task was to implement services in their game, which means that after login it is possible to: • add the particular game as favourite, • rate the game, • comment the game, or • after winning the game, have your score be added into a list of best players. GameStudio was a strong drive, mainly for the skilled students. They were driven by the idea of themselves, jointly working on something larger than a common undergraduate assignment - a game portal, where everybody could play their games and where they would be able to proudly present their knowledge and skills to others. 2 Can

be found online on http://gamestudio.kpi.fei.tuke.sk/

Apart from the motivational factor, publishing the games in the GameStudio portal also served for a different purpose. The vision that not only students, but also general public will see their games, forced the students to create functional solutions, not merely unfinished concepts. As a result, indeed every student of the second bachelor year created a functional web-based game, which really surprised us positively. A play-list on our department’s YouTube3 was created with the same goal. For creating a video the students got bonus points and thanks to that, 67 very nice and watchable presentations were created. This channel also served for department propagation. D. Multiple Assignment Submissions Thanks to multiple assignment submissions during the semester, the students were motivated to finish their solutions as soon as possible, but especially until the milestone deadline. After the milestone, they could only get one half of the possible points for the assignment. E. Presentations in the End The assignments were evaluated via final presentation [16] in a strict time limit of 2 minutes. The students had the possibility to present via: • •

a YouTube video, a live demo on their own laptop.

Whether they chose a video or a live demo, they had to show the functionality of both the game and the services and the goal was to exhibit an actual usage. That prevented them to submit a dysfunctional solution. Many students took the presentations as a next challenge and their approach was often tuned jovial and playfully. F. Bonus Points for the Best One of the strongest motivating factors was the rule of 1/7 best. According to this rule, 1/7 best of all students get bonus points. The best assignments were evaluated in the scope of the final presentations and took the following properties into account: • • • • •

the final presentation - form, quality of the created solution, tasks beyond the assignment, activity on seminars, attendance, voting on the department’s YouTube channel.

Students were informed about this fact right from the beginning of the semester to ensure that they have the motivation to reach the best results. 3 Can

be found on-line on https://goo.gl/GIiLzq

deadline to deliver a functional solution at the and of the semester. Such prospects can get them discouraged right at the beginning of the semester. Since the task is also difficult for a second-year undergraduate, we decided to provide a support in multiple streams, necessary for passing the subject: • study materials in form of on-line sample tutorials for a game along with instructions of server installation, configuration and start, • consultations [17] directly on seminar and on-line, via discussion sections in the provided study materials, • live coding samples on lectures. In the following subsections, we provide the description of the individual support streams. A. Structured Study Materials

Fig. 2. GameStudio main page

G. Grading Style Several points from the total credit are separated for the so called "activity". These points are assigned individually when a particular student is active, works directly on the seminar, consults and creates solutions above the average. The number of points might not be high (in our course it is 16%), but their impact is strong - they force the students not to leave their work to the end of the semester, but to work continuously and to consult. This way, only the brightest students reach the full credit - the ones who really try to gain the highest number of points possible. Because we do not define any extra tasks explicitly, we support creativity, since the students themselves define the new tasks. H. Department Theme One of the multiple ways of how to gain bonus points was to tune the game in a theme of our department. They were allowed to use the department logos, photos of our staff, and be inspired by our department’s official webpage4 . At start, we meant this task both as a joke and an experiment. In the end however, multiple games suitable for department’s propagations emerged, such as the ones shown in Fig. 2. Many students had fun when trying to incorporate our profile photos into the games and we also noticed an increased degree of "patriotism" of students - awareness of where they belong and who are their teachers. IV. T ECHNICAL S UPPORT AND S TUDY M ATERIALS To keep the students motivated, it is important and necessary to provide them with technical support for the development and study materials for education. If they spend half a semester installing and configuring, they will not be able to meet the 4 http://kpi.fei.tuke.sk

The course study materials for seminars are created in the department’s system IT4KT5 . The materials are structured and provide a tutorial for an example game called Minesweeper6 . We tried to include as many programming patterns and good practices into the code as possible and provide an appropriate code structure. Most students applied this structure and practices in their code as well. Since each student had a different game assignment, we could not provide a thorough tutorial for every one of them. Therefore we tried to select the demo game to be as known as possible. Minesweeper was present in most versions of the Windows operating system, therefore was known to most of the students. The advantage of using a well known game was that students immediately recognized it, knew its rules and could therefore follow the argumentation in the materials very easily and they were able to apply the same argumentation on their design. Graduates in the past few years created games on multiple courses with thorough materials in a form of tutorials, where the instructions to develop the solution were described in detail. As example we can select courses such as OOP or Java Technologies. After passing these courses, however, many students had the feeling that they can create software only according to some manual or need someone to lead them through the process. Since they never had the experience of creating their own solution and designing a custom software without the help of a manual, they felt insecure in their following studies, and even more when searching for a job. In the CBP course we wanted to prevent just this lack of independence. Our goal was the students working independently as much as possible, creating their own designs, consulting only inevitable problems, which they encountered during their designs and gradually untying from the thorough manuals for software creation. By giving them a tutorial for an another game, we gave them enough lead for a start and an idea of 5 Information Technology for Knowledge http://it4kt.kpi.fei.tuke.sk/ 6 The tutorials in Slovak language can be http://it4kt.cnl.sk/c/kp/student/01.html

Transfer, found

in

a rough structure of a game design, but at the same time we gave them enough space for a creative design of their own. B. Live Instant Consultation In the scope of the seminars, the students had of course a possibility to consult the correctness of their designs with the lector. The lector’s task was to give the students the right feedback in form of reflection questions about future problem solutions and suggestions for improvements. Aside from the design, code quality was also consulted. The lectors gradually tried to establish the right programming habits in students, sometimes by multiple warnings and suggestions. When submitting the first checkpoint, the code quality was also checked as a part of the overall checkpoint score. One of the biggest possible issues when progressing through the development was the installation, configuration and start of the application server. Since the project was designed for a specific set-up, it was crucial to use the same server version and configurations. From our experience, despite the provided tutorials, most of the students get this step wrong and get stuck with their project for weeks. That is why we required the students to install, configure and start the GlassFish server directly on the 8th seminar. Most of the students got it right and we also discovered a few points of failure, solutions for which we included in the materials. C. Live Coding Examples on Lectures From our experience, providing a source code for the demo game and tutorials is usually enough for a simple project. This time, however, the project was complex, interconnected with many services and technologies. Therefore we decided to aid the students even more by providing live coding examples on lectures. The Minesweeper game design, as well as the next steps of creating JPA, REST services, JSF components and game graphics was presented directly on the demo source code and published as multiple branches (each lecture had a separate branch) on department’s GitLab. The lectures had a high attendance, which is unusable for our environment, since lectures are optional. Many students downloaded the source code from the lectures and continued to integrate their game into the code and were able to adjust and modify the remaining code according to their needs. This taught them two things: first, to work with a foreign code and second, to be able to integrate their own components into a foreign code and thus to fully leverage the power of component programming. V. C ONCLUSION In the field of computer science it is crucial to keep track of new technologies and trending software development paradigms. Regarding university education in this field it is a necessity. The course Component-Based Programming answers the demand and not only it presents components as reusable code units, it guides students through software analysis and modelling, web application development, features

of Java Enterprise Edition, practical use of database systems and instils in them good practices of checking and maintaining code quality. Although CBP is not an easy course for second-year students, the combined effect of learning by game creation, strong motivation and technical support guided them to a successful implementation of component-based games. ACKNOWLEDGMENT This work was supported by project KEGA No. 019TUKE4/2014 Integration of the Basic Theories of Software Engineering into Courses for Informatics Master Study Programmes at Technical Universities – Proposal and Implementation. R EFERENCES [1] A. J. A. Wang and K. Qian, Component-Oriented Programming. John Wiley & Sons, Inc., 2005. [2] A. L. Santos, “Collaborative course project for practicing componentbased software engineering,” in Proceedings of the 15th Koli Calling Conference on Computing Education Research. New York, NY, USA: ACM, 2015, pp. 142–146. [3] E. Pietriková and S. Chodarev, “Towards programmer knowledge profile generation,” Acta Electrotechnica et Informatika, vol. 16, no. 1, April 2016. [4] S. Šimoˇnák, “Verification of communication protocols based on formal methods integration,” Acta Polytechnica Hungarica, vol. 9, no. 4, pp. 117–128, 2012. [5] M. Tomášek, “Language for a distributed system of mobile agents,” Acta Polytechnica Hungarica, vol. 8, no. 2, pp. 61–79, 2011. [6] A. Parrish, B. Dixon, D. Hale, and J. Hale, “A case study approach to teaching component based software engineering,” in Software Engineering Education amp; Training, 2000. Proceedings. 13th Conference on, March 2000, pp. 140–147. [7] A. Baláž and N. Ádám, “Peer to peer system deployment,” Acta Electrotechnica et Informatika, vol. 16, no. 1, April 2016. [8] V. Szabóová, C. Szabó, V. Novitzká, and E. Demeterová, “Game semantics of the transaction rollback database operation,” Acta Electrotechnica et Informatika, vol. 15, no. 1, April 2015. [9] M. Akcaoglu, A. P. Gutierrez, P. Sonnleitner, and C. B. Hodges, Game Design as a Complex Problem Solving Process. IGI Global, 2016, pp. 217–233. [10] M. Biˇnas and E. Pietriková, “Useful recommendations for successful implementation of programming courses,” in 12th IEEE International Conference on Emerging eLearning Technologies and Applications, ICETA 2014, art. no. 7107618, 2014, pp. 397–401. [11] M. Biˇnas, “Identifying web services for automatic assessments of programming assignments,” in 12th IEEE International Conference on Emerging eLearning Technologies and Applications, ICETA 2014, art. no. 7107547, 2014, pp. 45–50. [12] T. E. Union. European credit transfer and accumulation system (ects). [Online]. Available: http://ec.europa.eu/education/resources/europeancredit-transfer-accumulation-system_en [13] J. Juhár and L. Vokorokos, “Separation of concerns and concern granularity in source code,” in 2015 IEEE 13th International Scientific Conference on Informatics, INFORMATICS 2015, 2015, pp. 139–144. [14] J. Kollár, M. Spišiak, and M. Siˇcák, “Abstract language of the machine mind,” Acta Electrotechnica et Informatica, vol. 15, no. 3, September 2015. [15] F. Y. Assiri, “Recommendations to improve programming skills of students of computer science,” in 2016 SAI Computing Conference (SAI), July 2016, pp. 886–889. [16] M. Sulír and S. Šimoˇnák, “A terse string-embedded language for tree searching and replacing,” Acta Electrotechnica et Informatica, vol. 14, no. 2, June 2014. [17] E. Pietriková, “Audience response systems: Benefits & utilization,” Acta Electrotechnica et Informatica, vol. 15, no. 4, December 2015.