SlideShare a Scribd company logo
1 of 92
Download to read offline
Where Bad Code Comes From?	

                        June 2012
I’m Marcin Floryan	

http://marcin.flor yan.pl
You can find me at:	





@mfloryan	

   Energized Work	

   Value, Flow, Quality
The ACE Conference:	

   #aceconf	

This presentation:	

    #mfbadcode
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
Any developers in the room?
Seen any bad code?
?
Experienced 
any bad code
?
how bad can it get
Mariner 1

            $18.5 million
Hartford Coliseum	


       $80 million
Ariane 5	





$500 million
“
One	
  bug,	
  one	
  crash.	
  Of	
  all	
  
the	
  careless	
  lines	
  of	
  code	
  
this	
  one	
  may	
  stand	
  as	
  the	
  
most	
  devastatingly efficient.	
  
       James Gleick
North America black-out	



55 million people
“
To	
  err	
  is	
  human,	
  but	
  to	
  
really	
  foul	
  things	
  up	
  you	
  
need	
  a	
  computer.	
  
       Paul Ehrlich
Does your code resemble 
          this
or this…?
Building 
the wrong thing
Building 
the thing wrong
what	

   code	

   how
“
When	
  people	
  are	
  
factored	
  in,	
  	
  
nothing	
  is	
  simple.	
  
     Ken Schwaber
what	

             how	

          code	




          who
“
A post-modern firm is rich
in information and relies
heavily on the daily choices
of its knowledgeable
employees.	

    Haridimos Tsoukas
Let’s go back in time
What’s that rustling 	

  in the bushes?
F I G H T
You’re fed
What’s that rustling 	

  in the bushes?
F L I	

 H T 	

      G
You’re safe
back to 	

reality
How about that
RAG report?
Running late?
Add more people
Even more late *	



*	
  Consult	
  the	
  Brooks	
  Law	
  for	
  details	
  
How about that
RAG report?
Already over budget?
Let’s squeeze the testing
What do you mean
   quality?
But it worked so well
for the 99% of the time
      homo sapiens 
   have been around!
Do you ever fly?
?
     a novice pilot
          or
an experienced captain
or perhaps even
         
head of the airline
 safety program
Welcome aboard
KLM Flight 4805
       	

    Amsterdam to Las Palmas	
  
A bomb in a flower shop
            
                
                    
   Las Palmas closed
Landing at Tenerife
law mandated rest
  period looming
decision to re-fuel
and a T H I C K fog
KLM 747 crashes 
 into PanAm 747
Communication
misunderstandings	




  deadliest accident in
        aviation history
Junior pilots any better?	



      remember Air France flight 447
so how about
  Software
Development
?
    Ever worked 
to a tight deadline
?
       Ever worked 
on a high stakes project
?
    Ever worked 
with senior people
meet Bob*
                    the architect	



* Name changed to protect the innocent
“
Good, safe social interaction	

is as necessary 	

to successful development 	

as good technical skills	

     Kent Beck
Difficult Conversations
Recognise
any of these…
How do we tell… our tester	



                    you let all
                   these nasty
                  bugs through
How do we tell… a new developer	


                    you don’t
                    know the
                   framework
                   well enough
How do we tell… project manager	




      we are not
      resources
How do we tell… stakeholders	


      your	
  
   expectaAons	
  
       are	
  
    unrealisAc
How do we tell… operations	




    we	
  need	
  it	
  
    live	
  NOW
How do we tell… our client	



                  I am unable
                  to add value
                   as a coach
we

DON’T.
instead
Time for 
S O L U T I O N S
Ehm… no.
Not today.
I want you to learn
          
  and we learn best 
     by doing
“
One must learn by doing the
thing; for though you think you
know it, you have no certainty,
until you try.	

    Sophocles
so instead
some
H O M E W O R K
    for you
Your job	


1.  Find some bad code	

2.  Trace it back to a difficult
    conversation	

3.  How could you have done it
    differently?
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
Follow-Up	


•  Catch me, stop me, talk to me	

•  Contact me on twitter @mfloryan	

•  Submit and discuss your ideas	



 bit.ly/ace-homework
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
Bibliography
So Thank You	

bit.ly/ace-bad-code
Resources	

