SlideShare une entreprise Scribd logo
1  sur  41
Writing a
framework for fun
  @jhugman – James Hugman
Not him again
    • Software Engineer in industry for
      10y+
    • Written:
      • Compilers, Reasoning Engines,
        ETL systems, evolutionary
        algorithms, cross-platform mobile
        frameworks

@jhugman
Contents

    • Why should I care
    • Words shape thought
    • Rules for enablers
    • Developers are users too



@jhugman
Anti-Contents

    • A specific technology
    • The importance of encapsulation
    • An exhaustive list of anything




@jhugman
Why should I care?
      Why would I want to write a framework?




@jhugman
Your role changes


    • Tool user
    • Tool maker




@jhugman
@jhugman   Status
Architect




@jhugman   Status
What happens at
@jhugman  work…
What happens at
@jhugman  work…
@jhugman   It feels like…
@jhugman   It feels like…
Words Shape
            Thought
     Identifiers, Little Languages and Patterns




@jhugman
Words shape
             thought

    • Find language that describe the
      concepts
    • Break concepts into smaller nouns &
      verbs



@jhugman
Words shape
             thought

    • Make your code out of this language
      e.g. identifiers
    • Build your code bottom up




@jhugman
Words shape
             thought
    • Over-generalizing is double-plus-
      ungood
      • process()
      • apply()
      • execute()


@jhugman
Words shape
             thought


    • Wrong words require double-think




@jhugman
Why Language
             Matters
    • Thought-to-code gap
    • More readable code
    • Better intra-team communication
    • Bugs are harder to write



@jhugman
Other People’s
               DSLs
    • Integrate existing little languages
      with your framework
      • e.g. SQL, XPath, Javascript
    • Design patterns provide a
      vocabulary


@jhugman
Definitional
            Interlude


    • Framework vs Toolkit   (Hollywood Principle)




@jhugman
Extendable systems
    Architect like you have a plugin mechanism




@jhugman
Plugin systems

    • Modularity above the package level
    • Assume you have a plugin system,
      even if you don’t




@jhugman
Rules for Enablers
    • Invitation Rule – Whenever possible, let others
      contribute to your contributions
    • Fair Play Rule – All clients play by the same
      rules, even me.
    • Explicit Extension Rule – Declare explicitly
      where a platform can be extended.
    • Diversity Rule – Extension points accept
      multiple extensions.


@jhugman
Rules for Enablers

    • Explicit API Rule - separate the API from
      internals.
    • Defensive API Rule - Reveal only the API in
      which you are confident, but be prepared to
      reveal more API as clients ask for it.




@jhugman
Architect for
            Participation
    • Requirements change, new features
      added
    • Multiple uncoordinated teams can
      work concurrently
    • Plugins limit negative impact of
      change
    • Containment of unpredictability

@jhugman
Example
           Architecting for growth




@jhugman
House Numbers

    • Physical world example
      • A street, where houses will be
      • How should we number the
        houses



@jhugman
House numbers
   •Sequential
   •Row at a time
   •Simple at     1   2          3   4
    build time            road
   •Not           5   6          7   8
    extendable
   •Not very
    navigable



@jhugman
House numbers
   •Sequential
   •Odds/Evens
   •Extendable in 1   3          5   7
    one direction         road
   •Assumes no 2      4          6   8
    space
    between
    houses



@jhugman
House numbers
   •Distance
    from one end
   •Large scale
                   10300             17010
   •Navigable              road
                                  15705
   •No fixed                       19010

    construction
    order



@jhugman
Developer UX
            Developers are users too




@jhugman
Developer pain kills


    • Everything should be obvious
    • A good mental model




@jhugman
API Usability

    • Design APIs upfront (almost BDD for
      APIs)
    • Seek feedback from real developers
    • Prototype, review, iterate



@jhugman
Related

    • Paper prototyping
      • README driven development
      • Commit-log driven development




@jhugman
Summary

    • Words shape thought
    • Build in extensibility, early
    • Think hard about developer
      experience



