1 class motto: what’s this button for?. 2 cmsc104 problem solving and computer programming section...

49
1 Class motto: What’s this button for?

Upload: sabrina-cobb

Post on 29-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

1

Class motto:What’s this button for?

Page 2: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

2

CMSC104

Problem Solving and Computer Programming

Section 4, Spring 2012

Prof. Richard Chang

Page 3: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

3

Contact Information

Email: [email protected]

Office hours:ITE 326Tues & Thurs: 2:00 – 3:00pm

Page 4: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

4

Am I in the Right Class?

CMSC 104 Assumes NO programming experience Prepares you for CMSC 201 Does NOT count towards the CS major Meets a requirement for other majors: i.e. Biology,

Physics, Financial Economics

CMSC 201 Assumes some programming experience First CMSC course for CS majors More challenging

Page 5: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

CMSC100 vs CMSC104

CMSC100: less technical, less programming, more overview of computer science.

CMSC104: concentrates on programming, you have to learn programming to pass this class.

5

Page 6: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

6

This is an ELECTIVE class

Main Objective:

Learn Programming in C

Strategy:

Classwork Homework 1 ⇒

⇒ Homework 2 Quiz Final ⇒ ⇒

Page 7: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

7

Command Line Interface

Basic use of an operating system (Linux)

a text editor

Page 8: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

8

Levels of Programming

typing: copy a program verbatim

coding: convert high-level solution (pseudo-code?) into syntactically correct program

design: producing a high-level solution to original problem

debugging: oops!

Page 9: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

9

Debugging

bugs: mistakes in your program

debugging: removing bugs

Almost no one writes bug-free programs on the first attempt

Programming is mostly recovering from a series of bugs

Be resilient!

Page 10: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

10

Course Web Page

Location: http://umbc.edu/~chang/cs104

Announcements

Course Syllabus

Homework Assignments

Powerpoint? I hate Powerpoint

Page 11: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

11

Why do I hate Powerpoint?

The next slide

never has

what I want to say.

Page 12: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

12

Why do I hate Powerpoint?

Besides,

I’m not going to just stand up here

and

read the slides to you verbatim.

Page 13: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

13

Grading

• 14 Classwork: 14%, 1% each

• 13 Homework: 26%, 2% each

• 5 Quizzes: 30%, 6% each

• 1 Final Exam: 30%

Page 14: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

14

No Late Homework

• Assigned on Tuesday

• Due next Tuesday, 11:59pm

• 2 class meetings to ask questions

Page 15: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

15

How hard is the homework?

• 10 minutes for C programmer

• 30-60 min for “good” student

• ??? for “less good” student

Page 16: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

16

Classwork

• Must be done in class

• Can “finish up” by next class for 10% improvement

• Miss class miss classwork⇒

Page 17: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

17

Extra Credit

• Must be “mostly” correct

• Can only replace classwork and homework scores

• 110% HW+CW & 80% Quiz+Final = 100% x 40 + 80% x 60 = 40 + 48 = 88 = B

not = 110% x 40 + 80% x 60 = 44 + 48 = 92 = A

Page 18: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

18

Do No Classwork?

Classwork 0% x 14 = 0

Homework 100% x 26 = 26

Quizzes 100% x 30 = 30

Final Exam 100% x 30 = 30

Total = 86= B

Page 19: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

19

“Outsource” Homework?

Classwork 100% x 14 = 14

Homework 100% x 26 = 26

Quizzes 50% x 30 = 15

Final Exam 50% x 30 = 15

Total = 70= C

Page 20: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

20

Fall 2011 Grade Distribution

• 8 A’s

• 8 B’s

• 9 C’s

• 2 D’s

• 7 F’s (includes 3 final exam no shows)

Page 21: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

21

Academic Integrity

• Do your own work= nice, hard-working, diligent student

• Do no work= lazy / over-committed / forgetful student

• Cheat= pond scum

Page 22: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

22

Allowed

• Help from Help Center & instructor

• Help from other sources (incl. classmates)

• Discuss assignment

• Identify syntax errors

• Identify simple logic errors

Page 23: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

23

Not Allowed (not exhaustive)

• Someone else typing code in your program

• Cut & paste more than 1 line of code

• Looking at someone else’s program while typing in your code

• Receive someone else’s program by email, text message, hard copy, …

• Send program to another student …

Page 24: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

24

General Philosophy

This policy recognizes that students can learn productively from many sources including from other students in the class.

Thus, this policy allows small amounts of help but prohibits outright copying.

Although, this leaves a gray area between "small amounts of help" and "outright copying", it is better that we live with some ambiguity than to have a clear-cut policy that deprives the students of productive learning opportunities.

Students who have doubts about the propriety of an activity should consult the instructor.

Page 25: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

25

Academic Integrity

• Do your own work= nice, hard-working, diligent student

• Do no work= lazy / over-committed / forgetful student

• Cheat= pond scum

Page 26: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

26

Scenario #1

