Teaching Mobile Computing and Developing Software to Support ...

9 downloads 81248 Views 12MB Size Report
Mar 12, 2011... considering, a pro- gramming course targeting mobile devices to satisfy student ... Keywords. eBook, mobile computing, Android, microlab. 1.
Teaching Mobile Computing and Developing Software to Support Computer Science Education James B. Fenwick Jr.

Barry L. Kurtz

Joel Hollingsworth

Computer Science Department Appalachian State University Boone, NC, USA 28608 828-262-2708

Computer Science Department Appalachian State University Boone, NC, USA 28608 828-262-7008

Computer Science Department Elon University Elon, NC, USA 27244 336-278-6241

[email protected]

[email protected]

ABSTRACT

phone programming appearing at a variety of institutions including NYU, Stanford, Maryland, and Austin (TX) Community College. In addition, there are a large number of free, online courses offered such as those at edumobile.org. A search of ACM education publications unfortunately reveals less information to assist educators in their own efforts [7]. We have offered four such courses and several independent study groups over the past two years and report on these experiences as well as recommendations. The first half of 2010 is marked by the emergence of a new generation of devices that attempt to combine the functionality of an eBook Reader (similar to a Kindle) and a web browser (similar to an iPod Touch). The underlying operating systems for many of these devices are the same as for the smart phones, and this presents an opportunity to broaden the focus to a larger class of multi-function devices. We have a well-published history of using emerging technologies in innovative ways to support and enhance the education experience and are very intrigued with the possibilities offered by these devices. In particular, the authors have reported on using iPod Touch devices and tablet PCs [8]. This paper describes a variety of these emerging devices, details course experiences at our institutions on mobile device programming, and describes our efforts on developing software enhancements that target improving the educational experience for students using these new devices.

Many schools have introduced, or are considering, a programming course targeting mobile devices to satisfy student interest in programming smart phones. In addition, a new class of mobile devices are appearing that combine the functionality of an eBook reader with a web browser, and many of them are based on the same programming frameworks as the smart phones. We report on the successes of mobile device programming courses at two schools. In addition, we report on the accomplishments of students developing software to leverage these newer, multi-function devices in supporting broader computer science education initiatives. In particular, we have developed a service-oriented application that allows students to compile and test programs written in Java and C++ that can be invoked from these devices. We have developed other software allowing these devices to function like Tablet PCs. After describing these important tools, we discuss our current efforts to use these mobile devices in computer science education.

Categories and Subject Descriptors K.3.1 [Computing Milieux]: Computer Uses in Education—Collaborative Learning, Computer Science Education

General Terms Human Factors

2.

Keywords eBook, mobile computing, Android, microlab

1.

[email protected]

INTRODUCTION

Many schools have begun, or are considering, offering courses for programming mobile phones. In addition to our two schools, an Internet search shows college courses on mobile

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. SIGCSE’11, March 9–12,2011,Dallas,Texas,USA. Copyright 2011 ACM 978-1-4503-0500-6/11/03 ...$10.00.

589

EBOOK/BROWSER DEVICES

The most talked about device is the Apple iPad [1]; the larger screen on the iPad makes the web browsing experience much quicker and typing much easier than the iPod Touch device. The large screen also makes this a device where one can view books, lecture presentations, and other documents. The screen on the iPad is 9.7” with 1024 x 768 resolution. The iPad does not have any camera or video capabilities. The iPad weighs 1.5 lb. and the base model costs $499. The Entourage Edge [3] combines two large screens: a 9.7” gray scale e-ink screen with 1200 x 825 resolution and a 10.1” LCD screen with 1024 x 600 resolution. A unique feature of the e-ink screen is that the user can write on it with a stylus. The Edge can record the audio part of lectures and has a video camera that would allow students to communicate with classmates and instructors. The Edge has the size and weight (3 lb.) of a larger netbook and has a comparable price ($499). We also purchased a dual-screen Alex Reader from Spring

Design but found its capabilities to be too limited for our endeavors. There are at least twenty small tablets that are in development or have been released using the Android OS; particularly promising is the Samsung Galaxy Tab, a 7” tablet running Android 2.2 [15].

3. 3.1

