The Magic of Computing Dr. Tom Way CSESI 2009 Haverford College June 30, 2009...

35
The Magic of Computing Dr. Tom Way CSESI 2009 Haverford College June 30, 2009 0000000100000010000100100000000100000011000000010000010000000001000000100 001001000000001

Transcript of The Magic of Computing Dr. Tom Way CSESI 2009 Haverford College June 30, 2009...

The Magic ofComputing

Dr. Tom WayCSESI 2009

Haverford CollegeJune 30, 2009

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 2

My Background• UM Radio TV UD SE VU

• Computer Science professor for 7 years

• Graduate student for 8 years

• Software engineer for 9 years

• Hollywood writer for 10 years

• Magician for 40 years (1969)

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 3

Focus

• Focus on teaching you how to perform some of the tricks

• Understand the learning process for acquiring new tricks

• Rely on your creativity to link tricks to your specific teaching needs

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 4

Plan for the day

• Using magic to teach

• Art & Science behind magic

• Learning magic tricks

• Where to find out more

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 5

Proposed Schedule

• 9-12 watch, learn, try

• 12-1 lunch

• 1-3:30 develop, practice, perform

Remedial Computer Science 101

Prof. Tom WaySection 1

Meeting: Today 9-9:30am

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 7

2s Complement• What is 2s Complement?

• Negative binary integers• What is the algorithm?

• Start: 000101• Not: 111010• Add 1: 111011

• Check our work: 000101 5 +111011 -5 000000 0

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 8

Search Algorithms• Find specific value (its index) in an array

• Random search• Linear search• Binary search• Optimal search

• Know what the optimal is helps us to judge how good our algorithm is

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 9

GUI Design Principles

1. Principle of metaphor• Borrow behaviors from familiar systems

2. Principle of user profiling• Know who your user is

3. Principle of coherence• Behavior should be internally

and externally consistent

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 10

Load Balancing• Example: 3 tasks of different lengths

• How long will it take to perform the tasks simultaneously?

• How could we get them done faster?

• What is the fastest way to get them done?

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 11

Data Compression• Purpose is to squeeze the air out of data

so it fits in a smaller space

• Lots of ways to do this – depends on data• Lossless – decompressed = original• Lossy – some data is missing• Run length encoding – lots of repetition• Huffman – probabilistic data (Morse code)

And now, back to yourregularly scheduled

program

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 13

Using Magic to Teach• Not a short-cut to As, revolutionary idea,

scientifically validated approach• Is another trick for a good educator’s bag of

pedagogical tricks• A little KLA (Kinetic Learning Activities)• A little problem-based learning• A little example-based teaching• A little what-the?

• It’s cheap – don’t have to buy toys, candy, spend massive time planning, etc.

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 14

What is going on?• Active Thinking – brain in high gear

• Uniqueness – brain loves surprise

• Coolness – popular, generates buzz

• Anticipation – appealing, fun, engaging

• Evolving – empirical? anecdotal!

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 15

Approach 1: Topic Driven• Pick an upcoming topic you will teach

• Find a trick that fits

• Learn the trick

• Plan what to say

• Practice

• Perform it in class

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 16

Approach 2: Trick Driven• Pick a trick that you really like

• Find an upcoming topic that fits

• Learn the trick

• Plan what to say

• Practice

• Perform it in class

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 17

Learning a trick• Read the description

• Work through each step

• Try it in front of a mirror

• Practice it a couple times

• Use it in class

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 18

Performing a trick• Natural is best

• The overused “make it your own” applies

• Attitude is important• NOT know-it-all, fooled you, try to figure this

out – TURN OFF• YES check this out, I’m amazed too, enjoy it

along with them

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 19

Art of Magic• Magician’s Code

• Never reveal how trick is done• Never repeat trick for same group• Practice, practice, practice

• Patter – what you say, story you tell• In our case, the patter will involve

some aspect of Computer Science

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 20

Science of Magic• Misdirection

• Controlling the audience’s attention• Making them look where you want them to• THE secret of all magic

• Concealment - hiding• Switching - replacing• Forcing – not a free choice

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 21

Categories of Tricks• Production• Vanish• Transposition• Penetration• Levitation• Mental• Escape

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 22

MASTER Principle• Movement – large conceals small

• Angles – consider your angles

• Surprise – don’t tip your hand

• Thought – keep their brains busy

• Eyes – look where you want them to look

• Reason – has to make sense

Let’s try it

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 24

Goodie Bag & Handbook• Pencils• Cards• Rope• String• Hatpin• Balloons• Rubber bands• Scotch tape

• Paperclips• Fake dollar bill• Penny• Bent penny• 3 Card Monte• Professor’s Nightmare• Floating gimmick• Styrofoam cup

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 25

Wrist Twister

• Page 12

• Penetration – break your wrist

• Switching – change the position

• Concealment – hide the position

• Misdirection

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 26

Pick Any Card

• Page 24

• Mental – predict the future

• Forcing – you know which card

• Revelation – how to reveal prediction?

• Misdirection

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 27

Sticky Pencil & Stickier Pencil

• Pages 29 & 30

• Levitation – defy gravity

• Concealment – hide the mechanics

• Misdirection

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 28

Napkinesis

• Page 42

• Vanish

• Concealment

• Misdirection

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 29

Professor’s Nightmare

• Page 34

• Transposition

• Switching

• Concealment

• Misdirection

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 30

Other Tricks

• Three Card Monte (36) – big cards

• Instant Reconnect (37) – piece of string

• Dematerializing Toothpick (43) – tape, toothpick

• Cut & Restored Rope (13) – rope & scissors

• Magician’s Choice (23) – any 3 objects

• Mind Bending Coin (35) & utility switch

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 31

More Tricks

• Coin Vanish (40) – coin or other object

• Karate Dollar (14) – dollar & pencil

• Balloon Testing (16) – balloons & pin

• Linking Paper Clips (17) – dollar & 2 paperclips

• Jumping Rubber Band (18) – 1 rubber band

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 32

Still More Tricks

• Reversal of Expectation (38) – cards

• Pincushion Thumb (19) – napkin & pin

• Haunted Styrofoam Cup (28) – cup

• Cup Juggling (31) – cup

• Vanishing Card (41) – napkin, stirrer, cards

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 33

Resources• Public library• Internet

• Google: easy magic tricks• Google: online magic trick

• Magic shops• Yellow pages• Online shops (e.g., magicfact.com)

• Web sites for magician’s• allmagic.com

Grand finale!

0000000100000010000100100000000100000011000000010000010000000001000000100001001000000001

CSESI 2009 35

Straitjacket

• Invented by Dr. Benjamin Rush, 1814

• Believed that torture was good medicine

• Restrains the “criminally insane”

• Designed to be escape proof

• Trying to escape leads to exhaustion

• Still used today