Showing posts with label cs1. Show all posts
Showing posts with label cs1. Show all posts

Tuesday, October 6, 2009

0 David Malan and CS50

Today I attended a talk at Carnegie Mellon University. The presenter was David Malan - a Harvard lecturer of Computer Science. About three years ago, Dr. Malan inherited the School's CS50 course (http://www.cs50.net/). Here is the course description, taken from the CS50 website.

Introduction to the intellectual enterprises of computer science and the art of programming. This course teaches students how to think algorithmically and solve problems efficiently. Topics include abstraction, encapsulation, data structures, databases, memory management, software development, virtualization, and websites. Languages include C, PHP, and JavaScript plus SQL, CSS, and XHTML. Problem sets inspired by real-world domains of biology, cryptography, finance, forensics, and gaming. Designed for concentrators and non-concentrators alike, with or without prior programming experience.
Since inheriting the course, Dr. Malan has made CS50 a "sexier" and more attractive course for students across disciplines at Harvard. Here are a few stats about the class:

  • Enrollment is up 168% since 1989; In 1989 there were about 150 enrolled in the class, in 2000 there were about 260 and in 2009 there are about 350 students currently enrolled in CS50.
  • Mainly sophomore students; primarily because Harvard freshman are inandated with general education requirements.
  • 71.5% of the students have no prior coursework in CS.
  • Gender: In 2007 women made up about 29% of the students; 2008, women made up 38% of the students.
  • From 2007 to 2008, there was increase of about 50 student enrollment, of which, most were women.
  • Workload: <5>
There were a few things that stood out about this course
  1. Dr. Malan videotapes his lessons and provides them for the students
  2. His pedagogical approach targets learners of various styles through the use of Scribe notes, lecture, recitation (led by undergraduate students), bulletin board, course website and code walkthroughs.
  3. There are approximately 60 undergraduate students serving as teaching fellows (paid) or course assistants (volunteers)
  4. He uses Scratch (developed at MIT's media lab) to introduce computational thinking and programming concepts during week 0; then translates Scratch to C for the students. He says this helps to reduce the cognitive load (eg. little distractions, students can focus on the concepts that matter). This technique, he states is "pedagogically useful."
  5. He provides a "regular" version of each homework assignment and a "hacker" version - for students who desire a little more challenge (no extra points)
Here is a sample of the topics he covers week by week (syllabus - pdf):

week 0 - multi-threading, events (Scratch)
week 2 - stacks, frames, scope, arrays, cryptography, strings, command line arguments
week 3 - search, sort, asymptotic notation, recursion, sorting & debugging
week 4 - structures, dynamic memory allocation, stack/heaps, pointers
week 5 - input/output, forensics, linked lists, stacks, queues
week 7 - bitwise operations, hash tables, trees & binary search
week 8 - TCP/IP, HTTP, XHTML, PHP, SQL
week 9 - DOM, CSS, Inheritance, JavaScript events, AJAX
week 10 -Preprocessing, compiling, assembly, linking, CPUs
...

The number of topics and content that he covers during a semester is AMAZING!! How do you do it, when most students have no prior programming experience? Scratch in week 0 to students proficient and advanced in hash tables, trees, binary search, Web design and AJAX in week 12?? Must be excellent teaching, relevant & engaging curriculum.

All of his lectures are available on itunes and the course website is accessible to the public.

Great talk and an interesting twist on teaching computer science - in his words, "Making it sexier" (I <3 it!) Read the blog, visit his website, download lectures as podcasts, learn something about making CS fun!

Saturday, October 3, 2009

0 Teaching K12 CS with Toys and Manipulatives

Teaching K12 CS with Toys and Manipulatives
Robb Cutler, Tutor Crossing, former Assistant Head, Harker School



Towers of Hanoi with stacking rings
Have students write down their steps.
How many steps did you use?
How do we solve this in a more general case? What is the pattern?
- The pattern is hard to see, because it is recursive.
This is a "hard" problem; students need scaffolding; make it natural. A very exploratory example.





Stacking Cups
  • allows us to represent data in a non-numeric way.
  • use to teach sorting algorithms
  • can introduce terminology such as invariants, algorithmic run time (number of steps), algorithmic analysis - what is a step? number of comparisons;
  • Want to teach them the math, but not use math :)
