23
91.100 Media Computing • Instructor Byung Kim [email protected] Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

91.100 Media Computing Instructor Byung Kim [email protected] Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Embed Size (px)

Citation preview

Page 1: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

91.100 Media Computing

• Instructor• Byung Kim

[email protected]

• Olsen 231

• Office hours – MWF 9:00-10:00 AM or by appointment

Page 2: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Class website

www.cs.uml.edu/~kim/100.html

This is where you’ll find everything about the classSyllabusHomeworks/Projects/LabsAnnouncements (You are responsible for these!!)

Page 3: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Course Objectives

• A general introduction to computer science, programming (coding), and problem solving

• Not about how to use MS Word, Photoshop, etc.

• You DO computer programming

• Open up to a wide variety of CS concepts/topics

Page 4: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Course Objectives

• In this course,

• you DO computer programming

• DO computer programming with immediate feedback• Turtles• Pictures• etc.

Page 5: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Course Grading

• Program assignments and Projects (40%)• Hands-on programming labs

• Quizzes (30%)

• In-class work (Labs) and other assignments (30%)

Page 6: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

What is Computer Science ?

Problem solving to what computers can understand

It’s about communications and processLike writing a cooking recipe (algorithm) or solving a puzzle

Media Computation: Why digitize media? How can it possibly work?

Page 7: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Terminology• Problem solving – a high-level strategy

• how do we think through problems

• can we develop instructions (strategies) to

solve problems

• Programming – mechanical coding of the

strategy• how do we tell computers how to solve

problems

• how can we express our ideas to computers

Page 8: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Example: Counting Dots

Page 9: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Another Strategy?

Page 10: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Picture Example

I have a Santa picture

Page 11: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Picture Example

I have a Santa picture

And, I want its negative

Page 12: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Articulation Simplification Generalization

Page 13: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Example• Compute the class average

Initialize total to zeroInitialize counter to zero

Input the first gradewhile the user has not as yet entered the sentinel

add this grade into the running totaladd one to the grade counterinput the next grade (possibly the

sentinel)

if the counter is not equal to zeroset the average to the total divided by

the counterprint the average

elseprint 'no grades were entered'

Page 14: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Example• Compute the class average

total = 0counter = 0

while grades[counter] >=0:total = total + grades[counter]counter = counter+1

if counter > 0:average = total/counterprint average

else:print 'no grades were entered'

Page 15: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Course Objectives Able to read, understand, modify, and assemble programs that achieve useful communication tasks: Text manipulation, Image manipulation

Learn what computer science is about, especially data representations, algorithms, encodings, forms of programming.

Learn to articulate a process

Page 16: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Textbook Bryson Payne

“Teach Your Kids to Code,” 2015, No Starch Press

Reference Allen B. Downey

http://greenteapress.com/thinkpython/html/index.html

Why Python ? Easy to learn Flexible Popular – used for Google web search engine Not very efficient http://www.python.org It’s used by companies like Google, Industrial Light & Magic, Nextel, and others

Page 17: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Other Programming Languages• Python

• C

• Java

• Scheme

def hello(): print “Hello World!”

#include <stdio.h>void main(){ printf”Hello World !\n”);}

class HelloWorld { static public void main(String args[]){ System.out.println(“Hello World !”); }}

(define helloworld (lambda ()

(display “Hello World !”)(newline)))

Page 18: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

What is Computer Science about ? Computer science is the study of recipes (algorithms)

Computer scientists study…

How the recipes are written (algorithms, software engineering)

The units used in the recipes (data structures, databases)

What can recipes be written for (systems, intelligent systems, theory)

How well the recipes work (human-computer interfaces)

Page 19: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Key concept: The COMPUTER does the recipe! Make it as hard, tedious, complex as you want!

Crank through a million genomes? No problem!

Find one person in a 30,000 campus? Yawn!

Process a million dots on the screen or a bazillion sound samples? That’s media computation

Page 20: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Specialized Recipes

Some people specialize in crepes or barbeque

Computer scientists can also specialize on special kinds of recipes Recipes that create pictures, sounds, movies, animations (graphics, computer music)

Still others look at emergent properties of computer “recipes” What happens when lots of recipes talk to one another (networking, non-linear systems)

Page 21: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

A Recipe is a Statement of Process A recipe defines how something is done In a programming language that defines how the recipe is written

When you learn the recipe that implements a Photoshop filter, you learn how Photoshop does what it does.

And that is powerful.

Page 22: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

Finally: Programming is aboutCommunicating Process A program is the most concise statement possible to communicate a process That’s why it’s important to scientists and others who want to specify how to do something understandably in as few words as possible

Page 23: 91.100 Media Computing Instructor Byung Kim kim@cs.uml.edu Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment

What takes to code ?

Capability of manipulating a computer Need to understand what tools there are

Need to have a clear goal (objective) Need to specify steps to achieve the goal

Recognize Mental Differences http://www.youtube.com/watch?v=9CEr2GfGilw