being craftsman: a software developers handbook

43
Being Craftsman: A Software Developers Handbook. -Harshvardhan Kelkar

Upload: others

Post on 08-Apr-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Being Craftsman: A Software Developers Handbook

Being Craftsman: A Software Developers Handbook.

-Harshvardhan Kelkar

Page 2: Being Craftsman: A Software Developers Handbook

IntroductionChapter One BeginningsChapter Two FundamentalsChapter ThreeTinkeringChapter FourThe ApprenticeChapter FiveTestsChapter SixRandomnessChapter SevenFocusChapter EightCareerChapter NineFinancesChapter TenHobbiesChapter ElevenHealthChapter TwelveReportingChapter ThirteenNegotiationChapter FourteenReadConclusion

Page 3: Being Craftsman: A Software Developers Handbook

INTRODUCTIONI thought that it would have been useful forme to have a handbook geared towards new graduates when I was starting out as a Software Craftsman. This chronicles my journey over the last five years and the lessons that I learned. I hope you find then useful. Do send me a note at [email protected] with your thoughts.

Page 4: Being Craftsman: A Software Developers Handbook

CHAPTER ONE Beginnings

I was fresh out of graduate school havingsecured a master's in computer science. Amaster's program certainly made medelusional as far as the job prospects wereconcerned. I strongly believed that seeingmy credentials as someone who could doresearch getting a job would be a piece ofcake. This was towards the end of 2009,when the effects of the recession were stillin play. I ended up working for startup xdoing uninspiring work. Mid 2010 as I wasstumbling, for those unfamiliar perusingstumbleupon. I came across preyproject . Itwas something that immediately caughtmy attention even though the webpage wasin Spanish. Running it through googletranslate I quickly realized this wassomething I cared about, A geo-trackingsoftware for Laptop's, mac's and cellphones. Discarding all my inhibitions Imailed the developers Tom and Carlosasking if they needed any help. They were

Page 5: Being Craftsman: A Software Developers Handbook

kind enough to respond positively and Ifound myself involved in an Open SourceProject based out of Chile. During thecourse of my interaction with Carlos, Ibecame acquainted with git, Blackberryapp development and most of all rekindledthe spark of software development in mewhich was missing since high school.I moved to California and found a new jobat BMC Software. My experience withPreyProject helped me deliver at BMC, Prey took a back seat but I was determinedto deliver on that front too. Last weekend Ipushed onto Github the "Lock" module forthe Blackberry version of Prey. The Lockmodule is essentially a global UI that istriggered onto a mobile screen by a pushfrom the server side, which disables allactions on the blackberry and can only beunlocked using a passphrase set at theserver-side. Furthermore, Prey runs as aservice on the device. Turning it off andthen on simply means the service startsagain with the device. If the lock attributeis set at the server side the Lock will be inplay again!

Page 6: Being Craftsman: A Software Developers Handbook

After testing functionality and seeing itwork, I was filled with Pride and Joy. Pridethat I had created value. Joy that I hadcreated beauty. I did something that Ireally wanted to do. I created a featurewhich may well be used in millions ofdevices. But even if it isn't that wouldn'tdiminish my joy one bit.One may well say there is no financial gainout of this exercise. Pete Sampras in hisautobiography says he must have hit atennis ball at least a million times beforehe ever set foot on court in his first majormatch. Malcolm Gladwell's hypothesis inhis book Outliers is to gain expertise in afield One must spend at least 10,000 hoursengaged in tasks of higher complexity thanthe previous one. Ten years to become anexpert software developer as outlined byPeter Norvig. I might have come late to theparty but I sure do intend to be an expertSoftware Developer with time. GoodSoftware Developers are Craftsmen orCraftswomen and what makes them sogood is practice. Open Source developmentis a very effective way of engaging with the

Page 7: Being Craftsman: A Software Developers Handbook