libraries are coming online allowing JavaScript access to underlying phone, location, acceleration, sound, camera, etc. functionalities of the devices.

3.4

DEVELOPMENT ENVIRONMENTS The iPhone OS

The iPhone SDK is freely available from Apple (registration is required). Applications are developed using the XCode development environment, which is a mature and productive tool. User interfaces are developed using the Interface Builder (IB) environment. While these two systems work together for application construction, they are not seamlessly integrated; for example, a common error for novices is forgetting to save the IB work when returning to XCode. Applications are built with Objective-C, which has features of SmallTalk and C. These tools and the SDK only run on a Mac platform; thus, a hardware investment may be necessary. However, we purchased Mac Mini machines and used KVM switches to re-use monitors also connected to lab PCs at 50-60% of the price of a Mac desktop. The SDK comes with a robust device emulator. There are many books and online resources available. Deploying applications to a device requires a developer license with Apple. The University license is free but has (sensible) restrictions on the applications and uses. Personal licenses are about $100 USD and must be renewed annually.

3.2

4. 4.1

TEACHING MOBILE COMPUTING Experiences at Elon University

A course called Mobile Computing has been taught at Elon University each Spring semester since 2008. The past two iterations of this course have been taught using Android. This required senior-level course has become very popular with the students as it gives them a chance to explore the emerging world of software development for smart phones. The course was taught using an e-book, as supplemental reading material, along with the Android Developers SDK and Dev Guides available directly from Google [4]. The students developed applications using the Eclipse IDE and the Android Development Tools plugin [2]. The Eclipse ADT plugin gives the students an intuitive development environment along with direct integration with the Android emulator that can be used to test applications before deployment to actual devices. Deployment to Android phones is quite easy and can be done to any Android phone by selecting an option in the phone’s settings. Elon purchased eight Android Developer Phones from Google that are made readily available to the students. A number of students used their own Android phones during the course. By the end of the course, students were running applications on six different types of Android phones. The first half of the course was lecture-based. Lectures were reinforced by a fairly straight forward programming assignment based on the lecture topic. Topics included: XMLbased GUI development, using orientation sensors, touchbased input, gesture-based input, using media and the camera, and a number of general software development topics for mobile computing. Instead of using lecture slides, students were presented application requirements and then were led by the instructor through the development process for the application. This process included discussion of any new topics that might arise. All of the application code developed during the course has been made available at the course website [5].

The Android OS

Android is a free, open source, full featured software platform based on Linux for mobile devices. It supports a number of features including a touch and/or keyboard interface, camera, video, accelerometer, compass, audio, phone, SMS, email, maps, and GPS. Android includes a number of open source libraries such as SQLite, OpenGL ES, and WebKit along with application programming interfaces in Java [4]. Android provides a rich SDK which gives the application programmer full access to the same framework API which is used by the core applications. Applications are run in their own process in order to enforce isolation. Most applications are written in Java and run using Dalvik, a Java VM which has been optimized for mobile devices. Android does allow code to be implemented in C and provides a native interface between Java and C.

3.3

Other Software

In considering newer multi-purpose devices like the Entourage Edge, there are additional frameworks to learn. The Edge adds a its own SDK on top of the base Android system. At present, this SDK is not released for developers. A primary feature of these devices is the e-ink screen. Any EPUB formatted document can be displayed on the e-ink screen. The EPUB format is an XML format composed of three open standards developed by the International Digital Publishing Forum [6]. This open standard allows the possibility of developing content that can integrate with the device (e.g., Entourage Edge) SDK to make the dual-screen device a seamless and integrated multi-media content provider. For instance, section 5.3 describes work we have accomplished in having students use the stylus pen on the e-ink screen to answer a question posed by the e-ink text. This response is then sent wirelessly to an instructor station for review and possible classroom discussion. As the device manufacturers release their SDKs even more robust educational interactions will be possible.

Mobile Web Applications

