SlideShare a Scribd company logo
1 of 64
When Code Cries

             Cory Foy
            @cory_foy
        cory@8thlight.com
www.8thlight.com, www.coryfoy.com
Bad Code
Is this quality code?
Is this quality code?
Is this quality code?
 “Code that actually
    gets used”
Is this quality code?
 “Code that actually
    gets used”
 “Lots of merged in
   pull requests”
Is this quality code?
 “Code that actually
    gets used”
 “Lots of merged in
   pull requests”

“Quality code makes
 me say, "hmm," not
       "ick."”
Is this quality code?
 “Code that actually
    gets used”
 “Lots of merged in
   pull requests”

“Quality code makes
 me say, "hmm," not
       "ick."”
  “If, when used, it
  pleases the user”
“The specific patterns out of which a building or a town
  is made may be alive or dead. To the extent they are
alive, they let our inner forces loose, and set us free; but
    when they are dead, they keep us locked in inner
                         conflict.”
                              Christopher Alexander - “The Timeless Way of Building”
Code Smells
Code Talks
Code Cries
Code Cries
  Because No One
Understands What It Is
       Saying
So?
So?
So?
http://www.flickr.com/photos/bunchofpants/99848415
“...we have so far beset ourselves with rules, and
 concepts, and ideas of what must be done to make a
building or a town alive, that we have become afraid of
what will happen naturally, and convinced that we must
  work within a “system” and with “methods” since
 without them our surroundings will come tumbling
                    down in chaos.”
                           Christopher Alexander - “The Timeless Way of Building”
Ten Thousand Hours
Functional Programming
Imperative Programming
  Logic Programming
      Static Typing
    Dynamic Typing
Coding Standards Define Dialects
BICS




CALP
BICS
Basic Interpersonal Communication Skills




                 CALP
BICS
Basic Interpersonal Communication Skills




                 CALP
Cognitive/Academic Language Proficiency
BICS
Basic Interpersonal Communication Skills




                 CALP
Cognitive/Academic Language Proficiency
BICS
           Basic Interpersonal Communication Skills




 Context                                              Context
Embedded                                              Reduced




                            CALP
           Cognitive/Academic Language Proficiency
Cognitively Undemanding
                            BICS
           Basic Interpersonal Communication Skills




 Context                                              Context
Embedded                                              Reduced




                            CALP
           Cognitive/Academic Language Proficiency
               Cognitively Demanding
Cognitively Undemanding
                               BICS
 - Copying from the board
 - Reading a Map
 - Face to Face Conversation
 - Selecting food in the
 lunchroom
 Context                                     Context
Embedded                                     Reduced




                               CALP


                   Cognitively Demanding
Cognitively Undemanding
                               BICS
 - Copying from the board
 - Reading a Map                      - Following a class schedule
 - Face to Face Conversation          - Telephone Conversation
 - Selecting food in the              - Oral Presentations
 lunchroom                            - Getting an absence excuse
 Context                                                Context
Embedded                                                Reduced




                               CALP


                   Cognitively Demanding
Cognitively Undemanding
                               BICS
 - Copying from the board
 - Reading a Map                      - Following a class schedule
 - Face to Face Conversation          - Telephone Conversation
 - Selecting food in the              - Oral Presentations
 lunchroom                            - Getting an absence excuse
 Context                                                Context
Embedded                                                Reduced
 - Demonstrations
 - Basic Math
 Computations
 - Science Experiements
                               CALP


                   Cognitively Demanding
Cognitively Undemanding
                               BICS
 - Copying from the board
 - Reading a Map                      - Following a class schedule
 - Face to Face Conversation          - Telephone Conversation
 - Selecting food in the              - Oral Presentations
 lunchroom                            - Getting an absence excuse
 Context                                                Context
Embedded                                                Reduced
 - Demonstrations                       - Standardized Tests
 - Basic Math                           - Math Concepts and
 Computations                           Applications
 - Science Experiements                 - Listening to a Lecture
                               CALP


                   Cognitively Demanding
Cognitively Undemanding
                   BICS




 Context                             Context
Embedded                             Reduced




                   CALP


           Cognitively Demanding
Foy-Z      Cognitively Undemanding
                   BICS




 Context                             Context
Embedded                             Reduced




                   CALP


           Cognitively Demanding
Foy-Z              Cognitively Undemanding
                           BICS


           Katas


 Context                                     Context
