Академический Документы
Профессиональный Документы
Культура Документы
Lecture1 BackgroundandIntroduction
TueJan4,20102:003:30,FCKAuditorium WedJan5,201011:0012:30PCSAuditorium Prof.RKJoshi ComputerScienceandEngineering IITBombay
Email:rkj@cse.iitb.ac.in
WhatisProgramming?
Trainingamachinetosolveourproblems
Lookatthisusageoftheterm'programming:
thebrainisprogrammed
Examplesofprogrammingin commonlyuseddevices..
Characterizingprograms
ComplexPrograms
Aprogramcanhavemanyinputsandmanypossibleoutputs Forexample,object'telephone'hasacomplexlogic
HandlingErrorConditions
Programsneedtoworkinfailsafemode.
Manymoreoutputpossibilitiesneedtobe considered
Someexamplesofcomputer programsthatyoumayhaveused
Someexampleapplicationsfrom EngineeringandScientificComputing
CommonProgramsforprogrammingand utilizationofcomputingsystems
Atypicalcomputingapplication
A program
Amoreadvancedapplication..
Database Engine
A program
Amoreadvancedapplication..
Database Engine
A program
Everythinginthispictureis associatedwithprogramming..
Database Engine A program A program OperatingSystem network ComputingHardware, storage,media,networkingdevices
Haven'tyouusedsuchasystemearlier?
WhyDowestudyComputer Programmingandutilization?
Introductionto
Basicsofcomputerprogramming
Applicationsofprogrammingareallaround:
Programmingneedsdiscipline
Inabsenceofit:
Aretheseproblemssolvablebyappointingmoresuchprogrammers?!
Thereusabilityaspect
e.g.Nutsandbolts
Programsalsoneedtobe'packaged'nicely..programming languagesprovidetherequiredconstructs.
StepsinProgramDevelopment
Programmingisallaboutthelogicthatgoesintoaprogram
Youneedtothinkaboutitfirst,andnoteitdown
ThentranslateitintoaprogramwritteninaprogramminglanguagelikeC++
Typeoutthesourceprogramonacomputer. Saveit
Thatprogramisthen'compiled'
Checkthe'syntax' Producean'executable'version
Executeit(Runit!)andhavefun.. Lookoutforbugs..testtheprogramanddebugittofixthebugsyoufind.
SomeCharacteristicsofGood Programs
Onemoreexample..
AProgrammingLanguage
Dataorvalues Controlorlogicalsteps
Aboutthecourse
Utilizingcomputers ProgramminginC++
Variousprogrammingconstructs
ApplyingProgramming ProgrammingAssignments,Labs
Let'strytounderstandthiscycle ofprogramdevelopment..
Think Edit
Fixcoding errors
yes
errors?
No
execute
yes
bugs? No done
Observetheactivityboxesandthe forwardandbackwardarrows..
Wewillcomebacktoitwhenwewillactually developprograms. Manytimesyouwillendupcombiningthefirsttwo activitieswhilesittinginfrontofthecomputer..So youmaymissthedistinctionbetweenthetwo leftmostupwardarrows..watchout!