You are on page 1of 6

12/8/13

Which Programming Language Should I Learn First?

MELANIEPINOLAonLIFEHACKER

ASKLIFEHACKER

Thursday10:00am 120,225 g 31 1 284 L

WhichProgrammingLanguageShouldI LearnFirst?

DearLifehacker, Withallthebuzzaboutlearningtocode,I'vedecidedtogiveitatry.Theproblemis,I'mnotsurewheretostart. What'sthebestprogramminglanguageforabeginnerlikeme? Signed, CouldBeCoder DearCouldBe, That'sprobablyoneofthemostpopularquestionsfromfirsttimelearners,andit'ssomethingthateducators debateaswell.Thethingis,youcanasktenprogrammerswhatthebestlanguageistogetyourfeetwetwith andyoucouldgettendifferentanswerstherearethousandsofoptions.Whichlanguageyoustartwithdepends notonlyonhowbeginnerfriendlyitis,though,butalsothekindofprojectsyouwanttoworkon,whyyou're interestedincodinginthefirstplace,andperhapsalsowhetheryou'rethinkingofdoingthisforaliving.Here aresomeconsiderationsandsuggestionstohelpyoudecide.

WhyDoYouWanttoLearntoCode?
Dependingonwhatitisyouwanttomakeordo,yourchoicemightalreadybemadeupforyou.Tobuilda websiteorwebapp,forexample,youshouldlearnHTMLandCSS,alongwithJavaScriptandperhapsPHPfor interactivity.Ifyourfocusismostly/onlyonbuildingamobileapp,thenyoucandiverightintolearning ObjectiveCforiOSappsorhowtoprogramwithJavaforAndroid(andotherthings).
lifehacker.com/which-programming-language-should-i-learn-first-1477153665 1/6

12/8/13

Which Programming Language Should I Learn First?

RELATED

Apple'sStartDevelopingiOSApps TodayGuideIsaRoadmapfor CreatingYourFirstApp

HowtoProgramWithJavaTeachesYoutheBasicConceptsof Programming(andJava,OfCourse)
RELATED

HowandWhytoTeachYourKidsto Code
Ifyou'relookingtogobeyondonespecificprojectorspecialty, though,orwanttolearnabunchoflanguages,it'sbesttostartwith learningthebasicconceptsofprogrammingandhowto"thinklikea coder."Thatway,nomatterwhatyourfirstprogramminglanguage,youcanapplythoseskillstowardslearning anewone(maybeinaslittleas21minutes).Evenkids'codingappscanbeusefultostartwith.Forexample,the firstformalprogrammingcourseItook(well,otherthanBASICbackinfourthgrade)wasHarvard'sCS50, whichyoucantakeforfree.ProfessorMalanstartsthecourseoffwithScratch,adraganddropprogramming environmentbuiltforkidsthatteachescodingbasicsandlogicwhilehelpingyoucreatesomethingcooland thenheproceedstoteachyouC. We'vefeaturedseveralotherexcellentresourcesforlearningtocodeovertheyears,suchasinteractive courseCodecademy,butevenwiththoseyoustillneedtochoosewhichlanguagetostartwith.Solet'stakea lookatthedifferencesbetweenthemorepopularonesandwhicharemostrecommendedasastarterlanguage.

TheMostOftenRecommendedProgrammingLanguagesfor Beginners
Mostofthe"mainstream"programminglanguagessuchasC,Java,C#,Perl,Ruby,andPythoncandothe sameornearlythesametasksastheothers.Java,forexample,workscrossplatformandisusedforweb appsandapplets,butRubyalsocandolargewebappsandPythonappssimilarlyrunonLinuxand Windows.SOAWorldpointsoutthatbecausemanylanguagesaremodeledaftereachother,thesyntaxor structureofworkingonthemisoftennearlyidentical,solearningoneoftenhelpswithlearningtheothers.For example,toprint"HelloWorld,"JavaandC#aresyntacticallysimilarjustasPerlandPythonare:
lifehacker.com/which-programming-language-should-i-learn-first-1477153665 2/6

12/8/13

Which Programming Language Should I Learn First?

Theydiffer,however,inhoweasytheyaretosetupandgetinto.SOAWorldcontinues:

Hey,bytheway,ifyoulookedcloselyatthoseexamples,you'llnotice somearesimple,othersarecomplex,andsomerequiresemicolonsat theendsoflineswhileothersdon't.Ifyou'rejustgettingstartedin programming,sometimesit'sbesttochooselanguageswithoutmany syntactical(orlogical)rulesbecauseitallowsthelanguageto"Getout ofitsownway".Ifyou'vetriedonelanguageandreallystruggledwithit, tryasimplerone!

Here'saquickcomparisonofthemostpopularprogramminglanguages:

C:TrainsYoutoWriteEfficientCode
Cisoneof,ifnotthe,mostwidelyusedprogramminglanguages.Thereareafewreasonsforthis.Asnoted programmerandwriterJoelSpolskysays,Cistoprogrammingaslearningbasicanatomyistoamedicaldoctor. Cisa"machinelevel"language,soyou'lllearnhowaprograminteractswiththehardwareandlearnthe fundamentalsofprogrammingatthelowesthardwarelevel(CisthefoundationforLinux/GNU).Youlearn thingslikedebuggingprograms,memorymanagement,andhowcomputersworkthatyoudon'tgetfromhigher levellanguageslikeJavaallwhilepreppingyoutocodeefficientlyforotherlanguages.Cisthe"grandfather" ofmanyotherhigherlevellanguages,includingJava,C#,andJavaScript. Thatsaid,codinginCisstricterandhasasteeperlearningcurvethanotherlanguages,andifyou'renot planningonworkingonprogramsthatinterfacewiththehardware(tapintodevicedrivers,forexample,or operatingsystemextensions),learningCwilladdtoyoureducationtime,perhapsunnecessarily.StackOverflow hasagooddiscussiononCversusJavaasafirstlanguage,withmostpeoplepointingtowardsC.However, personally,althoughI'mgladIwasexposedtoC,Idon'tthinkit'saverybeginnerfriendlylanguage.It'llteach
lifehacker.com/which-programming-language-should-i-learn-first-1477153665