Embedded                                     Reduced




                           CALP


                   Cognitively Demanding
Foy-Z              Cognitively Undemanding
                           BICS


           Katas                           Koans


 Context                                           Context
Embedded                                           Reduced




                           CALP


                   Cognitively Demanding
Foy-Z              Cognitively Undemanding
                           BICS


           Katas                           Koans


 Context                                           Context
Embedded                                           Reduced

        Adding a new
          Feature

                           CALP


                   Cognitively Demanding
Foy-Z              Cognitively Undemanding
                           BICS


           Katas                           Koans


 Context                                           Context
Embedded                                           Reduced

        Adding a new
                                    Listening to Code
          Feature

                           CALP


                   Cognitively Demanding
Listening to Code




                http://www.flickr.com/photos/jn2race/263149573
Listening to Code

Decide to listen




                                   http://www.flickr.com/photos/jn2race/263149573
Listening to Code

Decide to listen           Listen for the whole message




                                   http://www.flickr.com/photos/jn2race/263149573
Listening to Code

 Decide to listen           Listen for the whole message



Let go of your
own personal
    agenda




                                    http://www.flickr.com/photos/jn2race/263149573
Listening to Code

 Decide to listen           Listen for the whole message



Let go of your
own personal                                   Be patient
    agenda




                                    http://www.flickr.com/photos/jn2race/263149573
Listening to Code

 Decide to listen           Listen for the whole message



Let go of your
own personal                                   Be patient
    agenda



    Be curious


                                    http://www.flickr.com/photos/jn2race/263149573
Listening to Code

 Decide to listen           Listen for the whole message



Let go of your
own personal                                   Be patient
    agenda



    Be curious                 Test for understanding


                                    http://www.flickr.com/photos/jn2race/263149573
4 Rules of Simple Design


  Does this code
 express all of the
 ideas we want to
     express?

Are there concepts
 from our domain
    that can be
    expressed?
Commonality/Variability Analysis


 What is common?
  What varies?

  Is it easy to swap
the things that vary?

Is it easy to identify
 the things that are
      common?
Fowler’s Perspectives (from UML Distilled)




Are we operating at
  the right level -
    Conceptual,
  Specification or
 Implementation?
SOLID Principles
   Do we have
    duplication
(implementation or
   conceptual)?

     Single
 responsibilities?

  LoD violations?

  LSP violations?
To Listen, We Must Understand
To Listen, We Must Understand

To Understand, We Must Practice
To Listen, We Must Understand

 To Understand, We Must Practice

To Practice, We Must Have Context
To Listen, We Must Understand

 To Understand, We Must Practice

To Practice, We Must Have Context
To Listen, We Must Understand

 To Understand, We Must Practice

To Practice, We Must Have Context
Cory Foy
    (@cory_foy)
 cory@8thlight.com
 www.8thlight.com
  www.coryfoy.com




    8th Light
Software is our craft
                    TM

More Related Content

More from Cory Foy

Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestCory Foy
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Cory Foy
 
Code Katas
Code KatasCode Katas
Code KatasCory Foy
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed AgilityCory Foy
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling AgilityCory Foy
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOpsCory Foy
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for BeginnersCory Foy
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationCory Foy
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Cory Foy
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleCory Foy
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code CriesCory Foy
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesCory Foy
 
Rails as a Pattern Language
Rails as a Pattern LanguageRails as a Pattern Language
Rails as a Pattern LanguageCory Foy
 
Patterns in Rails
Patterns in RailsPatterns in Rails
Patterns in RailsCory Foy
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile DemystifiedCory Foy
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# DevelopersCory Foy
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataCory Foy
 
Mud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy CodeMud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy CodeCory Foy
 
Fostering Software Craftsmanship
Fostering Software CraftsmanshipFostering Software Craftsmanship
Fostering Software CraftsmanshipCory Foy
 
Delivering What's Right
Delivering What's RightDelivering What's Right
Delivering What's RightCory Foy
 

More from Cory Foy (20)

Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015
 
Code Katas
Code KatasCode Katas
Code Katas
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed Agility
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling Agility
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOps
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for Beginners
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the Organization
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at Scale
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code Cries
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code Cries
 
Rails as a Pattern Language
Rails as a Pattern LanguageRails as a Pattern Language
Rails as a Pattern Language
 