best developers across the globe andcreating a meaningful impact by doingsomething you like to do. FurthermoreOpen Source software is a uniquerepository of millions of lines of code opento inspection by anyone. Read code, writecode then read some more code. So stopfor a moment, Find a project you like onGithub or source-forge. Join a project,Drive a project but most of all rememberthe time when you were a kid, whenanything was possible and createsomething just for the Joy of it. Toconclude, Learn demonstrable skillsbeyond the computer science curriculumduring your stay in school. If you arewondering what is worth learning? Readon.

Page 8: Being Craftsman: A Software Developers Handbook

CHAPTER TWO

FundamentalsOnce you put yourself on the path ofradical self-improvement you start lookingat the fundamentals. For me it was therealization that I couldn't touch type.Having grown-up in the era of instantmessaging, I learned typing the wrong way.While I was a fast typist my fingerplacement was completely random. I didnot rely on the home row that the keyboardprovides. Bad techniques are hard toeliminate once imbibed. Now this is ageneric enough skill that you should learneven if you aren't a programmer given thatyou will type something.To remedy this I started working throughdrills on gtypist. Gtypist is a shell basedutility that teaches you to type the properway. Ratatype is a web based typing tutorthat works well too. This was time wellinvested as now I can indeed touch-typeand spend almost no time looking at thekeyboard. Once you start learning yourtools you make use of the cues that they

Page 9: Being Craftsman: A Software Developers Handbook

provide. In case of a standard qwertykeyboard I discovered the home row andthe raised bars on the f and j keys. Thosetwo bars alone give your fingers the entiremap of the keyboard. This also highlightsthe need to slow down, be mindful andmake use of the full potential that yourtools offer. If I were to start all over again Iwould learn to type first. Speaking of tools,who do you think wields tools? What doesthe word craftsman evoke? For me it isimages of toolmakers building watches,shipbuilders working in tandem towardsbuilding massive vessels and of coursedevelopers crafting code.Progressing as a craftsman is a hard task. Ithink there are three key essentials forsuccess.1. The Guidance of Master Craftsmen orWomen, henceforth referred to craftsmanfor the rest of this essay.2. The burning desire to build, tweak andcontinuously refine.3. The tenacity to work hard through thenot so interesting parts.Self learning is a good thing, but in the

Page 10: Being Craftsman: A Software Developers Handbook

company of master craftsmen one canmake giant leaps. I rediscovered, workingwith the best evokes the desire to buildbetter. There are techniques one can pickup by observation and osmosis.I s e r e n d i p i t o u s l y c a m e a c r o s s adocumentary called "Jiro Dreams of Sushi"Jiro is a master Sushi chef who runs aMichelin 3 star restaurant in a TokyoSubway. Earning 3 stars from Michelinmeans that the place is so good that it isworthwhile to visit the country just for thatrestaurant! Jiro at 85 years plus issomeone who is at the peak of his craft andstill aims to surpass it each day.What resonated strongly was the idea thatto achieve success you need to be so goodthat you can't be ignored. Further buildingon this is another idea that you need tosatisfy your work rather than rooting forsome dream passion. Satisfying the workthat is given to you is a stepping stonetowards building expertise and thusuncovering a deeper satisfaction of thework that you do. It is enlightening to seethe tough regimen that aspiring sushi

Page 11: Being Craftsman: A Software Developers Handbook

apprentices have to undergo before theycan even handle fish often running intomany years. Jiro's son Yoshikazu a masterSushi Chef in his own right at 50 years stillgets critiqued by his demanding father.The other takeaway was simplicity and theability to develop an expertise in a nichearea. There are no shortcuts and one has tocommit to a lifetime of learning. Finding amaster is not easy. Why should anyonespend time to critique you? Ultimately oneneeds to offer something of value. Findinga way to lighten your potential master'sload or solving a problem for him is oneway to form a symbiotic relationship. Theother motivation comes from greatcraftsmen themselves who want the craftto progress. In an environment like aSoftware company or even a Sushi bar likeJiro's it is imperative to train apprenticesto take upon future roles as craftsmenthemselves. This is pure economics at playonce the enterprise needs to run at scale.There are times when apprentices getassigned dreary tasks. The most successfulcraftsmen have gone through this phase,

