Tutorial: Using and Creating Automatically Generated PowerPoint Slides to Facilitate Teaching of Data Structures and Algorithms

 

Sen Zhang and JAMES Ryder

Department of Mathamatics, Computer Science and Statistics

SUNY Oneonta

 

Abbreviated Title:  Data Structures and Algorithms Teaching Slides Auto Generation

Contact Information: Fitzelle Hall 224/238 Tel: 607-436-3382/3647 Fax: 6074362173 Email: zhangs,ryderj@oneonta.edu

Last Date of Revision: 02 October 2011

 

Conference

The 2011 Consortium for Computing Sciences in Colleges Eastern Conference (CCSCE) Oct. 14, 2011, Arlington, Virginia, Hosted by Marymount University

Keywords

 

PowerPoint, Slides, Auto Generation, Data Structures, Algorithms, computer science, undergraduate, education, visualization


 

Abstract

 

Aims: We present an on-going, long-term, coding-intensive project that aims to facilitate teaching of Data Structures and Algorithms (DSAAs) using automatically generated PowerPoint slides. The poster will present the following information: the motivation, design, two-level automation framework, pilot implementation, and status of the project, a list of DSAA generators that have been prototyped by a group of faculty and students, representative screenshots of the machine-made slides produced by the generators, the first-hand experience of coding the generators and using the computer-generated slides, a prototype of a cyber-based platform that adds the second level of automation to the system, the pedagogical advantages and the implementation challenges of the approach, as well as a comparative analysis between the proposed approach and other solutions, etc.

 

Rationale: DSA Education is not standardized; DSA presentation can be best generated by machine themselves.

 

Methods: Implementing generators and the dispatcher that runs generators

 

Results: Pilot implementation of the idea has been conducted. The approach seems feasible and promising.

 

Main Conclusions: With adequate support, we can build a community adopting the approach to improve CS education, more specifically DSA education, at a large scale.

 


 

Introduction

 

Background to the Topic

DSAs are important, but they are challenging to grasp for students. To facilitate their learning, many visualization solutions have been proposed. However, none of them has been adopted at large scale. Some obvious reasons are learning curve, not teaching oriented, these solutions themselves are not straightforward to adopt.

Statement of Aims / Questions Posed

Is there any a feasible, light-weighted, deployment-friendly and editable DSA visualization solution that is ready to be adopted.

Gaps in Previous Knowledge

There is a gap between the need of effective teaching materials and the surprisingly low adoption level.

DSAs are more and more challenging to teach due to many reasons. To name only a few here. First, CS, as a knowledge body, expands every day, while the years needed to complete CS degree remains 4. Second, this conflict causes the time spent on every single course, DSAs with no exception, dramatically compressed. If we remain the CS curriculum of 20 years ago, students won’t be ready for the job market, despite the core remains still technically sound. If we incline to the programming and software engineering tools aiming at the market, then students will have less time in fundamentals. Currently, any reasonable CS curriculum tries to balance the time on all “Important” courses, which is the reason DSAs get less time to study then before. Third, traditional CS 1 and 2 have been designed more forgiving in response to huge retention pressure, which causes DSAs are even challenging for the students with less training in abstract thinking capability. Fourth, in general, the new generation of students grow up browsing find out the classical materials not readable. As a result, they need visualization aids to study abstract concepts, which in our case include DSAs.

All the previous visualization approaches focus on the visualization generation itself without considering the learning curve that refrain most CS instructors from adopting them. All the previous approaches won’t generate materials that are saveable and editable. As a result, most of we CS educators, especially undergraduate CS instructors, haven’t adopted any of the previous approach. We still teach DSAs without having access to teaching-friendly visual aids.  

 

Scientific Merit and Applications: The project itself is an application in the field of computer science undergraduate education. It can be applied to other fields, if there are any, where large amount illustrations should be automatically generated. Our approach is feasible, standardized and meaningful.

 

The Status of the Project

a MS PPT-based solution

PowerPoint is the excellent office tool for business, school teaching and studying. This is an application where graphic supports of PowerPoint are used not just for aesthetic reasons but in a meaningful way.

What has been done?

The project is an on-going, long-term and programming-labor-intensive.

We have pilot implemented about 12 generators for different DSAs.

We have prototyped a web-based system that can automatically run these generators.

We have put up sample slides on the website, which has attracted or trapped around 2000 web hits over the past 18 months.

Currently, most of the programming effort was made by faculty and student volunteers. One student has been supported by one small college grant. We are seeking external funds to support more students to contribute to the project which has direct impact on CS undergraduate education.

What will be done?

We will refine the above materials (code, slides, web pages etc.) whenever we can.

We plan to grow the project by supporting more DSAs.

 

Relation to other approaches

It is unique, but it won’t replace other approaches. Actually, it compensate with other approaches. Other toolkits can be more interactive suitable for students to explore after class. Our solution is more likely helpful from teaching point of view.  

