University of Alberta Improves First-Year Engineering Student Outcomes with MATLAB Programming

“Some of my colleagues expressed concerns about switching from C++ to exclusively using MATLAB for first-year programming. I found that not only could we effectively teach programming with MATLAB, we could do a better job than we did before—to the benefit of students in all engineering disciplines.”

Challenge

Make introductory programming engaging for first-year students in all engineering departments while fostering algorithmic thinking

Solution

Replace C++ with MATLAB, and use video game development to teach programming fundamentals and software engineering methods

Results

  • Instructor ratings significantly improved
  • Course expanded to cover more material
  • Students prepared for upper-level coursework
Plot generated by a MATLAB remake of the classic Gorillas video game. In-class development of the 300-line program is used to help teach programming using MATLAB. Nintendo ® images and Gandhi quotations are incorporated for educational purposes. Image from “From Robots to Gorillas: Computer Programming for Engineers,” American Society for Engineering Education 2013 conference paper.

All first-year engineering students at the University of Alberta complete an introductory computer programming course offered by the Department of Electrical and Computer Engineering (ECE). ENCMP 100: Computer Programming for Engineers covers basic programming and more advanced software engineering concepts, such as software development models. A key learning outcome for the over 900 students taking the course each year is the development of algorithmic thinking skills that enable them to break down complex problems into a sequence of simple steps.

For several years the course was taught using procedural C++. Recently, University of Alberta engineering professors, in consultation with department heads, decided to teach the course using MATLAB®.

“MATLAB is a full-fledged programming language with everything necessary to teach the core programming concepts,” says Dr. Dileepan Joseph, Associate Professor of Engineering at the University of Alberta. “Because the learning curve for programming with MATLAB is shorter than with C++, the course can also cover more advanced engineering concepts. The excellent visualization and plotting capabilities of MATLAB help engage students in creative design, which is now a bigger part of the course.”

Challenge

When the course was taught with C++, students expressed dissatisfaction to the ECE and other department chairs. In addition, new instructors were frustrated by receiving relatively low teaching ratings compared with their other courses.

An interdepartmental task force formed to review the course concluded that the C++ learning curve was frustrating to students. The mechanical and chemical engineering departments favored switching to exclusively using a language and programming environment that students would continue to use in upper-level courses. The civil engineering department was open to the change, but the ECE department was concerned that such a change would impair the teaching of algorithmic thinking.

Solution

To increase the appeal and utility of the core first-year programming course to students across all departments, the task force recommended a joint C++ and MATLAB solution. The faculty’s academic planning committee chose to adopt MATLAB exclusively, tasking instructors with maintaining focus on algorithmic thinking.

The course offers two weekly lectures over approximately 12 weeks, as well as labs and quizzes. Dr. Joseph’s contribution to the lecture material, a complex solution to a single problem, is designed to be taught in six parts, one part about every two weeks.

Using this contribution, instructors apply concepts taught in other lectures to iteratively and incrementally develop a remake of the 1990s IBM® video game Gorillas. In this artillery game, two gorillas hurl bananas at each other using angle and velocity values provided by human players or the computer.

For the first Gorillas version, instructors develop a MATLAB script to plot the game background and trajectory of each gorilla’s banana. In the second version, they apply MATLAB loops and conditionals to give the gorillas multiple turns, animate the bananas, and identify a winner. For the third version, they refactor existing code, using MATLAB functions and data structures to improve readability, maintainability, and extensibility, and adding a computer opponent.

In the following two versions, the instructors enhance the game using strings, files, images, and sounds in MATLAB. A sixth version is used to teach software engineering concepts, such as iterative and incremental development (IID), modularity, and reusability. In this final version, another computer opponent—the “final boss”—is added to the game.

The course includes an optional programming contest in which students create a MATLAB program of their own design, which they present in a five-minute video. 30 students participated in the inaugural competition. Winning projects included a role-playing game and a GPA calculator.

The university holds a Campus-Wide License that gives students campus-wide access to MATLAB and Simulink® on personal computers.

Results

  • Instructor ratings significantly improved. “When I began teaching the course with MATLAB, my ratings on student surveys increased from 4.3–4.4 to 4.5–4.7,” says Dr. Joseph. “A rating higher than 4.5 is possible only when more than half the students ‘strongly agree’ that ‘overall, the instructor was excellent.’ ”

  • Course expanded to cover more material. “MATLAB has a shorter learning curve than C++,” says Dr. Joseph. “As a result, I was able to teach more concepts that I consider important to programming and software engineering, including refactoring and IID.”

  • Students prepared for upper-level coursework. “Professors in all our engineering departments teach with MATLAB because of its value for engineering problem-solving,” says Dr. Joseph. “Now students go into those courses with MATLAB experience. Our new course is also a good springboard for students in ECE to learn procedural C++.”

Acknowledgements

University of Alberta is among the 1300 universities worldwide that provide campus-wide access to MATLAB and Simulink. With the Campus-Wide License, researchers, faculty, and students have access to a common configuration of products, at the latest release level, for use anywhere—in the classroom, at home, in the lab or in the field.