Both the iPhone and Android SDKs require learning new frameworks. These frameworks are well documented yet remain large and can intimidate some students. Another strategy is to use common web technologies to build web applications that can be run on nearly all mobile devices. Rogers describes how to use HTML5, CSS, and JavaScript to accomplish these goals; specifically building the same application (Note Pad) that is one of the cornerstone Android tutorial applications [13]. This is an attractive option since many students may already possess enough familiarity with these technologies from other courses. In addition, no specific hardware (Mac platform) or software (Eclipse ADT) are required or encouraged. Students can develop in their usual way. Moreover, the application can be run on many different devices without requiring porting any code. Specialized

590

The hands-on approach mentioned above has worked very well for the past two iterations of the course. The course has been taught in a lab to allow the students to both follow along with the instructor and to try their hand at slight changes to the application. This allows the students to be active during the learning process while also gaining experience in the development environment. The second half of the course was project-based. The students were required to submit project proposals which outline a mobile application they wished to develop. This was done individually or as a team. The students then orally presented their proposal to their peers and requested feedback. After the project was accepted by the instructor, the students used the remaining course time to implement this application. Student applications in 2010 included: a 2-D animation of fireflies in a lantern, a Mad Libs application which incorporated SMS and email, GPS-enabled application for setting hiking waypoints, and a multi-tool for ROTC cadets. A couple of groups have continued to work on their application in an effort to polish them for upload to the Android Market. Android has proven to be an exciting environment which can be used to teach both software development and mobile computing topics. Students and instructors at Elon have been pleasantly surprised by the ability to quickly develop interesting applications. We have found Android to be so intuitive, we have incorporated it into both the CS II and CS III course [12].

4.2

website; a time-management app that is designed to integrate with a popular web-based management application; and lastly, the instructor created a mobile app for a popular, local weather website. The students enjoyed the course and the studio format. Students largely solved problems they encountered, such as out-of-date text code, undocumented XML configuration items, etc. Two other items of positive feedback, while anecdotal, are valuable indicators. One student developed an application outside the requirements of the course to support an activity of his own interest – rock climbing. The application uses the camera and geo-location subsystems to record coordinates and photo of a good rock climbing spot along with ratings, textual descriptions, and a feature to share with other social networking systems. Another student said that his final project had nearly 1,000 Android Market downloads a month after the class had completed. This entrepreneurial and independent spirit seemed to be missing from our CS students generally, so it was refreshing to witness again.

4.3

Independent Study Experiences

Kurtz is co-PI on an NSF STEP grant where one of the activities is to sponsor Freshman research clusters of four students to explore a topic of their own choice [16]. In Spring 2009 his cluster elected to work on iPhone software development. Despite providing students sole access to a machine for development, no significant progress was made by the end of the semester beyond getting some programs taken directly from reference books up and running. His Spring 2010 research cluster, a different group of four freshmen students, elected to do Android development. They made significant progress by the end of the semester developing a 3D tic-tactoe game and a program that queried an earthquake web service (earthquake.usgs.gov) to find any large earthquakes in the world in the last 24 hours and then using Google maps to display this information on an Android smart phone. In Fall 2010 this group moved to iPad software development after their experience using Android. They have been much more successful than the original group noted above and have developed three different two person games that can be played using Bluetooth connectivity. Kurtz believes that the Android experience may have eased the learning curve for development using the iPhone/iPad. The software described in this paper for the Entourage Edge, namely the editor for microlabs and submission software to WAGS (see section 5.2) and the Tablet PC mode of operation (see section 5.3), was developed by two different students completing an independent study. Development of this software went smoothly due to the familiarity with Java and the Android plugin for Eclipse. The only problems dealt with the lack of an SDK for the Edge inhibiting automation of operations between the e-ink screen and the LCD screen, use of Android 1.6 instead 2.1 or 2.2, and lack of Bluetooth support on the Android simulator.

Experiences at Appalachian State

