Download CS1315: Introduction to Media Computation

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
COMP.1000 Media Computing
• Instructor
• Byung Kim
• [email protected]
• Olsen 231
• Office hours – MWF 8:00-9:00 AM
and by appointment
Class website

www.cs.uml.edu/~kim/100.html

This is where you’ll find everything about the class
 Syllabus
 Homeworks/Projects/Labs
 Announcements (You are responsible for these!!)
Course Objectives
• Not about how to use MS Word, Photoshop, etc.
• You DO computer programming
• A general introduction to computer science,
programming (coding), and problem solving
Computers and Algorithms are
Everywhere!
https://en.wikipedia.org/wiki/ENIAC
Airline
booking
Google search
Stock market trading
Amazon preferences
etc.
Main Course Objective
• “problem solving” -- to automate a problem
• Given a problem
• How to design a solution in English
• Problem analysis & solution formulation
• Coding the English solution in Python
• Mechanical tools available
Terminology
• Problem solving – a high-level strategy
• how do we think through problems
• develop instructions (strategies) to solve problems in baby
steps
• Programming – mechanical coding of the strategy
• how do we tell computers how to solve problems
• how can we express our ideas to computers
Example: Bake an apple pie

A recipe

Ingredients

Baking steps
What is Computer Science?

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)
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
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)
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.
What do we learn in this class?

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
What do we learn in this class?

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

=> Learn about ourselves
Example: Compute a class average
• Liberal Arts Level
Add grades and divide by the number of students
• What more do we need
• Data
• Process/procedure
• Output
Example: Compute a class average
• Computer Science Design Level
Initialize total to zero
Initialize counter to zero
Get the first grade
while not the end of grades
add this grade into the running total
add one to the grade counter
input the next grade
if the counter is not equal to zero
computer total divided by the counter
print the average
else
print 'no grades were entered'
Example: Compute a class average
• Computer Science Coding Level
total = 0
counter = 0
while grades[counter] >=0:
total = total + grades[counter]
counter = counter+1
if counter > 0:
average = total/counter
print average
else:
print 'no grades were entered'
Design vs. Coding Level
Initialize total to zero
Initialize counter to zero
total = 0
counter = 0
Input the first grade
while grades[counter] >=0:
while not the end of grades
total = total + grades[counter]
add this grade into the running total
counter = counter+1
add one to the grade counter
input the next grade
if counter > 0:
if the counter is not equal to zero
average = total/counter
computer total divided by the
print average
counter
else:
print the average
print 'no grades were entered'
else
print 'no grades were entered'
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 of problem solving
Example: Counting Dots
Another Strategy?
Picture Example

I have a Santa picture
Picture Example

I have a Santa picture

And, I want its negative
Problem Solving
 Articulation
 Simplification
 Generalization
Textbook

Al Sweigart


Reference



“Automate the Boring Stuff with Python,” 2015, No Starch Press
Help in Python IDLE
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
Other Programming Languages
• Python
def hello():
print “Hello World!”
• C
• Java
#include <stdio.h>
void main(){
printf”Hello World !\n”);
}
class HelloWorld {
static public void main(String args[]){
System.out.println(“Hello World !”);
}
}
• Scheme
(define helloworld
(lambda ()
(display “Hello World !”)
(newline)))
Course Grading
• HW/Program assignments and Projects (40%)
• Two in-class tests (30%)
• In-class work (Labs) and other assignments (30%)
HW 1
• Read pages 1 through 22
• Download and install Python (page 6)