Patterns in Rails
Patterns in RailsPatterns in Rails
Patterns in Rails
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile Demystified
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# Developers
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
 
Mud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy CodeMud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy Code
 
Fostering Software Craftsmanship
Fostering Software CraftsmanshipFostering Software Craftsmanship
Fostering Software Craftsmanship
 
Delivering What's Right
Delivering What's RightDelivering What's Right
Delivering What's Right
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

When Code Cries

  • 1. When Code Cries Cory Foy @cory_foy cory@8thlight.com www.8thlight.com, www.coryfoy.com
  • 5. Is this quality code? “Code that actually gets used”
  • 6. Is this quality code? “Code that actually gets used” “Lots of merged in pull requests”
  • 7. Is this quality code? “Code that actually gets used” “Lots of merged in pull requests” “Quality code makes me say, "hmm," not "ick."”
  • 8. Is this quality code? “Code that actually gets used” “Lots of merged in pull requests” “Quality code makes me say, "hmm," not "ick."” “If, when used, it pleases the user”
  • 9. “The specific patterns out of which a building or a town is made may be alive or dead. To the extent they are alive, they let our inner forces loose, and set us free; but when they are dead, they keep us locked in inner conflict.” Christopher Alexander - “The Timeless Way of Building”
  • 10.
  • 11.
  • 15. Code Cries Because No One Understands What It Is Saying
  • 16. So?
  • 17. So?
  • 18. So?
  • 20.
  • 21.
  • 22. “...we have so far beset ourselves with rules, and concepts, and ideas of what must be done to make a building or a town alive, that we have become afraid of what will happen naturally, and convinced that we must work within a “system” and with “methods” since without them our surroundings will come tumbling down in chaos.” Christopher Alexander - “The Timeless Way of Building”
  • 23.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. Functional Programming Imperative Programming Logic Programming Static Typing Dynamic Typing
  • 33. BICS Basic Interpersonal Communication Skills CALP Cognitive/Academic Language Proficiency
  • 34. BICS Basic Interpersonal Communication Skills CALP Cognitive/Academic Language Proficiency
  • 35. BICS Basic Interpersonal Communication Skills Context Context Embedded Reduced CALP Cognitive/Academic Language Proficiency
  • 36. Cognitively Undemanding BICS Basic Interpersonal Communication Skills Context Context Embedded Reduced CALP Cognitive/Academic Language Proficiency Cognitively Demanding
  • 37. Cognitively Undemanding BICS - Copying from the board - Reading a Map - Face to Face Conversation - Selecting food in the lunchroom Context Context Embedded Reduced CALP Cognitively Demanding
  • 38. Cognitively Undemanding BICS - Copying from the board - Reading a Map - Following a class schedule - Face to Face Conversation - Telephone Conversation - Selecting food in the - Oral Presentations lunchroom - Getting an absence excuse Context Context Embedded Reduced CALP Cognitively Demanding
  • 39. Cognitively Undemanding BICS - Copying from the board - Reading a Map - Following a class schedule - Face to Face Conversation - Telephone Conversation - Selecting food in the - Oral Presentations lunchroom - Getting an absence excuse Context Context Embedded Reduced - Demonstrations - Basic Math Computations - Science Experiements CALP Cognitively Demanding
  • 40. Cognitively Undemanding BICS - Copying from the board - Reading a Map - Following a class schedule - Face to Face Conversation - Telephone Conversation - Selecting food in the - Oral Presentations lunchroom - Getting an absence excuse Context Context Embedded Reduced - Demonstrations - Standardized Tests - Basic Math - Math Concepts and Computations Applications - Science Experiements - Listening to a Lecture CALP Cognitively Demanding
  • 41. Cognitively Undemanding BICS Context Context Embedded Reduced CALP Cognitively Demanding
  • 42. Foy-Z Cognitively Undemanding BICS Context Context Embedded Reduced CALP Cognitively Demanding
  • 43. Foy-Z Cognitively Undemanding BICS Katas Context Context Embedded Reduced CALP Cognitively Demanding
  • 44. Foy-Z Cognitively Undemanding BICS Katas Koans Context Context Embedded Reduced CALP Cognitively Demanding
  • 45. Foy-Z Cognitively Undemanding BICS Katas Koans Context Context Embedded Reduced Adding a new Feature CALP Cognitively Demanding
  • 46. Foy-Z Cognitively Undemanding BICS Katas Koans Context Context Embedded Reduced Adding a new Listening to Code Feature CALP Cognitively Demanding
  • 47. Listening to Code http://www.flickr.com/photos/jn2race/263149573
  • 48. Listening to Code Decide to listen http://www.flickr.com/photos/jn2race/263149573
  • 49. Listening to Code Decide to listen Listen for the whole message http://www.flickr.com/photos/jn2race/263149573
  • 50. Listening to Code Decide to listen Listen for the whole message Let go of your own personal agenda http://www.flickr.com/photos/jn2race/263149573
  • 51. Listening to Code Decide to listen Listen for the whole message Let go of your own personal Be patient agenda http://www.flickr.com/photos/jn2race/263149573
  • 52. Listening to Code Decide to listen Listen for the whole message Let go of your own personal Be patient agenda Be curious http://www.flickr.com/photos/jn2race/263149573
  • 53. Listening to Code Decide to listen Listen for the whole message Let go of your own personal Be patient agenda Be curious Test for understanding http://www.flickr.com/photos/jn2race/263149573
  • 54. 4 Rules of Simple Design Does this code express all of the ideas we want to express? Are there concepts from our domain that can be expressed?
  • 55. Commonality/Variability Analysis What is common? What varies? Is it easy to swap the things that vary? Is it easy to identify the things that are common?
  • 56. Fowler’s Perspectives (from UML Distilled) Are we operating at the right level - Conceptual, Specification or Implementation?
  • 57. SOLID Principles Do we have duplication (implementation or conceptual)? Single responsibilities? LoD violations? LSP violations?
  • 58.
  • 59. To Listen, We Must Understand
  • 60. To Listen, We Must Understand To Understand, We Must Practice
  • 61. To Listen, We Must Understand To Understand, We Must Practice To Practice, We Must Have Context
  • 62. To Listen, We Must Understand To Understand, We Must Practice To Practice, We Must Have Context
  • 63. To Listen, We Must Understand To Understand, We Must Practice To Practice, We Must Have Context
  • 64. Cory Foy (@cory_foy) cory@8thlight.com www.8thlight.com www.coryfoy.com 8th Light Software is our craft TM