A summer course called Mobile Device Programming was offered in Summer 2010 that emphasized Android programming (80%) with enough iPhone programming (20%) to gain some familiarity. This course was an upper-level elective course that filled to capacity easily. The course used the Rogers et.al. O’Reilly text [14] and also frequently consulted the online Android Developers website materials [4]. The students developed applications using the Eclipse IDE and the Android Development Tools plugin [2]. The department provided Entourage Edge devices and a number of students used their own Android phones during the course. The Android SDK provides an emulator that is quite robust, and most work was developed with the emulator primarily and deployed to actual devices as a final step. The course was run in a programming studio fashion. A new assignment was posted daily and students worked on the assignment in class completing it outside of class. Following the text, the course explored the Android SDK environment, coding, debugging, use of XML configurations, manifests, and publishing applications in the context of a single running application. Then specific features of the mobile device framework were learned, including SQLite databases; location-based services and mapping; a large variety of user interface features (input methods, widgets, etc.); telephone, accelerometer, camera usage. This intensely hands-on approach worked very well. Students formed pairs for a final project that required several of the features mentioned above. A few student final projects included: a bouncing ball pit game with speed, size, number controls as well as highest score database; a graffiti-inspired applications dubbed ’Stash-Mash allowed user to add pre-loaded mustaches to a picture taken with the camera; a mobile application for ticket purchasing for our university’s athletics

4.4

Teaching Recommendations

Our advice to instructors considering entering this area of mobile device programming is to consider your goals and resources first. iPhone development requires a specific hardware platform so there may be an expense incurred and space may need to be allocated for these machines. If students are not familiar with Objective-C or SmallTalk then

591

iPhone development will likely progress more slowly as the base language is learned. The Android framework is heavily object-oriented. Students who know Java will be comfortable from their use of Java Collections, etc. A procedurally-motivated C++ programmer may incur a steeper learning curve to assimilate the use of composition, delegation, interfaces, abstract classes, etc. that are mainstays of the framework. The Android SDK itself works on all platforms.As described in section 3.4 above, a web application strategy using HTML5, CSS, and JavaScript can be a good choice for some as it can alleviate the hardware and software dependences of the SDKs. Hybrids are also possible, covering some of each technology. We have found that the requirement of using a large framework is a good learning experience for students. Moreover, learning how to work with a framework was easier for the second framework. For this reason we tend to suggest starting with the platform which will incur the least effort in learning the base language. We also recommend allowing students flexibility in project selection. They are highly adept consumers of these types of applications and need gentle nudges to begin thinking entrepreneurially, but this truly is “right up their alley.”

5.

the microlab students are given a program that compiles and runs but does not function properly; the primary problem is that there are 25 readers and only one writer that is starved from changing the data value. Students have to modify the program to make sure the writer has priority. Specifically students have to: (1) declare the locks and conditions, (2) add the appropriate operations to the startRead, endRead, startWrite and endWrite methods, and (3) run the test program to make sure everything works properly.

5.2

Our automated grading system is designed to provide students immediate feedback on their solution to a microlab. Clients can submit programs for compilation and execution using Java, C/C++, or MPI (Message Passing Interface). The server machine is typically a multicore machine (we are currently using an eight core machine) so that the advantages of parallelism are evident. We now present a sequence of screenshots that show how a student uses the WAGS system to complete the ReadersWriters microlab. We use an Entourage Edge in dual screen mode where useful documentation can appear on the e-ink screen and the LCD screen is used to edit the skeleton code and then submit a solution to WAGS. We developed a simple text editor under the Android OS that can open text files, allow editing using the built-in electronic keyboard, and save the modified files to either the SD card or to a jump drive plugged into the USB port. The modifications require declaring a ReentrantLock and then creating two condition variables associated with this lock. The JavaDoc APIs for the Lock Interface and the Condition Interface are vital to completing this exercise; these interfaces are displayed on the e-ink display (see figure 1). The LCD screen shows the skeleton code after the student has made the requested modification. The program is then copied to WAGS and compiled. If there are no compile errors the testing proceeds automatically. However, as shown in Figure 2 there were compile errors and then logic errors in the submitted code before a successful submission. In this case the compile errors were due to the student not using the proper import statements to make the ReentrantLock and Condition types visible. Once the imports are added to the program, it compiles and is executed. The program prints a sequence of statements that indicate when a reader starts to read and finishes reading and when a writer wants to write, actually starts to write, and then finishes the write. The test program has been set up to detect that the writer will block any new readers and that once all the existing readers are finished the writer can proceed. The most common error is that the request from the writer to write is not given priority and the writer can never proceed because there are many readers always accessing the data. When the instructor logs into WAGS, she is recognized as having administrative privileges and can examine any or all of the solutions submitted by students in her class. Often the instructor can look at the most recent submissions from a student and provide some helpful advice.