In the least, the proposed solution provides an instructor-friendly alternate to the previous solutions. If you already adopt other approaches, please remain open-minded to this approach because it may help other faculty who hasn’t found your approach helpful.

Some argurable DISadvantages

Admittedly, the proposed approach doesn’t have advanced features that usually are boasted by other solutions. For example, our approach is not as interactive as some other solutions. However, teachers can still be interactive with students using our approach.

The approach doesn’t show fancy animation, which might NOT necessarily be a bad thing, because continuous animation usually causes confusion to students who expect the changes happen in discrete way.

Pedegogical Advantages

Standardization

Automation

Preparedness

Focus on explanation rather than visualization

Reuse

Materials centralization

 

How to Use the slides

 

Way-1: Effortless adoption

Just download the sample slides generated by us. More specifically, just three clicks away: download, save and play!

http://employees.oneonta.edu/zhangs/PowerPointPlatform/

Way-2: Refine the slides

Since the most tedious part of preparing slides is drawing and it has been automatically generated, you can easily delete, add and polish the annotation part to revise the slides in a way you like. It is very likely that you want to add more information to the slides. If you feel that the information should be useful for other instructors, please send the information or your polished slides back to us. We will put them up on the web site giving the credit to you.

Way-3: Generate new slides using the inputs that are interesting to you.

Since the generators, once implemented and sufficiently debugged, can run against any reasonable input, you can revise inputs to get different sets of slides.

To support the third way, each generator accepts needed input in the formats that are intuitive for most computing people. Depending on the specific DSA, a generator may take text, number or XML file as input.

Besides the DSA dependent input, there are two other inputs: the template file name and the file name for the generated slides.

 

How to Develop a Generator

If you would like to contribute generators for the algorithms of your choice to the project or you would like to refine our implementation, here is information that can help you started.

HARDWARE REQUIREMENT

Any PC running contemporary versions of Windows OS. 

SOFTWARE REQUIREMENT

Operating Systems: Windows XP, Vista or Win 7

Development tools: Microsoft Visual Studio (MSVS) 2005, 2008, 2010. All of the above versions have been used by us.

From the final products point of view, it doesn’t matter which language is used to write generators.

MS office 2003, 2007, 2010

Underlying APIs have different versions.

Authors have used all of them

How to create a generator project?

To become a generator developer, you should first feel comfortable with programming in general, which we assume most computer science faculty still program on a regular basisJ

Which language has been used for developing the generators?

Authors have used C#, so the development process will be illustrated using C#. However, other MSVS languages such as C++ and VB should work too. Even Java API is also available.

Check this out http://poi.apache.org/. It is open source, but not as well maintained as the native MS API. Version 3.6 now supports Office 2007 format documents, may needs a new version to support Office 2010.

In this project, which language is not the problem, as long as we can generate slides for DSAs.

If you haven’t used C# before, probably you need to pick up it. Here are some links (you can find out more from the internet).  http://www.csharp-station.com/Tutorial.aspx

How to programmatically create PowerPoint presentations?

 A generator C# project is basically a standalone project using the MS Office API that provides the low-level MS Office components that manipulates PPT (what we need here) and other office suite documents. Specifically, the following steps need to be taken in order to use the API.

Step 1: Create a new regular C# project anyway!

Step 2: Implement the algorithm first using proper data structures without considering by PPT.  Try to use as much OO as possible.

Step 3: Add the following two references to your project to change it to a generator project.

MSVS->Project->Add references … -> Com Tab

Add the following two references

MS OFFICE.core

MS OFFICE.POWERPOINT

If you intend to use MS Office components in a C# project, you have to refer to these interop assemblies, i.e., you need add a reference pointing to Microsoft.Office.PowerPoint as well as the core assemblies. More references may be needed if the project involving using excel, word or Access, which may be necessary for more complicated generators and DSAs.

Step 3: Use the namespaces in your coding in the code files where office components (objects) will be used.  

Step 4: Declare some needed visual control objects using classes provided by the PPT API.

Now that you have added the references and include the right namespace to your project, you need to use the classes declared in these packages. Use PPT presentation class and other classes needed for creating presentation related objects such as slides, shapes etc.

PowerPoint.Application objApp;

PowerPoint.Presentations objPresSet;

PowerPoint._Presentation objPres;

PowerPoint.Slides objSlides;

PowerPoint._Slide objSlide;

PowerPoint.TextRange objTextRng;

What classes of objects need to be declared?

It depends on what kind of internal data structures or what kind of algorithms you would like to externalize. For example, if your generator is about presenting a sorting algorithm where the main data structure should be an array, most probably it is reasonable and appropriate to use a table to manifest the data. If it is about a tree data structure and its manipulating algorithms, most probably circle and lines should be used to present the tree structure. In all cases, text relevant objects are needed to display information.  Simply put, depending on the data structures and algorithms you would like to present, you need to use different objects such as you can also insert/position pictures, tables, charts, and many other shapes supported by the API.

Step 5: Manipulate the visual objects to externalize the status of the data structures on slides.

Inject the code that manifests the data structures using different shapes.