Page 12: Being Craftsman: A Software Developers Handbook

tenaciously completing the assigned tasks,learning the domain along the way. Manyproblems are apparent only after doing thegrunt work first. So do not be surprised ifthe first tasks you are assigned seem trivialwhether it is your first job ever or you arestarting out at a new one. The projects youare given are a way for your employers toassess you. Do them well. Observe whatproblems are being solved and what aren't?Are there processes that can be improved?Be proactive in sharing ideas after youhave an understanding of your workenvironment. Once you can demonstrateexcellent delivery of the easy work will yoube given the harder stuff.

Page 13: Being Craftsman: A Software Developers Handbook

CHAPTER THREETinkering

A lot of what you learn will depend on thethings you tinker with. I decided to learnpython. Going through the usual motionsof starting with variables to moving toloops, something did not seem right.This exercise was not fun. So to make itinteresting I decided to build a tictactoegame in Python. The rest followed. It washard no doubt having to learn newparadigms, but having a clear goal in mindh e lp e d in g a t h e r in g t h e r e le v a n tinformation. Learning by doing is certainlythe best way in my opinion. Yet, that is notthe way we think natural. How did youcome to speak the language that you dotoday? Did you learn by first learning thetheoretical basis and the grammar or bylistening and being absorbed in anenvironment that literally leaked the

Page 14: Being Craftsman: A Software Developers Handbook

language also known as your family.Building a simple game like TicTacToetaught me valuable lessons.1. Rome wasn't built in a day, the samegoes for software.2. Gaining skills takes time, be patient.3. There is great joy to be gained frombuilding something from scratch and thatin itself is reason enough to do it.4. This is a form of deliberate practice.Pushing yourself beyond what you can docurrently is deliberate practice. Buildingsomething that you haven't yet willinvariably involve some aspect that willpush your limits. Keep a notebook withthings you want to build next. Theseprojects will help you expand yourhorizons and make you more valuable.

When you tinker, things will invariablybreak. The way forward is to identify andsolve the breakage. Lets see how.It was a sunny day, I stepped in my car andstarted out for work. Within the firsthundred feet of the car moving, I heard amuffled but regular "thup a thup a thup". I

Page 15: Being Craftsman: A Software Developers Handbook

stopped the music and it was still there, Ipulled over and got out of the car. Did aquick visual, checked if my bumper washitting the tires, saw nothing amiss andstarted again. The sound persisted"aargh!". I pulled over again. I saw an oldman approaching and thought to myselfthat this was great luck. I lowered mywindows and asked if he could see anyobvious flaws as I would attempt to movethe car slowly. Hoping for an affirmative, Iwas aghast when he gestured to me that hewas extremely hard of hearing. I got downagain and started looking at the tires again.Then there it was stuck on my front tire,some kind of a poly wrapping material.Each time the tire rotated the portion thatwasn't stuck was hitting the area above thetire. I took it out and problem solved. I hadjust completed debugging my car.

What is Debugging? At its essence given asystem with x as a known and expectedbehavior and y as undesirable behavior,the task of reconciling the difference andfinding the root cause is debugging.

Page 16: Being Craftsman: A Software Developers Handbook

In fact debugging is very much a part ofprogramming as it is in daily life. bestadvice I got out of college was "learn todebug". Ironically I got the advice in aninterview that I flubbed. It is analogous todoctors figuring out what is wrong with apatient or a mechanic finding trouble witha car. The goals similar, but the objects andtools employed different. The bestprogrammers are extremely good atdebugging. Some of the techniques I'vecome to employ are:1. Reduce the problem space.2. Use print statements. 3. Use Debuggers, which was my originalintent in asking the old man for help.4. Logs: Logs give a long term state of thesystem when turned on. It is very easy tohave them running into millions of lineswhich leads me to point one again.The other use of debuggers I make is tounderstand the behavior of unfamiliarprograms. When a reading is not sufficient,It is quite handy to spin up the debuggerand step through the program seeing thestate of the data that it manipulates. When

