Presentation is loading. Please wait.

Presentation is loading. Please wait.

Breadth-first CS1 (for scientists) Zachary Dodds 25/06/07 ITiCSE 2007 Dundee.

Similar presentations


Presentation on theme: "Breadth-first CS1 (for scientists) Zachary Dodds 25/06/07 ITiCSE 2007 Dundee."— Presentation transcript:

1 Breadth-first CS1 (for scientists) Zachary Dodds 25/06/07 ITiCSE 2007 Dundee

2 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

3 traditional Java, mostly imperative CS 1 at HMC wk 10-: objects wk 3-4: control wk 8-9: arrays wk 5-6: functions wk 1-2: variables 'mystery' function f("onyx","balk") == 13.0 f("adds","beet") == 1.0 f("zach","bach") == 0.5 abstract(ion) art | |****| |****| | | | Choose a light: 2 | | |****| | | | | Choose a light: 1 |****|****| | | | | | Choose a light: 0 You win! lights out

4 PrecedenceThematic Structure CS 1 elsewhere! breadth-first rigor-first objects-first imperative-first games media robots math & science functional-first algorithms-first hardware-first

5 PrecedenceThematic Structure CS 1 elsewhere! breadth-first rigor-first objects-first imperative-first games media robots math & science functional-first algorithms-first hardware-first

6 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

7 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-lastbreadth-first

8 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-lastbreadth-first 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

9 CS 1 for scientists platforms schedule 8:00 am or 9:00 am three times a week two hours of scheduled, closed lab per week curriculum WeeksParadigmSamples of the labs and assignments 1-3functionalintegration, random walks, ciphers 4-6hardwarerecursion in assembly, 4-bit multiplier 7-9imperativeMarkov text generation, Conway's life 10-12objects/classesConnect Four player, Date calculator 13-15CS theoryuncomputability, finite-state machines

10 lists, function composition, recursion Functions first Keys: vs. Zelle's graphics.py lambda and map reduce background differences familiar and functional weeks 1-3

11 representation, circuits, assembly language Hardware Keys: read r loadn r3 1 loadn r2 8 jzero r0 r2 mul r3 r0 r3 addn r0 -1 loadn r4 3 jump r4 write r3 print Loop setup finish implementing recursion as (tri)umphvery popular, even among non-engineers weeks 4-6

12 representation, circuits, assembly language Hardware Keys: read r loadn r3 1 loadn r2 8 jzero r0 r2 mul r3 r0 r3 addn r0 -1 loadn r4 3 jump r4 write r3 print Loop setup finish implementing recursion as (tri)umphthough perhaps for very different reasons… weeks 4-6

13 design, loops, multidimensional lists Imperative Keys: weeks 7-9

14 design, loops, multidimensional lists Imperative Keys: weeks 7-9

15 design, loops, multidimensional lists Imperative Keys: weeks 7-9

16 design, loops, multidimensional lists Imperative into Objects Keys: weeks 9-10 it wouldn't be CS 1 without it…3d rendering via vPython

17 continued practice with imperative idioms Objects Keys: weeks def dow(self): dayOfWeekList = ["Sunday", "Monday","Tuesday", "Wednesday","Thursday", "Friday","Saturday"] now = Date(11,12,2006) b = self.diff(now) return dayOfWeekList[b%7] (30)% python -i hw11pr1.py >>> d = Date(6,25,2007) >>> d.dow() 'Monday' an object-based Date calculator in hw11pr1.py: at the command line:

18 continued practice with imperative idioms Objects Keys: weeks | | | | |O| |O| | | | | |O| |X| | |X|X| |X| |X|X|O|O|O| (42)% python -i hw11pr3.py >>> p1 = Player('X',2) >>> p2 = Player('O',0) >>> b = Board(6,7) >>> b.playGame(p1,p2) def dow(self): dayOfWeekList = ["Sunday", "Monday","Tuesday", "Wednesday","Thursday", "Friday","Saturday"] now = Date(11,12,2006) b = self.diff(now) return dayOfWeekList[b%7] (30)% python -i hw11pr1.py >>> d = Date(6,25,2007) >>> d.dow() 'Monday' Connect Four with lookaheadan object-based Date calculator | | | | |O| |O| | | | | |O| |X| | |X|X| |X|X|X|X|O|O|O| X wins! in hw11pr1.py: at the command line:

19 Computability and DFA Theory final project using OOP … and practice weeks Karel-like automaton virtual Pool simulated Roomba final exam answers Create a DFA accepting strings iff s[0] == s[-1]

20 Final exam 2) Create a circuit for segment 'g' 8) Show that contrary is uncomputable 5) Floating-point division in (integer-only) assembly asmic spams papaj amsoy 6) Count words in a 2d array

21 Final exam week 15 … but invalid if the group is too self-selected! Comparing old vs. new CS 1 students, in terms of performance in CS 2 Final exam scores in CS 1, Fall 2006 midterm final exam imperative, java old breadth, python new % chance of significance

22 Results Retention at least flat… Students choosing to take CS 2 in the spring

23 Results Taking sides!

24 Results When bias is good…

25 Results A) The course stimulated my interest in the subject matter. B) I learned a great deal in this course. on a seven-point scale Comparing the previous CS 1

26 imperative with functional closed labs and final project hardware graphics Perspective homework choices KeepChange breadth-first 8 am class time add more such paths more 2d & audio; less 3d reality

27 Opportunities


Download ppt "Breadth-first CS1 (for scientists) Zachary Dodds 25/06/07 ITiCSE 2007 Dundee."

Similar presentations


Ads by Google