CS 106A, Lecture 1
CS 106A, Lecture 1
CS 106A, Lecture 1
106A, Lecture 1
Welcome to CS 106A!
suggested reading:
Course Information handout
Karel, Ch. 1-2
This document is copyright (C) Stanford Computer Science and Marty Stepp, licensed under Creative Commons Attribution 2.5 License. All rights reserved.
Based on slides created by Keith Schwarz, Mehran Sahami, Eric Roberts, Stuart Reges, and others.
Plan For Today
•Introduction
•Course Policies
•Meet Karel the Robot
2
Plan For Today
•Introduction
•Course Policies
•Meet Karel the Robot
3
What is Computer Science?
• The art of using computing to solve complex problems.
– Specify instructions that computers execute, usually in a programming
language
• Applicable to art, medicine, mathematics, philosophy, and more
• Touches many aspects of our daily lives
4
Computing is Everywhere
• > 3.5B users of the internet (internetlivestats.com)
• 39% owned a smartphone in 2016 (strategyanalytics.com)
• A computer recently defeated the world-champion Go player
• Machine translation has taken dramatic leaps in the past year
5
What is CS 106A?
• Programming Methodology
– Focusing on computational problem solving, not syntax
– Uses the Java programming language
– No former programming experience required!
• Topics include:
– Karel the Robot
– Text-based programs
– Graphics and animation
– Games
– And more…
6
Course Website
cs106a.stanford.edu
7
Nice to meet you!
8
Section Leaders
• Helpful undergraduate assistants who will:
– run your discussion section each week
– grade your homework assignments and exams
– help you when you have questions
– ... and much more
9
Nice to meet you!
10
Nice to meet you!
11
Plan For Today
•Introduction
•Course Policies
•Meet Karel the Robot
12
Units
13
Course Website
cs106a.stanford.edu
14
Textbooks
• Karel the Robot Learns Java, coursereader (35 pages)
– used this and next week as we introduce coding
– usable on open-book (closed-note) exams
– Free PDF available online
15
Grading
****** 45% Programming assignments
* 10% Section Participation
** 15% Midterm Exam
**** 30% Final Exam
16
Grading
****** 45% Programming assignments
* 10% Section Participation
** 15% Midterm Exam
**** 30% Final Exam
17
Programming Assignments
• 6 programming assignments (some individual, some in pairs),
completed using Eclipse
• Free software, available on
course website
• Homework: set up Eclipse!
• Come to LaIR this Wed. 7-
11PM for troubleshooting
19
The Bucket System
20
The Bucket System
21
The Bucket System
22
The Bucket System
23
The Bucket System
++ Absolutely fantastic submission (very rare)
+ Exceeds expectations; often reflects additional work
√+ Well done; satisfies all assignment requirements
√ satisfactory; meets requirements, maybe a few issues
√- Problems serious enough to fall short of assignment requirements
- Extremely serious problems, a little effort and understanding
24
The Bucket System
++ Absolutely fantastic submission (very rare)
+ Exceeds expectations; often reflects additional work
√+ Well done; satisfies all assignment requirements
√ satisfactory; meets requirements, maybe a few issues
√- Problems serious enough to fall short of assignment requirements
- Extremely serious problems, a little effort and understanding
-- Little effort
25
The Bucket System
++ Absolutely fantastic submission (very rare)
+ Exceeds expectations; often reflects additional work
√+ Well done; satisfies all assignment requirements
√ satisfactory; meets requirements, maybe a few issues
√- Problems serious enough to fall short of assignment requirements
- Extremely serious problems, a little effort and understanding
-- Little effort
0 No submission
26
Getting Help
• Visit the SLs in the LaIR (1st floor of Tresidder Union)
– open Sun-Wed, 7PM – 11PM, starting this Wednesday
– staffed with multiple section leaders to answer questions
27
2 Minds are Better Than 1
• Some assignments may optionally be done in pairs
• Both partners receive the same grade
• A chance to brainstorm ideas and work with another programmer
• MUST be in the same section!
• More info in handout #1 and on the course website
28
Interactive Grading
• For each assignment (except for the last), you will get feedback via
an Interactive Grading (IG) session, scheduled with your section
leader.
• Go over assignment feedback, strengths, things to improve
29
Late Days
• Start out with 3 “free late days”: each late day allows you to submit
an assignment 24 hours late without penalty.
• Hard deadline 48 hours after original due date
• 1-bucket deduction per day late after late days are exhausted
• Pair late days are assessed individually
• ”Pre-granted extensions” – additional extensions granted only in
very special circumstances. Head TA must approve extensions.
30
Grading
****** 45% Programming assignments
* 10% Section Participation
** 15% Midterm Exam
**** 30% Final Exam
31
Discussion Sections
• Weekly 50-minute sections led by your section leader
• Go over lecture material, do practice problems, answer
questions
• Graded on section attendance + participation (+IG
attendance)
• Homework: sign up for section on the course website!
32
Grading
****** 45% Programming assignments
* 10% Section Participation
** 15% Midterm Exam
**** 30% Final Exam
33
Exams
• Midterm exam – Monday, July 24th, 7-9PM
– Contact me by July 17 if you have an academic or University
conflict
• Final exam – Friday, August 18th, 12:15-3:15PM
– No alternate final! You MUST be able to take the final exam
at the scheduled time.
34
Grading
****** 45% Programming assignments
* 10% Section Participation
** 15% Midterm Exam
**** 30% Final Exam
35
Stanford Honor Code
• The Honor Code is an undertaking of the students, individually and collectively:
– that they will not give or receive aid in examinations; that they will not give or receive
unpermitted aid in class work, in the preparation of reports, or in any other work that
is to be used by the instructor as the basis of grading;
– that they will do their share and take an active part in seeing to it that others as well as
themselves uphold the spirit and letter of the Honor Code.
• The faculty on its part manifests its confidence in the honor of its students by refraining
from proctoring examinations and from taking unusual and unreasonable precautions to
prevent the forms of dishonesty mentioned above. The faculty will also avoid, as far as
practicable, academic procedures that create temptations to violate the Honor Code.
• While the faculty alone has the right and obligation to set academic requirements, the
students and faculty will work together to establish optimal conditions for honorable
academic work.
38
Meet Karel the Robot!
39
Meet Karel the Robot!
Hello, world!
40
Programming languages
• procedural languages: programs are a series of commands
– Pascal (1970): designed for education
– C (1972): low-level operating systems and devices
41
Karel's World
3
. . . . .
2
. . . . .
1
. . . . .
1 2 3 4 5
42
Karel's World
3
. . . . .
2
. . . . .
1
. . . . .
1 2 3 4 5
43
Karel's World
3
. . . . .
2
. . . . .
1
. . .
Hello, world!
. .
1 2 3 4 5
44
Karel's World
3
. . . . .
2
. . . . .
1
. . . . .
1 2 3 4 5
45
Streets (rows)
3
. . . . .
2
. . . . .
1
. . . . .
Each row is called a
1 2 3 4 5 street.
46
Avenues (columns)
3
. . . . .
2
. . . . .
1
. . . . .
1 2 3 4 5
47
Corners (locations)
3
. . . . .
2
. . . . .
1
. . . . .
The intersection of a street
and an avenue is a corner.
1 2 3 4 5
48
Walls
3
. . . . .
2
. . . . .
1
. . . . .
1 2 3 4 5
Karel cannot
move through
walls.
49
Beepers
3
. . . . .
2
. . . . .
1
. . . . . Beepers mark
locations in Karel's
world. Karel can
1 2 3 4 5 pick them up and
put them down.
50
Wrap-up
•Introduction √
•Course Policies √
•Meet Karel the Robot √
51