•  Hartford Civic Center Arena Roof Collapse	

   http://www.eng.uab.edu/cee/faculty/ndelatte/case_studies_project/Hartford%20Civic%20Center/hartford.htm	


•  Mariner 1	

   http://en.wikipedia.org/wiki/Mariner_1	


•  Ariane 5	

   http://www.around.com/ariane.html	


•  KLM flight 4805	

   http://en.wikipedia.org/wiki/Tenerife_airport_disaster	


•  Air France flight 447	

   http://en.wikipedia.org/wiki/Air_France_Flight_447	


•  2003 North America black-out	

   http://en.wikipedia.org/wiki/2003_North_America_blackout	

•  The Kludge Tweet	

   https://twitter.com/jmeydam/status/143405066571886592
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.
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.

More Related Content

Similar to Where Bad Code Comes From

The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)
Christian Heilmann
 
A journey through an INFOSEC labyrinth
A journey through an INFOSEC labyrinthA journey through an INFOSEC labyrinth
A journey through an INFOSEC labyrinth
Avădănei Andrei
 

Similar to Where Bad Code Comes From (20)

Understand Open Source ecosystems
Understand Open Source ecosystemsUnderstand Open Source ecosystems
Understand Open Source ecosystems
 
Reasons to be cheerful - Fronteers 2010
Reasons to be cheerful - Fronteers 2010Reasons to be cheerful - Fronteers 2010
Reasons to be cheerful - Fronteers 2010
 
DevDay 2013 - Building Startups and Minimum Viable Products
DevDay 2013 - Building Startups and Minimum Viable ProductsDevDay 2013 - Building Startups and Minimum Viable Products
DevDay 2013 - Building Startups and Minimum Viable Products
 
Finding harmony in web development
Finding harmony in web developmentFinding harmony in web development
Finding harmony in web development
 
The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)The Soul in The Machine - Developing for Humans (FrankenJS edition)
The Soul in The Machine - Developing for Humans (FrankenJS edition)
 
Secrets of Scrum
Secrets of ScrumSecrets of Scrum
Secrets of Scrum
 
So You Want to be a Hacker?
So You Want to be a Hacker?So You Want to be a Hacker?
So You Want to be a Hacker?
 
Many to many: no man is an island
Many to many: no man is an islandMany to many: no man is an island
Many to many: no man is an island
 
Many to many: no man is an island
Many to many: no man is an islandMany to many: no man is an island
Many to many: no man is an island
 
Recruiting Great Engineers in Six Easy Steps
Recruiting Great Engineers in Six Easy StepsRecruiting Great Engineers in Six Easy Steps
Recruiting Great Engineers in Six Easy Steps
 
NLJUG speaker academy 2023 - session 1
NLJUG speaker academy 2023 - session 1NLJUG speaker academy 2023 - session 1
NLJUG speaker academy 2023 - session 1
 
Technical Debt - osbridge
Technical Debt - osbridgeTechnical Debt - osbridge
Technical Debt - osbridge
 
Software demo Skills for Business Analysts
Software demo Skills for Business AnalystsSoftware demo Skills for Business Analysts
Software demo Skills for Business Analysts
 
A journey through an INFOSEC labyrinth
A journey through an INFOSEC labyrinthA journey through an INFOSEC labyrinth
A journey through an INFOSEC labyrinth
 
CloudOpen 2012 Slides: Open Source and Federation
CloudOpen 2012 Slides: Open Source and FederationCloudOpen 2012 Slides: Open Source and Federation
CloudOpen 2012 Slides: Open Source and Federation
 
Patterns of fail
Patterns of failPatterns of fail
Patterns of fail
 
Cybercrime and the Developer Java2Days 2016 Sofia
Cybercrime and the Developer Java2Days 2016 SofiaCybercrime and the Developer Java2Days 2016 Sofia
Cybercrime and the Developer Java2Days 2016 Sofia
 
NLJUG speaker academy 2022 - session 1
NLJUG speaker academy 2022 - session 1NLJUG speaker academy 2022 - session 1
NLJUG speaker academy 2022 - session 1
 
