2010 - teaching computer science

4
Teaching Computer Science: A Neumont Philosophy Sharon DeReamer Senior Instructor Neumont University [email protected] Although there may be many areas where educators differ, most educators agree that when teaching Computer Science all things can and will change. Languages change, paradigms change, tools change, applications change -- even students change. But more importantly, our knowledge of how to teach these topics will change as we try new teaching techniques and observe the results. In the past, introductory programming courses at Neumont University were taught with an approach that resembled the pedagogical approach we tool to teaching our advanced projects courses. The structure of the class included time to instruct students on new topics followed by a longer period of intense hands-on programming. Although this is an outstanding way to teach advanced programming classes, the time spent programming was a bit extreme for novices. During their first quarter at Neumont, students took Object Oriented Programming (OOP) for four hours each day. In that class, they were put through a rigorous pace, learning in ten weeks what would typically be covered in two or three semesters at a traditional university. This technique worked for students who came to Neumont with a strong background in programming, or for those with a natural aptitude, but it was not suitable for many of our less experienced students. In the fall of 2008, Neumont decided to modify our pedagogical approach to better serve a larger portion of our student body. This meant dividing an intense OOP curriculum into two more manageable courses. Neumont students now take Introduction to Computer Science (ICS) the first quarter and OOP the second quarter. Each class is two hours per day provides students the same amount of instruction time; but the material is now less compressed. This allows our students to work through difficult concepts in a less stressful environment; and gives more time outside of class to practice the concepts covered. Another change Neumont implemented is the language used. In the past, C# was taught in the OOP course at Neumont. The goal of the introductory programming classes at Neumont is to provide students with an understanding of an object-oriented (OO) approach. As a result, it is imperative that the material be taught in such a way as to enhance OO understanding. Now, students at Neumont will continue to learn multiple languages; but begin with Java rather than C#. Java is thought to be a more appropriate language for introductory programming courses for many reasons including its true object orientation, garbage collection, built-in documentation, single inheritance, and the list goes on. C# is another language that meets many of these requirements but is: “…more complex than Java and there is always a price for complexity. Every extra keyword, construct and control structure makes the language more difficult for a novice. One can teach a subset, but students are often dissatisfied with this approach.”[1] Java is also the required language at many traditional universities and at the high school level. Today’s Advanced Placement Program (AP) courses and tests currently require Java. As a result, most pedagogy and available teaching tools and text books written for introductory programming classes are written based on Java. [2]. Another consideration when planning a curriculum for introductory programming classes is pedagogy or the order in which materials is covered. In the Computer Science Course Description prepared by the College Board for the AP course and test, it is stated, “At most institutions, the current introductory programming course takes an object-oriented approach to programming that is based on encapsulating procedures and data and creating programs with interacting objects.”[3] Many programming classes begin by teaching students to write the “Hello World” program. This is a simple program that puts the words “Hello world” onto a screen. This is fine for a class that stresses a procedural approach. It adequately covers how to edit, compile, and run a program in the language being taught. However, if an OO approach is the goal, there are many reasons that this is not the best program to teach first. These problems include the fact that no objects are created, no methods are invoked, and the only class that is written has no reason to exist other than to hold the main method. A course taught using an OO approach should start with students writing a program that instantiates objects and then uses those objects to send messages back and forth with each object performing its own required actions. The problem is that, in order to start that way, students must first learn the following topics: What is a class and how is it written? What are instance variables and what does it mean to be public, private, etc.? What are types and how are they used to declare variables? How is a method written? How is a method called? What is an object and how is it instantiated? Possibly, how are parameters passed to and returned from method calls? How to use built-in Input/output (IO) classes What is the main method and what do the words public, static, void, String and [ ] mean? How to edit, compile and run a program. This is a lot of material to cover before the first program is even written. So how would you start teaching a programming class? One thought is that the introductory class should begin by using simple tools specifically written for novice programmers. Selecting the Java language is a start, but there is more. Another ACM SIGSOFT Software Engineering Notes Page 1 November 2010 Volume 35 Number 1 DOI: 10.1145/1668862.1668880 http://doi.acm.org/10.1145/1668862.1668880

