Back to Basics in CS1 and CS2 Stuart Reges University of Washington.

Slides:



Advertisements
Similar presentations
CS18000: Problem Solving and Object-Oriented Programming.
Advertisements

Programming II - Part 1 – Object Oriented Programming with Java Sebastian Uchitel
Object Orientated Concepts. Overview  The world is objects  Defining an object  Not a function, it’s a method  Lets inherit want we can  Objects.
Course Introduction CS 1037 Fundamentals of Computer Science II.
Week 2 ______ \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||
Honors 101, Fall 2006 Please do not sit in back of room! Lots of info on web page Join the mailing list Download Eclipse and start using it Read the text.
Copyright 2013 by Pearson Education Building Java Programs Chapter 1 Lecture 1-1: Introduction; Basic Java Programs reading:
More Arrays Length, constants, and arrays of arrays By Greg Butler.
Derived from Building Java Programs by Stuart Reges & Marty Stepp
CTF & CSE Using the Udacity Java CS MOOC Platform Wordsmithing & Rearrangements but limited authoring is by Gerry Donaldson. Attribution – Slides that.
Abstraction, Inheritance, and Polymorphism in Java.
Hello AP Computer Science!. What are some of the things that you have used computers for?
Object Oriented Programming CEN 221. Course Description Classes, objects, inheritance, polymorphism, graphical user interfaces, event handling, exception.
1 Review of Java Higher Level Language Concepts –Names and Reserved Words –Expressions and Precedence of Operators –Flow of Control – Selection –Flow of.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
1 BUILDING JAVA PROGRAMS CHAPTER 2 PRIMITIVE DATA AND DEFINITE LOOPS.
Introduction to Application Programming IST 256 Application Programming for Information Systems Xiaozhong Liu
ICS 102 Computer Programming University of Hail College of Computer Science & Engineering Computer Science and Software Engineering Department.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
Input & Output In Java. Input & Output It is very complicated for a computer to show how information is processed. Although a computer is very good at.
1 Web Based Programming Section 8 James King 12 August 2003.
Topic 19 file input, line based Copyright Pearson Education, 2010 Based on slides bu Marty Stepp and Stuart Reges from
1 Building Java Programs Chapter 7: Arrays These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may not be rehosted, sold, or.
1 Building Java Programs Chapter 3: Introduction to Parameters and Objects These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
CS305j Introduction to Computing Classes 1 Topic 23 Classes – Part I "A 'class' is where we teach an 'object' to behave." -Rich Pattis Based on slides.
An Update on UW Intro Classes Stuart Reges Principal Lecturer University of Washington.
By Mr. Muhammad Pervez Akhtar
Reading input from the console input. Java's console input The console is the terminal window that is running the Java program I.e., that's the terminal.
16. CONCLUSIONS Rocky K. C. Chang 25 November 2015.
CSC 205 Java Programming II Introduction. Topics Syllabus Course goals and approach Review I Java language fundamentals.
OOP Basics Classes & Methods (c) IDMS/SQL News
Topic 6 loops, figures, constants Based on slides bu Marty Stepp and Stuart Reges from "Complexity has and will maintain.
Back to Basics for APCS Success Stuart Reges, Principal Lecturer University of Washington Hélène Martin, CS teacher Garfield High School.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Software Construction Lab 05 Abstraction, Inheritance, and Polymorphism in Java.
CSE 143 Lecture 9: introduction to recursion reading: 12.1.
6.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
A High Flying Overview CS139 – Fall 2010 How far we have come.
Learning Plan 6 Java Programming Intro to Object Oriented Programming.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Programming Languages Dan Grossman 2013
CSC207 Fall 2016.
Building Java Programs
CSc 020: Programming Concepts and Methodology II
Analysis and Comparison is ICS4U
CSC1401 Input and Output (and we’ll do a bit more on class creation)
PRE-AP computer science 1
Building Java Programs
Testing Object-Oriented Programs
CSC 221: Computer Programming I Fall 2005
Building Java Programs
CS139 – Fall 2010 How far we have come
Adapted from slides by Marty Stepp, Stuart Reges & Allison Obourn.
CS18000: Problem Solving and Object-Oriented Programming
slides created by Marty Stepp and Alyssa Harding
Building Java Programs
slides created by Ethan Apter
Topic 6 loops, figures, constants
Building Java Programs
CS 2530 Intermediate Computing Dr. Schafer
Review of Previous Lesson
Building Java Programs
Review of Previous Lesson
CSE 143 Lecture 2 ArrayIntList, binary search
slides created by Ethan Apter
Building Java Programs
Building Java Programs
Optional Topic: User Input with Scanner
Presentation transcript:

Back to Basics in CS1 and CS2 Stuart Reges University of Washington

In a Nutshell… Major redesign of the CS1/CS2 courses at the University of Washington New CS1 emphasizes procedural programming, objects later New CS2 includes OOP concepts and traditional concepts (recursion, linked lists, binary trees) with a “collections” theme Student satisfaction up; enrollment up; female admissions up

I used to believe –Programs with sophisticated graphics and GUIs would be more fun for CS1 students than console and file based programs I found: –They were often less fun I now believe: –Students enjoy writing complete programs –Students prefer standard Java –Graphics gets old fast –Our “sophisticated” programs are fairly crude –The problem solving challenge is more important than surface appearance

Confession: I have them write a program that produces this (console output, ascii art): /**\ //**\\ ///**\\\ ////**\\\\ /////**\\\\\ +=*=*=*=*=*=*+ |../\..../\..| |./\/\../\/\.| |/\/\/\/\/\/\| |\/\/\/\/\/\/| |.\/\/..\/\/.| |..\/....\/..| +=*=*=*=*=*=*+ |\/\/\/\/\/\/| |.\/\/..\/\/.| |..\/....\/..| |../\..../\..| |./\/\../\/\.| |/\/\/\/\/\/\| +=*=*=*=*=*=*+ /**\ //**\\ ///**\\\ ////**\\\\ /////**\\\\\

I used to believe –I could teach object oriented design in CS1 instead of procedural design I found: –Java objects involve a lot of syntactic detail –There are no line programs where OOD helps –Many object based assignments end up being “paint by numbers” rather than problem solving –Many students don’t get the object concept I now believe: –A large number of mid-level students who can master procedural concepts (loops, conditionals, methods, parameters, arrays) struggle with the object concept –Therefore, it is better to start with procedural programming if you have a broad audience

Confession: I have my students write code like this (with static methods): public class DrawFigure { public static final int SUB_HEIGHT = 3; public static void main(String[] args) { drawLine(); drawTop(); drawBottom(); drawLine(); } // Produces a solid line public static void drawLine() { System.out.print("+"); for (int column = 1; column <= (2 * SUB_HEIGHT); column++) { System.out.print("-"); } System.out.println("+"); }... }

A few more CS1 details Students use objects early, define them later We use a custom DrawingPanel to explore objects (Graphics, Color, …) Scanner is helpful for console and file input: while (input.hasNextLine()) { String text = input.nextLine(); Scanner data = new Scanner(text); } Input files make programs interesting

Some objections Stuart is guilty of crimes against Java –I’ve been in trouble before Why not a procedural language like Python for CS1? –We’re using Java in CS2 and switching languages is tough for mid-level students Why do you have to use the s-word so much? –Procedural Object Oriented Programming is a slippery slope (look what it spells)

A few words about CS2 Eliminated some useful but less fundamental topics (GUIs, junit testing, javadoc, streams) Brought back emphasis on fundamentals (recursion, linked lists, binary trees) including recursive backtracking Less emphasis on OO design, but basic OO concepts included (encapsulation, inheritance, interfaces) including a client view of data structures Collections framework as a “case study”

Results: student satisfaction Question C Mean Old Java Mean New Java Mean The course as a whole was: The course content was: The instructor’s contribution to the course was: The instructor’s effectiveness in teaching the subject matter was:

Results: CS1 enrollment

Results: female admission

Conclusions New courses are working for us Impossible to tell which changes have helped the most Too early to infer long-term trend (particularly with female admission) We serve as an “existence proof” that back to basics can work

For more information Building Java Programs by Stuart Reges and Marty Stepp, Addison Wesley, expected early 2007