//Build Slide #1:

//Add text to the slide, change the font objSlide=objSlides.Add(1,PowerPoint.PpSlideLayout.ppLayoutTitleOnly);

objTextRng = objSlide.Shapes[1].TextFrame.TextRange; objTextRng.Text = “data structures and & Algorithms";

objTextRng.Font.Name = “Calibri"; objTextRng.Font.Size = 30;

//Create a new presentation based on a template.

objApp = new PowerPoint.Application();

objApp.Visible = MsoTriState.msoTrue;

objPresSet = objApp.Presentations;

objPres = objPresSet.Open(strTemplate, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);

objSlides = objPres.Slides;

 

You can also programmingly save the auto-generated presentations.

We have a generator.cs file that already standardizes many of the above steps. Please download our sample code.

Go through a simple problem together

If time allows. Otherwise, feel free to contact us if you would like to learn how to write your own geneators.

The main programming challenges

Just like any other visualization approach, the main coding effort is about how to position size and color the visual controls. Also how to present information using limited screen size. Interface design can also be as challenging as other solutions. For example, text length might need to be determined before centered within a specific space.

Sample Code

You don’t have to start from scratch, since we can share all source code with you.

You are welcome to download sample implementation from this page.

On this page you can find the source code, ppt slides template, and the input data in XML format of the sample implementations of AVL tree and quick sort generators.

To try the source code, one needs to download, unzip and compile the zipped MSVS C# project to get executables ( you are assumed to know how to configure MSVS projects for debug and release modes.

How to run the sample generators?

Then run the executable by supplying three command line arguments: name of the ppt slides template file, the name of the xml input file and the name of the generated slides file.

Quicksort templatefilename, 10, outputfilename

Here 10 is the size of the array of random numbers.

Feel free to use the ideas and methods presented in the sample code in your own generators.

A project template and a unified event-driven generator framework might be provided at a later time.

Work together to benefit the community

If you have developed a new generator, you are encouraged to send it to us. Our project will serve as a permanent and centralized platform to host the teaching materials generators. Your contribution will be acknowledged on our website and will be appreciated by many users of the materials produced by your generators through our platform.

Questions and Discussion

 

Summary of Main Findings:

The proposed approach is feasible. Once generated, the slides can be effortlessly adopted.

What are the challenges?

The challenge is who will write them? A generator of each algorithm or data structure needs to be coded, which is very time consuming.

The project website has a FAQ page.

Any questions not on the FAQ or not clarified by the FAQ are welcomed. Due to time constraint, you are also welcome to contact us should you have more questions.

Attendance Sheet, Feedback through instant Survey

Please sign attendance sheet and fill out a simple survey to provide your feedback. You are also welcome to contact us for further suggestions or feedback.

Acknowledgements

 

Their grant office, TLTC, the department of Mathematics, Computer Science and Statistics

Students assistants: Sean Long, Chris Fregmen, Tom Kish, Erik William

All external reviewers of our project proposals, auto-generated materials, conference posters and tutorials.

 

References

Developing with Office 2010, http://msdn.microsoft.com/en-us/office/ee722025.

Association for Computing Machinery (ACM) Curricula Recommendations for computer science, www.acm.org/education/curricula.html

Automating the production of Algorithm Teaching Materials in PowerPoint Format (Faculty Poster), S. Zhang and J. Ryder, the Consortium for Computing Sciences in Colleges Eastern Conference (CCSCE), March, 2009.

Preliminary Implementation of the Teaching Slides Generators for Heapsort and Range Coder(Student Poster), E. Williams and T. Kish, S. Zhang (Faculty advisor) and J. Ryder (Faculty advisor), the Consortium for Computing Sciences in Colleges North-Eastern Conference (CCSCNE) 2009.

Building a Generator-based Cyber Platform for Automating Production of PPT-based Algorithm Visualization Teaching Materials, S. Zhang and J. Ryder, SIGCSE 2011: Reaching Out, the 42nd ACM Technical Symposium on Computer Science Education, Mar. 09-12, 2011

The project website, http://employees.oneonta.edu/zhangs/PowerPointPlatform/

 

 

 


 

Captions for Figures and Tables

Figure 1: WEb-based Platform

Figure 2: Web hits map

 

Table 1: PPT vs. Other Approaches

PPT

Non PPT

Standardized

Yes

Usually no

Industry Level Support

Yes

Usually no

Easy to Adopt

Yes

Usually no

Customizable/Editable

Yes, once generated, existing independent from the generator and subsequently can be further revised manually by users.

Usually no

Separable from generators/

Light-weighted

Yes

Usually no

Navigation

Yes, built in support

Usually no

Teacher Friendly

Yes, PPT viewer has been wildly adopted

Usually confusing

Printable

Yes, built in support

Usually no

Learning Curve

Low, almost zero

Usually sharp

Maintenance

Low, once generated, detached as files

High, usually tied to executables

Proprietary

Yes; however, PPT has already been used anywhere anyway

Usually Yes. Imposing various limitations