Computer Programming

14,204 views 16 slides Jan 07, 2021
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

Why Programming?
The Programming Process
What Programmers do?
Programming as a Career
Level of Programming Languages
Computer Languages


Slide Content

Computer
Programming
Syed Zaid Irshad

Outline
–Why Programming?
–The Programming Process
–What Programmers do?
–Programming as a Career
–Level of Programming Languages
–Computer Languages

Why Programming?
–Programminghelpsyouunderstandcomputers.
–Acomputerisonlyatool.Ifyoulearnhowtowritesimpleprograms,youwillgainmore
knowledgeabouthowacomputerworks.
–Writingafewsimpleprogramsincreasesyourconfidencelevel.
–Manypeoplefindgreatpersonalsatisfactionincreatingasetofinstructionsthatsolvea
problem.
–Learningprogrammingletsyoufindoutquicklywhetheryoulikeprogrammingand
whetheryouhavetheanalyticalturnofmindprogrammersneed.
–Evenifyoudecidethatprogrammingisnotforyou,understandingtheprocesscertainly
willincreaseyourappreciationofwhatprogrammersandcomputerscando.

The Programming Process
–There are five main ingredients in the programming process:
–Defining the problem
–Planning the solution
–Coding the program
–Testing the program
–Documenting the program

The Programming Process
–Defining the problem
–Identifyingwhatitisyouknow(input-givendata),andwhatitisyouwanttoobtain
(output-theresult).
–Eventually,youproduceawrittenagreementthat,amongotherthings,specifiesthe
kindofinput,processing,andoutputrequired.
–Thisisnotasimpleprocess.
–Planning the solution
–It is a map of what your program is going to do and how it is going to do it.

The Programming Process
–Coding the program
–Youwilltranslatethelogicfromtheflowchartorpseudocode-orsomeothertool-toa
programminglanguage.
–Aswehavealreadynoted,aprogramminglanguageisasetofrulesthatprovidesawayof
instructingthecomputerwhatoperationstoperform.
–Testing the program
–Programmayhavesomeimperfectionsforthenewprogrammers.So,theprogrammers
usefollowingstepstoovercome.
–Desk-Checking
–Translating
–Debugging

The Programming Process
–Documenting the program
–Documentingisanongoing,necessaryprocess,although,asmanyprogrammersare,
youmaybeeagertopursuemoreexcitingcomputer-centredactivities.
–Documentationisawrittendetaileddescriptionoftheprogrammingcycleand
specificfactsabouttheprogram.
–Typicalprogramdocumentationmaterialsincludetheoriginandnatureofthe
problem,abriefnarrativedescriptionoftheprogram,logictoolssuchasflowcharts
andpseudocode,data-recorddescriptions,programlistings,andtestingresults.

What Programmers do?
–Ingeneral,theprogrammer'sjobistoconvertproblemsolutionsintoinstructionsfor
thecomputer.
–Theprogrammerpreparestheinstructionsofacomputerprogramandrunsthose
instructionsonthecomputer,teststheprogramtoseeifitisworkingproperly,andmakes
correctionstotheprogram.
–Theprogrammeralsowritesareportontheprogram.
–Theseactivitiesarealldonetohelpauserfillaneed,suchaspayingemployees,billing
customers,oradmittingstudentstocollege.
–Theprogrammingactivitiesjustdescribedcouldbedone,perhaps,assoloactivities,
butaprogrammertypicallyinteractswithavarietyofpeople.

Programming as a Career
–Althoughmanypeoplemakecareerchangesintothecomputerfield,fewchooseto
leaveit.
–Surveysofcomputerprofessionals,especiallyprogrammers,consistentlyreportahigh
levelofjobsatisfaction.
–Thereareseveralreasonsforthiscontentment.Oneisthechallenge-mostjobsinthe
computerindustryarenotroutine.
–Anotherissecuritysinceestablishedcomputerprofessionalscanusuallyfindworkand
thatworkpayswell-youwillprobablynotberich,butyoushouldbecomfortable.

Level of Programming
Languages
–There are five(5) levels or generations of programming languages:
–Machine language
–Assembly languages
–High-level languages
–Very high-level languages
–Natural languages