Upload: nelsonss

Post on 12-Sep-2015

217 views

Category:

Documents


1 download

DESCRIPTION

2010 - Teaching Computer Science

TRANSCRIPT

  • Teaching Computer Science: A Neumont Philosophy

    Sharon DeReamer Senior Instructor

    Neumont University [email protected]

    Although there may be many areas where educators differ, most educators agree that when teaching Computer Science all things can and will change. Languages change, paradigms change, tools change, applications change -- even students change. But more importantly, our knowledge of how to teach these topics will change as we try new teaching techniques and observe the results.

    In the past, introductory programming courses at Neumont University were taught with an approach that resembled the pedagogical approach we tool to teaching our advanced projects courses. The structure of the class included time to instruct students on new topics followed by a longer period of intense hands-on programming. Although this is an outstanding way to teach advanced programming classes, the time spent programming was a bit extreme for novices. During their first quarter at Neumont, students took Object Oriented Programming (OOP) for four hours each day. In that class, they were put through a rigorous pace, learning in ten weeks what would typically be covered in two or three semesters at a traditional university. This technique worked for students who came to Neumont with a strong background in programming, or for those with a natural aptitude, but it was not suitable for many of our less experienced students.

    In the fall of 2008, Neumont decided to modify our pedagogical approach to better serve a larger portion of our student body. This meant dividing an intense OOP curriculum into two more manageable courses. Neumont students now take Introduction to Computer Science (ICS) the first quarter and OOP the second quarter. Each class is two hours per day provides students the same amount of instruction time; but the material is now less compressed. This allows our students to work through difficult concepts in a less stressful environment; and gives more time outside of class to practice the concepts covered.

    Another change Neumont implemented is the language used. In the past, C# was taught in the OOP course at Neumont. The goal of the introductory programming classes at Neumont is to provide students with an understanding of an object-oriented (OO) approach. As a result, it is imperative that the material be taught in such a way as to enhance OO understanding.

    Now, students at Neumont will continue to learn multiple languages; but begin with Java rather than C#. Java is thought to be a more appropriate language for introductory programming courses for many reasons including its true object orientation, garbage collection, built-in documentation, single inheritance, and the list goes on. C# is another language that meets many of these requirements but is: more complex than Java and there is always a price for complexity. Every extra keyword, construct and control structure makes the language more difficult for a novice. One can teach a subset, but students are often dissatisfied with this approach.[1]

    Java is also the required language at many traditional

    universities and at the high school level. Todays Advanced Placement Program (AP) courses and tests currently require Java. As a result, most pedagogy and available teaching tools and text books written for introductory programming classes are written based on Java. [2]. Another consideration when planning a curriculum for introductory programming classes is pedagogy or the order in which materials is covered. In the Computer Science Course Description prepared by the College Board for the AP course and test, it is stated, At most institutions, the current introductory programming course takes an object-oriented approach to programming that is based on encapsulating procedures and data and creating programs with interacting objects.[3]

    Many programming classes begin by teaching students to write the Hello World program. This is a simple program that puts the words Hello world onto a screen. This is fine for a class that stresses a procedural approach. It adequately covers how to edit, compile, and run a program in the language being taught. However, if an OO approach is the goal, there are many reasons that this is not the best program to teach first. These problems include the fact that no objects are created, no methods are invoked, and the only class that is written has no reason to exist other than to hold the main method.

    A course taught using an OO approach should start with students writing a program that instantiates objects and then uses those objects to send messages back and forth with each object performing its own required actions. The problem is that, in order to start that way, students must first learn the following topics:

    What is a class and how is it written? What are instance variables and what does it mean to be

    public, private, etc.? What are types and how are they used to declare

    variables? How is a method written? How is a method called? What is an object and how is it instantiated? Possibly, how are parameters passed to and returned

    from method calls? How to use built-in Input/output (IO) classes What is the main method and what do the words public,

    static, void, String and [ ] mean? How to edit, compile and run a program. This is a lot of material to cover before the first program is

    even written. So how would you start teaching a programming class? One thought is that the introductory class should begin by using simple tools specifically written for novice programmers. Selecting the Java language is a start, but there is more. Another

    ACM SIGSOFT Software Engineering Notes Page 1 November 2010 Volume 35 Number 1

    DOI: 10.1145/1668862.1668880 http://doi.acm.org/10.1145/1668862.1668880

  • question arises, What Integrated Development Environment (IDE) should be used?

    This parallels the concept of teaching a child how to ride a

    bicycle. The first question here is, Which bicycle should be purchased to teach a five year old child how to ride? Ultimately, a child will grow into a ten year old who wants many gears, knobby tires, and a light frame and that will come in time. That more advanced bicycle might look like the one shown in Image 1.1. However, a good first bike to teach a five year old child how to ride, more realistically, looks like the one shown in Image 1.2.

    Image 1.1: The ideal childs bike

    Image 1.2: The ideal beginners bike

    Image 1.2 is simple with minimal controls, ex. forward,

    turn, and stop; it promotes ease of use and is safe. So what is the answer to the question, What IDE should be used when teaching programming to novices? At Neumont, students in the introductory classes are taught to program in Java using the Sun compiler. However, the IDE used is BlueJ. In an article on the Sun web site, it is stated:

    The Java programming language serves well as an introduction to programming because it provides a clean implementation of object-oriented concepts, and its popularity encourages teachers to teach it. However, object-oriented concepts are not easy to teach or learn. Many textbooks skimp on the complex concepts behind object-oriented programming. A tool that can get past the problems and allow students to visualize objects and their relationships would be ideal. BlueJ, a simple IDE, written in the Java programming language, does just that. [4]

    Using BlueJ, students are able to make and edit classes, compile, debug, test, and run programs without the distraction of

    so many bells and whistles that often get in the way of learning when using a more complex IDE. In addition, BlueJ is a visual tool that shows students Unified Modeling Language (UML) type diagrams of classes made and the relationships between the classes. Students can instantiate objects, call methods on those objects, pass in parameters, and inspect the data in each object. This kind of interaction allows students to learn about OO programming on the first day of class.

    Image 2.1 is a screen shot of a project written in Java using the NetBeans IDE contrasted with a project using the BlueJ IDE, shown in the image 2.2. Notice the simplicity of the BlueJ screen compared to the NetBeans screen. Next it must be decided what to teach. Going back to the concept that students should instantiate objects and have the objects send messages back and forth is a good idea. However, we come back to the long list that must be taught before that can happen. Lets compare that, again, to teaching a child how to ride a bicycle.

    A new bicycle rider must learn the following skills, even with the simplest starter bicycle:

    How to balance the bicycle How to make it move forward How to turn the bicycle How to stop Personal safety issues such as not riding in the street or on

    grass or near trees How to keep other people or animals safe when riding

    near them This daunting list of skills must be learned under the

    overriding pressure of keeping the bicycle upright. Many parents decide that putting a set of training wheels on the bicycle can delay the immediate need to learn how to balance until the child has mastered all the other required skills. Once the parent is satisfied the child can ride the bicycle in a safe manner, the training wheels come off.

    So what are the training wheels of programming? At Neumont, during the initial weeks of the ICS class, the development tool Greenfoot is used. On the Greenfoot web site, the tool is described like this: Consider Greenfoot as a combination between a framework for creating two-dimensional grid assignments in Java and an integrated development

    Image 2.1: Java using the NetBeans IDE

    Image 2.2: BlueJ IDE

    ACM SIGSOFT Software Engineering Notes Page 2 November 2010 Volume 35 Number 1

    DOI: 10.1145/1668862.1668880 http://doi.acm.org/10.1145/1668862.1668880

  • environment (class browser, editor, compiler, execution, etc.) suitable for novice programmers. While greenfoot supports the full Java language, it is especially useful for programming exercises that have a visual element. In greenfoot object visualization and object interaction are the key elements. [5]

    Greenfoot is a tool that uses the BlueJ IDE as its framework and provides a World class and an Actor class from which students can subclass. The World class has methods already written that allow a background to be shown and is used as a repository for actors. The Actor class has methods that allow an image to be shown and for some action to take place each time the act button is pressed. Greenfoot allows novice programmers to make worlds with animation the very first week they learn to program. The visualization and animation allows an experience that is more fun and provides a sense of accomplishment for students when they complete a project.

    The following figures are some of the worlds developed by students during the Fall 2008 quarter using Greenfoot:

    Image 3.1: Lights blink on and off randomly and the tree shakes due to a cat that has crawled up

    the trunk.

    Image 3.2: Balls move at random speeds/directions

    and bank off the bumpers at the correct angles. When a ball enters a pocket, it falls in and is taken out of play.

    Image 3.3: The tortoise and the hare participate in a race where

    the tortoise moves at a steady but slow pace while the hare moves quickly but often takes breaks.

    Image 3.4: A maze, complete with start and stop

    points. The mover goes around the maze staying out

    of the water motes and collecting rings for points.

    In addition to teaching programming techniques, Neumont also stresses the need for students to learn to think independently. This is accomplished in the ICS and OOP classes

    which require students to read a specifications and perform analysis and design before implementing a solution. Students are also taught modeling techniques used in Object-Oriented Design (OOD). In small teams, they develop class, sequence, and activity UML diagrams to document and discuss their designs. These designs are developed and presented to the rest of the class before the teams begin to program their solutions.

    Making changes to a curriculum is difficult. Students wonder why the curriculum and classes have changed. Teachers here things like, Thats not how it was done when my friend took this class. Making changes can also be risky. One could say, If it works, why fix it? And making changes can be tricky. Questions arise regarding which direction should be taken.

    In spite of these road blocks, as educators we must evolve as the industry grows if we are to accomplish our goals of offering the best possible academic experience and outcomes. Ultimately, the goal is that more students will successfully complete the program, graduate, and move into exciting careers in the industry. References [1] Reges, Stuart, Can C# Replace Java in CS1 and CS2? ITiCSE'02, June 24-26, 2002 [2] Addison-Wesley/Prentice Hall web site, quantities of books available for the Computer Science 1 (CS1) course based on language: 46 Java, 25 C++, 17 C#, 13 C, 3 Pascal [3] College Board AP, Computer Science A and Computer Science AB Course Description, May 2009, http://apcentral.collegeboard.com/apc/public/repository/ap08_compsci_coursedesc.pdf [4] Nourie, Dana, Teaching Java Technology with BlueJ, http://java.sun.com/features/2002/07/bluej.html [5] http://www.greenfoot.org/about/whatis.html

    We are excited to announce the SuperBot Challenge presented by Neumont University. The SuperBot Challenge programming contest is designed to give high school students an opportunity to test their Java programming skills using the Greenfoot* IDE. Using Greenfoot, students can stretch their knowledge of Java and prepare for advanced courses (or college level study) in computer science.

    Your students are invited to compete in this exciting challenge. Participants can win Best Buy Gift cards and Neumont scholarships. And, instructors who encourage SuperBot participation can win too, $500 BestBuy Classroom Technology Improvement Grants sponsored by Neumont University.

    Challenge details, Greenfoot downloads, and the SuperBot Challenge scenario are available online at www.superbotchallenge.com. All entries must be submitted online by March 20, 2010 through the Submit Your Entry Form.

    Log on to www.neumont.edu/superbot today to request an Instructors packet which will help you explain the competition to your students. Teachers are invited to sponsor an unlimited number of SuperBot entries.

    ACM SIGSOFT Software Engineering Notes Page 3 November 2010 Volume 35 Number 1

    DOI: 10.1145/1668862.1668880 http://doi.acm.org/10.1145/1668862.1668880

  • ACM SIGSOFT Software Engineering Notes Page 4 November 2010 Volume 35 Number 1

    DOI: 10.1145/1668862.1668880 http://doi.acm.org/10.1145/1668862.1668880