3ca3d631084adef8d705721c1f5759bf.ppt
- Количество слайдов: 81
On The Cruelty of Really Teaching Computer Science Redux Owen Astrachan http: //www. cs. duke. edu/~ola Cruelty of Teaching Computer Science Redux, Fall 2005 1
Shoulders of Giants, Thanks “… it is a tale Told by an idiot, full of sound and fury, Signifying nothing. ” Macbeth, V, v, 19 Cruelty of Teaching Computer Science Redux, Fall 2005 2
Where are we going … Questions l What should our concerns be for those choosing to major in Computer Science? Ø courses, research, jobs, … l Should we be concerned by the precipitous decline in those taking our courses? Ø majors, technical students, non-technical … l What can we do to ensure the ongoing success of our academic discipline? Ø Look inward, look to others Cruelty of Teaching Computer Science Redux, Fall 2005 3
Cruelty of Teaching Computer Science Redux, Fall 2005 4
WWDD? Cruelty of Teaching Computer Science Redux, Fall 2005 5
Questions If you gotta ask, you’ll never know Louis Armstrong: “What’s jazz? ” If you gotta ask, you ain’t got it Fats Waller: “What’s rhythm? ” What questions did you ask in school today? Arno Penzias via Isaac Isadore Rabi Cruelty of Teaching Computer Science Redux, Fall 2005 6
Questions and Answers l Judge a man by his questions rather than by his answers Cruelty of Teaching Computer Science Redux, Fall 2005 7
Don’t know much about history We are doomed if we don’t pay attention Cruelty of Teaching Computer Science Redux, Fall 2005 8
Who, when? “No stretching … is required to envision computer consoles installed in every home. Everyone will have better access to the Library of Congress than the librarian himself now has. Full reports on current events, whether baseball scores, the smog index in Los Angles or the minutes of the 178 th Korean Truce Commission will be available for the asking. ” John, Mc. Carthy, Information, Chapter 1, 1966 Cruelty of Teaching Computer Science Redux, Fall 2005 9
You win some, you lose some People will soon become discontented with the “canned” programs available; they will want to write their own. The ability to write a computer program will be as widespread as the ability to drive a car. Not knowing how to program will be like living in a house full of servants and not speaking their language. Many people can write simple programs after an hour or two of instruction. … Programming is far easier to learn than a foreign language or algebra. Cruelty of Teaching Computer Science Redux, Fall 2005 10
Then and Now Ouchless I/O Bailey, SIGCSE 1972 All of the Fortran statements were to be introduced as the need arose within the context of a problem-solving situation—that is, a here-is-what-we-want-how-can-we-do-it approach…the overall objective of the course was to make the instruction as interesting and informative as possible. It is remarkable that the majority of students can indeed handle fairly complex I/O by the end of the first six lessons, even though they have not actually been formally taught how to do it. Cruelty of Teaching Computer Science Redux, Fall 2005 11
Now and Then Java IO and Testing Made Simple, Proulx and Rasala, SIGCSE 2004 We believe that the combination of the well-designed tools with well-designed abstractions presented here provide a solid foundation for introducing input processing to novice programmers. In addition to making the input from the user an integral part of student's programs, students learn from seeing and using abstractions that provide tangible and significant benefits. Cruelty of Teaching Computer Science Redux, Fall 2005 12
1984 Cruelty of Teaching Computer Science Redux, Fall 2005 13
Teaching Compsci in 1984 l l l 64 K memory, 128 K extended 8 -bit, 1 Mhz 6502 processor 5 Mb drive: $3500 UCSD Pascal: >$100 Owen's machine: $3000 $677. 80 in 1984 has $1200 "purchase power" in 2003 l http: //eh. net/hmit/ppowerusd/ Cruelty of Teaching Computer Science Redux, Fall 2005 14
Typical machine in 2004? l l l Cruelty of Teaching Computer Science Redux, Fall 2005 1 Gb memory 3+ GHz, 32 -bit chip Ø Cache, … 160 Gb disk Lots of free resources Ø Good academic pricing Under $1000 15
What has changed in 20 years? l Machines Ø Characteristics and Availability l Internet Ø Availability, IM, web, Google, … l Students Ø Comfort with technology, Expectations Cruelty of Teaching Computer Science Redux, Fall 2005 16
The more things change…? Assume I took your first course(s) in 1984 and understood the concepts so completely that I could still get a 100 on the final from 1984 if I took it today (e. g. , I've been in a cryogenic chamber). How would I do on the 2004 final exam? Cruelty of Teaching Computer Science Redux, Fall 2005 17
What has changed in Physics? "You'd get a 100 plus or minus sigma. Intro classical physics hasn't really changed that much over the last 100 years. In graduate level e. g. E&M or quantum classes I think ditto, although sigma would be bigger (and might depend more on the instructor variation than on any real variation in the material). The main difference is, I think, that your chances of GETTING 100 now would be much higher. " Rob Brown, Poohbah of Physics Instruction Cruelty of Teaching Computer Science Redux, Fall 2005 18
What has changed in Biology? "The basic principles and concepts of biology haven't changed much in 20 years. What has changed relates to specific content, and in this arena the changes have been enormous. 20 years ago, we barely knew how to sequence DNA; today information of this kind has had a major impact on just about every topic in the biological sciences. Thus, some questions on an exam today would address topics that would be completely unfamiliar to a 1984 time-traveller. " Greg Wray, Director of Undergraduate Studies, Biology Cruelty of Teaching Computer Science Redux, Fall 2005 19
What has changed in Economics? "… we now cover material that was only introduced in an advanced or intermediate course in 1984. In 1984 we spent the bulk of the time dealing with the Keynesian model and virtually no dialogue about supply side policies. Now the Keynesian stuff is a small subset of a much broader exposure to Aggregate demand supply… Also there is more international coverage now - as opposed to 20 years ago for obvious reasons. " Lori Leachman, Director of Undergraduate Studies, Economics Cruelty of Teaching Computer Science Redux, Fall 2005 20
What has changed in Calculus? We have two varieties of calculus courses, the lab courses and the traditional. . . The latter two have not changed significantly in decades, and I think that a student who fared well on the 1984 exam in those courses would do well today, and vice versa. [In the lab courses] You would ace about half the exam. The other half would be unfamiliar to you. For example, you would probably not know how to answer a problem on modeling a set of data, creating an approximation using Euler's method, interpreting derivatives in the context of applications in other fields, or giving explanations of ideas … Lewis Blake, Supervisor of First-year Instruction Cruelty of Teaching Computer Science Redux, Fall 2005 21
Changes in Computer Science? Cruelty of Teaching Computer Science Redux, Fall 2005 22
Changing CS? Rock, Hard place l If Computer Science has changed drastically is it to keep up with fads and stylistic changes or because of fundamental changes in the discipline? l Are we leveraging the technological and intellectual resources at our disposal l If we haven’t changed, is it because of a solid bedrock of principles that endures? Or because we’re lazy, good-for-nothing, … Cruelty of Teaching Computer Science Redux, Fall 2005 23
1985, AP Computer Science, Q 2 Write a procedure Compact that eliminates all elements with value 0 from its argument, a list. Compact leaves the order of the other elements unchanged. For example, if list is (0, 9, 7, 0, 0, 23, 4, 0) When the procedure is called, it should be (9, 7, 23, 4) After the procedure executes. All local variables should be scalar. (declaration for Pascal record with array and count) Cruelty of Teaching Computer Science Redux, Fall 2005 24
Concepts and Solutions l Why the restriction to use only scalar variables? Ø Force an expected solution? Ø Punish students? Ø What is expected solution, O(n) or O(n 2) Ø What if I make a new array? l What does this look like today? (to appear) Cruelty of Teaching Computer Science Redux, Fall 2005 25
2004, AP, Question 1 public class Word. List { Array. List my. List; public void remove. Words. Of. Length(int len) { // you write this } } Cruelty of Teaching Computer Science Redux, Fall 2005 26
Details of Question Revisited Write the Word. List method remove. Words. Of. Length. Method remove. Words. Of. Length removes all words from the Word. List that are exactly len lettters long leaving the order of the remaining words unchanged. For example assume that the instance variable my. List of the Word. List animals contains the following: {“cat”, “mouse”, “frog”, “dog”} After the call animals. remove. Words. Of. Length(3) {“mouse”, “frog”} Cruelty of Teaching Computer Science Redux, Fall 2005 27
What about trends today? Cruelty of Teaching Computer Science Redux, Fall 2005 28
Cruelty of Teaching Computer Science Redux, Fall 2005 29
What is CS? Why study it? Do we have Physics (Math, …) Envy? “It's hard for voice over Internet Protocol or e -commerce to compete with finding the age of the universe, ” Peter Lee, CMU l l Does familiarity breed contempt? Ø What was different in 1984 than today? Cruelty of Teaching Computer Science Redux, Fall 2005 30
Cruelty of Teaching Computer Science Redux, Fall 2005 31
Cruelty of Teaching Computer Science Redux, Fall 2005 32
Cause for comfort or concern? Source: CRA Cruelty of Teaching Computer Science Redux, Fall 2005 33
Cruelty of Teaching Computer Science Redux, Fall 2005 34
Cruelty of Teaching Computer Science Redux, Fall 2005 35
COHFE Amherst College, Barnard College, Brown University, Bryn Mawr College, Carleton College, Columbia University, Cornell University, Dartmouth College, Duke University, Georgetown University, Harvard University, Johns Hopkins University, Massachusetts Institute of Technology, Mount Holyoke College, Northwestern University, Oberlin College, Pomona College, Princeton University, Rice University, Smith College, Stanford University, Swarthmore College, Trinity College, University of Chicago, University of Pennsylvania, University of Rochester, Washington University in St. Louis, Wellesley College, Wesleyan University, Williams College, Yale University Cruelty of Teaching Computer Science Redux, Fall 2005 36
Cruelty of Teaching Computer Science Redux, Fall 2005 37
What’s wrong with this picture? Why is the first year different from all other years? Cruelty of Teaching Computer Science Redux, Fall 2005 38
Algorithm Arch OS AI CMU MIT Stanford Berkeley UIUC Cornell UTexas UW Cal Tech Wisc G. Tech Maryland Brown UCLA Michigan UNC Penn Duke Harvard Purdue Cruelty of Teaching Computer Science Redux, Fall 2005 UCSD 39
Books and Approaches Used Cruelty of Teaching Computer Science Redux, Fall 2005 40
Cruelty of Teaching Computer Science Redux, Fall 2005 41
Cruelty of Teaching Computer Science Redux, Fall 2005 42
If you don’t take a course in CS, you won’t major in it. Why is the first year different from all other years? Cruelty of Teaching Computer Science Redux, Fall 2005 43
Who's going to College? Cruelty of Teaching Computer Science Redux, Fall 2005 44
Who's going to College? Cruelty of Teaching Computer Science Redux, Fall 2005 45
Who's going to College? Cruelty of Teaching Computer Science Redux, Fall 2005 46
Interdisciplinary minors l At Duke it is difficult to double major in sciences Ø Too many requirements, 17 courses in biology l Students are interested in credentials Ø No business major/minor, certificate program (requires intro, capstone, six courses) l Minor requires five courses, double counting ok Ø Three courses in CS, two in econ or biology Ø From gene to social networks, data mining, … Cruelty of Teaching Computer Science Redux, Fall 2005 47
Genome Revolution Focus Course l Arts in Contemporay Society, Exploring the Mind, Evolution and Humankind, 20 th Century Europe, Visions of Freedom, The Genome Revolution and its Impact on Society, … Ø Three of four courses, one writing, two others. Interdisciplinary 0. 5 credit seminar P/F Ø Seminars, students live in same dorm Ø 600+ out of 1600 in FOCUS course l For Genome, 80 applicants for 30 slots, 65% women Ø In CS Genomics course 8 women, 9 men Cruelty of Teaching Computer Science Redux, Fall 2005 48
Simple examples l Given strand of DNA, calculate CG ratio Ø Potential source of proteins “CGGATTATC” l Given protein “HLVWW” calculate number of different DNA strands that could code for it Ø 64 codons, 20 amino acids l Find heaviest protein in array of proteins Ø Given atomic mass of amino acids l Interpret ORF data from NCBI website Cruelty of Teaching Computer Science Redux, Fall 2005 49
From Algorithms to Objects l Read DNA assumed to be in 5’ to 3’ orientation Ø Use Bio. Java to read via http l Construct reverse complement (3’ to 5’) Ø From CAATT produce AATTG l How big is the human genome? Ø Runtime of algorithm O(1) Cruelty of Teaching Computer Science Redux, Fall 2005 50
Computer Science is filled with real-world examples. Why is the first year different from all other years? Cruelty of Teaching Computer Science Redux, Fall 2005 51
A picture is worth … Cruelty of Teaching Computer Science Redux, Fall 2005 52
A thousand words Write class Cat that says 'meow' l Write Loud. Dog that says 'bark-bark' when Dog says 'bark' l Cruelty of Teaching Computer Science Redux, Fall 2005 53
How do we teach CS? Cruelty of Teaching Computer Science Redux, Fall 2005 54
Gries on Teaching Programming “Suppose you attend a course in cabinet making. The instructor briefly shows you a saw, a plane, a hammer, and a few other tools, letting you use each one for a few minutes. He next shows you a beautifullyfinished cabinet. Finally, he tells you to design and build your own cabinet and bring him the finished product in a few weeks. You would think he was crazy!” 1974 Cruelty of Teaching Computer Science Redux, Fall 2005 55
Putting it all together … …we conclude that students are not given sufficient instruction in how to "put the pieces together. " Focusing explicitly on specific strategies for carrying out the coordination and integration of the goals and plans that underlie program code may help to reverse this trend. Sporher and Soloway, Novice mistakes: Are the folks wisdoms correct? Studying the Novice Programmer, 198956 Cruelty of Teaching Computer Science Redux, Fall 2005
Changing Data into Knowledge We provide an unjust education if we do not give every student the maximum opportunity for learning. Depending on their natural abilities, imbalance in education deprives some students of learning more than others. Those who are naturally more creative, or have better memories, or are more reflective, or are more active have different opportunities if we do not provide balance. That is unjust. James Zull: The Art of Changing the Brain Cruelty of Teaching Computer Science Redux, Fall 2005 57
Teaching as … English is not history and history is not science and science is not art and art is not music, and art and music are minor subjects and English, history and science major subjects, and a subject is something you 'take' and when you have taken it, you have 'had' it, and if you have 'had' it, you are immune and need not take it again. " (The Vaccination Theory of Education? ) Cruelty of Teaching Computer Science Redux, Fall 2005 58
What is CS? Who wants to study it? Why do they want to? Cruelty of Teaching Computer Science Redux, Fall 2005 59
What is Computer Science? What is the central core of the subject? What is it that distinguishes it from the separate subjects with which it is related? What is the linking thread which gathers these disparate branches into a single discipline? My answer to these questions is simple --- it is the art of programming a computer. Cruelty of Teaching Computer Science Redux, Fall 2005 60
Is this Computer Science? public static void stuff(int n){ doit(n, 0, 1, 2); } public static void doit(int n, int f, int t, int a){ if (n == 1) move(n, f, t); else { doit(n-1, f, a, t); move(n, f, t); doit(n-1, a, t, f); } } Cruelty of Teaching Computer Science Redux, Fall 2005 61
Why Arguments are a Good Thing Bubblesort, An Archeological Algorithm Analysis Cruelty of Teaching Computer Science Redux, Fall 2005 62
11/08/77 Cruelty of Teaching Computer Science Redux, Fall 2005 63
17 Nov 75 Not needed Can be tightened considerably Cruelty of Teaching Computer Science Redux, Fall 2005 64
Jim Gray (Turing 1998) l Bubble sort is a good argument for analyzing algorithm performance. It is a perfectly correct algorithm. But it's performance is among the worst imaginable. So, it crisply shows the difference between correct algorithms and good algorithms. (italics mine) Cruelty of Teaching Computer Science Redux, Fall 2005 65
Brian Reid (Hopper Award 1982) Feah. I love bubble sort, and I grow weary of people who have nothing better to do than to preach about it. Universities are good places to keep such people, so that they don't scare the general public. (continued) Cruelty of Teaching Computer Science Redux, Fall 2005 66
Brian Reid (Hopper 1982) I am quite capable of squaring N with or without a calculator, and I know how long my sorts will bubble. I can type every form of bubble sort into a text editor from memory. If I am writing some quick code and I need a sort quick, as opposed to a quick sort, I just type in the bubble sort as if it were a statement. I'm done with it before I could look up the data type of the third argument to the quicksort library. I have a dual-processor 1. 2 GHz Powermac and it sneers at your N squared for most interesting values of N. And my source code is smaller than yours. Cruelty of Teaching Computer Science Redux, Fall 2005 67
Niklaus Wirth (Turing award 1984) I share your view that Bubble Sort has hardly any merits. I think that it is so often mentioned, because it illustrates quite well the principle of sorting by exchanging. I think BS is popular, because it fits well into a systematic development of sorting algorithms. But it plays no role in actual applications. Quite in contrast to C, also without merit (and its derivative Java), among programming codes. Cruelty of Teaching Computer Science Redux, Fall 2005 68
Back to the Future How will we know when we get there? Cruelty of Teaching Computer Science Redux, Fall 2005 69
A Future for Computer Science? Cruelty of Teaching Computer Science Redux, Fall 2005 70
What does the Internet look like? Cruelty of Teaching Computer Science Redux, Fall 2005 71
Cruelty of Teaching Computer Science Redux, Fall 2005 72
Cruelty of Teaching Computer Science Redux, Fall 2005 73
Is there a Science of Networks? l From Erdos numbers to random graphs to Internet Ø From FOAF to Selfish Routing Ø Modeling, simulation, and hypotheses Ø Computer Science? l From the facebook to tomogravity Ø How do we model networks, measure them? Ø What mathematics is necessary? Ø Will the real-world intrude? Cruelty of Teaching Computer Science Redux, Fall 2005 74
Network Models (Barabasi) l Differences between Internet, Kazaa, Chord Ø Building, modeling, predicting l Static networks, Dynamic networks Ø Modeling and simulation l Random and Scale-free Ø Implications? l Structure and Evolution Ø Modeling via Touchgraph Cruelty of Teaching Computer Science Redux, Fall 2005 75
My recommendations at Amazon Cruelty of Teaching Computer Science Redux, Fall 2005 76
And again… Cruelty of Teaching Computer Science Redux, Fall 2005 77
Finally, … Cruelty of Teaching Computer Science Redux, Fall 2005 78
From Pigou to Braess l Roughgarden terminology Ø Ø Ø l Selfish Routing Cost as measure of social welfare Non-cooperative agents Nash flows Ø Ø Optimality Game Theoretic )=x (x 1 T 0 1 Cruelty of Teaching Computer Science Redux, Fall 2005 SCH x = (x) T 79
Alan Kay "Simple things should be simple. Complex things should be possible". "The best way to predict the future is to invent it" Cruelty of Teaching Computer Science Redux, Fall 2005 80
Who else is similar? Cruelty of Teaching Computer Science Redux, Fall 2005 81