youdiscipline,butyou'llhavetolearnanawfullotbeforeyoucanmakeanythinguseful.Also,becauseit'sso 3/6

12/8/13

Which Programming Language Should I Learn First?

strictyoumightendupfrustratedlikethis:

Java:OneoftheMostPracticalLanguagestoLearn
Javaisthesecondmostpopularprogramminglanguage,andit'sthelanguagetaughtinStanford'srenowned (andfree)IntrotoCSprogrammingcourse.JavaenforcessolidObjectOrientedprinciples(OOP)thatareusedin modernlanguagesincludingC++,Perl,Python,andPHP.Onceyou'velearnedJava,youcanlearnotherOOP languagesprettyeasily. Javahastheadvantageofalonghistoryofusage.Therearelotsof"boilerplate"examples,it'sbeentaughtfor decades,andit'swidelyusedformanypurposes(includingAndroidappdevelopment),soit'saverypractical languagetolearn.Youwon'tgetmachinelevelcontrol,asyouwouldwithC,butyou'llbeableto access/manipulatethemostimportantcomputerpartslikethefilesystem,graphics,andsoundforanyfairly sophisticatedandmodernprogramthatcanrunonanyoperatingsystem.

Python:FunandEasytoLearn
ManypeoplerecommendPythonasthebestbeginnerlanguagebecauseofitssimplicityyetgreatcapabilities. Thecodeiseasytoreadandenforcesgoodprogrammingstyle(likeindenting),withoutbeingoverlystrictabout syntax(thingslikerememberingtoaddasemicolonattheendofeachline).PatrickJordanatAriel Computingcomparedthetimeittakestowriteasimplescriptinvariouslanguages(BASIC,C,J,Java,and Python)anddeterminedthatwhiletheotherlanguagesshouldn'tbeignored,Python:

lifehacker.com/which-programming-language-should-i-learn-first-1477153665

4/6

12/8/13

Which Programming Language Should I Learn First?

frequentsuccessbreedconfidenceandinterestinthestudent,whois thenbetterplacedtocontinuelearningtoprogram.

SOAsaysPythonisanabsolutemustforbeginnerswhowanttogettheirfeetwetwithLinux(orarealready familiarwithLinux).Python'spopularityisalsorisingquicklytodaythankstowideadoptiononpopular websiteslikePinterestandInstagram.

JavaScript:ForJumpingRightinandBuildingWebsites
RELATED

LearntoCode:TheFullBeginner's Guide
JavaScript(oflittlerelationtoJava)requirestheleastamountofsetup togetstartedwith,sinceit'salreadybuiltintowebbrowsers.O'Reilly MediarecommendsyoustartwithJavaScriptbecauseithasarelatively forgivingsyntax(youcancodelooselyinJavaScript),youseeimmediateresultsfromyourcode,andyoudon't needalotoftools.InourownLearntoCodenightschoolweuseJavaScripttoshowyouthebasicslikehow variablesandfunctionswork.Ifyouwanttomakecoolinteractivethingsfortheweb,JavaScriptisamusthave skill.

ChoosingYourPath
Onelastconsiderationiswhetherornotyoumightwanttogofromcodingasahobbytodoingitasa career.Dev/Code/Hackbreaksdownthedifferentjobrolesandtheskillsyoushouldpickupforthem:

Backend/ServersideProgrammer:Usuallyusesoneofthefollowing: Python,Ruby,PHP,Javaor.Net.Hasdatabaseknowledge.Possiblyhas somesysadminknowledge. Frontend/ClientsideProgrammer:HTML,CSS,JavaScript.Possibly hasdesignskill. MobileProgrammer:ObjectiveCorJava(forAndroid).HTML/CSSfor mobilewebsites.Potentiallyhasserversideknowledge. 3DProgrammer/GameProgrammer:C/C++,OpenGL,Animation. Possiblyhasgoodartisticskill. HighPerformanceProgrammer:C/C++,Java.Mayhavebackground inmathematicsorquantitativeanalysis.
lifehacker.com/which-programming-language-should-i-learn-first-1477153665 5/6

12/8/13

Which Programming Language Should I Learn First?

Intheend,though,there'snoonewaytogetstartedlearningtocode.Themostimportantthingistolearnthe fundamentalsthrough"scratchingyouritch,"sotospeak,withworkingonaproblemsyouwanttosolveor somethingyouwanttobuild.Astheprogrammingisterribleblogsays:

Thefirstprogramminglanguageyoulearnwilllikelybethehardestto learn.Pickingsomethingsmallandfunmakesthislessofachallenge andmoreofanadventure.Itdoesn'treallymatterwhereyoustartas longasyoukeepgoingkeepwritingcode,keepreadingcode.Don't forgettotestiteither.Onceyouhaveonelanguageyou'rehappywith, pickingupanewlanguageislessofafeat,andyou'llpickupnewskills ontheway.

RELATED

BentoShowcasestheBestResources forLearningtoCode
Onceyou'vedecided,previouslymentionedBentowillsuggestthe resourcesyouneedandthecoursestotakeafteryou'velearnedyour firstlanguage.

P
Love, Lifehacker

lifehacker.com/which-programming-language-should-i-learn-first-1477153665

6/6

You might also like