Code

honggarae 26/12/2021 1173

Explanationofterms

Anysymbolsystemforinputtingdataandinstructionsintoautomaticcomputersortabulatingmachines;alsoreferstotherecordingofsuchsymbols(suchastypingThemagneticpointontheholedatacardortape).

Computercode

Sourcecode(alsocalledsourceprogram)referstoaseriesofhuman-readablecomputerlanguageinstructions.

Thesourcecodeisrelativetothetargetcodeandexecutablecode.Thesourcecodeisthecodewritteninassemblylanguageandhigh-levellanguage.Thetargetcodereferstothebinarycodegeneratedbythesourcecodeafterthecompilercanbedirectlyrecognizedbythecpu.Executablecodeistheexecutablefileformedbylinkingthetargetcode,andofcourseitisalsobinary.

Inmodernprogramminglanguages,thesourcecodecanappearintheformofbooksortapes,butthemostcommonlyusedformatisatextfile.Thepurposeofthistypicalformatistocompileacomputerprogram.Theultimatepurposeofcomputersourcecodeistotranslatehuman-readabletextintobinaryinstructionsthatthecomputercanexecute.Thisprocessiscalledcompilationandiscompletedbyacompiler.

Function

Themainfunctionofthesourcecodehasthefollowingtwofunctions:

Generateobjectcode,thatis,thecodethatcanberecognizedbythecomputer.

Describethesoftware,thatis,explainthewritingofthesoftware.Manybeginnersandevenafewexperiencedprogrammersneglectthecompilationofthesoftwaredescription,becausealthoughthispartwillnotbedirectlydisplayedinthegeneratedprogram,itwillnotparticipateinthecompilation.Butitshowsthattherearehugebenefitsforsoftwarelearning,sharing,maintenanceandsoftwarereuse.Therefore,writingsoftwaredescriptionsisconsideredtobeagoodhabitforcreatingexcellentprogramsintheindustry,andsomecompaniesalsomakeitmandatorytowrite.

Itshouldbepointedoutthatthemodificationofthesourcecodecannotchangethegeneratedtargetcode.Ifthetargetcodeneedstobemodifiedaccordingly,itmustberecompiled.

Codecombination

Asaspecialpartofthesoftware,thesourcecodemaybeincludedinoneormorefiles.Aprogramdoesnotneedtobewritteninthesameformatofsourcecode.Forexample,ifaprogramhasthesupportoftheClanguagelibrary,thenitcanbewritteninClanguage;whiletheotherpartcanbewritteninassemblylanguageinordertoachieveahigheroperatingefficiency.

Morecomplexsoftwaregenerallyrequirestheparticipationofdozensorevenhundredsofsourcecodes.Inordertoreducethiscomplexity,itisnecessarytointroduceasystemthatcandescribetheconnectionsbetweenvarioussourcecodesandhowtocompilethemcorrectly.Inthiscontext,therevisioncontrolsystem(RCS)wasbornandbecameoneofthenecessarytoolsfordeveloperstorevisecode.

Thereisanothercombination:sourcecodewritingandcompilationareimplementedondifferentplatforms,andtheprofessionaltermissoftwaremigration.

Copyright

Ifsoftwareisdistinguishedbysourcecodetype,itisusuallydividedintotwocategories:freesoftwareandnon-freesoftware.Freesoftwareisgenerallynotonlyfreelyavailable,butalsoopensourcecode;correspondingly,non-freesoftwaredoesnotopensourcecode.Allacquisitionsofnon-freesoftwaresourcecodethroughabnormalmeanswillberegardedasillegal.

Quality

Forcomputers,thereisnoreal"good"sourcecode;however,asaperson,thequalityofthesourcecodewillbedeterminedbythequalityofwritinghabits.Bad.Whetherthesourcecodeisreadableisanimportantcriterionforjudgingitsquality.Softwaredocumentationisthekeytoshowingreadability.

Efficiency

Althoughwecanimplementthesamefunctionofacomputerindifferentlanguages,therearedifferencesinexecutionefficiency.Thegeneralruleis:thehigherthelevelofthelanguage,thelowertheexecutionefficiency.ThisiswhythefilesgeneratedbyassemblylanguagearegenerallysmallerthanthosegeneratedbyVBlanguage.

Opensourcecode