@jhugman
Further Study
    • Graduates/Juniors:
      • Effective Java   Josh Bloch




      • Huston Design Patterns                  (a website with GoF patterns)




      • Programming Pearls            Jon Bentley




      • Pragmatic Programmer                  Andrew Hunt & Dave Thomas




      •

@jhugman
Further Study
    • Principles of Newspeak            George Orwell




    • Growing a Language         Guy Steele




    • The Art Of War   Sun Tzu




    • Unwritten Rules Of Engineering                    Skakoon &
      King



    • Developer UX


@jhugman
Podcasts

    • Java Posse
    • this developer’s life
    • Hacker News Pod
    • Software Engineering Radio



@jhugman
Thanks
           @jhugman – James Hugman




@jhugman
Discuss
             AMA




@jhugman
@jhugman

Contenu connexe

Similaire à Writing Frameworks for Fun and Profit

Emperors new clothes_digitalbarn_output_snakk
Emperors new clothes_digitalbarn_output_snakkEmperors new clothes_digitalbarn_output_snakk
Emperors new clothes_digitalbarn_output_snakkkevinjohngallagher
 
Emperors new clothes - digitalbarn2012
Emperors new clothes - digitalbarn2012Emperors new clothes - digitalbarn2012
Emperors new clothes - digitalbarn2012kevinjohngallagher
 
IoT is Something to Figure Out
IoT is Something to Figure OutIoT is Something to Figure Out
IoT is Something to Figure OutPeter Hoddie
 
Odessa .NET User Group - 10.11.2011 - Applied Code Generation
Odessa .NET User Group - 10.11.2011 - Applied Code Generation Odessa .NET User Group - 10.11.2011 - Applied Code Generation
Odessa .NET User Group - 10.11.2011 - Applied Code Generation Dmytro Mindra
 
Metaprogramming Go
Metaprogramming GoMetaprogramming Go
Metaprogramming GoWeng Wei
 
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)kevinjohngallagher
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): RevistedMike Harris
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremKris Buytaert
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)Mike Harris
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Derek Jacoby
 
Information literacy tutorial design & development
Information literacy tutorial design & developmentInformation literacy tutorial design & development
Information literacy tutorial design & developmentmikeypage10
 
Everyone hacks design at a hackathon
Everyone hacks   design at a hackathonEveryone hacks   design at a hackathon
Everyone hacks design at a hackathonWillow Brugh
 
Taking the plunge: Why you should use new technology on client projects
Taking the plunge: Why you should use new technology on client projectsTaking the plunge: Why you should use new technology on client projects
Taking the plunge: Why you should use new technology on client projectsTommy Ferry
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2Derek Jacoby
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d GameIsfand yar Khan
 

Similaire à Writing Frameworks for Fun and Profit (20)

Emperors new clothes_digitalbarn_output_snakk
Emperors new clothes_digitalbarn_output_snakkEmperors new clothes_digitalbarn_output_snakk
Emperors new clothes_digitalbarn_output_snakk
 
Emperors new clothes - digitalbarn2012
Emperors new clothes - digitalbarn2012Emperors new clothes - digitalbarn2012
Emperors new clothes - digitalbarn2012
 
IoT is Something to Figure Out
IoT is Something to Figure OutIoT is Something to Figure Out
IoT is Something to Figure Out
 
Odessa .NET User Group - 10.11.2011 - Applied Code Generation
Odessa .NET User Group - 10.11.2011 - Applied Code Generation Odessa .NET User Group - 10.11.2011 - Applied Code Generation
Odessa .NET User Group - 10.11.2011 - Applied Code Generation
 
Metaprogramming Go
Metaprogramming GoMetaprogramming Go
Metaprogramming Go
 
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
Kevinjohn Gallagher's: Emperors new clothes (WordUp Glasgow 2012)
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
 
Requirements the Last Bottleneck
Requirements the Last BottleneckRequirements the Last Bottleneck
Requirements the Last Bottleneck
 