Level of Programming
Languages
–Machine language
–Humansdonotliketodealinnumbersalone-theypreferlettersandwords.But,
strictlyspeaking,numbersarewhatmachinelanguageis.
–Thislowestleveloflanguage,machinelanguage,representsdataandprogram
instructionsas1sand0sbinarydigitscorrespondingtotheonandoffelectrical
statesinthecomputer.
–Eachtypeofcomputerhasitsmachinelanguage.Intheearlydaysofcomputing,
programmershadrudimentarysystemsforcombiningnumberstorepresent
instructionssuchasaddandcompare.
–Primitivebytoday'sstandards,theprogramswerenotconvenientforpeopletoread
anduse.Thecomputerindustryquicklymovedtodevelopassemblylanguages.

Level of Programming
Languages
–Assembly languages
–Assemblylanguagesareconsideredverylowlevel-thatis,theyarenotasconvenientfor
peopletouseasmorerecentlanguages.
–Atthetimetheyweredeveloped,however,theywereconsideredagreatleapforward.To
replacethe1sand0susedinmachinelanguage,assemblylanguagesusemnemonic
codes,abbreviationsthatareeasytoremember:AforAdd,CforCompare,MPfor
Multiply,STOforstoringinformationinmemory,andsoon.
–AlthoughthesecodesarenotEnglishwords,theyarestillfromthestandpointofhuman
convenience-preferabletonumbers(0sand1s)alone.
–Furthermore,assemblylanguagespermittheuseofnames-perhapsRATEorTOTAL-for
memorylocationsinsteadofactualaddressnumbers.
–Justlikemachinelanguage,eachtypeofcomputerhasitsassemblylanguage.

Level of Programming
Languages
–High-level languages
–Thefirstwidespreaduseofhigh-levellanguagesintheearly1960stransformed
programmingintosomethingquitedifferentfromwhatithadbeen.
–ProgramswerewritteninanEnglish-likemanner,thusmakingthemmoreconvenient
touse.
–Asaresult,aprogrammercouldaccomplishmorewithlesseffort,andprograms
couldnowdirectmuchmorecomplextasks.
–Theseso-calledthird-generationlanguagesspurredthegreatincreaseindata
processingthatcharacterizedthe1960sand1970s.

Level of Programming
Languages
–Very high-level languages
–Thefirstisthattheymakeatruebreakwiththepriorgeneration-theyarenon-
procedural.
–Aprocedurallanguagetellsthecomputerhowataskisdone:Addthis,comparethat,
dothisifsomethingistrue,andsoforth-averyspecificstep-by-stepprocess.
–Thefirstthreegenerationsoflanguagesareallprocedural.Inanonprocedural
language,theconceptchanges.Here,usersdefineonlywhattheywantthecomputer
todo;theuserdoesnotprovidethedetailsofjusthowitistobedone.
–Itisaloteasierandfasterjusttosaywhatyouwantratherthanhowtogetit.This
leadsustotheissueofproductivity,akeycharacteristicoffourth-generation
languages.

Level of Programming
Languages
–Natural languages
–Theword"natural"hasbecomealmostaspopularincomputingcirclesasithasinthesupermarket.
–Fifth-generationlanguagesare,asyoumayguess,evenmore,ill-definedthanfourth-generationlanguages.
–Theyaremostoftencallednaturallanguagesbecausetheyresemblethe"natural"spokentheEnglishlanguage,and,tothe
managernewtocomputersforwhomtheselanguagesarenowaimed,naturalmeanshuman-like.
–Insteadofbeingforcedtokeycorrectcommandsanddatanamesinthecorrectorder,amanagertellsthecomputerwhattodo
bykeyinginhisorherownwords.
–Amanagercansaythesamethinganynumberofways.Forexample,"GetmetennisracketsalesforJanuary"worksjustaswell
as"IwantJanuarytennisracketrevenues.“
–Sucharequestmaycontainmisspeltwords,lackarticlesandverbs,andevenuseslang.
–Thenaturallanguagetranslateshumaninstructions-badgrammar,slang,andall-intocodethecomputerunderstands.
–Ifitisnotsurewhattheuserhasinmind,itpolitelyasksforfurtherexplanation.

Computer Languages
–There are 7 categories of computer languages:
–Machine and assembly languages
–Algorithmic languages
–Business-oriented languages
–Computer programming language
–Education-oriented languages
–Object-oriented languages
–World wide web display languages
Tags