Page 17: Being Craftsman: A Software Developers Handbook

you are in a situation be it in a program oryour personal life, think of the debuggingmodel employing a program or a personfor your problems.

Abraham Maslow said, “If all you have is ahammer, everything looks like a nail”.Building quality software relies on amyriad of tools. One essential pillar ofcraftsmanship, software or otherwise is inthe mastery of tools that you work with. The most important and essential tool thatyou have is your mind. All softwareoriginates as a thought so having a cleart h o u g h t p r o c e s s i s n e c e s s a r y .U n f o r t u n a t e l y w e h a v e b e c o m eaccustomed to google, facebook andtwitter. Being mindful of what you aretrying to achieve is important. There is aquote from the TV show Sherlock that hasstuck with me "People fill their heads withall kinds of rubbish. And that makes it hardto get at the stuff that matters. Do yousee?" Treat your mind as a garden and onlylet in thoughts that should be nurtured,

Page 18: Being Craftsman: A Software Developers Handbook

getting rid of weeds is essential. We must remember for all the clouds thatare now available, ultimately it is a groupof computers connected to a network.Quoting Larry Ellison "Google does not runon water vapor". The choice of operatingsystem that you go with will have an effecton how much of the underlying system youunderstand. Choose wisely. There are a plethora of programminglanguages available and to persist with thethought that all languages are made equalis a fallacy. Using the right language for thejob at hand will go a long way in buildingsuccessful products. Learning a differentlanguage than one which you use on a dailybasis will create new ways of thinking. Forinstance try writing to a file first in Java,then in Python. While I am not getting inthe argument of which is better, I do wantto emphasize that languages have thereown strengths. To deal with data in flatfiles, you are missing out if you do not usethe trinity of awk, sed and grep. They willallow you to craft one liners rather thanequivalent programs of hundreds of lines

Page 19: Being Craftsman: A Software Developers Handbook

in a high level language. From notepad tovim to sublime text to even a IDE. The texteditor is where you translate your thoughtto code. Structured information that canmake computers do what you want it to do.Mastery of the text editor will determinehow long it takes you to write code. Weneed to see how our code evolved. AnySoftware that is not one time use should bemaintained in a version control system. Gitis my favorite, however depending on yourwork environment you could end up usingsvn or perforce. Git has many subtletiesthat will be apparent with practice, knowyour git and never worry about losingsource code. Debuggers aid understandingboth the program and data flow in complexprojects, though let your mind compile itfirst. Mastering the debugger will go a longway in solving bugs in programs that youare unfamiliar with and sometimes infamiliar code too. To store and retrievedata we need databases. Databases are thefoundation of the applications that webuild. We have SQL and not only SQL. Forstructured data SQL based databases are

Page 20: Being Craftsman: A Software Developers Handbook

still golden. Since real data is not alwaysstructured, that has forced the move toNOSQL databases. Redis is the swiss-knifeof data in key-value pairs. Learn aboutcouchbase or mongodb for exposure todocument based databases. T h i s l i s t o f t o o l s i s i n n o w a ycomprehensive, Building mastery of toolsis a long and arduous process. Howevertaking tiny steps today go a long way andadd up in a few years. More often than notthe problem you are trying to solve willdrive the tools that you will use. So try tosolve as many different problems as youcan, slowly but surely you will see anexpanding toolkit. The path I have laid formyself is to always be learning and teachwhat I learn.

Page 21: Being Craftsman: A Software Developers Handbook

CHAPTER FOUR The Apprentice

