CS4HS – Beginners’ CS (1.44)

3 main topics: algorithms, programming languages, usability (human computer interaction). Broad cross section of computer science.

Pick something very simple, like an alarm clock, what is the task that someone is trying to do, what is the task – cell phone camera, what is the task – take a picture, but what do you actually do? How do I take a picture? First task – turn the phone on!! Get from taking phone that is off and turning on and then taking a photo. How could the interface be improved to make the task easier? e.g. taking a photo.

Usability, what is really going on? Alarm clock – set alarm to go off at a particular time in the morning. Reality is different, tired, late, consequences of not working. Forcing students to step back and think what is really going on.

Key things for students to learn, lots of algorithms to same problem, but some are better then others, algorithms have cost associated with them.
Searching and sorting algorithm topics, common topic in CS. The two go hand in hand.
Cost of an algorithm, 2 main ways – amount of time takes, or number of comparisons.

3.1.3. SEARCHING AND SORTING part of guide

  • widgets for students to go through
  • 3.2 Searching widget 1 in 20 chance to find in first go
  • binary search, half as many searches as number of boxes, with number of lives in game, will always find the pet.
  • binary search always works well
  • phone book example – is there an equal number of every letter, no! So not uniformly distributed. Guy, with girls phone number but didn’t know name – how long did it take for him to find it? (Saturday morning to Sunday afternoon). The cost of the algorithm, time it takes. He had to do a sequential search.
  • algorithm analysis: sequential search, linear
    • 256 pages + 2 mins = about 9 hours to go through every single page
    • worst – 9 hours, best – 1 mins, on average – 4.5 hours
    • ball park estimate
    • If known surname, binary search, start at middle, rip off right hand half, eliminated half the pages, divide in half again – ripping of book is cool
    • had to look at 8 pages – binary search, 256 pages, 9 x 2 secs ~ 18 secs, auckland phone book – 20 secs (1 more rip)
    • https://pbs.twimg.com/media/BbKSp6JCIAEGnjC.jpg:large
    • computers can’t search straight for “B”, it is the reasoning we are trying to teach
  • Unplugged activities – restrict students to limitations within a program / algorithm
  • find the pet in the boxes widget – binary search will always work, intropperity search will not always work as losing lives
  • Sorting algorithm- have to have a good sorting algorithm, otherwise searching algorithm you won’t get to.
    • to find heaviest weight, how many comparisons – 8 weights, 7 comparisons
    • doing activity, taking pictures and using to write report and show understanding – widget coming is scales – could take screenshots
    • https://pbs.twimg.com/media/BbKUtXOCYAEKLVj.jpg:large
    • figuring out how many comparisons it will take to find the heaviest weight
    • Gauss – write list backwards, the total is double what you want
Advertisements

One thought on “CS4HS – Beginners’ CS (1.44)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s