Rob used the diagram below to illustrate the number of comparisons used in sorting.
  • count - first time there are 6 comparisons (7 items); second time there are 5 comparisons ... and so on ... (black stars - below)
  • this is an n^2 "thing" - if i double the number of cups (to 14), i know have double the number of comparisons
  • the student can visually see the relationships in the diagram.

* * * * * *
* * * * *
*
* * * * * *
* * *
* * *
* * * * * *
*
* * * * *

* * * * * *
Ping Pong Balls
  • number the balls
  • use pvc pipe to represent the "stack" and ping pong balls as items
  • use to make a stack, with two arrows (push, pop)
  • push a 1 to the stack, pop a 1 from the stack
  • can teach FIFO, LIFO, peak(), isempty()
  • can talk about what we can do with a stack - how do I reverse the number? push numbers and pop until empty.
  • must have rules; have "enqueue" and "dequeue" on each end
If they can hold it in their hands, they can learn it better.
  • can also use this to represent a queue
  • clear plastic tubes: can see what's inside; or using the pvc pipes it is a "black box"
PVC pipes and connectors - binary trees


- add velcro to the items (laminated pieces of paper - eg. numbers)
- data structure is recursive - "mimics itself in other places"








Use whiteboard to "code" on the board. Formulate the rules of writing an algorithm.
Allow students to generate the code or algorithm.

What other ideas - using toys to teach computing concepts?
- toy trains for linked list
- my first barrel of monkeys - linked list & pointers
- quercetti toys - binary arithmetic, good for just in the classroom
- bags of candy - separate by attribute, use to teach classes
- PB&J - logic & syntax errors
- yarn of string to teach recursion - through it across the room to students
- mancala: recursion, iteration, mathematical thinking

Thursday, March 5, 2009

0 Scratch & Great ideas for CS1

What do you teach in CS1? What teaching methods or strategies do you implement? What applications or tools help you teach computing? This was the theme of two workshops I attended this morning: "Starting with Scratch" and "Rediscovering the Passion, Beauty, Joy and Awe: Making Computing Fun Again, continued."

Scratch is a "new programming language that makes it easy to create your own interactive stories, animations, games, music, and art (scratch.mit.edu)". Scratch and Alice (alice.org) seem very similar in nature - such as the drag and drop interface - but I'm interested to know which "language" (are these really considered programming languages??) really helps students develop transferrable programming knowledge. Activities that are 'visual' are most appealing to students ages 8-18, which explains why web design, robotics and "programming languages" such as Alice and Scratch are helping to generate interest in CS amongst middle and high school students. Another thing I like about Scratch is that the students are able to post their projects online. This essentially creates an online social network of students working on Scratch projects. At this moment, there are 347,024 projects with a total of 8,928,428 scripts and 2,710,427 sprites (animation objects) created by 52,655 contributors (from the Scratch home page). I'm interested to hear about others using Scratch, as well as comparisons to Alice? Is Scratch better for high school or middle school students? Or appropriate for both?

Dr. Henry Leitner, a professor at Harvard University brought up the book "Great Ideas in CS with Java" - while I haven't read the book, the topic sure does interest me. He uses this book to teach an Intro to CS course for humanities and social science majors who want "industry level" programming skills (ie. these students want something to put on their resume.) What about teaching CS2 from this level. From the description of the book on Amazon.com, it seems as a thorough book that covers fundamental object oriented programming concepts while connecting it to relevant programming projects. While he uses this book, he also mentioned using Scratch to introduce students to think 'algorithmically' through 3, 50 minute lectures.

The other workshop discussed how to make computing fun again. How do we rediscover (and share) the passion, beauty and awe of computing??????? Robb Cutler was one of the panelists and he brought up the point that "How we teach determines learning and PBJA." (PBJA is short for passion, beauty, joy and awe.) He also mentioned that "What we see as aww inspiring they see as "um hmm." Soo true :) What we (adults) find 'aww inspiring' youth are not so inspired. We have to realize what we like is not always of interest to students in CS1 - if teachers don't take this into account ... how do we get the PBJA factor? Finally, the computer as the tool and not the focal point. I believe that if we teach computer science from the perspective of computing as a tool to a means of solving a problem or achieving a goal we can make CS a more inviting subject. Zach Dodds said something I will never forget ..."what is learned is the square root of what is taught." :)