To be a master, one must first be anapprentice. In the modern world, typicallyyour first job is where the apprenticeshipbegins. I would prefer working on a craftmuch earlier than that. But, we are limitedby the systems created around us likeschool and university. With medievalguilds no longer around, we have to craftour own apprenticeship path. The firstchallenge is finding masters. Some placesyou will find them are Universities,Companies and Open Source projects. Thesoftware industry, dynamic as it is will notafford you the luxury of one master. Peoplemove on or you do. So be comfortable withthe idea of having many masters over thecourse of your apprenticeship.The big mistake I made when I wasyounger is to think that the golden key toopportunity is a degree from an elitecollege. A degree is just a tool that can

Page 22: Being Craftsman: A Software Developers Handbook

open certain doors and maybe give you ahead start. So don't lose hope in case youdidn't go to one. The real world only caresif you can solve a business problem.There are in fact two keys to opportunity,curiosity and a hunger to learn. Use yourcuriosity to learn things that you like. Don'tpanic if things don't make sense, everyonebegins somewhere. Learn from books andthe internet, the greatest learning tool ofour time. Teach what you learn. Leveragewhat you have learned to get in a companythat aligns with your curiosity. This createsa feedback mechanism for you. Learn fromeveryone, your peers, your superiors andeven the interns.To be a software craftsman you must learn,all the time. Do you have the hunger tolearn? If you don't stop and do somethingelse, otherwise cultivate it.

What is worth learning? Two things 1.) To satisfy the work that is given to you,you naturally must learn about it.2.) Follow your curiosity.

Page 23: Being Craftsman: A Software Developers Handbook

That's it by learning the things needed toaccomplish your tasks you immediatelyhave become valuable to your employer.

The second thing to do is to follow yourcuriosity. This comes with a caveat ofwhittling down your interests to a fewthings rather than many. That will allowyou to get better at your chosen interests.Then let the magic begin, with the rightpeople around you will learn exponentiallyf a s t e r a n d h a v e a m e a n i n g f u lapprenticeship. In the path to mastery, thejourney is the destination.

Page 24: Being Craftsman: A Software Developers Handbook

CHAPTER FIVETests & Checklists

One of the most important ideas Iencountered in building quality software istest-driven development. In TDD themantra is red, green, refactor. Write afailing test and run it (red), make the testpass (green), then refactor it ,that is look atthe code and see if you can make it anybetter. If you embrace TDD you will generate codethat can be shipped with confidence and will lay the groundwork to effectively communicate the code's intent in the future. With TDD you will eliminate magic from the code your write and make it deterministic and dependable.

The other tool to use while performing repetitive processes such as deploying yourcode to a production environment is a Checklist . Checklists are simple actions that should be ticked off before taking a critical action.

Page 25: Being Craftsman: A Software Developers Handbook

Eg. • Check the code version• Check that code compiles• Check that all unit tests pass• Check that all integration tests pass.

Only when all items on a checklist are satisfied should you go ahead with the production push. Combining Test driven development with checklists is something that all developers should consider.

One of the most notorious cases of bad code being deployed is that of Knight Capital which lost over 400 Million dollars in a Span of 30 minutes. A checklist based process would have prevented old code from being run on a single server across a group of eight.

Checklists are universally applied by airlinepilots, surgeons etc. So make the checklist a part of your life. They will prevent mistakes that could happen otherwise.

Page 26: Being Craftsman: A Software Developers Handbook

CHAPTER SIX Randomness

What makes life interesting is notpredictability but randomness, I will givean example, On Superbowl sunday day Imet couple of friends at Crepevine in PaloAlto for brunch. While going back I took awrong exit and ended up in the StanfordCampus. Now the roundabout there isalmost a mile inside. Upon taking the Uturn I noticed a museum midway that Ihad not on my earlier visits there. I pulledin and it turned out it was a museumestablished by none other than theStanford family itself. I parked my car andwent inside to see one of the best collectionof artifacts and art that I have ever seen.Added bonus that entry and parking wasfree. So a wrong exit made my day richer.Chance has a greater role in life than welike to admit. Relating randomness to theSoftware world may seem strange but bearwith me. The idea I seek to present is thatrandom explorations may lead toserendipitous occurrences. Exploring

