cs100: studio 0 - brown universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. ·...

11
CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first CS100 studio! During this studio, you will take care of various administrative necessities, to get you ready for an exciting and productive semester. For example, you will begin by signing the course Collaboration Policy. You will also get started with Markdown, a tool for creating documents that can be converted into web pages, pdfs, etc… You will complete most studios in a computer lab in the CIT, with your fellow classmates. For this studio only, you can/should do most of your work independently, and then visit the CS100 TAs during office hours to introduce yourselves to them, and get credit for completing this studio. They can also help you with the various studio tasks, as necessary. To find out when TA hours are held each week, you can check the TA hours here. This week (only), the TAs will be holding extra hours on Monday, so you will have plenty of opportunities to stop by. Objectives By the end of this studio, you will have:

Upload: others

Post on 20-Jan-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

CS100:Studio0Welcome!September4,2019

Instructions:WelcometoyourfirstCS100studio!Duringthisstudio,youwilltake

careofvariousadministrativenecessities,togetyoureadyforan

excitingandproductivesemester.Forexample,youwillbeginby

signingthecourseCollaborationPolicy.Youwillalsogetstartedwith

Markdown,atoolforcreatingdocumentsthatcanbeconvertedinto

webpages,pdfs,etc…

YouwillcompletemoststudiosinacomputerlabintheCIT,withyour

fellowclassmates.Forthisstudioonly,youcan/shoulddomostofyour

workindependently,andthenvisittheCS100TAsduringofficehoursto

introduceyourselvestothem,andgetcreditforcompletingthisstudio.

Theycanalsohelpyouwiththevariousstudiotasks,asnecessary.

TofindoutwhenTAhoursareheldeachweek,youcanchecktheTA

hourshere.Thisweek(only),theTAswillbeholdingextrahourson

Monday,soyouwillhaveplentyofopportunitiestostopby.

ObjectivesBytheendofthisstudio,youwillhave:

Page 2: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

ReadandsignedacopyofthecourseCollaborationPolicy

JoinedthecourseonPiazza

Learnedaboutpairprogramming

LearnedsomeMarkdown

Hadfunsearchingfordata

InstalledRandRStudio

CollaborationPolicyReadandsignthecoursecollaborationpolicy.

Youmustsubmitthisformtoreceivecreditforthisstudio.

PiazzaPleasesignupforourcourseonPiazza.Throughoutthesemester,you

canpostanyquestionsyouhaveaboutthecourseonPiazza,andaTA

willreply.Feelfreetogiveitatrynow:Ifyouhaveafavoritedata

visualization(orcanfindacoolonequickly),postitasanoteandtagit

studio0 .

PairprogrammingDuringfuturestudiosessions,wewillbe“pairprogramming,”meaning

thattwostudentswillbeworkingtogethertocompletethetasks.Toget

abetterunderstandingofwhattoexpect,pleasereadthispair

programmingguide.NotethatAmycompiledthisguideoveradecade

ago,whenshestartingteachingCS17/18.

Page 3: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

Onceyouhavefinished,pleaseanswertheseTrueorFalsequestions.

Youcanjotyouranswersdownonapieceofpaper,ortypethemintoa

textfile.Beforeyouleavestudiotoday,youwillneedtohavethem

checkedoffbyaTA.

1. Onestudentshouldbeinchargeoftypingfortheentireduration

ofastudiosession.

2. Pairprogrammingisadivide-and-conquerstrategy,inwhich

eachstudentworksonadifferentpartoftheassignment.

3. Pairprogramminghelpsstudentslearnmoreandwritebetter

code.

4. Itisimportanttocommunicaterespectfullywhilepair

programming.

MarkdownTutorialsAllCS100documents,includingthisone,arewritteninMarkdown,a

simplelanguageforeasilygeneratingwebpages,pdfs,etc.Inafew

weeks,wewillrequirethatyourhandinsbegeneratedfromMarkdown,

specificallyRMarkdown.Toprepare,youshouldcompletelessons1-7of

thisMarkdowntutorial.

Funfindingdata!Atsomepointsoon,youwillfindyourselfsearchingfordata,sowe’re

goingtopracticenow.

Electronicdataarestoredinvariousformats,includingCSV,meaning

Page 4: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