SOFTWARE TOOLS FOR MICROLABS

We developed our microlab approach to active learning as part of NSF grant (0737355) entitled Modern Distributed Computing Education funded under the CCLI program. The use of programming microlabs is reported in [11]. A microlab is a hands-on activity typically lasting 3-20 minutes that is completed by students during lecture. The programming microlabs take the most time and depend on software that makes it possible to compile, run and test programs in Java and C/C++ on eBook/Browsers. Logical microlabs are similar to active learning interactions commonly used with tablet PCs and are of much shorter duration.

Figure 1: Solving a Microlab on the Entourage Edge

5.1

The Web-based Automated Grading System (WAGS)

Using Programming Microlabs

To provide a concrete example, we discuss one programming microlab in detail. The Readers-Writers problem involves many processes trying to read a data value and one or more other processes trying to write to the data value. Simultaneous readers are allowed but only one active writer is allowed; all other readers or writers must be blocked. In

5.3

Using Logical Microlabs

Using Tablet PCs during lecture is a form of active learning that is popular with students; our second major project

592

was to emulate this tablet PC mode of instruction. Here is an example of a logical microlab. After covering the basic concepts of a binary search tree, an instructor may ask students to draw the final tree after inserting the nodes M, A, Z, P, B, T, O, D, Q into an initially empty binary search tree. Students draw their solutions and submit them anonymously to the instructor. The instructor can view all responses and select one or two of the responses for class discussion.

The server program on the instructor machine receives multiple pdf files from students and stores them in a common directory. The instructor can view these responses and select one or more for further discussion. The selected student response is sent back to all client machines and automatically transferred to the e-ink screen. Alternatively, using a USB to VGA graphics adapter it is possible to project the selected response for everyone to see. It is important that solutions be submitted anonymously and that students do not know which of their classmate’s solution is being discussed. In practice, often a student will self-acknowledge that it is his/her solution being discussed.

Figure 3: Student response entered on e-ink screen

6.

USING NEW CAPABILITIES

These eBook/Browser devices have many built-in capabilities that have immediate application in an educational setting. For example, using the Entourage Edge it is possible to record the audio portion of a lecture or to hand write lecture notes on the e-ink screen.

6.1

Using the Communications Capabilities

The Entourage Edge contains a front facing video camera for online meetings. Synchronous real-time meetings can be used for: VIRTUAL OFFICE HOURS - The instructor may wish to set up designated times that she would be able to answer questions posed during a live chat session. PROJECT GROUP MEETINGS - If students are working on a group project, they may find it convenient to meet electronically rather than have to meet physically at the same location. VIRTUAL CLASS SESSIONS - The instructor might want to offer voluntary virtual class sessions, such as review before a test, to answer student questions. DISCUSSION GROUPS - Students may be asked to watch some presentation, such as talk on an educational television channel, or review an educational document and then form groups to discuss the presentation or documents.

Figure 2: Sample WAGS output: (top) compilation error, (middle) logic error, (bottom) correct behavior. We implemented our approach on the Entourage Edge since its e-ink screen accepts hand written annotations. The instructor machine is the server and can select either Bluetooth mode or WiFi mode for submission.. After selecting a submission mode the instructor can transfer a pdf file to all the clients by selecting a file from a list. On the client side, after the student has registered as part of the network, the student can elect to either receive a file or send a file to the server machine. In this case, the student receives the binary search tree problem sent by the instructor and, using an Android intent, this pdf is automatically transferred to the e-ink screen. The student enters annotation mode and draws in a proposed solution, such as the one shown in figure 3, which is then exported as a pdf file thereby completing the process by sending the file back to the server machine.

6.2

Using the Audio/Video capabilities

The audio and video playback capabilities can be used to provide tutorial materials in various forms. Rather than

593

8.

