You are on page 1of 23

K-12 Professional Development Workshop

Computer Science and Engineering

What is Computer Science, Really?

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Problem: They didnt teach computer science when I went to school. Why this is a big problem for schools:
The general population knows no computer science. School boards and administrators dont fully appreciate the importance of computer science. Pioneering teachers must pick up a new discipline. Parents are unable to help their children at home. This is a self-perpetuating cycle.

Why this is an important problem for the nation:


If students are not exposed to computer science K-12, many will not even consider it as a possible career. To be a leader in science, technology, and engineering innovation, we need a workforce with a broader and deeper understanding of computer science.
2

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

What K-12 Computer Science Teachers Face


Misconceptions:
Computer Science = Programming Computer Science is just a tool, not a subject in its own right. Computer Science isnt intellectually interesting. Computer Scientists are nerds who play games and replace circuit boards. Only future programmers need computer science.

Skepticism:
Why does my kid need computer science? I get along just fine without it! Technology changes so fast. Kids should learn things for the long term.

Fear:
I dont want my kid to be a hacker. All the jobs are going overseas.

Isolation:
There is often only one Computer Science teacher per building or district.
3

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

So, K-12 CS teachers must


Learn the subject, often on their own. Explain the subject to colleagues and administrators. Justify why CS should be taught. Attract students to take CS courses. Teach deep concepts in inspiring, motivating ways. Help diverse learners develop confidence. Which may lead you to conclude wouldnt it be easier to just teach Math? Workshop goal: Help you be better at doing this.
4

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Computer Science is hard to explain


Myths:
(particularly because the general population has experiential basis)

Computer Science = Programming Computer Scientists work alone Computer Science is not a deep discipline

Facts:
Computer Science is about algorithmic thinking, creative problem solving, system design, and implementation. Computer Scientists work with each other and with people of other disciplines. Computer Science has a deep intellectual foundation and is rapidly changing the world.
5

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Whats in a name?
The field is somewhat misnamed:

Computer Science
Is not really science, And its not really about computers.

Its like Carpentry being called Hammer Science.


6

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Computer Science is not really Science


Natural Sciences Natural (biology, chemistry, physics) Focus on discovery Ask what? and why? using scientific method. Investigate artifacts and look for patterns. Study the real world. Computer Science Synthetic (synthesis of math and physics) Focus on invention Ask how? using analytic thought. Create abstractions and patterns. Model real or invented worlds.
7

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Computer Science is not about Computers


People say I teach computers. Johnny is so good at computers. But do you ever hear? I teach pencils. Sarah is a whiz at Bunsen burners.

Computer science is not about tools Its about ideas. In particular, its about ideas concerning process.

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

But what is Computer Science, really?


The field is young, so people still argue about what it is. But Ill offer a definition

Computer Science is the study of efficient and correct automation of process.


Since nearly all disciplines involve processes in some form, computer science is widely applicable, but it is not about using the applications. Its about creating them.

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Computer Science is the study of efficient and correct automation of processes.


So computer science is about algorithms, and their efficiency and correctness techniques for the design of algorithms bounds on the efficiency of possible solutions tools for implementing algorithms in software techniques for designing and reasoning about software Chicken and egg problem: This kind of explanation is vague or meaningless to those without CS experience.
10

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Experience is the Best Teacher


We want students to experience the thought process of computer science, so we reason as follows: To automate a process on a computer, you must be describe it precisely. So students must first learn a programming language. To learn a programming language, you must learn the syntax. Therefore, a students first exposure to computer science is learning programming language syntax. Then students conclude: This field is boring! They may not wait around for whats interesting.
11

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Goal: Teaching Concepts First


How? Create problem solving situations that let students experience the computer science thought process without programming. [This morning.] Use tools that let students experience software design and implementation with little or no entry barrier. [This afternoon and part of Wednesday.]
12

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

A stream is a useful abstraction for input and output.

upstream sender downstream receiver

Streams decouple the sender and the receiver, but they do need to agree on a communication protocol.
13

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Group Activity: Design a Network Protocol


Problem: Sender - wants to send a text message Receiver - wants to receive the same message Communication Channel - can transmit packets between the sender and the receiver in both directions Each packet has
a letter (A-Z) and 3 digits (000-999)

For example, B073 or W816

14

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Form of the Solution: Algorithms for Sender and Receiver


Sender: Send the letters of the text message in order, one letter per packet, with the digits all 0. (For example, if the message is CAT, send C000, A000, T000.) Receiver: Receive the packets and reconstruct the message by stringing together the letters of each packet. This protocol will work, but only if the channel reliably delivers messages in order. The Internet does not!
15

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

The Channel is Faulty


The channel may: Lose messages Garble messages (by changing a letter or a digit) Deliver messages out of order Your protocol must be resilient to these kinds of faults: Receiver must be able to reconstruct the message in spite of these faults.
16

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Part I: Teams will


Discuss the problem. Design a protocol. Write down algorithms for the sender and the receiver (in English). Simulate the protocol with a faulty channel (using a die to create random errors). Improve the protocol, as needed, and simulate again.

17

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

The Faulty Channel


To simulate random faults, alternate between steps A and B: A. Roll and copy 1 to 6 packets accurately from the SEND tapes to the RCV tapes. B. Roll and treat the next incoming packet as follows:
Roll 1 or 2 > Ignore the packet. Roll 3 > Change a letter and copy the result. Roll 4 > Change a digit copy the result. Roll 5 or 6 > Choose and copy any earlier packet.

18

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Remember
Your protocol must transmit the entire message accurately even though some packets may be delivered incorrectly or not at all. The receiver can packets to the sender to provide it with feedback on how things are going. Your protocol must allow the receiver to
detect garbled packets (changed letter or digit). deal with out-of-order packets.
19

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Throughput and Latency


Throughput - the amount of data successfully transferred per unit of time.
In this simulation, can measure throughput with a kitchen timer (how many characters per minute?)

Latency - the amount of time it takes for one character to be successfully transferred from the sender to the receiver.
In this simulation, can measure average latency by having the sender and receiver write the times at which they first send and receive each packet. Then take the differences and compute the average.

20

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

Optional Extensions
Reducing message size: Use only 2 digits in each packet, instead of 3. Private communication: Prevent the message channel from being able to reconstruct the message, even if it knows the protocol. (Sender and receiver can share a secret number.)

21

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

TCP (Transmission Control Protocol)


standard algorithm for transferring information across the Internet TCP is built on top of the Internet Protocol (IP), which provides unreliable data transfer. In TCP, the stream of data is broken up into IP packets that are sent individually and sequenced at the receiver. The receiver acknowledges the packets and the sender retransmits lost packets. A checksum detects garbled packets, which are treated as lost. Packet 2 ACK 2

22

July 17, 2006

K-12 Professional Development Workshop

Computer Science and Engineering

A sliding window is used so that the sender doesnt have to wait for an acknowledgement before sending the next packet. That way, data can be sent at a faster rate. (The window size is the number of packets that are allowed to be in transit simultaneously. The window size increases slowly over time. Eventually, if no ACK is received, data is retransmitted and the window size decreases by half.)

Packet 3 4 ACK 4

H I

H E
23

M E S S A G E . July 17, 2006

You might also like