Thisdocumentiscopyright(C)StanfordComputerScienceandMartyStepp,licensedunderCreativeCommonsAttribution2.5License.Allrightsreserved.BasedonslidescreatedbyKeithSchwarz,MehranSahami,EricRoberts,StuartReges,andothers.
CS106A,Lecture1WelcometoCS106A!
suggestedreading:CourseInformationhandout
Karel,Ch.1-2
2
Plan For Today•Introduction•CoursePolicies•MeetKareltheRobot
3
Plan For Today•Introduction•CoursePolicies•MeetKareltheRobot
4
What is Computer Science?• Theartofusingcomputingtosolvecomplexproblems.
– Specifyinstructions thatcomputersexecute,usuallyinaprogramminglanguage
• Applicabletoart,medicine,mathematics,philosophy,andmore• Touchesmanyaspectsofourdailylives
5
Computing is Everywhere• >3.5Busersoftheinternet(internetlivestats.com)• 39%ownedasmartphonein2016(strategyanalytics.com)• Acomputerrecentlydefeatedtheworld-championGoplayer• Machinetranslationhastakendramaticleapsinthepastyear
6
What is CS 106A?• ProgrammingMethodology
– Focusingoncomputationalproblemsolving,notsyntax– UsestheJava programminglanguage– Noformerprogrammingexperiencerequired!
• Topicsinclude:– KareltheRobot– Text-basedprograms– Graphicsandanimation– Games– Andmore…
7
Course Website
cs106a.stanford.edu
8
Nice to meet you!
9
Section Leaders• Helpfulundergraduateassistantswhowill:
– runyourdiscussionsectioneachweek– gradeyourhomeworkassignmentsandexams– helpyouwhenyouhavequestions– ...andmuchmore
10
Nice to meet you!
11
Nice to meet you!
12
Plan For Today•Introduction•CoursePolicies•MeetKareltheRobot
13
Units
Matriculated Stanford grad?
14
Course Website
cs106a.stanford.edu
15
Textbooks• KareltheRobotLearnsJava,coursereader (35pages)
– usedthisandnextweekasweintroducecoding– usableonopen-book(closed-note)exams– FreePDFavailableonline
• TheArt&ScienceofJava,byEricRoberts– writtenhereatStanford;tailoredtothiscourse;avaluablereference– usableonopen-book(closed-note)exams– availableonreserveatlibrary
16
Grading****** 45% Programmingassignments* 10% SectionParticipation** 15% MidtermExam**** 30% FinalExam
17
Grading****** 45% Programmingassignments* 10% SectionParticipation** 15% MidtermExam**** 30% FinalExam
18
Programming Assignments• 6 programmingassignments(someindividual,someinpairs),completedusingEclipse
• gradedonfunctionality (behavior)andstyle (elegance)– Interactivegradingsessionsforeveryassignment– gradingscaleisdividedinto"buckets”
• Freesoftware,availableoncoursewebsite
• Homework: setupEclipse!• CometoLaIR thisWed.7-11PM fortroubleshooting
19
The Bucket System
√ satisfactory;meetsrequirements,maybeafewissues
20
The Bucket System
√+ Welldone;satisfiesallassignmentrequirements√ satisfactory;meetsrequirements,maybeafewissues
21
The Bucket System
√+ Welldone;satisfiesallassignmentrequirements√ satisfactory;meetsrequirements,maybeafewissues√- Problemsseriousenoughtofallshortofassignmentrequirements
22
The Bucket System
+ Exceedsexpectations;oftenreflectsadditionalwork√+ Welldone;satisfiesallassignmentrequirements√ satisfactory;meetsrequirements,maybeafewissues√- Problemsseriousenoughtofallshortofassignmentrequirements
23
The Bucket System
+ Exceedsexpectations;oftenreflectsadditionalwork√+ Welldone;satisfiesallassignmentrequirements√ satisfactory;meetsrequirements,maybeafewissues√- Problemsseriousenoughtofallshortofassignmentrequirements- Extremelyseriousproblems,alittleeffortandunderstanding
24
The Bucket System++ Absolutelyfantasticsubmission(veryrare)+ Exceedsexpectations;oftenreflectsadditionalwork√+ Welldone;satisfiesallassignmentrequirements√ satisfactory;meetsrequirements,maybeafewissues√- Problemsseriousenoughtofallshortofassignmentrequirements- Extremelyseriousproblems,alittleeffortandunderstanding
25
The Bucket System++ Absolutelyfantasticsubmission(veryrare)+ Exceedsexpectations;oftenreflectsadditionalwork√+ Welldone;satisfiesallassignmentrequirements√ satisfactory;meetsrequirements,maybeafewissues√- Problemsseriousenoughtofallshortofassignmentrequirements- Extremelyseriousproblems,alittleeffortandunderstanding-- Littleeffort
26
The Bucket System++ Absolutelyfantasticsubmission(veryrare)+ Exceedsexpectations;oftenreflectsadditionalwork√+ Welldone;satisfiesallassignmentrequirements√ satisfactory;meetsrequirements,maybeafewissues√- Problemsseriousenoughtofallshortofassignmentrequirements- Extremelyseriousproblems,alittleeffortandunderstanding-- Littleeffort0 Nosubmission
27
Getting Help• VisittheSLsintheLaIR (1stfloorofTresidder Union)
– openSun-Wed,7PM– 11PM,startingthisWednesday– staffedwithmultiplesectionleaderstoanswerquestions
• otherhelpresources:– instructorofficehours– headTAofficehours– emailSL,TA,instructor
• EclipsetroubleshootingsessionWednesday6/287-11PM@LaIR
28
2 Minds are Better Than 1• Someassignmentsmayoptionallybedoneinpairs• Bothpartnersreceivethesamegrade• Achancetobrainstormideasandworkwithanotherprogrammer• MUSTbeinthesamesection!• Moreinfoinhandout#1andonthecoursewebsite
29
Interactive Grading• Foreachassignment(exceptforthelast),youwillgetfeedbackviaanInteractiveGrading (IG)session,scheduledwithyoursectionleader.
• Gooverassignmentfeedback,strengths,thingstoimprove
30
Late Days• Startoutwith3“freelatedays”:eachlatedayallowsyoutosubmitanassignment24hourslatewithoutpenalty.
• Harddeadline48hoursafteroriginalduedate• 1-bucketdeductionperdaylateafterlatedaysareexhausted• Pairlatedaysareassessedindividually• ”Pre-grantedextensions”– additionalextensionsgrantedonlyinveryspecialcircumstances.HeadTAmustapproveextensions.
31
Grading****** 45% Programmingassignments* 10% SectionParticipation** 15% MidtermExam**** 30% FinalExam
32
Discussion Sections•Weekly50-minutesectionsledbyyoursectionleader•Gooverlecturematerial,dopracticeproblems,answerquestions
•Gradedonsectionattendance+participation(+IGattendance)
•Homework:signupforsectiononthecoursewebsite!
33
Grading****** 45% Programmingassignments* 10% SectionParticipation** 15% MidtermExam**** 30% FinalExam
34
Exams•Midtermexam– Monday,July24th,7-9PM
– ContactmebyJuly17 ifyouhaveanacademicorUniversityconflict
• Finalexam – Friday,August18th,12:15-3:15PM– Noalternatefinal!YouMUST beabletotakethefinalexamatthescheduledtime.
• Bothexamsareopen-book,closed-notes,closed-electronic-device.Youwillbeprovidedwithasyntaxreferencesheet.
35
Grading****** 45% Programmingassignments* 10% SectionParticipation** 15% MidtermExam**** 30% FinalExam
36
Stanford Honor Code• TheHonorCode isanundertakingofthestudents,individuallyandcollectively:
– thattheywillnotgiveorreceiveaidinexaminations;thattheywillnotgiveorreceiveunpermittedaidinclasswork,inthepreparationofreports,orinanyotherworkthatistobeusedbytheinstructorasthebasisofgrading;
– thattheywilldotheirshareandtakeanactivepartinseeingtoitthatothersaswellasthemselvesupholdthespiritandletteroftheHonorCode.
• Thefacultyonitspartmanifestsitsconfidenceinthehonorofitsstudentsbyrefrainingfromproctoringexaminationsandfromtakingunusualandunreasonableprecautionstopreventtheformsofdishonestymentionedabove.Thefacultywillalsoavoid,asfaraspracticable,academicproceduresthatcreatetemptationstoviolatetheHonorCode.
• Whilethefacultyalonehastherightandobligationtosetacademicrequirements,thestudentsandfacultywillworktogethertoestablishoptimalconditionsforhonorableacademicwork.
seealso:http://honorcode.stanford.edu/
37
Honor Code and CS 106A• Pleasehelpusensureacademicintegrity:
– IndicateanyassistancereceivedonHW(books,websites,friends).– Donotlookatotherpeople'ssolutioncode(outsideofyourpair).– Donotgiveyoursolutioncodetoothers,orpostitontheweb.– Reportanyinappropriateactivityyouseeperformedbyothers.
• Assignmentsarecheckedregularlyforsimilaritywithhelpofsoftwaretools.
• Ifyourealizethatyouhavemadeamistake,youmayretractyoursubmissiontoanyassignmentatanytime,noquestionsasked.
• Ifyouneedhelp,pleasecontactusandwewillhelpyou.– WedonotwantyoutofeelanypressuretoviolatetheHonorCodeinordertosucceedinthiscourse.
38
Plan For Today•Introduction•CoursePolicies•MeetKareltheRobot
39
Meet Karel the Robot!
40
Meet Karel the Robot!
Hello, world!
41
Programming languages• procedurallanguages:programsareaseriesofcommands
– Pascal (1970): designedforeducation
– C (1972): low-leveloperatingsystemsanddevices
• functionalprogramming:functionsmapinputstooutputs– Lisp (1958)/Scheme (1975),ML (1973),Haskell (1990)
• object-orientedlanguages:programsuseinteracting"objects"
– Smalltalk (1980):firstmajorobject-orientedlanguage
– C++ (1985): "object-oriented"improvementstoC• successfulinindustry;usedtobuildOSessuchasWindows
– Java (1995): designedforembeddedsystems,webapps• Runsonmanyplatforms(Windows,Mac,Linux,cellphones...)• Thelanguagetaughtinthiscourseandourtextbook
42
Karel's World
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5
43
Karel's World
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5
44
Karel's World
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5
Hello, world!
45
Karel's World
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5
46
Streets (rows)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5Each row is called a
street.
47
Avenues (columns)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5
Each column is called an avenue.
48
Corners (locations)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5
The intersection of a street and an avenue is a corner.
49
Walls
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5Karel cannot move through
walls.
50
Beepers
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
2
3
1 2 3 4 5
Beepers mark locations in Karel's world. Karel canpick them up andput them down.
51
Wrap-up•Introduction√•CoursePolicies√•MeetKareltheRobot√
Nexttime:moreprogrammingwithKarel!
Top Related