comp 14 – 02: introduction to programming andrew leaver-fay august 31, 2005 monday/wednesday...

46
COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 August 31, 2005 Monday/Wednesday 3-4:15 pm Monday/Wednesday 3-4:15 pm Peabody 217 Peabody 217 Friday 3-3:50pm Friday 3-3:50pm Peabody 217 Peabody 217

Post on 22-Dec-2015

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

COMP 14 – 02: Introduction to Programming

Andrew Leaver-FayAugust 31, 2005August 31, 2005

Monday/Wednesday 3-4:15 pmMonday/Wednesday 3-4:15 pmPeabody 217Peabody 217

Friday 3-3:50pmFriday 3-3:50pmPeabody 217Peabody 217

Page 2: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

About Me

• UNC graduate student– 5th year Ph.D. student– Undergrad: University of Virginia

• Research interests:– Computational Structural Biology

• Protein design• Protein structure prediction

•http://www.cs.unc.edu/~plato/

Page 3: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

About me

• I like to cook

Page 4: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 5: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 6: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 7: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 8: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 9: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 10: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 11: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 12: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 13: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 14: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 15: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 16: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217
Page 17: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Cooking

pots, stove, ingrediants Chef Recipe

Page 18: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Computing

ResourcesProcessing thing in the

middleProgram

Page 19: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Computing

Hard Drive, Memory,

Graphics Card

Processing thing in the

middleProgram

Page 20: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Computing

Hard Drive, Memory,

Graphics Card

Central Processing

ThingProgram

Page 21: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Computing

Hard Drive, Memory,

Graphics Card

Central Processing

UnitProgram

Page 22: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Cooking

pots, stove, ingrediants Chef Recipe

Page 23: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Cooking

pots, stove, ingrediants Chef Recipe

Recipe Author

Page 24: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Computing

Hard Drive, Memory,

Graphics Card

Central Processing

UnitProgram

Software Engineer

Page 25: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Syllabus

• Learn how to develop algorithms

• Learn the basic components of computer programming– can be applied to any programming language (Java, C++,

etc.)

• Is COMP 14 right for you?

• Requirements / prerequisites– no programming knowledge assumed

Page 26: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Course Web Page

• UNC Blackboard System– http://blackboard.unc.edu

• http://www.cs.unc.edu/~plato/COMP14

• Staff Information• Course Documents• Assignments• Checking Grades

Page 27: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Weekly Schedule

• Lecture– Monday/Wednesday 3-4:15 pm– Peabody 217

• Recitation– Friday 3-3:50pm– Peabody 217

Page 28: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Lecture Format

• Review previous material

• Present new material

• In-class exercises– work in groups

• Lecture notes will be posted online after class

Page 29: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

What’s A Recitation?

• Mini-lab– Extra programming practice– Occasionally in-class assignments will be graded– Answer questions from lecture

• You will work in groups• Each group should always have a laptop and textbook

• No new material will be covered

Page 30: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Textbook

RequiredJava Programming: From Problem Analysis to Program Design D. Malik, P. Nair ISBN: 0-619-06497-8

Page 31: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Software

• jGRASP– on public lab machines

• All Programs / UNC Courseware / COMP 14– you will install on your machine

• see link from Syllabus on web• this Friday's recitation

Page 32: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Computer Labs

• 8 Labs

• Maintained by UNC ITS

• Locations, schedules, and a map on course web site

• You may do homework there (jGRASP is installed on all UNC lab machines)

Page 33: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

COMP 14 Map

Page 34: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Grades

• Programming Assignments 45 %• Homeworks/Quizzes 15 %• Midterm Exam 15 %• Final Exam 20 %• Class Participation 5 %

Page 35: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Assignments

• Assignments are due at 11:59pm on the due date– turn in using Blackboard

• Homework assignments from textbook– practice for exams

• Programming assignments– budget 10-12 hours per program

• design, code, debugging– start early!

Page 36: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Submitting Assignments

• All assignments will be submitted through Blackboard

• All assignments must include the honor code pledge

• Submission Errors– I will email you and give a deadline for re-submitting– Don't change your assignment

• I will look at the file's timestamp to determine if you originally met the deadline

– Not checking your email is not an excuse for missing the deadline

Page 37: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Late Policy• Assignments

– Due at 11:59 on their posted due date.– You have five “late days” to spend over the semester– After you’ve used your late days, no late assignment

will be accepted– After 11:59pm counts as a day late!!

• Exceptions will be made as necessary– Talk to me sooner than later– "I started late and something came up" is not an

acceptable excuse

Page 38: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Exams

• Mid-Term. Monday October 17th in class– Warning: week before fall break

• Final. Friday December 16th at 4pm.– to take the exam at a different time, you must get

permission from your Dean and bring me the blue slip you get from the Dean

Page 39: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Working in the Lab

• Before you open jGRASP and start coding:– read the assignment– think about what the assignment is asking for– review lectures and examples on the topic– write (yes, on paper) your plan for completing the

assignment (i.e., your algorithm)• Talk to me if you’re having trouble at this point

Page 40: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Campus File System Andrew File System (AFS)

• Disk space associated with your Onyen– automatically backed up by UNC

• AFS in the lab– automatically appears as drive H: when you log in

• On your personal machine– you can install the AFS Client– won’t see drive H: unless you’re connected to the network (i.e.,

can access the Internet)

• More information– see External Links on the course Blackboard site

Page 41: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Backup Your Work!

• Backup your work!

• You will lose something at some point– you might have to learn the hard way

• Use your AFS space– use of AFS space is not required, but is recommended

• Search for “backup” in the Windows help

Page 42: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Help!

http://help.unc.eduhttp://help.unc.edu962-HELP962-HELP

• For help on general computer problems, including getting AFS enabled on your laptop or at home

• Also, for free software

Page 43: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Honor Policy

• Don’t cheat!– Every line of code you turn in must be your own.– You can

• talk to each other about the lecture topics• talk about assignment requirements• Hand wave assignment solutions (out loud, or on a

whiteboard)– You should

• do your own assignments -- design and code– You should never

• share code -- it is easy to detect and we will prosecute

• Pledge Form

Page 44: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Send me e-mail

• Put “COMP 14” in subject line

• For example:– COMP 14, I’m lost– COMP 14, This course is too easy

Page 45: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

Homework 0

• Hello World– instructions given Friday

• Due Monday (Sept 5th) at 11:59pm• Write java code and turn it in using Blackboard

Page 46: COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217

This Week's Recitation• Bring your laptop!

• We will install jGRASP and the SDK

• We will discuss “Hello World”

• We will probably finish it during recitation