Your SlideShare is downloading. ×
Becoming a Better Programmer
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Becoming a Better Programmer

29,874
views

Published on

One of my sessions at the ACCU 2011 developer conference. …

One of my sessions at the ACCU 2011 developer conference.

CHECK OUT THE BOOK: https://gum.co/becomingbetter

>> SYNOPSIS

You're a programmer. You spend your life programming. (You dull person, you!)

Don't you want to do it as well as you possibly can?

This entertaining talk will provide a number of practical, simple methods to become a better programmer. There will be plenty of hand-waving and jumping, a little philosophy, and much wisdom from our excellent programmer forebears.

Be the best programmer you can!

Published in: Technology, Business

7 Comments
98 Likes
Statistics
Notes
No Downloads
Views
Total Views
29,874
On Slideshare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
67
Comments
7
Likes
98
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. BECOMING ABETTERPROGRAMMERPETE GOODLIFFE ACCU 2011, Oxford, UK
  • 2. @petegoodliffepete@goodliffe.netgoodliffe.blogspot.comwww.goodliffe.net PETE PROG GOOD LIFFE RAMMER / AUTHOR / C OLUMNIST / TEACHER CO NSCIENTIOUS CODER
  • 3. I WRITE STUFF (you might like to read it )PETEPRO GOOD LIFFE GRAMMER / AUTHOR / COLUMNIST TEACHER CO NSCIENTIOUS CODER
  • 4. I WRITE CODE (check out my latest iPhone game) iTunes Link: http://t.co/cV5KfsyPETEPRO GOOD LIFFE GRAMMER / AUTHOR / COLUMNIST TEACHER CO NSCIENTIOUS CODER
  • 5. SYNOPSIS // MY PROMISE TO YOU Youre a programmer. You spend your life programming. (You dull person, you!) Dont you want to do it as well as you possibly can? This entertaining talk will provide a number of practical, simple methods to become a better programmer. There will be plenty of hand-waving and jumping, a little philosophy, and much wisdom from our excellent programmer forebears. > Be the best programmer you can!
  • 6. SYNOPSIS // OUR ROUTE start BECOMING A BETTER PROGRAMMER what is a “good” this is a how to learn from programmer? continual cycle them look at good programmers the end applause, flowers, etc
  • 7. SYNOPSIS // THE PROBLEM 90 minutes!
  • 8. SYNOPSIS // THE PROBLEM
  • 9. CASE STUDY #1
  • 10. SYNOPSIS // OUR ROUTE ...go!
  • 11. WHAT ISA GOODPROGRAMMER ?
  • 12. Better than iwhat? ndu are now stry averyou age programm ers aroun d you
  • 13. no, nono, no, no, no no
  • 14. the“ideal programmer”
  • 15. super awesome you?liability
  • 16. super awesome skill a skill b skill c you?liability
  • 17. CASE STUDY #2
  • 18. 2 useful models
  • 19. THEFOUR LEVELS OFINCOMPETENCE
  • 20. 4 Levels of (In)Competence us inc ompe tence Unc onscio ten ce com pe ous in Cons ci ce p et en co m en ce c io us p et Cons c om ou s ns ci nc o U
  • 21. THEDREYFUSMODEL SKILLS OFACQUISITION
  • 22. the dreyfus model
  • 23. the dreyfus model expert proficient competent advanced beginner novice
  • 24. novicehave no knowledge (yet) want results (fast) have no experience need rules c an’t judge rules
  • 25. ad vanced b eginner som e experience some learning explicit knowledge can break free from rules a little will get quickly stuck know where to get answers cant focus out irre levant details
  • 26. co mpetent men tal model made assoc iations formedunde rstand relative i mportance of aspects can approach unk nown problems thi go s is od pla a hodical routes into problems to be ceplans met
  • 27. p roficient beyond competency un derstand big picturefrustrated by nov ice simplifications can corre ct previous errors & ref lect on experiences maxims focus on important issues tacit knowledge
  • 28. expert the pinnaclethe re are very few have authority interlink skills c an teach others have intuition naturally see an answer
  • 29. where are you? how far up the mountain?
  • 30. how high do you want to go?
  • 31. IT’SALL ABOUTEFFORT
  • 32. 10,000
  • 33. 10,000 expe rt8,000 s ho w s p ot entia l 4,000 also- ran
  • 34. 10,000 expe rt = 10 years * 3 hours
  • 35. “Effort is one of the thingsthat gives meaning to life.Effort means you care aboutsomething, that something isimportant to you and you arewilling to work for it. ” Carol Dweck Social Pyschologist Self-theories: Their role in motivation, personality and development (1999)
  • 36. what is a “good” programmer?
  • 37. what is a “good” programmer?me ductive ets d ead pr o knows a l line ot s conscientio joins so us an code cieties rite s cle good designer w constan tly lear lot ning r eads a improves codegood ce comm h... expe rien unica tor , bla blah “knows bl ah, ” certa
  • 38. what is a “good” programmer?me ductive ets d ead o who’s m pr knows a l ot line s e conscientio usasuring ode joins so cieties w rite s clean c ? good designer constan tly lear lot ning r eads a improves codegood comm h... nce unica h , bl a exp erie tor blah , bla
  • 39. who cares? like, really, who cares?
  • 40. does it matter?
  • 41. hell, yeah!
  • 42. IT’SALL ABOUTATTITUDE
  • 43. attitude
  • 44. attitude ResponsibilityContinuous learning Hunger Curiosity Humility Self-belief
  • 45. choose to carechoose not to care
  • 46. OVER TO YOU #1 do you want to be a better programmer?
  • 47. OVER TO YOU #1 do you want to be a better programmer?
  • 48. CASE STUDY #3
  • 49. OVER TO YOU #2 what is your weakest area as a programmer right now?
  • 50. OVER TO YOU #2 what is your weakest area as a programmer right now?
  • 51. OVER TO YOU #2b what’s the worst and best code you’ve ever written?
  • 52. OVER TO YOU #2b what’s the worst and best code you’ve ever written?
  • 53. OVER TO YOU #2c are you a better programmer than you were last month last year last decade last job/project
  • 54. OVER TO YOU #2c are you a better programmer than you were last month last year last decade last job/project
  • 55. THIS IS NOT ASUBLIMINALMESSAGE
  • 56. start BECOMING A BETTER PROGRAMMERwhat is a “good” this is a how to learn from programmer? continual cycle them look at good programmers the end applause, flowers, etc
  • 57. start BECOMING A BETTER PROGRAMMERwhat is a “good” this is a how to learn from programmer? continual cycle them look at good programmers the end applause, flowers, etc
  • 58. THEWISDOM OFG R E(“great”)C O D E R S AT
  • 59. we needsome experts!
  • 60. THE CAST #1 THE CAST #2
  • 61. THE CAST #3
  • 62. we needsome topics!
  • 63. OFLEARNING
  • 64. BOB MARTIN Re ad! Learn! Never stop learning. Lea rn many languag es. Learn many disc iplines. Practice TDD and never let it go. w-with-robert-c-martin-co tervie -a uthor-of-the-agile-manifes to/ http://www.azull o.com/blog/think-agile/in
  • 65. BJARNE STRO Know your fu USTRUP ndamentals machine arc (algorithms, hitecture, sy data structuprogrammin stems) and k res, g languages now several to the point where you ca n use http://www them idioma .wired.com/ thisdayintec h/2010/10/1 tically. 014cplusplu s-released/a ll/1
  • 66. If you are looking to get better atsome thing, youre not going to get very far wit hout either pract ice or feedback. p.html t.co m/2011/02/harvesting-crohttp://asemantic.blogspo KEVLIN HENNEY
  • 67. OVER TO YOU #3 are you continually learning? how?
  • 68. OVER TO YOU #3 are you continually learning? how?
  • 69. OFJ O Y
  • 70. CASE STUDY #4
  • 71. JAMES G OSLING To be re To be se ally goo lf motiva d, you ha ted. in love w ve to be http://u smanah ith what mad.wor d you do. linus-tor press.com/200 valds-da 6 ve-thom /08/02/great-p as-david r -heinem ogrammers-ans eier-pet er-norvi wersinterview-w g-james -gosling ith-steve-yegge -guido-v an-tim-b - ray
  • 72. DAVE THOMASDurin g my secondary s chooling I took a cla ss in a local tech nical college on com puters. It got me totally hooked: I fell in love with programming s-torvalds-dave-thomas- inte rview-with-steve-yegge-linu reat-programmers-answers ng-guido-van-tim-brayhttp://usmanahmad.wordpress.com/2006/08/02/g david-heinemeie r-peter-norvig-james-gosli
  • 73. DAVE THOMAS Passion terv iew-with-steve-yegge-linu s-torvalds-dave-thomas- at-programmers-answersin uido-van-tim-bray ress.com/2006/08/02/gre david-heinemeier-p eter-norvig-james-gosling-ghttp://usmanahmad.wordp
  • 74. DONALD Despite being a founder KNUTH decades member compute , Knuth h of one o rs today as not lo f the boo surprise st his se m fields s me, th nse of w of the pahttp://w ere wasn onder: “ st ww.fbbv t a sing Everythi a.es/TLF le thing ng abou U/tlfu/i ng/micr have pre that I co t osites/p remios/ frontera dicted 3 uld s/galard 0 years onados/ 2010/in ago.” for macion. jsp
  • 75. DONALD KNUTH Youre b ound to unhappy be if you optimize everythi(referen ce unava ng. ilable)
  • 76. THIS IS NOT ASUBLIMINALMESSAGE
  • 77. OVER TO YOU #4 do you have passion/joy? how does it affect your work?
  • 78. OVER TO YOU #4 do you have passion/joy? how does it affect your work?
  • 79. OFPRIDE AND OFTAKING CARE
  • 80. PETE GOODL What’s the r IF eal differenc FE stems from e? Good prog your attitud ramming professiona e. It lies in k l approach a nowing the the best sof nd always w tware you ca anting to wr the software n, despite th ite factory. e pressuresCode Craft, N o Starch Pre ss of
  • 81. BOB MARTIN The o nly way t o go fast is to go well. ry Programmer Should Kno w Speed Kills, 97 Things Eve
  • 82. Whe n you write c ode, write thebest code you can.Never suc cumb to thetempta tion to rush. obert-c-martin-co-author- of- w-with-r http://www.azullo.com /blog/think-agile/intervie the-agile-manifesto/ BOB MARTIN
  • 83. DONALD Why did I choose KNUTH the word somethi ng artifi ‘art’ for by Natur cial, dev the title e, but it ised by h ? “Art m is to cre also mea uman be eans ate som ns a wor ings rath has styl ething o k of bea er than e and el f beauty uty. Wha program egance a : that a c t I want s should nd comm omputerhttp://w ww.fbbv also be w unicates program a.es/TLF U/tlfu/i ell writt well. Goo ng/micr osites/p remios/ en.” d fronte ras/gala rd onados/ 2010/infor macion. jsp
  • 84. DAVE THOMAS [Good progr ammers] c are about w hat they do. egge-linus-torvalds-dave- rs-ans wersinterview-with-steve-y /08/02/great-programme r-peter-norvig-james-gosli ng-guido-van-tim-brayhttp://usmanah mad.wordpress.com/2006 thomas-david-heinemeie
  • 85. Huma ns are allergic to change. They love to say, “We ve always done it t his way.” I try to f ight that. Thats w hy I have a clock on my wall that runs coun ter-clockwise. 1987, No. 167 pril, OCLC Newsletter, March/AGRAC E HOPPER
  • 86. CASE STUDY #5
  • 87. OVER TO YOU #5 do you take pride in your work? when has this been evident?
  • 88. OVER TO YOU #5 do you take pride in your work? when has this been evident?
  • 89. OFSIMPLICITY
  • 90. sir C.A. There ar e two wa R. HOAR obviousl One way ys of con is to ma structin Eg a softw y no def ke it so are desi iciencie simple t gn: it so com s, and th hat ther deficien plicated e other w e are cies. The that the ay is to first me re are no make demand thod is f obvious s the sa ar more inspirat me skill difficult ion as th , devotio . Itlaws wh e discov n, insigh ich unde ery of th t, and ev rlie the e simple en complex physical phenom ena of n The Emp ature. eror’s O ld Clothe s
  • 91. DENNIS RITCHIE UN IX is basically a s imple operating system , but you have to be a genius to understand t he simplicity. be tml#ixzz17iofPO otes/authors/d/dennis_ritchie.hhttp:/ /www.brainyquote.com/qu
  • 92. B RIAN KER NIGHAN Controlling complexity is the essence of compute r programming. ith P.J. Plaugher) 19 (w Software Tools (1976), p. 3
  • 93. S implicity is p rerequisitef or reliability. ) ths that might hurt? (1975EWD498 How do we tell tru E DSGER DIJSKSTRA
  • 94. sir C.A. R. HOAR At first I hoped th but I soo at such a tech E n realize nically u software d it was nsound p determi can be im doomed roject w nation. T plement to succe ould col here is n ed, sold, ss. Almo lapse othing a and even st anythBut ther mere sc used giv ing in e is one against ientist c en enougreliabili quality t the flood an say t h ty. The p hat cann hat will rice of r ot be pu of a hundred m stand eliabilit rchased illion do It is a pr y is the in this w llars. ice whic pursuit of the ay - and that h the ve utmost s is ry rich f implicity ind most . hard to p ay. ?
  • 95. OVER TO YOU #6 do you strive for simplicity? when has this been evident?
  • 96. OVER TO YOU #6 do you strive for simplicity? when has this been evident?
  • 97. OFBEAUTY
  • 98. DONALD Why did devised I choose by huma the word KNUTH ‘art’ for beauty. n beings the title What I w rather th ? “Art m has styl ant is to an by Na eans som e and el create s ture, but ething a well wri egance a omethin it also m rtificial, tten”, he nd comm g of bea between explains unicates uty: that eans a work of science . “There well. Goo a compu enough and art is this s d progra ter prog to expla is that s tatemen ms shou ramhttp://w in it to a cience is t that I l ld also b ww.fbbv a.es/TLF compute somethi ike: the e U/tlfu/i r, and ar ng that differen ng/micr osites/p t is ever we unde ce remios/ frontera ything e rstand w s/galard onados lse”. ell /2010/i nformac ion.jsp
  • 99. LINUS T ORVALDSI call “taste”. It’s a thing ork with not by how p roficient they are:I tend to judge the people I w ut more by how they some people can churn ou t a _lot_ of code, b ode, and then obviou sly by what their own rea ct to other people’s c ose. That tells me looks_ like, and wha t approaches they ch code _ e thing is, a person whe ther they have “good taste” or not, and th is not very good at ju dging other peoples withou t “good taste” often onderfully good. ut his own code ofte n ends up not being w code, b -pro grammers-answersinterview -with-steve-yegge-linus-to rvalds-dave-thomas-david-hein em eier-peter-norvig-james-go sling-guido-van-tim- bray/ ss.com/2006/08/02/greathttp://usmanahmad.wordpre
  • 100. CASE STUDY #6
  • 101. OVER TO YOU #7 have you a sense for the aesthetic? when has this been evident?
  • 102. OVER TO YOU #7 have you a sense for the aesthetic? when has this been evident?
  • 103. OFCOMMUNICATION(YADA, YADA, YADA, YADA)
  • 104. LINUS T ORVALDS eful, especially in an open sourceOne thi ng that is very us bility to commun icate well what proje ct, is simply the a it. The ability you want to do, and how y ou are going to do why_ you do som ething a certain to e xplain to others _ has that ability. way is very important, a nd not everybody id-heinemeier-peter-norvig -james-gosling-guido-van- tim- -linus-torvalds-dave-thomas-dav bray/ interview-with-steve-yegge ress.com/2006/08/02/g reat-programmers-answers http://usmanahmad.wordp
  • 105. BILL GATES And, in fact, the greatest whos both g missing skil ood at under l is somebod and has goo standing the y d relationsh engineering engineers, a ips with the nd bridges t hard-core customers a hat to worki nd the mark ng with thehttp://www .microsoft.c eting and th om/presspa ss/exec/bil ings like tha lg/speeches /2005/07-18 FacultySum t. mit.aspx
  • 106. Bes ides a mathemati cal inclination, ane xceptionally good mastery of onesnative tongue is the mo st vital asset of a competen t programmer. 975) How do we tell truths that might hurt? (1 E DSGER DIJSKSTRA
  • 107. BJARNE STRO USTRUP Learn to com effectively in municate speech and i nhttp://www .wired.com/ writing. thisdayintec h/2010/10/1 014cplusplus -released/al l/1
  • 108. OVER TO YOU #8 how well do you communicate? with team, managers, customers...
  • 109. OVER TO YOU #8 how well do you communicate? with team, managers, customers...
  • 110. OFOTHERINTERESTS
  • 111. RO SS UM DO VAN o beGUI lw ay su sef ul t any It ’s a ted in m inte res gs. ent thin differ -answe view-w ith-s egge-l in teve-y ido-van-tim- rsinter -james-gosli ig ng-gu alds- us-torv ay/ br o grammers r-peter-norv reat-pr meie 8 /02/g -david-heine 006/0 as ss. com/2 dave-thom ad.w ordpre /usm anahm http:/
  • 112. BJARNE STRO Know some n on-computer field of stud USTRUP biology, hist y well — mat communicat ory, optics, w h, e effectively hatever. Lea in speech an rn to Spend an un d in writing.difficult topi reasonable a c to really m mount of tim aster it. Try e on some that might m to do someth ake a differe ing http://www .wired.com/ nce in the wo thisdayintec h/2010/10/1 014cpl rld. usplus-relea s ed/all/1
  • 113. DAVE THOMAS o have elation between people wh I have seen a strong corr mming skills. I some m usic in their back ground and progra spect that some of the areas of have no idea why, but I su eone musical also make them goodthe bra in that make som re development. at softwa -james-gosling-guido-van-tim-bra y id-heinemeier-peter-norvig nus- torvalds-dave-thomas-dav terview-with-steve-yegge-li ss.com/2006/08/02/gre at-programmers-answersin rehttp://usmanahmad.wordp
  • 114. CASE STUDY #7
  • 115. OVER TO YOU #9 do you cultivate “outside” interests? do they affect your code?
  • 116. OVER TO YOU #9 do you cultivate “outside” interests? do they affect your code?
  • 117. OFHUMILITY
  • 118. The competent progr ammer is fullyawa re of the strictly limited size of his own skull; therefore he approaches the progra mming task in fu ll humility, and am ong other things he avoids clever tricks li ke the plague. grammer EWD340 — The Humble Pro EDGAR DIJSKSTRA
  • 119. Learning to admit that I Realising I wasn’t a very good onecan be wrong Richard HarrisAstrid Byro Realise that you are fallible.  RealiseNever being afraid to ask that you have more to learn.for help. Hubert MatthewsSeb Rose Dont be so foolish as to believe thatHaving to swallow my pride you know (any/every)thingand be told Im wrong Matthew WilsonSteve Love The hard balance between believing in myself and not appearing too arrogant Jason McGuiness
  • 120. OVER TO YOU #10 are you? (honestly?!)
  • 121. OVER TO YOU #10 are you? (honestly?!)
  • 122. OFOTHERPEOPLE
  • 123. LEARNING FROM THEMTalking to people/listening "Dan Marsden" an ex-colleague of mineFrances Love Andrew BurrowsFinding, engaging with and Being privileged enough to work with,learning from real peers, and have access to via email,and realising that those newsgroups and other communications,are not necessarily ones the best and brightest people in ourwork colleagues. profession.Jason McGuiness Steve Love
  • 124. DEALING WITH THEMPeople may have hidden Work with smart people whoagendas. You need to try are different to youto understand their Andrew Burrowstrue motivations/prioritiesAstrid Byro
  • 125. Becoming a Better Programmer Survey 16 12 8 4Specific techniques and disciplines ACCU Problem approach Humility Learn from mistakes People A book Design 0 Testing Other Passion
  • 126. THEQUESTION THATP E TE IS ASKING
  • 127. THEWHAT ISMOST SINGLE IMPORTANT THING THAT HASMADE ? A BETTER YOU PROGRAMMER
  • 128. ...and...
  • 129. M y definition o f an expert in any field is a person who k nows enough about whatsreall y going on to be scared. 1983 Computer Language, MarchP.J. PLAUGER
  • 130. QA &Pete Goodliffe @petegoodliffe pete@goodliffe.net
  • 131. @petegoodliffepete@goodliffe.netgoodliffe.blogspot.comwww.goodliffe.net
  • 132. BUMPH DULL, but importantTHIS DOCUMENT WAS CREATED BY PETE GOODLIFFE IT IS COPYRIGHT // © 2011 PETE GOODLIFFE>> ALL RIGHTS RESERVED>> ALL THOUGHTS ARE OWNED>> PHOTOS AND IMAGES ARE MOSTLY SOURCED FROM THE WEBTHANK YOU FOR READING // I HOPE IT WAS USEFUL Version 1.2 2011-05-08