SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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
 

Último

[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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
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.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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.pdfUK Journal
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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 slidevu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

[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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

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

Notas do Editor

  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