Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Where Bad Code Comes From


Published on

This is the slide deck presented at the ACE! 2012 conference in Kraków in June 2012. If you joined the talk use the slides for reference. If you haven't seen the talk and have a chance to see it again, allow yourself to be surprised by skipping the slides for now ;)

Published in: Technology
  • Login to see the comments

Where Bad Code Comes From

  1. 1. Where Bad Code Comes From? June 2012
  2. 2. I’m Marcin Floryan http://marcin.flor
  3. 3. You can find me at: @mfloryan Energized Work Value, Flow, Quality
  4. 4. The ACE Conference: #aceconf This presentation: #mfbadcode
  5. 5. Acceptance criteria ☐ You can give examples of different sources of bad code ☐ You have identified one new reason for bad code you didn’t pay attention to before ☐ You will consider a way to tackle it
  6. 6. Any developers in the room?
  7. 7. Seen any bad code?
  8. 8. ?Experienced any bad code
  9. 9. ?how bad can it get
  10. 10. Mariner 1 $18.5 million
  11. 11. Hartford Coliseum $80 million
  12. 12. Ariane 5 $500 million
  13. 13. “One  bug,  one  crash.  Of  all  the  careless  lines  of  code  this  one  may  stand  as  the  most  devastatingly efficient.   James Gleick
  14. 14. North America black-out 55 million people
  15. 15. “To  err  is  human,  but  to  really  foul  things  up  you  need  a  computer.   Paul Ehrlich
  16. 16. Does your code resemble this
  17. 17. or this…?
  18. 18. Building the wrong thing
  19. 19. Building the thing wrong
  20. 20. what code how
  21. 21. “When  people  are  factored  in,    nothing  is  simple.   Ken Schwaber
  22. 22. what how code who
  23. 23. “A post-modern firm is richin information and reliesheavily on the daily choicesof its knowledgeableemployees. Haridimos Tsoukas
  24. 24. Let’s go back in time
  25. 25. What’s that rustling in the bushes?
  26. 26. F I G H T
  27. 27. You’re fed
  28. 28. What’s that rustling in the bushes?
  29. 29. F L I H T G
  30. 30. You’re safe
  31. 31. back to reality
  32. 32. How about thatRAG report?
  33. 33. Running late?
  34. 34. Add more people
  35. 35. Even more late * *  Consult  the  Brooks  Law  for  details  
  36. 36. How about thatRAG report?
  37. 37. Already over budget?
  38. 38. Let’s squeeze the testing
  39. 39. What do you mean quality?
  40. 40. But it worked so wellfor the 99% of the time homo sapiens have been around!
  41. 41. Do you ever fly?
  42. 42. ? a novice pilot oran experienced captain
  43. 43. or perhaps even head of the airline safety program
  44. 44. Welcome aboardKLM Flight 4805 Amsterdam to Las Palmas  
  45. 45. A bomb in a flower shop Las Palmas closed
  46. 46. Landing at Tenerife
  47. 47. law mandated rest period looming
  48. 48. decision to re-fuel
  49. 49. and a T H I C K fog
  50. 50. KLM 747 crashes into PanAm 747
  51. 51. Communicationmisunderstandings deadliest accident in aviation history
  52. 52. Junior pilots any better? remember Air France flight 447
  53. 53. so how about SoftwareDevelopment
  54. 54. ? Ever worked to a tight deadline
  55. 55. ? Ever worked on a high stakes project
  56. 56. ? Ever worked with senior people
  57. 57. meet Bob* the architect * Name changed to protect the innocent
  58. 58. “Good, safe social interaction is as necessary to successful development as good technical skills Kent Beck
  59. 59. Difficult Conversations
  60. 60. Recogniseany of these…
  61. 61. How do we tell… our tester you let all these nasty bugs through
  62. 62. How do we tell… a new developer you don’t know the framework well enough
  63. 63. How do we tell… project manager we are not resources
  64. 64. How do we tell… stakeholders your   expectaAons   are   unrealisAc
  65. 65. How do we tell… operations we  need  it   live  NOW
  66. 66. How do we tell… our client I am unable to add value as a coach
  67. 67. weDON’T.
  68. 68. instead
  69. 69. Time for S O L U T I O N S
  70. 70. Ehm… no.Not today.
  71. 71. I want you to learn and we learn best by doing
  72. 72. “One must learn by doing thething; for though you think youknow it, you have no certainty,until you try. Sophocles
  73. 73. so instead
  74. 74. someH O M E W O R K for you
  75. 75. Your job 1.  Find some bad code 2.  Trace it back to a difficult conversation 3.  How could you have done it differently?
  76. 76. My example 1.  Data transfer via FTP upload of text files is really clunky 2.  That’s the way things are done around here. We never challenged this. 3.  Ask to understand rationale behind the decision, present viable alternatives
  77. 77. Follow-Up •  Catch me, stop me, talk to me •  Contact me on twitter @mfloryan •  Submit and discuss your ideas
  78. 78. The Remember Slide •  We’re not optimised for writing code •  Our mental software is mostly legacy code •  We don’t talk to each other •  We hide our emotions
  79. 79. Bibliography
  80. 80. So Thank You
  81. 81. Resources •  Hartford Civic Center Arena Roof Collapse •  Mariner 1 •  Ariane 5 •  KLM flight 4805 •  Air France flight 447 •  2003 North America black-out •  The Kludge Tweet
  82. 82. Picture Credits •  The Bismuth Cristals based on “Wismut Kristall und 1cm3 Wuerfel” photo by Alchemist-hp from Wikimedia Commons under FreeArt license •  FIGURE 02.2 The Manifesto for Agile Software Development” from flickr by Jurgen Appelo from flickr licensed under Creative-Commons-by-2.0 license •  FIGURE 02.3 The Manifesto for Software Craftsmanship” from flickr by Jurgen Appelo from flickr licensed under Creative-Commons-by-2.0 license •  ”bushes from flickr by Rupert Ganzer under Creative-Commons-by-nd-2.0 license •  ”Cottontail Rabbit from flickr by Ken Slade under Creative-Commons-by-nc-2.0 license •  “Lion” from flickr by Angela Huxham under Creative-Commons-by-nc-sa-2.0 license •  ”the first standup photo from flickr by Karthik Chandrasekariah under Creative-Commons-by-nc-2.0 license •  Traffic light stacking photo from flickr by fabi42 under Creative-Commons-by-nc-sa-2.0 license •  “Tenerife747s” picture from Wikimedia Commons by Anynobody under Creative Commons by-sa-3.0 license •  The Difficult Conversations picture is by Olaf Lewitz from XP Days Benelux 2012 available on G+ •  The Coaching Dojo picture is from Olaf Lewitz (By Ole) at XP Days Benelux 2012 available on G+ The remaining pictures are used under the fair use policy or available in public domain.
  83. 83. License This presentation is provided under the Creative Commons Attribution - Share Alike 3.0 Unported License You are free to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.