Emperors new clothes_jab
Emperors new clothes_jabEmperors new clothes_jab
Emperors new clothes_jab
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPrem
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)
 
Ask your users
Ask your usersAsk your users
Ask your users
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
Information literacy tutorial design & development
Information literacy tutorial design & developmentInformation literacy tutorial design & development
Information literacy tutorial design & development
 
Go fundamentals
Go fundamentalsGo fundamentals
Go fundamentals
 
Everyone hacks design at a hackathon
Everyone hacks   design at a hackathonEveryone hacks   design at a hackathon
Everyone hacks design at a hackathon
 
eXtreme Programming
eXtreme ProgrammingeXtreme Programming
eXtreme Programming
 
Taking the plunge: Why you should use new technology on client projects
Taking the plunge: Why you should use new technology on client projectsTaking the plunge: Why you should use new technology on client projects
Taking the plunge: Why you should use new technology on client projects
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d Game
 

Dernier

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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 textsMaria Levchenko
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Dernier (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Writing Frameworks for Fun and Profit

  • 1. Writing a framework for fun @jhugman – James Hugman
  • 2. Not him again • Software Engineer in industry for 10y+ • Written: • Compilers, Reasoning Engines, ETL systems, evolutionary algorithms, cross-platform mobile frameworks @jhugman
  • 3. Contents • Why should I care • Words shape thought • Rules for enablers • Developers are users too @jhugman
  • 4. Anti-Contents • A specific technology • The importance of encapsulation • An exhaustive list of anything @jhugman
  • 5. Why should I care? Why would I want to write a framework? @jhugman
  • 6. Your role changes • Tool user • Tool maker @jhugman
  • 7. @jhugman Status
  • 11. @jhugman It feels like…
  • 12. @jhugman It feels like…
  • 13. Words Shape Thought Identifiers, Little Languages and Patterns @jhugman
  • 14. Words shape thought • Find language that describe the concepts • Break concepts into smaller nouns & verbs @jhugman
  • 15. Words shape thought • Make your code out of this language e.g. identifiers • Build your code bottom up @jhugman
  • 16. Words shape thought • Over-generalizing is double-plus- ungood • process() • apply() • execute() @jhugman
  • 17. Words shape thought • Wrong words require double-think @jhugman
  • 18. Why Language Matters • Thought-to-code gap • More readable code • Better intra-team communication • Bugs are harder to write @jhugman
  • 19. Other People’s DSLs • Integrate existing little languages with your framework • e.g. SQL, XPath, Javascript • Design patterns provide a vocabulary @jhugman
  • 20. Definitional Interlude • Framework vs Toolkit (Hollywood Principle) @jhugman
  • 21. Extendable systems Architect like you have a plugin mechanism @jhugman
  • 22. Plugin systems • Modularity above the package level • Assume you have a plugin system, even if you don’t @jhugman
  • 23. Rules for Enablers • Invitation Rule – Whenever possible, let others contribute to your contributions • Fair Play Rule – All clients play by the same rules, even me. • Explicit Extension Rule – Declare explicitly where a platform can be extended. • Diversity Rule – Extension points accept multiple extensions. @jhugman
  • 24. Rules for Enablers • Explicit API Rule - separate the API from internals. • Defensive API Rule - Reveal only the API in which you are confident, but be prepared to reveal more API as clients ask for it. @jhugman
  • 25. Architect for Participation • Requirements change, new features added • Multiple uncoordinated teams can work concurrently • Plugins limit negative impact of change • Containment of unpredictability @jhugman
  • 26. Example Architecting for growth @jhugman
  • 27. House Numbers • Physical world example • A street, where houses will be • How should we number the houses @jhugman
  • 28. House numbers •Sequential •Row at a time •Simple at 1 2 3 4 build time road •Not 5 6 7 8 extendable •Not very navigable @jhugman
  • 29. House numbers •Sequential •Odds/Evens •Extendable in 1 3 5 7 one direction road •Assumes no 2 4 6 8 space between houses @jhugman
  • 30. House numbers •Distance from one end •Large scale 10300 17010 •Navigable road 15705 •No fixed 19010 construction order @jhugman
  • 31. Developer UX Developers are users too @jhugman
  • 32. Developer pain kills • Everything should be obvious • A good mental model @jhugman
  • 33. API Usability • Design APIs upfront (almost BDD for APIs) • Seek feedback from real developers • Prototype, review, iterate @jhugman
  • 34. Related • Paper prototyping • README driven development • Commit-log driven development @jhugman
  • 35. Summary • Words shape thought • Build in extensibility, early • Think hard about developer experience @jhugman
  • 36. Further Study • Graduates/Juniors: • Effective Java Josh Bloch • Huston Design Patterns (a website with GoF patterns) • Programming Pearls Jon Bentley • Pragmatic Programmer Andrew Hunt & Dave Thomas • @jhugman
  • 37. Further Study • Principles of Newspeak George Orwell • Growing a Language Guy Steele • The Art Of War Sun Tzu • Unwritten Rules Of Engineering Skakoon & King • Developer UX @jhugman
  • 38. Podcasts • Java Posse • this developer’s life • Hacker News Pod • Software Engineering Radio @jhugman
  • 39. Thanks @jhugman – James Hugman @jhugman
  • 40. Discuss AMA @jhugman

Notes de l'éditeur

  1. \n
  2. \n
  3. This is not just about encapsulation.\n
  4. This is not just about encapsulation\n\n I’ve learned over my career, distilled into an early morning talk.\n
  5. \n
  6. \n
  7. * Day-to-day: Tool-user --> Tool maker.\n * Status/Prospects: Jobbing builder --> Architect\n * Type of work: Soldier --> Scientists.\n * How I feel: Soldier ant --> Really Happy Dolphin\n
  8. If status is all you care about, we have a different problem.\n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. Notice this is quite top-down. But we can do this for even low-level sub-systems.\n
  15. Find language that describes the concepts of what you're doing.\nMake your code out of this language. \nNever settle for the over genral. process() apply() execute() doStuff() giesPeas()\nBreak down the concepts into smaller nouns.\nName your identifiers to follow this.\nBuild little languages.\n
  16. Never settle for the over general. process() apply() execute() doStuff() giesPeas()\n\nNewspeak joke\n\n
  17. When identifiers and concepts are not closely matched, you need to have two different (and perhaps conflicting) ideas in your head at once.\n
  18. Using the right words\n\nBugs are harder to write because\n * tests are easier to write, \n * the code is more readable.\n\nThis can apply to any layer of abstraction.\n
  19. Design patterns are explicitly designed to provide a shared vocabulary\n\nIntegrate: you don’t have to re-invent everything.\n
  20. Now we know the importance of words :)\n
  21. There are some technical differences between extensions, modules, plugins extension points\nbut I don’t want to go into them here.\n
  22. \n
  23. These changed my code style. Overnight.\n\nEspecially the Fair Play Rule - I have to expose enough API to build the system.\n
  24. \n
  25. Open beats closed.\n
  26. We’re inviting extensions into our framework.\nNeither the framework or the extension know what order they are going to be built.\n
  27. \n
  28. Fixed size housing\nNot extendable.\n
  29. Assumes:\n * no space between houses\n * fixed sized houses\n * house build order is fixed\n \n\n
  30. House number determined by 10s of meters from one end. (e.g. Melbourne to Adelaide)\nNo assumption of a house building order. \nHouses can be as big or small as you want.\n
  31. \n
  32. Principle of least surprise, \nEvery roadblock is an opportunity not to use your framework, or hate you, or both.\n * Installation\n * Common use-cases should be bug free.\n * Documentation\nMental model (i.e. the model of your framework in the user’s mind):\n * re-enforced by a clean API\n * does not need to bare any relation to the implementation. \n * a non-leaky abstraction.\n
  33. \n
  34. \n
  35. This is not just about encapsulation.\n
  36. Patterns should be on here, but I’m assuming this is a university book\n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n