Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dileepan Joseph, D.Phil. (Oxon), P.Eng. (AB) Associate Professor of Engineering University of Alberta.

Similar presentations


Presentation on theme: "Dileepan Joseph, D.Phil. (Oxon), P.Eng. (AB) Associate Professor of Engineering University of Alberta."— Presentation transcript:

1 Dileepan Joseph, D.Phil. (Oxon), P.Eng. (AB) Associate Professor of Engineering University of Alberta

2 Outline Introduction Procedural C++ with Robots MATLAB with Gorillas Evaluation and Reflection Conclusion June 26, ASEE Annual Conference & Exposition

3 Introduction ENCMP 100 Computer Programming for Engineers is a 1-semester 3-credit-hour course in a common 1 st year program. The course is taught by 5 lecture instructors, 1 lab instructor, and about 20 TAs and markers to about 800 engineering students per year. From 2009 to 2012, the course underwent major changes due to student dissatisfaction, as expressed in prior 4 th year exit surveys. June 26, 2013ASEE Annual Conference & Exposition 3

4 Introduction The paper describes strategies taken in this complex scenario to improve the course material taught to students and to improve the authors teaching evaluations. Focusing on the authors contributions, the paper compares 2 versions of the course: The first, in 2008–10, taught procedural C++ (C and C++ I/O) with a virtual robot called Karel; The second, since 2010, taught MATLAB with a video game based on Gorillas, a 1991 classic. June 26, 2013ASEE Annual Conference & Exposition 4

5 Introduction As with recent literature, this work supports the teaching of introductory computer programming with MATLAB, not C/C++. It also provides a detailed account of how the teaching of programming is facilitated by the development of a complex video game. Moreover, the Gorillas in MATLAB approach is distinguished by the introduction of iterative and incremental development (IID) to a 1 st year programming course. June 26, 2013ASEE Annual Conference & Exposition 5

6 Procedural C++ with Robots Karel, introduced by Pattis (1981), is a virtual robot with a simple programming language. It was created for educational purposes. Bergin et al.s update of Karel (1997), called Karel++, was used in ENCMP 100 for 2 years. Object-oriented aspects were hidden. Karel continues to be used in introductory programming courses elsewhere, such as in CS106A at Stanford University. June 26, 2013ASEE Annual Conference & Exposition 6

7 Procedural C++ with Robots June 26, 2013ASEE Annual Conference & Exposition 7 Initial (left) and final (right) situations (what the world looks like) for a Karel task (what the robot should do), from an ENCMP 100 assignment.

8 Procedural C++ with Robots In addition to lecturing and examining duties, the author developed and led a formal Karel programming contest, based on an informal one that was previously developed. Its goals were to encourage creativity and offer personal interaction in what was a very structured course with large classes. The contest, not for credit but for prizes, had limited and unlimited categories. June 26, 2013ASEE Annual Conference & Exposition 8

9 Procedural C++ with Robots About 3% of the class, or 20 students per year (Winter Term), took part in the contest. Presentations were shared with the whole class afterwards. 41% of all entries and 59% of unlimited entries were games. June 26, 2013ASEE Annual Conference & Exposition 9 Matti Lund and Greg Gislason present their winning entry in the unlimited category (2010). They went on to study Mechanical and Civil Engineering, respectively.

10 Procedural C++ with Robots Although department-led initiatives, begun in 2009, were improving the course, faculty-led initiatives would ultimately trump them. While there was consensus that a common core level of programming instruction be present in our programs, there was a lack of consensus over the procedural C++ choice. After substantial internal debate and external consultation, the faculty chose MATLAB. June 26, 2013ASEE Annual Conference & Exposition 10

11 MATLAB with Gorillas In developing the MATLAB course, instructors decided to retire rather than adapt Karel. MATLAB enabled visual examples easily enough, and the language was simpler. Another reason was to avoid duplication, where concepts taught with one language were then re-taught with another. This left a 2–3 week gap in the 12-week course for each instructor to fill. June 26, 2013ASEE Annual Conference & Exposition 11

12 MATLAB with Gorillas The author taught students to program a game, entitled Gorillas in MATLAB, using IID with 6 versions. Each time a syllabus part was completed, the game was revisited and improved based on what was taught. June 26, 2013ASEE Annual Conference & Exposition 12 The IID model puts requirements specification, implementation (coding), and verification (testing) in a circular loop. Each cycle of the loop results in a usable prototype, which evolves.

