15.01.2015 Views

Journal of Research in Innovative Teaching - National University

Journal of Research in Innovative Teaching - National University

Journal of Research in Innovative Teaching - National University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AGILE TEACHING: A CASE STUDY OF USING RUBY TO TEACH<br />

PROGRAMMING LANGUAGE CONCEPTS<br />

Majed A. Sahli and Gordon W. Romney<br />

Abstract<br />

Ruby, an object-oriented programm<strong>in</strong>g language, is an obvious choice for agile web development that is be<strong>in</strong>g<br />

confirmed <strong>in</strong> the web marketplace. It provides a hands-on tra<strong>in</strong><strong>in</strong>g tool for computer science students study<strong>in</strong>g<br />

programm<strong>in</strong>g language grammars, scanners, parsers, and Abstract Syntax Trees. A virtualized version <strong>of</strong> Ruby was<br />

used to implement a simple LL(1) calculator grammar. The power ga<strong>in</strong>ed by us<strong>in</strong>g Ruby significantly facilitated the<br />

implementation <strong>of</strong> the parser over comparable C++ and Java implementations. Usage <strong>of</strong> this portable, “virtual lab”<br />

facilitated the <strong>in</strong>tegration <strong>of</strong> laboratory and classroom assignments <strong>in</strong> a teach<strong>in</strong>g model that completes class<br />

<strong>in</strong>struction for a semester course <strong>in</strong> one calendar month. This is an example <strong>of</strong> agile teach<strong>in</strong>g <strong>in</strong> Internet-time.<br />

Key Words<br />

Accelerated learn<strong>in</strong>g, agile problem driven teach<strong>in</strong>g, agile s<strong>of</strong>tware development, portable development<br />

environment, Ruby, virtual labs<br />

Introduction<br />

Ruby is a unique open-source programm<strong>in</strong>g language that is <strong>of</strong> grow<strong>in</strong>g popularity. Ruby is<br />

mostly paired with Rails, so it is common to use the name Ruby on Rails (RoR). Rails is a<br />

framework that when used with Ruby makes an easy and productive web development<br />

framework. While RoR has been a success <strong>in</strong> the web marketplace, be<strong>in</strong>g adopted by Yahoo!,<br />

Google, Twitter, J.P. Morgan, New York Times, John Deere, and others (Fernandez, 2008), not<br />

many educators notice the unique Ruby features that promote it as a useful education tool,<br />

especially <strong>in</strong> agile problem-driven teach<strong>in</strong>g environments. The faculty at the <strong>National</strong> <strong>University</strong><br />

(NU) School <strong>of</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Technology (SOET) was among the early adopters <strong>of</strong> agility <strong>in</strong><br />

pedagogy (Dey et al., 2009).<br />

The authors showcase the use <strong>of</strong> Ruby as a hands-on tra<strong>in</strong><strong>in</strong>g tool for computer science<br />

students. The use case took place at NU, where courses are taught <strong>in</strong> a unique one-course-permonth<br />

format. The students learned the concepts <strong>of</strong> programm<strong>in</strong>g language grammars, scanners,<br />

parsers, and Abstract Syntax Trees (AST) by implement<strong>in</strong>g a simple Left to right Leftmost<br />

derivation, LL(1), calculator grammar, <strong>in</strong>troduced by Lee (2008). Us<strong>in</strong>g Ruby <strong>in</strong> a portable<br />

virtual lab enabled the students to successfully accomplish the goal <strong>of</strong> the project <strong>in</strong> an<br />

accelerated course format.<br />

Pr<strong>in</strong>ciples Beh<strong>in</strong>d Ruby<br />

Ruby was written by Yukihiro Matz Matsumoto (Matz), <strong>of</strong> the Network Applied Communication<br />

Laboratory <strong>in</strong> Japan, <strong>in</strong> 1993. It was first released to the public <strong>in</strong> 1996 as Ruby 1.0 (V<strong>in</strong>oski,<br />

2006). The popularity <strong>of</strong> Ruby has only grown s<strong>in</strong>ce, with many improvements. The current<br />

stable Ruby version is Ruby 1.9.1, released January 30, 2009.<br />

Ruby is unique because the basic pr<strong>in</strong>ciples on which it was based were <strong>in</strong>spired by Perl with<br />

Smalltalk-like features. Matz believes that programmers need to enjoy programm<strong>in</strong>g. He<br />

63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!