Page 27: Being Craftsman: A Software Developers Handbook

things that you may not have encounteredbefore goes a long way towards developingskills or adding new tools to your toolkit.For instance if you are an imperative styleprogrammer, learning a functionallanguage like Erlang will expose you to adifferent style of thinking. If you work withMysql then learning about a NoSqldatabase like Redis will expose you to howunstructured data can be handled. It is ofcourse difficult to predict how theserandom walks may be of immediate benefitbut I think the real value lies in relating thedisparate knowledge to a common thread. Ithink randomness is also what makes theSilicon Valley an interesting place to be. Ifyou are a technology professional in thebay area chance encounters can lead tonew opportunities or even just expose youto another dimension of the technologyindustry that you didn't know existed.One of the best ways to introducerandomness to your surfing habits isStumbleupon, you can think of it as aremote control to the Internet which willrecommend webpages based upon your

Page 28: Being Craftsman: A Software Developers Handbook

interests. I came across PreyProject viastumbleupon where I went on to make myfirst ever open-source contributions whichled me to eventually work at my first bigcorporation job. The other source forrandomness I rely upon is hacker news. Inreal life make use of meetup.com or yourfavorite programming language's usergroup. I think in case of real life therandomness begins once you show upwhich is not limited to showing upphysically but also taking up projects thatyou care about. You like the girl you justmet? Ask her out. I am engaged now sothat avenue is now closed. You want towrite that killer app? Start working on itthen, only then can randomness help you.

Following my embrace randomnessmantra, I first showed up to a talk at theBay Area Python User Group. At the end ofthe talk they were looking for speakers forthe next set of talks. I randomly picked“nltk” which is a natural languageprocessing package and volunteered to talkabout it. I knew nothing about it when I

Page 29: Being Craftsman: A Software Developers Handbook

first decided on the topic. Committing togive the talk forced me to learn everythingabout it and the end result was a verysuccessful talk.

The second problem was that while I didgive the talk the videographer did not showup, so I then decided to record the talkmyself via google hangouts. The Baypiggiesgroup now has it on their youtube channeltitled “Document similarity using nltk” .

The charter I have laid down for myself isto embrace more randomness by showingup viz. building things I care about thusencountering problems that I haven't seenbefore and in life in general. While I cannotvouch for all outcomes, I certainly hope itwill be an interesting journey.

Page 30: Being Craftsman: A Software Developers Handbook

CHAPTER SEVEN Focus

For a software craftsman, focus is essentialto build quality software. Interrupts are theenemy of focus. While not all interrupts areavoidable like meetings, interviews or evena colleague with a question. There arecertain things that can be controlled likeyour inbox and distractions like news,facebook, twitter or any other form ofcontent readily available. The question ishow? A friend suggested a system whichhas worked great for me. Break down workin chunks of 25 minutes before you take abreak. I use this nifty web applicationcalled moosti that helps me keep time.Ultimately it is a mental hack that allowsme to give permission to myself to bepresent and to focus on the task at hand.With the timer counting down I tend toclose all other tabs. The added benefit ofthis system is it allows me to measure howproductive my day was. I need to count thenumber of successful chunks.

Page 31: Being Craftsman: A Software Developers Handbook

CHAPTER EIGHT Career

To make a career move as a new SoftwareCraftsman there are two questions youdefinitely need to ask:1. Is it your time to learn or time to earn?2. what are you willing to get good at?I was lucky enough to ask both questionsthat originated at different sources, butthen I do embrace randomness. It is stillmy time to learn. What is interesting isonce you are in the workforce, earn andlearn are not mutually exclusive. So goahead make the most of it. This is anopportunity for you to find out what do youreally want to do. Once you decide that,don't look back and be willing to invest thetime it takes to become master of yourcraft.

When I am posed a question as to what is itthat I do, my reply is unequivocally I solvebusiness problems. In fact most craft's

Page 32: Being Craftsman: A Software Developers Handbook