13 MATLAB with Gorillas In this artillery game, which requires angle and velocity inputs each turn, 2 gorillas throw bananas at each other atop a city skyline. External resources, e.g., Nintendo images found online, are used with attribution. In addition to code, which is re-developed in class, 30 slides were prepared to frame each version (3–4 slides) and the whole project. The covered syllabus correlates very well with material in a popular textbook by Attaway. June 26, 2013ASEE Annual Conference & Exposition 13

14 MATLAB with Gorillas Kong (facing east): Angle (degrees)? 53 Velocity (m/s)? 11 Prof (facing west): Angle (degrees)? 57 Velocity (m/s)? 11 Prof wins (facing west). June 26, 2013ASEE Annual Conference & Exposition 14 Command (left) and figure (right) windows for one game of Gorillas in MATLAB (V6). Kong and Prof, the final boss, are computer players.

15 MATLAB with Gorillas VersionMATLAB (R2012)Attaway 2/E 1. Basics and PlottingALGEBRAIC AND COLON OPERATORS axis, ceil, clc, clear, close, cosd, disp, figure, hold, input, length, plot, rand, round, sind, size, stairs, text, title, xlabel, ylabel 1.1–1.6, 5.2, 2.1– Selection and Repetition LOGICAL AND RELATIONAL OPERATORS abs, break, case, clf, elseif, end, false, find, for, if, pause, switch, true, while 3.1, 5.4, 3.2– 3.7, 4.1–4.3, 5.1, 5.5– Functions and Structures DOT OPERATOR else, floor, function, isequal, menu, num2str, otherwise, struct 2.7, 5.3, 6.1– 6.5, Files, Strings, and Cellscell, fclose, feof, fgetl, fopen, fprintf, isempty, strcmp, strtok, strtrim, urlread 2.6, 7.1–7.4, 8.1, 9.1– Images and Soundsaudioplayer, global, image, imread, load, play, playblocking, save, subplot 14.1– Software Engineeringerfinv, randn, sqrt, tand June 26, 2013ASEE Annual Conference & Exposition 15

16 Evaluation and Reflection The authors instructor excellence rating rose from 50 th to 75 th percentile, comparable to his other courses, by going from procedural C++ with robots to MATLAB with Gorillas. The impact on 4 th year exit surveys will begin to be known in Nevertheless, student representatives no longer complain to the ECE Department Chair about the course. Antagonism to the course on its 1 st day has declined from 20% (2010) to 15% (2012). June 26, 2013ASEE Annual Conference & Exposition 16

17 Evaluation and Reflection In 2010–11, Gorillas in MATLAB was taught only in the authors ENCMP 100 section, while it was being developed for the first time. Peer assessment was very positive. Other instructors decided to adopt the material, after seeing it, for their own sections. Once further development was complete, Gorillas in MATLAB was taught to 768 students in 2012 (Winter Term). June 26, 2013ASEE Annual Conference & Exposition 17

18 Evaluation and Reflection Gorillas in MATLAB unified the syllabus much better than did Karel, who was barely seen in class after the first 2 weeks, with procedural C++ (the contest was held out of class). With the new course, important software engineering concepts, like refactoring and IID, are introduced with programming. All students, and not just those who enter a contest, are taught how to develop a larger program over a longer period of time. June 26, 2013ASEE Annual Conference & Exposition 18

19 Conclusion Source code, data files, and PowerPoint slides for Gorillas in MATLAB (6 lectures) may be downloaded from the authors website. Comprising up to 25% of a 12-week course at the University of Alberta, it is used to teach introductory computer programming. The syllabus is divided into 6 parts. At the end of each part, a version of Gorillas in MATLAB is taught. This unifies the course nicely. June 26, 2013ASEE Annual Conference & Exposition 19

20 Conclusion Unlike the state of the art, the proposed approach exploits iterative and incremental development and video game design to teach introductory computer programming. Relative to a previous course on procedural C++ with virtual robots, students expressed their preference for the current course by giving the author a significantly higher instructor excellence rating. June 26, 2013ASEE Annual Conference & Exposition 20

21 Acknowledgements ENCMP 100 is taught by a team and so the author is grateful to his colleagues, as well as to administrators and students, for their roles in course evolution. The author also thanks MathWorks for their offer of sponsorship. June 26, 2013ASEE Annual Conference & Exposition 21 Left to right: Marek Reformat, Qing Zhao, Sarah McEvoy, Dileepan Joseph, and Bruce Cockburn. Missing: Paul Iglinski, Lukasz Kurgan, and others.


Download ppt "Dileepan Joseph, D.Phil. (Oxon), P.Eng. (AB) Associate Professor of Engineering University of Alberta."

Similar presentations


Ads by Google