My Job Went to India And All I Got Was This Lousy Book ChadFowler ThePragmaticBookshelf Raleigh,NorthCarolina Dallas,Texas P r a g m a t i c B o o k s h e l f Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsare claimedastrademarks. Wherethosedesignationsappearinthisbook,andThePragmatic Programmers,LLCwasawareofatrademarkclaim,thedesignationshavebeenprintedin initialcapitallettersorinallcapitals.ThePragmaticStarterKit,ThePragmaticProgrammer, PragmaticProgramming, PragmaticBookshelfandthelinkinggdevicearetrademarksof ThePragmaticProgrammers,LLC. Everyprecautionwastakeninthepreparationofthisbook.However,thepublisherassumes noresponsibility forerrors or omissions, or for damagesthat may result from theuse of information(includingprogramlistings)containedherein. OurPragmaticcourses,workshops,andotherproductscanhelpyouandyourteamcreate bettersoftwareandhavemorefun. Formoreinformation,aswellasthelatestPragmatic titles,pleasevisitusat http://www.pragmaticprogrammer.com Copyright©2005ChadFowler. All rights resersvg. Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmitted, inanyform,orbyanymeans,electronic,mechanical,photocopying,recording,orotherwise, withoutthepriorconsentofthepublisher. PrintedintheUnitedStatesofAmerica. ISBN0-9766940-1-8 Printedonacid-freepaperwith85%recycled,30%post-consumercontent. Firstprinting,September2005 Version:2005-8-29 ForKellyJeanne Contents Introduction 1 PartI—ChoosingYourMarket 10 1. SupplyandDemand . . . . . . . . . . . . . . . . . . . . . 12 2. CodingDon’tCutItAnymore . . . . . . . . . . . . . . . . 16 3. LeadorBleed? . . . . . . . . . . . . . . . . . . . . . . . . . 19 4. InvestinYourIntelligence . . . . . . . . . . . . . . . . . . 22 5. BeaGeneralist . . . . . . . . . . . . . . . . . . . . . . . . . 26 6. BeaSpecialist . . . . . . . . . . . . . . . . . . . . . . . . . 31 7. Don’tPutAllYourEggsinSomeoneElse’sBasket . . . . 34 8. BetheWorst . . . . . . . . . . . . . . . . . . . . . . . . . . 36 9. LoveItorLeaveIt . . . . . . . . . . . . . . . . . . . . . . . 39 PartII—InvestinginYourProduct 42 10. LearntoFish . . . . . . . . . . . . . . . . . . . . . . . . . . 45 11. UnderstandBusinessBasics . . . . . . . . . . . . . . . . . 48 12. FindaMentor . . . . . . . . . . . . . . . . . . . . . . . . . 50 13. BeaMentor . . . . . . . . . . . . . . . . . . . . . . . . . . 54 14. Practice,Practice,Practice . . . . . . . . . . . . . . . . . . 56 15. TheWayThatYouDoIt . . . . . . . . . . . . . . . . . . . 61 16. OntheShouldersofGiants. . . . . . . . . . . . . . . . . . 64 17. AutomateYourselfintoaJob . . . . . . . . . . . . . . . . 67 PartIII—Executing 71 18. RightNow . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 19. MindReader . . . . . . . . . . . . . . . . . . . . . . . . . . 75 20. DailyHit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 21. RememberWhoYouWorkFor . . . . . . . . . . . . . . . 81 22. BeWhereYou’reAt . . . . . . . . . . . . . . . . . . . . . . 83 23. HowGoodaJobCanIDoToday?. . . . . . . . . . . . . . 86 24. HowMuchAreYouWorth? . . . . . . . . . . . . . . . . . 89 25. APebbleinaBucketofWater . . . . . . . . . . . . . . . . 92 26. LearntoLoveMaintenance . . . . . . . . . . . . . . . . . 95 CONTENTS vii 27. Eight-HourBurn . . . . . . . . . . . . . . . . . . . . . . . 99 28. LearnHowtoFail . . . . . . . . . . . . . . . . . . . . . . . 102 29. Say“No” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 30. SayIt,DoIt,ShowIt . . . . . . . . . . . . . . . . . . . . . 108 PartIV—Marketing...NotJustforSuits 112 31. Perceptions,Perschmeptions. . . . . . . . . . . . . . . . . 115 32. AdventureTourGuide . . . . . . . . . . . . . . . . . . . . 118 33. MeRiteReelNice . . . . . . . . . . . . . . . . . . . . . . . 121 34. BeingPresent . . . . . . . . . . . . . . . . . . . . . . . . . 123 35. SuitSpeak . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 36. ChangetheWorld . . . . . . . . . . . . . . . . . . . . . . . 129 37. LetYourVoiceBeHeard . . . . . . . . . . . . . . . . . . . 131 38. BuildYourBrand . . . . . . . . . . . . . . . . . . . . . . . 134 39. ReleaseYourCode . . . . . . . . . . . . . . . . . . . . . . 136 40. Remarkability . . . . . . . . . . . . . . . . . . . . . . . . . 138 41. MakingtheHang . . . . . . . . . . . . . . . . . . . . . . . 140 PartV—MaintainingYourEdge 143 42. AlreadyObsolete . . . . . . . . . . . . . . . . . . . . . . . 145 43. You’veAlreadyLostYourJob . . . . . . . . . . . . . . . . 147 44. PathwithNoDestination . . . . . . . . . . . . . . . . . . 149 45. MakeYourselfaMap . . . . . . . . . . . . . . . . . . . . . 151 46. WatchtheMarket . . . . . . . . . . . . . . . . . . . . . . . 153 47. ThatFatManintheMirror . . . . . . . . . . . . . . . . . . 155 48. TheSouthIndianMonkeyTrap . . . . . . . . . . . . . . . 158 PartVI—IfYouCan’tBeat’Em 161 49. Lead’Em . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 50. Manage’Em . . . . . . . . . . . . . . . . . . . . . . . . . . 165 51. LearnfromOpen-Source . . . . . . . . . . . . . . . . . . . 168 52. ThinkGlobal . . . . . . . . . . . . . . . . . . . . . . . . . . 170 WhatILearnedinIndia 173 Resources 176 A.1 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Reporterratum ItistrueIndiahastheadvantageinsoftwareandChinainhardware. IfIndiaandChinacooperateintheITindustry,wewillbeabletolead theworld...anditwillsignifythecomingoftheAsiancenturyoftheIT industry. WenJiabao,ChinesePremier,April11,2005 Introduction Iawoketoanoddsmell. WhereamI?Iasked(aloud,Ithink). IwasinBangalore,India’sGardenCity. Thatoddsmellwastheremark- ably foreign combination of pollution, ultraspicy food from the hotel’s kitchen, and something else that I could never quite put my finger on. It was my first morning there, and I was late for work. I didn’t feel bad about that, considering the hellish 32-hour journey I had suffered to get there. And that my India-savvy co-worker tricked me into an all-night culturalimmersionintheworld’sscariesthotel,aftergettingofftheplane inBombaythenightbefore. After coming to, I felt a panic, realizing that my driver must have been waitingdownstairsforanhour.OhGod,he’llbeangry,Ithought,asIscram- bled to getreadyfor the first in a seriesof all-dayinterviewing sessions. That’s just what I need on my first morning in a place like this...an angry taxi driver. Irusheddownstairs,resistingthefabulousaromaofaSouthIndianbreak- fast, and ran out to ask the doorman to page my driver. I asked if the driverhadbeentherelong. Hehad. Twohours. Ugh. IspentthefirstfiveminutesinthecarwithJosephapologizingprofusely overbeinglateandmakinghimwait. Helaugheddismissively. Thisismy job. I wait all day. And as I found out later, he really did. He didn’t just dropmeoffatworkandcomebackatafixedtime. Hewaitedattheoffice until the very minute I was ready to go. Without warning, at any time, I could come downfromthe officeandexpectto hop into the carandbe drivenaway. MyfirstexposuretoIndiaindaylightwasthatdriveacrosstownfromthe northwesterncornerofBangaloretothesouthwesterncorner. Theculture shockstartedtohitme. BangaloreisknownasIndia’sSiliconValley. Beingfromasmallcityback home, it was exciting to realize that I had come to a technical mecca. INTRODUCTION 2 More surprising, though, were the extreme contrasts between high tech and low tech. I saw half-naked children playing in the dirt in front of a huge Yahoo! sign. I saw a rickshaw with a Novell advertisementon the backand another with whatlooked like a SunSolarisCD danglingfrom therearviewmirrorasanornament. We drove past beautiful, state-of-the-art office buildings, filled with the employeesofsomeoftheWesternworld’smostinnovativecompanies.We dodged buffalo in the street and begrudingly yielded to rickety bicycles andfullfamiliesonsinglemopeds. We passed by fields containing huts made from twigs, mud, tarps, and assorted garbage. We drove through crowdsof well-dressedyoung peo- ple, drinking coffee outside their office buildings before the start of the day,onlytodrivealittlefarthertobepropositionedbylepersbeggingat atrafficlight. So before I even reached the office on my first day, my perspective had changed. This was a world of great extremes. These foreign voices I hadheardthroughscratchy,unreliablephoneconnections,attachedtothe brainswhosecodeI’dbeenruthlesslyreviewing,livedhere? Thesearethe peoplewhoareallegedlystealingourjobs? I had come to India in the first stage of the setting up of a new software developmentcenterformycompany. Myjobwastointerviewandselect about25peoplewhowouldformthe“seedteam”ofadevelopmentshop that would eventually house 250 people. More precisely, my job was to rejectmorethan200people. Wehadadvertisedouropenjobsandreceived nearly30,000applications. That’sfourzeroes.Youarereadingitcorrectly. Wehiredoutsidefirmstohelpuswhittlethe30,000downtoamoreman- ageablenumberandthenusedour ownU.S.-basedemployeestofurther workthatnumberdowntoashortlistofacouplehundredthatwecould interviewinperson. I was to be our interview panel’s executioner, sniffing out the weak and finishing themoffquicklyand(Ihoped)painlessly. While inIndia, Ivis- itedthehotelconferenceroomsofthreedifferentcitiesandmethundreds ofpeople. IprobablytookasecretpleasurefromthefactthatIwasgoing togoover andstopallthese peoplefromgettingthroughthesystemand “stealing”ourjobs. Itwaspost-boomtime. Bythat,ImeantheDotCombubblehadburst. The ITsector’slifestylehadgonefromrock’n’rolltoHolidayInnloungeact, anditwasshowinginIndiaaswell. Reporterratum INTRODUCTION 3 Infact,whatIfoundwasnotanarmyofpeople,plottingtostealourcom- forts for themselves. Unlike their counterparts in the West, these people weren’tangrythattheyhadtogetasmalltelevisionsetoreventhatthey might not be able to afford this month’s cable TV bill. These were sons and daughters who were scraping by, trying to raise money to support theirparentsandtheirspouses’parents. Theseweremothersandfathers whoseITjobsmeantthedifferencebetweenreallyeducatingtheirchildren or sending them to a school from which the further educational options haveahardlimit. Theyweren’ttryingtostealtheAmericandream. They weretryingtosqueezeaonce-dryeconomyforafewdropsoflife-giving cashflow. Ultimately, I was an executioner very much fit for the task. No physical injuriesresulted,butmanyintervieweesleftwithbruisedegos. WhatIleft withwasa changedperspective. Things had changed. A vibrantsociety of highlymotivatedand intelligent people existed here. And they weren’t playingforamenities;theywerecompetingforthesurvivaloftheirfami- lies. You can’t underestimate—or blame—someone with that kind of motiva- tion. Things Ain’tWhatTheyUsedto Be According to the U.S. government, IT unemployment has doubled since 2000. The Bureauof LaborStatisticsreportsthatbetween2000and2004, thenumberofprogrammersintheAmericanITindustrydroppedby17%. Injustthefirstthreemonthsof2005,U.S.techologycompaniescut60,000 jobs—twicethenumbercutinthesameperiodofthepreviousyear.1 The numbersaresobering. Inthisworldinwhicheverydeviceseemstocon- tainacomputer,couldsoftwaredevelopmentbeadoomedprofession? Matters are made more confusing by the bipolar temperament of the IT jobmarket. Hadyouleftandwentonretreatinacavein2000forseveral months,youwouldhaveemergedintoanITemploymentlandscapethat was as unrecognizable as Java to a COBOL programmer. In the mid- to late-nineties,agoldrushtookplaceintheITindustry. Irememberreading aboutemployersgivingBMWsassigningbonuses. Ateamfromanother company actually auctioned itself off on eBay for a huge signing bonus. 1“ChallengerTechSectorJobCutsReport,”http://challengergray.com/ Reporterratum