1 / 21

From Robots to Gorillas : Computer Programming for Engineers

Dileepan Joseph, D.Phil. (Oxon), P.Eng. (AB) Associate Professor of Engineering University of Alberta. From Robots to Gorillas : Computer Programming for Engineers. Outline. Introduction Procedural C++ with Robots MATLAB with Gorillas Evaluation and Reflection Conclusion. Introduction.

kemal
Download Presentation

From Robots to Gorillas : Computer Programming for Engineers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dileepan Joseph, D.Phil. (Oxon), P.Eng. (AB)Associate Professor of EngineeringUniversity of Alberta From Robots to Gorillas: Computer Programming for Engineers

  2. Outline • Introduction • Procedural C++ with Robots • MATLAB with Gorillas • Evaluation and Reflection • Conclusion ASEE Annual Conference & Exposition

  3. Introduction • ENCMP 100 Computer Programming for Engineers is a 1-semester 3-credit-hour course in a common 1st 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 4th year exit surveys. ASEE Annual Conference & Exposition

  4. Introduction • The paper describes strategies taken in this complex scenario to improve the course material taught to students and to improve the author’s teaching evaluations. • Focusing on the author’s 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. ASEE Annual Conference & Exposition

  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 1st year programming course. ASEE Annual Conference & Exposition

  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. ASEE Annual Conference & Exposition

  7. Procedural C++ with Robots • 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. ASEE Annual Conference & Exposition

  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. ASEE Annual Conference & Exposition

  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. Matti Lund and Greg Gislason present their winning entry in the “unlimited” category (2010). They went on to study Mechanical and Civil Engineering, respectively. ASEE Annual Conference & Exposition

  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. ASEE Annual Conference & Exposition

  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. ASEE Annual Conference & Exposition

  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. 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. ASEE Annual Conference & Exposition

  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. ASEE Annual Conference & Exposition

  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). • Command (left) and figure (right) windows for one game of Gorillas in MATLAB (V6). Kong and Prof, the “final boss”, are computer players. ASEE Annual Conference & Exposition

  15. MATLAB with Gorillas ASEE Annual Conference & Exposition

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

  17. Evaluation and Reflection • In 2010–11, Gorillas in MATLAB was taught only in the author’s 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). ASEE Annual Conference & Exposition

  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. ASEE Annual Conference & Exposition

  19. Conclusion • Source code, data files, and PowerPoint slides for Gorillas in MATLAB (6 lectures) may be downloaded from the author’s 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. ASEE Annual Conference & Exposition

  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. ASEE Annual Conference & Exposition

  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. Left to right: Marek Reformat, Qing Zhao, Sarah McEvoy, Dileepan Joseph, and Bruce Cockburn. Missing: Paul Iglinski, Lukasz Kurgan, and others. ASEE Annual Conference & Exposition

More Related