Mostsoftwareyoupurchaseordownloadonlyprovidescompiledandrunnableversions."Compiled"meansthattheactualprogramcode(calledsourcecode)createdbythedeveloperhasbeenprocessedbyaspecialprogramcalledacompilerthatconvertsthesourcecodeintoaformatthatthecomputercanunderstand(thecompilerFormoreinformation,pleaserefertotheClanguageintroductorytutorial).Itisextremelydifficulttomodifythecompiledversionofmostapplications,anditisalmostimpossibleforpeopletoknowhowthedeveloperscreatethevariouspartsoftheprogram.Mostcommercialsoftwaremanufacturersseethisasafavorableconditiontopreventothercompaniesfromcopyingtheirowncodeandusingitincompetingproducts,whileatthesametimecontrollingthequalityandfeaturesoftheirspecificproducts.

Opensourcesoftwareisjusttheopposite.Thesourcecodeisprovidedwiththecompiledversion,andpeopleareactuallyencouragedtomodifyorcustomizeit.Softwaredeveloperswhosupporttheconceptofopensourcebelievethatbyallowinginterestedpartiestomodifythesourcecode,theapplicationwillbemorecomplete,andtherewillbenoerrorsforalongtime.

Theopensourcesoftwaredefinedbythesoftwaredevelopmentindustrymustmeetcertainconditions:

  1. Theprogrammustbereleasedforfree(butitcanbeinthesoftwarepackagesoldPartofit,suchasinthefollowingexample,RedHatdoesthisforLinux).

  2. Thesourcecodemustbeprovided.

  3. Anyonemustbeallowedtomodifythesourcecode.

  4. Youcanrepublishtherevisedversion.

  5. Thelicenseshallnotrequiretheexclusionofothersoftwareorinterferencewiththeoperationofothersoftware.

Letuslookatarealexampleofopensourcesoftware.In1991,LinusTorvalds,astudentattheUniversityofHelsinkiinFinland,developedanewoperatingsystembasedonMinix,aderivativeofUnix,andcalleditLinux.Torvaldsreleasedversion0.02ofLinuxundertheGNUGeneralPublicLicense(whichprovidesagoodlegaldefinitionforopensourcesoftware).PeopleallovertheworlddownloadedandstartedusingLinux.Amongthem,manyusersareindependentprogrammerswhohavemodifiedthesourcecodeprovidedbyTorvalds.Overthenext3years,Torvaldsreceivedthesemodifiedversionsfromotherprogrammersandincorporatedmanychangesintothebasicversion,releasingLinuxversion1.0in1994.

Acommonconcernofenduserswhowanttouseopensourcesoftwareisthelackofqualityassuranceandtechnicalsupportforthesesoftware.Becausethesoftware'slicenseencouragesmodificationandcustomization,itisalmostimpossibletoprovidesupport.ThisiswhyRedHatSoftware,foundedin1994,created"OfficialRedHatLinux"andsoldthisusually"free"software.ThemainvaluethatRedHataddstothepackageisqualityassuranceandtechnicalsupport.Formostcompanies,thepromiseoftechnicalsupporthasbecomeakeyfactorinurgingthemtobuyLinuxinsteadofdownloadingitforfree.InadditiontoRedHat,thereareseveralothercompaniesthatpackageLinux(usuallywithothersoftware)forresale.

InadditiontoLinux,Mozilla(Netscapebrowsercore),Apache(Webserver),PERL(Webscriptinglanguage)andPNG(graphicfileformat)areallverypopularopensource-basedsoftware.

WEBstandard

WEBstandardizedCSS+DIVcode

CSS+DIVisthewebsitestandard(or"WEBstandard")OneofthecommonlyusedtermsinthewebdesignlanguageisusuallyusedtoexplainthedifferencebetweenthetablepositioningmethodinHTML(anapplicationofthestandarduniversalmarkuplanguage),becausethetablepositioningtechnologyisnolongerusedintheXHTMLwebsitedesignstandard.Itusescss+ptoachievevariouspositioning.

Cascadingstylesheets(foreignlanguageabbreviationCSS),whichisusedtoexpressHTML(anapplicationofstandarduniversalmarkuplanguage)orXML(asubsetofstandarduniversalmarkuplanguage)andotherfilestylesComputerLanguages.

