8
Computer Science 101 Preparing programmers to be architects Michael Huth, [email protected] Computing, Imperial College

Computer Science 101 Preparing programmers to be architects Michael Huth, [email protected]@doc.ic.ac.uk Computing, Imperial College

Embed Size (px)

Citation preview

Page 1: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

Computer Science 101Preparing programmers to be

architects

Michael Huth, [email protected]

Computing, Imperial College

Page 2: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

Outline of talk

• Challenges in teaching first-year programming.

• Learning outcomes in the “slashdot” world.

• Strategies for realizing those outcomes.

• Outlook: a marriage of theory and practice.

Page 3: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

Old and new challenges

Traditionally,

• incoming students have dramatically different skills;

• programming involves logic and artistic activity;

• real-world languages are too rich to be covered in full.

Today, software• is open and distributed;

• requires architectural design and analysis;

• interfaces across languages.

Page 4: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

Traditional outcomes

Be able to • state requirements and specifications of programs: “The call fac(m) returns the factorial of m, given that m

>= 0.”• implement specifications: int myFac(m) { if (m==0) {return 1;} else { return m * myFac(m-1);}}• test and reason about implementations: Run myFac on “good” test values; prove that myFac

“works”.

Page 5: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

New outcomes

• Extend old outcomes to open, distributed programs: try { Url u = Inbox.getUrl(); } catch(exception e) { print “URL not found”;}

AudioClip a = new Audioclip(); a = Url.downloadclip(u); if (this.hasLicence(a)) {Realplayer.playClip(a);} else { BigBrother.notifyViolation(this,u,a);}

• And ensure the …

Page 6: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

Ability to formally model design

Page 7: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

Strategies: students …

1. Week 1-5: … specify, implement, and test traditional programs in open, distributed language.

2. Week 6-10: … learn to use distributed language features; get exposure to design;

3. Week 11-15: Transfer acquired skills of first block to second one.

4. Assessment: Students evaluate the approach 1, 2, and 5 years after course completion.

Page 8: Computer Science 101 Preparing programmers to be architects Michael Huth, mrh@doc.ic.ac.ukmrh@doc.ic.ac.uk Computing, Imperial College

An unexpected marriage

• Reality check: teach software-engineering languages early on.

• Key language features: abstract, complex, and mathematical.

• “Hot” principles of practice (e.g. B2B, P2P): realized in very abstract formalisms.

• Opportunity: marry theory and practice in a key CS course.