comma-separatedvalues,andTSV,meaningtab-separatedvalues.

GooglecanhelpyousearchforCSV(orTSV)files.Yousimplyappend

thefiletypeofinteresttotheendofyourquery,asfollows:

+filetype:csv .

Forexample,searchingfor SouthAfrica+filetype:csv produces

CSVfilesmentioningSouthAfrica:

FindaCSVorTSVfileonatopicyouareinterestedin.Onceyou’ve

foundsomething,postitonPiazzaandcommentonwhyyoufindthe

datainteresting.(Asabove,tagyourpost studio0 .)Wearealwayson

thehuntforinterestingdata,soyouneverknow…yourfilemight

reappearlateronascoursematerial!

Page 5: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

SoftwareInstallationsonaLaptopAllofthenecessarysoftwareforthecoursecanbeaccessedon

computersintheCIT.(Inadditiontotheroomswherewewillbeholding

studio—CIT201andCIT167,a.k.a.theMSLab—youmayalsousethe

computersintheSunlab,whichisthelargeroomfullofcomputerson

thefirstflooroftheCIT.)Youmayalsochoosetoworkonyour

assignmentsusingapersonallaptop.Toinstallthenecessarysoftware

onalaptop,pleasefollowtheinstructionsbelow.

Atthestartofthecourse,we’llbeusingGoogleSheets.Sheetscomes

withyourBrownGoogleaccount,soyoushouldbeabletoaccessit

directlyfromyourGoogleDrive.Visitdrive.google.com,andclickon

New ,andselect GoogleSheets .

Afewweeksintothecourse,wewilladdtwofurthertoolstoourtoolkit:

R,aprogramminglanguagetailoredtostatisticsandvisualizations,and

RStudio,adevelopmentenvironmentforRprograms.Toinstallthis

software,followtheseinstructions:

SettingupR:1. TodownloadR,visitthislink

Page 6: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

2. IfyouareusingaWindowscomputerdownloadRforWindows,

ifyouareusingaMacdownloadRfor(Mac)OSX.

Windows:Clickon installRforthefirsttime ,andthenfollowthe

downloadinstructions:

Mac:TherearemultipleRpackagesforMacs,dependingonyourinstallation

Page 7: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

(OSX10.11(ElCapitan)andhigher,MacOSX10.9(Mavericks),etc.).

SelectthecorrectRpackageforyoursystem,andthenfollowthe

downloadinstructions:

OnceyouhavedownloadedR,youcanmoveontoinstallingRStudio.

SettingupRStudio:InCS100,weuseRStudiotowriteRprograms—alsocalledscripts—and

toviewtheiroutput(often,datavisualizations).RStudioisanIDEforR.

IDEstandsfor"integrateddevelopmentenvironment,”whichisan

applicationthatfacilitateswritingandexecutingofcode.

GototheRStudiowebsite.Scrolldownasnecessaryuntilyoucanclick

Page 8: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

on“DownloadRStudioDesktop”.Thislinkwilltakeyoutoatableof

differentproducts.YoushoulddownloadthefirstRStudioDesktop

product,becauseitisfree!

Onceyouclickonthedownloadlink,the .exe fileforRStudioshould

begindownloading.Clickthedownloaded .exe fileandfollowthe

directionsontheRStudiosetupguide.

Clicknexttocontinuewhentheinstallwizardopens.

Page 9: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

Clicknexttoacceptthedefaultinstalllocation.

Page 10: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

Laststep!Click Install toacceptthedefaultstartmenufolderand

installRStudio!

Click Finish toclosethewizard.

OnceRStudioisinstalled,openituptomakesureitwascorrectly

installed.Youshouldseeafewpanelsonyourscreen.Theoneonthe

bottomleftiscalledtheconsole.IfyoutypeRcodeintotheconsole,

andthenhitenter,RStudiowillrunyourcode,anddisplaytheresults.

Asasimpletest,enterthislineofcodeintotheconsole,andseewhat

happens:

Page 11: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

print("Welcometotheworldofdata!")

EndofStudioCongratulations!You’vecompletedyourfirstCS100studio.Youarenow

ingoodshapetocompletefuture,moreinteresting,assignments.

PleasegotoTAhourssothataTAcancheckyourwork.Youmustget

checkedofftogetcreditforcompletingthisstudio.