TheDIVelementisanelementusedtoprovidestructureandbackgroundforthelargeblock-levelcontentinanHTMLdocument.AllthecontentbetweenthestarttagandtheendtagoftheDIVisusedtoformthisblock,andthecharacteristicsofthecontainedelementsarecontrolledbytheattributesoftheDIVtag,orbyformattingtheblockwithastylesheet.

TheadvantagesandproblemsofCSS+DIVwebsitedesign

XHTMisthestandardwebsitedesignlanguageadvocatedinternationally.BecauseofthebasiccharacteristicsoftheXHTMLwebsitedesignlanguage,thisCSS+DIVThepatternofwebsitedesignhascertainadvantages,buttherearealsosomeproblemsintheCSS+DIVpatternintheapplicationofwebsiteconstruction.Thisarticleintegratestheexperienceofwebsitetechnologyanddesigners,andfromtheperspectiveofnetworkmarketingapplications,summarizestheadvantagesandproblemsofCSS+DIVwebsitedesignasfollows:

TheadvantagesofCSS+DIVwebsitedesign

Firstofall,thegreatadvantageofCSSliesintheconcisecode.Foralargewebsite,itcansavealotofbandwidth.Itiswellknownthatsearchengineslikecleancode(therealmeaningisthatitincreasestheeffectivekeywordstoaccountforthetotalnumberofwebpages.Theproportionofthecode),sothewebsitemadeusingthewebstandardofCSS+DIVhascertainadvantagesofbeingsearchenginefriendly.

Secondly,thewebsitemadebyCSS+DIVmakesthewebsiterevisionrelativelysimple.ManyproblemsonlyneedtochangetheCSSwithoutchangingtheprogram,thusreducingthecostofthewebsiterevision.

TheproblemsofCSS+DIVwebsitedesign

AlthoughCSS+DIVhascertainadvantages,theproblemsexistingintheconstructionofCSS+DIVwebsiteatthisstagearealsomoreobvious.Themainmanifestationsare:

First,thehighdependenceonCSSmakeswebdesignmorecomplicated.ComparedwiththetablelayoutinHTML4.0,CSS+DIVisnotunattainable,butatleastitismuchmorecomplicatedthanthetablepositioning.Evenforthemastersofwebsitedesign,itispronetoproblems,nottomentionthebeginners.ThishasaffectedthepopularapplicationofXHTMLwebsitedesignlanguagetoacertainextent.

Secondly,theabnormalCSSfilewillaffectthenormalbrowsingoftheentirewebsite.ThedesignelementsmadebytheCSSwebsiteareusuallyplacedinseveralexternalfiles.Theseoneorseveralfilesmaybequitecomplicatedorevenrelativelylarge.IftheCSSfilecallisabnormal,theentirewebsitewillbecomehorrible.

Thirdly,thebrowsercompatibilityproblemofCSSwebsitedesignismoreprominent.WebpagedesignbasedonHTML4.0hasalmostnobrowsercompatibilityissuesinversionsafterIE4.0,butthepagesthatarenormallydisplayedinIEbrowserforwebsitesdesignedbyCSS+DIVarenotdisplayedinFirefoxbrowser(FireFox).Itmaybeunrecognizable(thisiswhyInternetmarketersareadvisedtousetheFirefoxbrowser).CSS+DIVhasyettobefurthersupportedbyvariousbrowservendors.

Fourth,whetherCSS+DIVoptimizessearchenginesdependsontheprofessionallevelofwebdesignratherthanCSS+DIVitself.CSS+DIVwebpagedesigndoesnotguaranteethatwebpageswillbeoptimizedforsearchengines,anditcannotevenguaranteethattheremustbeacleanercodedesignthanHTMLwebsites.Moreover,theinclusionandrankingofwebpagesbysearchenginesisobviouslynotmeasuredbywhethertablesandCSSpositioningareused.Thisiswhymanywebsitesmadewithtraditionaltablelayoutsrankhighinsearchresults,whilemanywebpagesmadewithCSSandwebstandardsarestillrankedlow.Becauseforsearchengines,factorssuchaswebsitestructure,content,andrelatedwebsitelinksarealwaysthemostimportantindicatorsforwebsiteoptimization.

Latest: Barcode scanner

Next: Joseph John Thomson