The Modern Tech Stack: Machine Learning for Builders: Tools, Trends, and Truths
The Modern Tech Stack: Machine Learning for Builders: Tools, Trends, and TruthsThe Modern Tech Stack: Machine Learning for Builders: Tools, Trends, and Truths
The Modern Tech Stack: Machine Learning for Builders: Tools, Trends, and Truths
 
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Where Bad Code Comes From

  • 1. Where Bad Code Comes From? June 2012
  • 3. You can find me at: @mfloryan Energized Work Value, Flow, Quality
  • 4. The ACE Conference: #aceconf This presentation: #mfbadcode
  • 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. Any developers in the room?
  • 7. Seen any bad code?
  • 9.
  • 10. ? how bad can it get
  • 11. Mariner 1 $18.5 million
  • 12. Hartford Coliseum $80 million
  • 14. “ One  bug,  one  crash.  Of  all   the  careless  lines  of  code   this  one  may  stand  as  the   most  devastatingly efficient.   James Gleick
  • 15. North America black-out 55 million people
  • 16. “ To  err  is  human,  but  to   really  foul  things  up  you   need  a  computer.   Paul Ehrlich
  • 17. Does your code resemble this
  • 20.
  • 22.
  • 23. what code how
  • 24. “ When  people  are   factored  in,     nothing  is  simple.   Ken Schwaber
  • 25. what how code who
  • 26.
  • 27. “ A post-modern firm is rich in information and relies heavily on the daily choices of its knowledgeable employees. Haridimos Tsoukas
  • 28. Let’s go back in time
  • 29.
  • 30.
  • 31.
  • 32. What’s that rustling in the bushes?
  • 33.
  • 34. F I G H T
  • 36. What’s that rustling in the bushes?
  • 37.
  • 38. F L I H T G
  • 44. Even more late * *  Consult  the  Brooks  Law  for  details  
  • 48. What do you mean quality?
  • 49. But it worked so well for the 99% of the time homo sapiens have been around!
  • 50. Do you ever fly?
  • 51. ? a novice pilot or an experienced captain
  • 52. or perhaps even head of the airline safety program
  • 53. Welcome aboard KLM Flight 4805 Amsterdam to Las Palmas  
  • 54. A bomb in a flower shop Las Palmas closed
  • 56. law mandated rest period looming
  • 58. and a T H I C K fog
  • 59. KLM 747 crashes into PanAm 747
  • 60. Communication misunderstandings deadliest accident in aviation history
  • 61. Junior pilots any better? remember Air France flight 447
  • 62. so how about Software Development
  • 63. ? Ever worked to a tight deadline
  • 64. ? Ever worked on a high stakes project
  • 65. ? Ever worked with senior people
  • 66. meet Bob* the architect * Name changed to protect the innocent
  • 67. “ Good, safe social interaction is as necessary to successful development as good technical skills Kent Beck
  • 70. How do we tell… our tester you let all these nasty bugs through
  • 71. How do we tell… a new developer you don’t know the framework well enough
  • 72. How do we tell… project manager we are not resources
  • 73. How do we tell… stakeholders your   expectaAons   are   unrealisAc
  • 74. How do we tell… operations we  need  it   live  NOW
  • 75. How do we tell… our client I am unable to add value as a coach
  • 78. Time for S O L U T I O N S
  • 80. I want you to learn and we learn best by doing
  • 81. “ One must learn by doing the thing; for though you think you know it, you have no certainty, until you try. Sophocles
  • 83. some H O M E W O R K for you
  • 84. Your job 1.  Find some bad code 2.  Trace it back to a difficult conversation 3.  How could you have done it differently?
  • 85. 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
  • 86. Follow-Up •  Catch me, stop me, talk to me •  Contact me on twitter @mfloryan •  Submit and discuss your ideas bit.ly/ace-homework
  • 87. 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
  • 90. Resources •  Hartford Civic Center Arena Roof Collapse http://www.eng.uab.edu/cee/faculty/ndelatte/case_studies_project/Hartford%20Civic%20Center/hartford.htm •  Mariner 1 http://en.wikipedia.org/wiki/Mariner_1 •  Ariane 5 http://www.around.com/ariane.html •  KLM flight 4805 http://en.wikipedia.org/wiki/Tenerife_airport_disaster •  Air France flight 447 http://en.wikipedia.org/wiki/Air_France_Flight_447 •  2003 North America black-out http://en.wikipedia.org/wiki/2003_North_America_blackout •  The Kludge Tweet https://twitter.com/jmeydam/status/143405066571886592
  • 91. 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.
  • 92. 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.