ranging from watch making to ship-building are solving a business problem. Iwould define a business problem as onewhich upon being solved either increasesprofits or decreases expenses for yourorganization. For example:Writing software that predicts inventoryconsumption rates for spacely sprockets isa way to increase profits.Writing software that helps reduce thenumber of delivery trips that big retailerhas to make is a way to reduce expenses.Building software is a lot of fun as thebusiness problems that are solved bysoftware have the potential to be massivelyscalable. Lurking in your organization is aproblem waiting to be solved, maybe aprocess that can be automated or a missinghook to an api that returns valuable data.You are running a software company evenif you aren't.It is easy to be caught up into a title ofbeing a Software Engineer. In reality weare solving a business problem, writingsoftware is just the tool we use to achieve

Page 33: Being Craftsman: A Software Developers Handbook

it.

CHAPTER NINEFinances

While the best craftsmen are never in it forthe money, we owe it to ourselves to planfor our financial well being. If this is yourfirst gig at a big corporation, then you arein luck, there are financial instrumentsavailable to you that are effectively a bonuson top of your base salary. This wasconfusing to me when I first started out. So here is what you should definitely do:1. Max out your company 401k till thematching limit. e.g. If your companymatches 5% of your salary, do it. With thepower of compound interest that moneycan grow with time. The other advantagethat you get is the money that is placed in a401k is pre-tax. This reduces your taxableincome every year.2. ESPP. Employee stock purchaseprograms typically purchase a companystock at x% discount for you. You need to

Page 34: Being Craftsman: A Software Developers Handbook

avail of that. 3. The most important thing to makemoney is to first not lose money, let thatsink in. What that means is that you needto aggressively tackle your loans and stayout of debt.It took me a good 3 years in the industrybefore I got on top of these things so I wills a v e y o u s o m e t i m e . R e a d t h eMoneyMustache blog get a contrarionperspective on managing your finances.An active interest in building your stashwill open options unavailable to youearlier.

Page 35: Being Craftsman: A Software Developers Handbook

CHAPTER TENHobbies

To keep your sanity find a hobby outside ofwork. For me it is tennis. Tennis is civilizedbattle with the sword replaced with aracket. Tennis is about observing youropponent for that moment of hesitation.Tennis is about coming up from behindwhen you are down a couple of sets to winthe match. Tennis is about focus andsilencing your inner voice. Tennis is aboutliving in the moment. Tennis is aboutbelieving that the next serve will be an ace,the forehand you hit will be a winner andwhen you barely get the ball across the net,y o u w i l l s t a y a l i v e t o m o u n t acounterattack. Tennis is about long termstrategy and short term tactics.Tennis is about asking questions, Can Ibest my opponent with a fierce forehand ora blazing serve? Or can he get the better ofme in that time? Do I serve and volley ordo I play from the baseline? Did that extrapower on the return unsettle him? It isabout adapting to your opponent and

Page 36: Being Craftsman: A Software Developers Handbook

employing the right tools. There are manytools that can be applied: the serve, theforehand, the back-hand, the slice, the lobetc. It is about asking what new tools can Iemploy? Tennis is about statisticalthinking, what are the odds of me makingthis shot? Okay I admit I'm not good atthis. There is this constant process oflearning that goes on. Tennis is aboutmaking decisions in a split second withincomplete information.Tennis is about showmanship and makingelegant shots. I relish the crack of the ballhitting the racket on a shot and the silenceof a well executed serve. Tennis is aboutrooting for your opponent to make thathard return because it adds to the fun. Agood game of tennis is energizing. Playingtennis is about loving the battle more thanwinning and that is why I love tennis. Finda hobby that you love. That will make yourjourney as a craftsman more enjoyable.

Page 37: Being Craftsman: A Software Developers Handbook

CHAPTER ELEVENHealth