Editor's Notes

  1. Thanks to SCNA for having me back out again. I had the chance to speak at the 2009 conference, and it’s great to have watched the conference - and the movement of craftsmanship - continue to grow. But yet, even with all of the work done in craftsmanship, there’s something we still have to deal with.\n
  2. Bad Code is the bane of the software industry. And we have a lot of it! But why do we end up with bad code? Why is it that, over time, code becomes harder and harder to work with - and how can we prevent ours from ending up with the same fate? To answer that, perhaps we should start with identifying what quality code looks like and see if we can have our code match that. So, is this quality code?\n
  3. Is this quality code? (No Code). But yet, each of you have in your mind attributes you were ready for the code to not have. And I’d bet, each of you has something different than your neighbor. That’s because quality isn’t some static attribute of the code itself it’s not a checklist. Instead, quality happens at the interaction point of the code base - either when it is attempted to be understood, modified, or used. This can be seen in the responses I got from Twitter. Four highlighted phrases show that the code is alive\n
  4. Is this quality code? (No Code). But yet, each of you have in your mind attributes you were ready for the code to not have. And I’d bet, each of you has something different than your neighbor. That’s because quality isn’t some static attribute of the code itself it’s not a checklist. Instead, quality happens at the interaction point of the code base - either when it is attempted to be understood, modified, or used. This can be seen in the responses I got from Twitter. Four highlighted phrases show that the code is alive\n
  5. Is this quality code? (No Code). But yet, each of you have in your mind attributes you were ready for the code to not have. And I’d bet, each of you has something different than your neighbor. That’s because quality isn’t some static attribute of the code itself it’s not a checklist. Instead, quality happens at the interaction point of the code base - either when it is attempted to be understood, modified, or used. This can be seen in the responses I got from Twitter. Four highlighted phrases show that the code is alive\n
  6. Is this quality code? (No Code). But yet, each of you have in your mind attributes you were ready for the code to not have. And I’d bet, each of you has something different than your neighbor. That’s because quality isn’t some static attribute of the code itself it’s not a checklist. Instead, quality happens at the interaction point of the code base - either when it is attempted to be understood, modified, or used. This can be seen in the responses I got from Twitter. Four highlighted phrases show that the code is alive\n
  7. Is this quality code? (No Code). But yet, each of you have in your mind attributes you were ready for the code to not have. And I’d bet, each of you has something different than your neighbor. That’s because quality isn’t some static attribute of the code itself it’s not a checklist. Instead, quality happens at the interaction point of the code base - either when it is attempted to be understood, modified, or used. This can be seen in the responses I got from Twitter. Four highlighted phrases show that the code is alive\n
  8. Think about this. Have you ever worked with code that is a joy to work with? How freeing it is? And that feeling - I want us to capture that, and have that feeling more often! Because too often, the feeling we get is code that looks more like this <click>\n
  9. 45 seconds. 7 Samples. Code that isn’t a joy. That is anti-joy. Code which is frustrating to be around. This is not code that is alive - this is code which has problems. And these problems - we tend to name them something. When we see something not right in code, what do we say?\n
  10. 45 seconds. 7 Samples. Code that isn’t a joy. That is anti-joy. Code which is frustrating to be around. This is not code that is alive - this is code which has problems. And these problems - we tend to name them something. When we see something not right in code, what do we say?\n
  11. 45 seconds. 7 Samples. Code that isn’t a joy. That is anti-joy. Code which is frustrating to be around. This is not code that is alive - this is code which has problems. And these problems - we tend to name them something. When we see something not right in code, what do we say?\n
  12. 45 seconds. 7 Samples. Code that isn’t a joy. That is anti-joy. Code which is frustrating to be around. This is not code that is alive - this is code which has problems. And these problems - we tend to name them something. When we see something not right in code, what do we say?\n
  13. 45 seconds. 7 Samples. Code that isn’t a joy. That is anti-joy. Code which is frustrating to be around. This is not code that is alive - this is code which has problems. And these problems - we tend to name them something. When we see something not right in code, what do we say?\n
  14. 45 seconds. 7 Samples. Code that isn’t a joy. That is anti-joy. Code which is frustrating to be around. This is not code that is alive - this is code which has problems. And these problems - we tend to name them something. When we see something not right in code, what do we say?\n
  15. 45 seconds. 7 Samples. Code that isn’t a joy. That is anti-joy. Code which is frustrating to be around. This is not code that is alive - this is code which has problems. And these problems - we tend to name them something. When we see something not right in code, what do we say?\n
  16. Right - “Smelly Code”. But what I’d like to do today is reframe the discussion slightly. Instead of telling our code that it smells, let’s recognize something else - our code is trying to talk to us.\n
  17. And imagine trying to talk to someone about something important - say, the building is on fire - and them not understanding your strange gestures and telling you you are smelly. Would that make you happy? Probably not - no more than it makes our code happy. In fact, it makes our code sad - so sad, that our code \n
  18. And our code cries not because it is smelly, but because no one understands what it is trying to say. It’s trying to point out what it wants to do, what is important, and how to use it. And it isn’t happy about that!\n
  19. Aren’t we bigger than the code? Aren’t we smarter? Are we going to let it push us around?\n
  20. Aren’t we bigger than the code? Aren’t we smarter? Are we going to let it push us around?\n
  21. And though we’d like to think that we can overcome the code, overcome the forces that shape it through design and architecture, we are really fighting a losing battle. \n
  22. We create a design. We settle down, build a house, have a family. But the code doesn't want that. It has plans beyond our design. And if we don't listen to those plans, our days will become filled with holding off the impending - and inevitable - change (http://www.adammandelman.net/tag/harold-fisk/)\n
  23. For example, in 2011, the Mississippi River tried to change course, I believe to the Orange area. And it normally would have - except for the millions of dollars the Army Corp of Engineers spent to erect dams, flood farm fields and otherwise keep it on the course best for us - not for it. We like it when things are tidy, and go according to plan. So much so that Christopher Alexander has this to say\n
  24. The more we fight against the forces the code is trying to resolve, the work we have to do scales exponentially as the call of the forces increases. In fact, the entire movement behind patterns isn’t to catalog recipes, but to explain and understand forces that can be at play in our code. So what we need to do is find a way to listen to our code, understand our code, so that we can pay attention to the forces at play and allow our systems to grow incrementally in a way that is healthy. Learning Next\n
  25. To do that, we need to go back a bit, and look at how we, as an industry, tell people to learn code. There’s a common figure that is given to developers about what it takes to become great in software. Does anyone know that number? <Click> This is the number of hours to “master” a skill. And it’s the wrong place to start for a couple of reasons. The first is because I have this\n
  26. To do that, we need to go back a bit, and look at how we, as an industry, tell people to learn code. There’s a common figure that is given to developers about what it takes to become great in software. Does anyone know that number? <Click> This is the number of hours to “master” a skill. And it’s the wrong place to start for a couple of reasons. The first is because I have this\n
  27. To do that, we need to go back a bit, and look at how we, as an industry, tell people to learn code. There’s a common figure that is given to developers about what it takes to become great in software. Does anyone know that number? <Click> This is the number of hours to “master” a skill. And it’s the wrong place to start for a couple of reasons. The first is because I have this\n
  28. (Beaker story). But the second is that programming is an act of communication, precisely why they are called programming languages. And if we think about how we classify and learn natural languages, we get some pretty interesting results\n
  29. (Beaker story). But the second is that programming is an act of communication, precisely why they are called programming languages. And if we think about how we classify and learn natural languages, we get some pretty interesting results\n
  30. (Beaker story). But the second is that programming is an act of communication, precisely why they are called programming languages. And if we think about how we classify and learn natural languages, we get some pretty interesting results\n
  31. (Beaker story). But the second is that programming is an act of communication, precisely why they are called programming languages. And if we think about how we classify and learn natural languages, we get some pretty interesting results\n
  32. The first is how different languages - and paradigms - can affect our viewpoints. Linguist Roman Jakobson points out “Languages differ essentially in what they must convey and not in what they may convey”. For example, if I said, in English, I had dinner with a neighbor last night, I wouldn’t have to reveal if it was a male or female. But if I said the same thing in French or German, I would be obliged to (voisin vs voisine and Nachbar vs Nachbarin). So they same can be said for programming languages. Functional must express problems in the context of reduction of terms. Imperative expresses problems as a statement of the process, and logic expresses problems as a statement of the result. Static typing forces us to abstractions sooner, while dynamic typing allows the abstraction to be held off\n
  33. But it also gives you access to words that aren’t expressed in your native language.\nEven when we are in the same language, we may not understand the code because it’s not how we would write it\n
  34. But it also gives you access to words that aren’t expressed in your native language.\nEven when we are in the same language, we may not understand the code because it’s not how we would write it\n
  35. But it also gives you access to words that aren’t expressed in your native language.\nEven when we are in the same language, we may not understand the code because it’s not how we would write it\n
  36. But it also gives you access to words that aren’t expressed in your native language.\nEven when we are in the same language, we may not understand the code because it’s not how we would write it\n
  37. \n
  38. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  39. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  40. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  41. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  42. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  43. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  44. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  45. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  46. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  47. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  48. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  49. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  50. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  51. If we look at this model, we can now do something similar with programming. We can create a somewhat standardized model for increasing the success of developers from team to team, project to project and language to language\n
  52. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  53. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  54. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  55. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  56. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  57. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  58. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  59. This model, which I’m calling the “Foy-Z” model, since my name isn’t Jay, looks like this. We need to start by providing context. We can provide context through the use of Katas\n
  60. And Test for Understanding is where we get to ask questions back of the code base. Such as\n
  61. And Test for Understanding is where we get to ask questions back of the code base. Such as\n
  62. And Test for Understanding is where we get to ask questions back of the code base. Such as\n
  63. And Test for Understanding is where we get to ask questions back of the code base. Such as\n
  64. And Test for Understanding is where we get to ask questions back of the code base. Such as\n
  65. And Test for Understanding is where we get to ask questions back of the code base. Such as\n
  66. Patterns. 4 Rules of Simple Design. Question Every Line of Code. CVA. Conceptual/Specification/Implementation\n
  67. Patterns. 4 Rules of Simple Design. Question Every Line of Code. CVA. Conceptual/Specification/Implementation\n
  68. Patterns. 4 Rules of Simple Design. Question Every Line of Code. CVA. Conceptual/Specification/Implementation\n
  69. Transition to summary - to listen, we must understand\n
  70. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  71. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  72. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  73. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  74. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  75. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  76. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  77. Let’s work towards finding ways to establish baselines into the way we work for our teams, and growing our abilities to work with cognitive demanding tasks in limited context - keeping in mind the principles, patterns, and forces at play. And if we don’t, the code is going to do what it wants to do while we flail wildly against uttering the most sacred of phrases in the software world - WTF?\n
  78. \n