have the instructor give a “talking head” lecture on a topic, we show a student trying to solve a typical problem. We have developed a set of Asynchronous Instruction Patterns that are used to simulate student interaction in a virtual classroom based on the earlier work [9, 10]. Here are some of the more commonly-used patterns: ANSWER INSTRUCTOR QUESTION - The instructor asks an open ended question in a video clip and the student responds using handwriting, typing, audio or video as appropriate; feedback would be delayed until the instructor or a teaching assistant can review the responses. EVALUATE CLASSMATE - The student listens to a stored response of a classmate to an instructor question and evaluates the classmate’s response. ANSWER CLASSMATE QUESTION - A virtual classmate asks the instructor a question about the material just covered; the instructor asks the student using the eBook/Browser to answer the classmate question using an appropriate input mode. If immediate feedback is desired, the student could be shown several possible responses and asked to choose the most suitable response.

7.

CONCLUSIONS

Many schools are beginning to offer mobile device programming courses. We have offered such courses at two institutions for 4 terms and report on how these courses are working. Meanwhile, a new generation of devices has emerged that combine the functionality of an eBook reader and a web browser, such as the iPad and Entourage Edge. We report on ways that we are exploring that leverage these new devices to enhance computer science education including automated grading system integration, EPUB textbook hooks to make content come alive, and implementation of a variety of instructional patterns. Because these devices are programmed with the same tools and technologies as many modern mobile phone devices, our own students are able to translate skills from a mobile device programming course into research efforts with the new devices.

9.

REFERENCES

[1] Apple. Apple ipad. www.apple.com/ipad. [2] Eclipse. Adt plugin for eclipse. developer.android.com/sdk/eclipse-adt.html. [3] Entourage. Entourage edge. www.entourageedge.com. [4] Google. Android developers. developer.android.com. [5] J. Hollingsworth. Csc 442: Mobile computing. trumpy.cs.elon.edu/joel/2010/csc442/. [6] International Digital Publishing Forum. Epub specification. www.idpf.org/specs.htm. [7] S. Kurkovsky. Engaging students through mobile game development. In Technical Symposium on Computer Science Education, March 2009. [8] B. Kurtz, J. Fenwick, and C. Ellsworth. Using podcasts and tablet pcs in computer science. In Proceedings of the 45th ACM Southeast Conference, March 2007. [9] B. Kurtz, D. Parks, and E. Nicholson. Effective internet education: A progress report. In Technical Symposium on Computer Science Education, February 2002. [10] B. Kurtz, D. Parks, and E. Nicholson. Effective internet education: Strategies and tools. In International Conference on Frontiers in Education, November 2002. [11] B. Kurtz, R. Tashakkori, J. Helfert, and M. Sage. Using microlabs to teach modern distributed computing. In Technical Symposium on Computer Science Education, March 2010. [12] D. Powell and J. Hollingsworth. Integrating mobile computing with android in CS II and CS III. In International Conference on Frontiers in Education, July 2009. [13] R. Rogers. Developing portable mobile web applications. LinuxJournal, September 2010. [14] R. Rogers, J. Lombardo, Z. Mednieks, and B. Meike. Android Application Development. O’Reilly, 2009. [15] Samsung. Samsung galaxy tab. http://galaxytab.samsungmobile.com/. [16] R. Tashakkori, B. Kurtz, J. Fenwick, D. Parks, and A. McRae. Early participation of cs students in research. In submitted to SIGCSE 2011, March 2011.

TEACHING PROGRAMMING LANGUAGES

We are currently using the Entourage Edges to teach programming languages. Every student in the course was given an Entourage Edge to keep for the duration of the semester to support instructional activities. We illustrate the tablet PC mode to implement logical microlabs. Prolog was introduced using a family tree of data where facts for gender and parent relations are given. Students have to write rules for mother and father; both are very easy. Writing a rule for sibling is more challenging. The logical microlab shown in Figure 4 helps students focus on a sibling rule. Most student found X = rosa and Y = gregory; others will give the reverse bindings. Some will say both bindings are possible, but very few students notice that this rule allows you to be a sibling to yourself. This leads to an interesting discussion on how the Prolog inference engine discovers solutions. By

Figure 4: A Logical Microlab in Prolog using both programming microlabs and logical microlabs interspersed with lectures students quickly learned to program using a logical programming language (Prolog) and a functional programming language (F#).

594

Suggest Documents