Classmate: “My program won’t compile. It says ‘missing semi-colon’ !”

Page 27: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

27

Scenario #1

Classmate: “My program won’t compile! It says ‘missing semi-colon’ !”

OK to help point out location of missing semi-colon. (Yes, you can look at his/her program to find it.)

Page 28: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

28

Scenario #2

Classmate: “Why won’t this print statement execute??? #@!#$!# !”

Page 29: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

29

Scenario #2

Classmate: “Why won’t this print statement execute??? #@!#$!# !”

OK to look at his/her program to help find logic error.

NOT OK to tell him/her how to rewrite the program.

Page 30: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

30

Scenario #3

Classmate: “I don’t know how to get started on this homework. Can I see what you did?”

Page 31: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

31

Scenario #3

Classmate: “I don’t know how to get started on this homework. Can I see what you did?”

NOT OK to show him your program.

“Good thing you started the program when it was assigned. Ask Chang in class tomorrow, he’ll give us some hints.”

Page 32: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

32

Cheat “legally”??

How can one student show his completed program to another student “legally”??

Still won’t learn much, still pond scum.

Page 33: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

33

This is an ELECTIVE class

Manage your own learning experience!

Remember:

Classwork Homework 1 ⇒

⇒ Homework 2 Quiz Final ⇒ ⇒

Page 34: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

34

“Outsource” Homework?

Classwork 100% x 14 = 14

Homework 100% x 26 = 26

Quizzes 50% x 30 = 15

Final Exam 50% x 30 = 15

Total = 70= C

Page 35: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

35

Scenario #4

It is one hour before homework is due.

You can’t get homework finished in time.

Page 36: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

36

Scenario #4

It is one hour before homework is due.

You can’t get homework finished in time.

NOT OK to have your CS major boyfriend/girlfriend/roommate/parent/sibling do it for you in 10 minutes.

Page 37: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

37

Scenario #4

It is one hour before homework is due.

You can’t get homework finished in time.

•You won’t die, HW is only 2%.

•Do as much as you can in one hour and submit it for partial credit.

•Start on next week’s HW so this won’t happen again.

•Do extra credit to make up the points.

Page 38: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

38

Academic Integrity

• Do your own work= nice, hard-working, diligent student

• Do no work= lazy / over-committed / forgetful student= at least he/she didn’t CHEAT!

• Cheat= pond scum

Page 39: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

39

How to make this class harder

• Skip class

• Come to class but spend the whole time checking email, facebook, shopping, ...

• Come to class late all the time

• Come to class, don’t ask any questions

• Ignore the textbook

• Wait until the last minute to start HW

Page 40: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

40

Computer Science at UMBC

CSEE Student Services Office (Advising)

ITE 203 - 206

CSHC (Computer Science Help Center)

ITE 201E

Linux Users Group (LUG)

http://lug.umbc.edu

Page 41: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

41

DoIT Labs

The Dept of Information Technology is responsible for all lab computers.

On Web at: http://www.umbc.edu/doit Labs with PCs:

ENG021, ENG104, ENG122, ENG122A, ENG333

Labs may be on reserve for classes, so plan ahead! Print Dispatch -- ENG 019 (10? cents/page) Hours of Operations

DoIT will post outside of labs or go to:https://wiki.umbc.edu/display/doit/Computing+Labs+and+Facilities

Page 42: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

42

Consultants vs. Tutors

OIT labs are staffed by consultantsusing software (pine, Internet

Explorer, etc.)some text editors (xemacs)operating system commands (Linux)communicating with UMBC

computers (TeraTerm)

Page 43: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

43

Consultants vs. Tutors (con’t)

CSHC is staffed by student tutors Help with homework and projects xemacs and Linux questions ITE 201E – Hours TBA

Page 44: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

44

Hardware and Software Needs

Do I need my own computer?

No, but it is more convenient for you.

If I have my own computer, can I use it?

Yes, but there’s limited help for using your own.

Do I need a C Compiler?

Don’t buy one, the GNU C compiler is free.

Page 45: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

45

Windows: TeraTerm (from OIT), WinSCP, NotePad++

Mac: Developer Tools (free), Terminal + Unix commands, TextWrangler

Linux: Installation is on your own

More later...

Hardware and Software Needs

Page 46: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

46

Class motto:What’s this button for?

Page 47: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

47

Getting a myUMBC Account

You MUST have a myUMBC account

You can get one by going to:

http://accounts.umbc.edu (NO www.)

Your account can be used in ~½ hour

Grades, etc.

Page 48: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

Booting into Linux

Modify instructions posted on the walls:

press CTRL-ALT-DEL

select “Restart” from pop-up menu next to the shutdown button on bottom right

select “Linux” using arrow key

log in using usual password48

Page 49: 1 Class motto: What’s this button for?. 2 CMSC104 Problem Solving and Computer Programming Section 4, Spring 2012 Prof. Richard Chang

Reduce Firefox Cache Size

You have a disk quota of 100MB.

Set Firefox cache size to be 5-10MB.

49