270 likes | 362 Views
Breadth-first CS1 (for scientists). Zachary Dodds. 25/06/07. ITiCSE 2007 Dundee. Four undergraduate years: 175 students each. Only scientists and engineers. No course choices in the first year. Every student must take and pass CS 1. CS 1 at HMC. wk 1-2: variables. wk 3-4: control.
E N D
Breadth-first CS1 (for scientists) Zachary Dodds 25/06/07 ITiCSE 2007 Dundee
Four undergraduate years: 175 students each Only scientists and engineers No course choices in the first year Every student must take and pass CS 1
CS 1 at HMC wk 1-2: variables wk 3-4: control wk 5-6: functions traditional Java, mostly imperative wk 8-9: arrays wk 10-: objects | |****| |****| | | | | |****| |****| | | | | |****| |****| | | | | |****| |****| | | | 0 1 2 3 4 5 6 Choose a light: 2 | | |****| | | | | | | |****| | | | | | | |****| | | | | | | |****| | | | | 0 1 2 3 4 5 6 Choose a light: 1 |****|****| | | | | | |****|****| | | | | | |****|****| | | | | | |****|****| | | | | | 0 1 2 3 4 5 6 Choose a light: 0 You win! lights out abstract(ion) art 'mystery' function f("onyx","balk") == 13.0 f("adds","beet") == 1.0 f("zach","bach") == 0.5
CS 1 elsewhere! Precedence Thematic Structure imperative-first objects-first robots functional-first games breadth-first math & science algorithms-first media hardware-first rigor-first
CS 1 elsewhere! Precedence Thematic Structure imperative-first objects-first robots functional-first games breadth-first math & science algorithms-first media hardware-first rigor-first
the breadth-first model has not enjoyed the success that its proponents had envisioned… most breadth-first courses that exist today seem to be lead-ins to a more traditional programming sequence - CC 2001
breadth-first breadth-last the breadth-first model has not enjoyed the success that its proponents had envisioned… most breadth-first courses that exist today seem to be lead-ins to a more traditional programming sequence - CC 2001
breadth-first breadth-last the breadth-first model has not enjoyed the success that its proponents had envisioned… most breadth-first courses that exist today seem to be lead-ins to a more traditional programming sequence - CC 2001 Goals: - attract as many students to CS as possible - present CS as a self-respecting discipline - develop programming skills sufficient for CS 2 and useful for any scientific field of study
CS 1 for scientists platforms 8:00 am or 9:00 am three times a week schedule two hours of scheduled, closed lab per week curriculum
Functions first weeks 1-3 Keys: lists, function composition, recursion familiar and functional vs. Zelle's graphics.py lambda and mapreduce background differences
Hardware weeks 4-6 Keys: representation, circuits, assembly language 0 read r0 setup 1 loadn r3 1 2 loadn r2 8 3 jzero r0 r2 4 mul r3 r0 r3 Loop 5 addn r0 -1 6 loadn r4 3 7 jump r4 write r3 8 finish 9 print very popular, even among non-engineers implementing recursion as (tri)umph
Hardware weeks 4-6 Keys: representation, circuits, assembly language 0 read r0 setup 1 loadn r3 1 2 loadn r2 8 3 jzero r0 r2 4 mul r3 r0 r3 Loop 5 addn r0 -1 6 loadn r4 3 7 jump r4 write r3 8 finish 9 print though perhaps for very different reasons… implementing recursion as (tri)umph
Imperative weeks 7-9 Keys: design, loops, multidimensional lists
Imperative weeks 7-9 Keys: design, loops, multidimensional lists
Imperative weeks 7-9 Keys: design, loops, multidimensional lists
Imperative into Objects weeks 9-10 Keys: design, loops, multidimensional lists it wouldn't be CS 1 without it… 3d rendering via vPython
Objects weeks 10-11 Keys: continued practice with imperative idioms in hw11pr1.py: def dow(self): dayOfWeekList = ["Sunday", "Monday","Tuesday", "Wednesday","Thursday", "Friday","Saturday"] now = Date(11,12,2006) b = self.diff(now) return dayOfWeekList[b%7] at the command line: (30)% python -i hw11pr1.py >>> d = Date(6,25,2007) >>> d.dow() 'Monday' an object-based Date calculator
Objects weeks 10-11 Keys: continued practice with imperative idioms (42)% python -i hw11pr3.py >>> p1 = Player('X',2) >>> p2 = Player('O',0) >>> b = Board(6,7) >>> b.playGame(p1,p2) in hw11pr1.py: def dow(self): dayOfWeekList = ["Sunday", "Monday","Tuesday", "Wednesday","Thursday", "Friday","Saturday"] now = Date(11,12,2006) b = self.diff(now) return dayOfWeekList[b%7] <11 boards omitted> | | | | | | | | | | | | | | | | | | | | | | | | |O| |O| | | | | |O| |X| | |X|X| |X| |X|X|O|O|O| --------------- 0 1 2 3 4 5 6 | | | | | | | | | | | | | | | | | | | | | | | | |O| |O| | | | | |O| |X| | |X|X| |X|X|X|X|O|O|O| --------------- 0 1 2 3 4 5 6 X wins! at the command line: (30)% python -i hw11pr1.py >>> d = Date(6,25,2007) >>> d.dow() 'Monday' Connect Four with lookahead an object-based Date calculator
Create a DFA accepting strings iff s[0] == s[-1] Theory Computability and DFA weeks 12-14 final exam answers simulated Roomba virtual Pool final project using OOP … and practice Karel-like automaton
Final exam 2) Create a circuit for segment 'g' 5) Floating-point division in (integer-only) assembly 6) Count words in a 2d array asmic spams papaj amsoy 8) Show that contrary is uncomputable
Final exam week 15 Final exam scores in CS 1, Fall 2006 Comparing old vs. new CS 1 students, in terms of performance in CS 2 imperative, java old breadth, python new midterm 79.8 83.8 79.7 85.1 final exam 85% chance of significance … but invalid if the group is too self-selected!
Results Retention at least flat… Students choosing to take CS 2 in the spring
Results Taking sides!
Results When bias is good…
Results Comparing the previous CS 1 A) The course stimulated my interest in the subject matter. B) I learned a great deal in this course. on a seven-point scale
Perspective Keep Change breadth-first imperative with functional closed labs and final project 8 am class time homework choices add more such paths graphics more 2d & audio; less 3d hardware reality www.cs.hmc.edu/twiki/bin/view/CS5/WebHome