01_Introduction - Bryn Mawr Computer Science

Transcription

01_Introduction - Bryn Mawr Computer Science
9/4/13 Administrivia CMSC 110: Introduc/on to Compu/ng Fall 2013 Course Website: h=p://www.cs.brynmawr.edu Instructor: CMSC 110 Introduc/on to Compu/ng Jia Tao, Ph.D. ([email protected]) Lectures Grading TA-­‐Support • 
• 
• 
Open Labs (OpMonal) MW 2:30p to 4:00p in Park 338 >20 hrs/week in Park 231 7 Assignments
Exam 1
Exam 2
Total 56% 18% 26% 100% Wed 10:00pm to Noon in Park 231 Office Hours Mondays 4pm-­‐6pm Thursdays 3:45pm-­‐5:45pm Administrivia SoIware Processing 2.X –  Already installed in the CS Lab –  Also available for your own computer @ www.processing.org –  Processing == Java Book Class Lo=ery •  Make sure to sign-­‐in your name. •  If you are not “in” the lofery, indicate that. We will contact you by e-­‐mail as soon as we have confirmaMon from other students. Crea/ve Coding & Genera/ve Art in Processing 2 by Ira Greenberg, Dianna Xu, Deepak Kumar, friendsofEd/APress, 2013. Available at the Campus Bookstore or amazon.com or other vendors. Compu/ng: Your Parent’s View What is Compu/ng? 1 9/4/13 Compu/ng: internet, e-­‐mail, network… hfp://www.alanzeyes.com/2009/02/hdr-­‐photography.html Compu/ng: Entertainment… Compu/ng: Entertainment… Cuhng Edge Computer Science -­‐ Edsger Dijkstra 2 9/4/13 Google’s Autonomous Car •  Nevada made it legal for
autonomous cars to drive on
roads in June 2011
•  California introduced a
similar bill in Aug 2012
Robot Soccer
2011 Jeopardy! Aibo League
•  In February 2011, IBM Watson bested Brad Rufer (biggest all-­‐Mme money winner) and Ken Jennings (longest winning streak) •  IBM is currently applying Watson’s technology to medical diagnosis and legal research Humanoid League
RoboCup International Robotics Competition
http://www.robocup.org/
Bryn Mawr Robot Soccer Team
(Mexico 2012)
Areas in Computer Science Protobytes By Ira Greenberg ArMficial Intelligence RoboMcs OperaMng Systems Computer Networking Human-­‐Computer InteracMon Databases Computer Graphics Computer Security Computer Vision Ubiquitous CompuMng 3 9/4/13 What is Computer Science? Computer science is the study of solving problems using computaMon –  Computers are part of it, but the emphasis is on the problem solving aspect CompuMng is important Computer scienMsts work across disciplines: Geoscience Medicine/Surgery MathemaMcs Biology (bioinformaMcs) Archeology Engineering Chemistry Physics Geology Psychology Sociology CogniMve Science LinguisMcs Art … Huge Growth in CompuMng-­‐Related Jobs CompuMng is Consistently Ranked Among the Best OccupaMons CS-­‐Related Jobs Highlighted in Red CNN’s Top 100 Jobs 2010 (Graphic by Focus.com) The 25 Best Jobs of 2012 #1 Registered Nurse #6 Web Developer #2 Sotware Developer #7 Computer Systems Analyst #3 Pharmacist #8 Physical Therapist #4 Medical Assistant #9 Computer Programmer #5 Database Administrator #10 OccupaMonal Therapist CS Careers Rank Highly In: •  Job saMsfacMon •  Salary •  Work/life balance •  Growth potenMal •  Employment rate •  Work environment Strong Earnings PotenMal Salaries of Bryn Mawr Graduates Computer Science Dept All Science Depts $57,134 $66,667 $120,000 College Average Average Individual Annual Income Office of InsAtuAonal Research, Planning, and Assessment Bryn Mawr College …many different companies … need to hire computer scienMsts. They aren't Med to one parMcular industry. 4 9/4/13 Crea/ve Introduc/on to ^ Compu/ng Compu/ng Visualiza/ons Programming Aesthe/cs & Art Algorithms Processing/
Java Computa/onal Media Algorithms An algorithm is an effecMve method for solving a problem expressed as a finite sequence of instrucMons. For example, Put on shoes let sock right sock let shoe right shoe Programming = Wri/ng Apps Programming is the process of designing, wriMng, tesMng, debugging / troubleshooMng, and maintaining the source code of computer programs. This source code is wrifen in a programming language. Programming Languages Processing Python Lisp int areaOfCircle(int radius){
return PI*radius*radius;
}
def areaOfCircle(radius):
return PI*radius*radius;
(defun areaOfCircle (radius)
(return (* PI radius radius)))
r = 10;
area = areaOfCircle(r);
r = 10
area = areaOfCircle(r)
(setq r 10)
(setq area (areaOfCircle r))
A program int areaOfCircle(int radius){
return PI*radius*radius;
}
r = 10;
area = areaOfCircle(r);
A more interes/ng program... Eye e1, e2, e3, e4, e5; void setup() { size(200, 200); smooth(); noStroke(); e1 = new Eye( 50, 16, 80); e2 = new Eye( 64, 85, 40); e3 = new Eye( 90, 200, 120); e4 = new Eye(150, 44, 40); e5 = new Eye(175, 120, 80); } // setup() void draw() { background(102); e1.update(mouseX, mouseY); e2.update(mouseX, mouseY); e3.update(mouseX, mouseY); e4.update(mouseX, mouseY); e5.update(mouseX, mouseY); e1.display(); e2.display(); e3.display(); e4.display(); e5.display(); } // draw() class Eye { int ex, ey; int size; float angle = 0.0; Eye(int x, int y, int s) { ex = x; ey = y; size = s; } // Eye() void update(int mx, int my) { angle = atan2(my-­‐ey, mx-­‐ex); } // update() void display() { pushMatrix(); translate(ex, ey); fill(255); ellipse(0, 0, size, size); rotate(angle); fill(153); ellipse(size/4, 0, size/2, size/2); popMatrix(); } // display() } // class Eye 5 9/4/13 Our Goal •  Use compuMng to realize works of art •  Explore new metaphors from compuMng: images, animaMon, interacMvity, visualizaMons •  Learn the basics of compuMng •  Have fun doing all of the above! Crea/ve Introduc/on to ^ Compu/ng Compu/ng Visualiza/ons Aesthe/cs & Art Processing/
Java Programming Algorithms Computa/onal Media Shepard Fairey Examples Sample Assignment 6 9/4/13 Abstract Art Summer/me SummerMme, And the livin' is easy Fish are jumpin' And the cofon is high Your daddy's rich And your mamma's good lookin' So hush lifle baby Don't you cry One of these mornings You're going to rise up singing Then you'll spread your wings And you'll take to the sky But Mll that morning There's a'nothing can harm you With daddy and mamma standing by SummerMme, And the livin' is easy Fish are jumpin' And the cofon is high Your daddy's rich And your mamma's good lookin' So hush lifle baby Don't you cry Word Cloud Created using: wordle.net Lyrics by George Gershwin World Cloud President’s Inaugural Addresses Wa
If'j .. .
. became
prize
refuse
rules Iaw think another arms pressure
. Ie ffarts evolution stands
years joined difficult
VIO ence many women decades
nconucePct
clear kingsacrifice
I middle matter
ways
-'"
cause times
let aspirations stand nation " Power"othi""O""''''ios.
military sometimes
,
use h' "teedom a m e r l C a s t i l i e v e n newjustice
live
IS ory
t
"
' .s Wit
'h'In fear,
best
never
lives
eas.
ee.h
t Ird america
k
religion confllctalso wltnOUtinternational action.
secu nty
faith 0 rce now
• weapons
better
time
future questions
••
••
. .
soldiers
. . ..
noral leaders
t;nited confront pi;
recognized right
dignity
necessary· T
h afghanistan understand
CIVI
exist I
longtrue honor nature
intervention engagement a ways every prevent
ff rt
something first men e 0
century practical hope defen d
beongs
face
hard
"U 5 t
J
states
W
Of
one
need
truth
'd
0 a €e
htsn at Ion S
WarS
ke
U man
m u St
Map-­‐based 11/28/2012 41 7 9/4/13 Box Office Earnings Our Goal •  Use compuMng to realize works of art •  Explore new metaphors from compuMng: images, animaMon, interacMvity, visualizaMons •  Learn the basics of compuMng •  Have fun doing all of the above! From: The Ebb and Flow of Movies: Box Office Receipts 1986 — 2008 nyMmes.com February 23, 2008 Administrivia SoIware Let’s get started… Processing 2.X –  Already installed in the CS Lab –  Also available for your own computer @ www.processing.org –  Processing == Java Book Crea/ve Coding & Genera/ve Art in Processing 2 by Ira Greenberg, Dianna Xu, Deepak Kumar, friendsofEd/APress, 2013. Available at the Campus Bookstore or amazon.com or other vendors. Homework •  Go the CS Computer Lab (Room 231 PSB) •  Log in •  Start the Processing applicaMon (Make sure it is Version 2.x) •  In a web browser, go to the Tutorials secMon of processing.org hfp://www.processing.org/tutorials/gehngstarted/ •  Read the Gehng Started tutorial (by Casey Reas & Ben Fry) and try out the two examples of simple Processing programs presented there •  If you’d like, install Processing 2.x on your own computer •  Read Chapter 1 (Read pages 1-­‐12, skim 12-­‐32) 8