The most important thing you can do isstay healthy. Healthy people are bydefinition not sick and so can work ifwhenever they choose to. Staying healthy isa simple task, that can be achieved withmoderate exercise and the right diet. Walka lot if you don't work out. Dis t in g uis h in g be t we e n fo o d a n dentertainment. e.g. Cake, pastries, cookiesare entertainment. Nuts, fruits, salads arefood(thank you Scott Adams!). Once youtrain your brain you will find yourselfmaking these choices automatically.The next thing to control is the equipmentyou use . Sof twa r e Cr a f tsme n a r esusceptible to repetitive stress injuries. Theway to dodge those are to:a)Learn to type.b) Get an ergonomic evaluation to get yourposture right.c) Get an ergonomic keyboard and a mouseor trackpad.Investing in these now will save pain

Page 38: Being Craftsman: A Software Developers Handbook

tomorrow. I personally had wrist painwithin a year of working on a cheapkeyboard. That led me to explore and Idiscovered the Kinesis Advantage, a splitkeyboard that corrects the posture of yourhands. I started carrying it around and boyare my wrists happy. It is also a greatconversation opener when you first startwork.

Page 39: Being Craftsman: A Software Developers Handbook

CHAPTER TWELVE Reporting

Your first job will also introduce you tomanagement. That means you will reportto a superior who will assign tasks to you.Management loves to know whats going onand rightly so, they are paying you after all.There is a simple system I use. I maintaintwo files one called done.txt and anothercalled runbook.txt.I update my done file at the end of eachday with you guessed it, what I've done.The runbook is more interesting. I've ashort attention span. So the runbook isdetailed instructions on the tasks I need toaccomplish that day.e.g. Write a program to parse data stream. Run Awesome algorithms on parsed

data. Write methods a, b, c to accomplish

that.

The advantage of doing this is that each

Page 40: Being Craftsman: A Software Developers Handbook

action item is a micro unit of work andeven if I get interrupted I can resumewhere I left off by referring to the runbook.At the end of each week I go over done.txtcollect the items for the week and send it tomy manager. I've done this across multiplecompanies and my managers have loved it.

Page 41: Being Craftsman: A Software Developers Handbook

CHAPTER THIRTEENNEGOTIATION

There are many dimensions to anegotiation apart from your compensation,your stock options plan and your 401k. Forme the most important one is the rate atwhich you can learn. You can directlyleverage that to earn more. That to me isthe biggest component of the negotiation. Ialways ask will I be happy working at thisplace and how much will I learn? It isimportant to not out negotiate yourself outof the conversation especially while you arestarting out. Take the job for the adventureand growth it offers rather than just hardnumbers. You can always ask for moreonce you have proven your worth. Thereare many negotiation books that you willfind on amazon and you should considerreading. Negotiating is a skill worth tens ofthousands of dollars each working year.

Page 42: Being Craftsman: A Software Developers Handbook

CHAPTER FOURTEEN READ

The more you read the more models youwill be able to fit in your head and identifysituations conducive to your growth. Thinkof books as your mentors. Books areespecially useful if you don't have mentorsin real l i fe. Uti l ize the col lectiveintelligence available to you. You will bewiser. What books to read? I'll give you astarter list. You can use that as a startingpoint much like how a web crawl works.Books which I think transformed me as aperson. 1 . How to Fail at Almost Everything and Still Win Big:Kind of the Story of My Life by Scott Adams2. Choose Yourself by James Altucher3. AntiFragile by Nassim Nicholas Taleb4. Mastery by Robert Greene5. The Power of Now by Eckhart Tolle6. The Surrender Experiment by Michael Singer7. The Passionate Programmer by Martin Fowler8. The Personal MBA by Josh Kaufman9. The Checklist Manifesto by Atul Gawande

The other books to read are the ones bypeople who inspire you and you want to belike, anything that piques your curiosity.

Page 43: Being Craftsman: A Software Developers Handbook

Let that be your guiding light.

ConclusionThe ability to go to sleep knowing that you did your job with full dedication and energy is a valuable reward. There is no purpose except to enjoy the journey you are on. I wish you success and a lifetime of learning.