Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Keeping Software Soft

John Kary
January 17, 2015

Keeping Software Soft

Software provides continual value when it can evolve with the business. But without proper care it's easy for software to become rigid and difficult to change--it stops being soft. In this talk John introduces ways to think of software as independent, replaceable components.

John Kary

January 17, 2015
Tweet

More Decks by John Kary

Other Decks in Technology

Transcript

  1. Keeping Software Soft
    John Kary
    @johnkary
    Lawrence Coders, January 2015

    View full-size slide

  2. Program
    Data In

    View full-size slide

  3. Program
    Data In Data Out

    View full-size slide

  4. Program
    Program Program

    View full-size slide

  5. $ ls -l | grep "b"
    fabien.txt
    rabid-bear.rb
    sunk-cost.bl
    zabbazabba.do
    !
    !
    $ tail -f logs/prod.log | grep "error"
    [2015-01-16 21:15:45] app.error — Uncaught Exception
    [2015-01-16 23:22:42] app.error — Invalid argument "1" expected "2"
    [2015-01-17 00:01:52] app.error — SQL parse error "); DROP TABLE St

    View full-size slide

  6. $ ls -l | grep "b"
    fabien.txt
    rabid-bear.rb
    sunk-cost.bl
    zabbazabba.do
    !
    !
    $ tail -f logs/prod.log | grep "error"
    [2015-01-16 21:15:45] app.error — Uncaught Exception
    [2015-01-16 23:22:42] app.error — Invalid argument "1" expected "2"
    [2015-01-17 00:01:52] app.error — SQL parse error "); DROP TABLE St
    Unix Pipes

    View full-size slide

  7. https://www.flickr.com/photos/billybrown00/4982722491

    View full-size slide

  8. http://www.xcalak.info/images/misc/voip_network_l.gif

    View full-size slide

  9. http://www.xcalak.info/images/misc/voip_network_l.gif
    +1 785-979-8176

    View full-size slide

  10. GET /index.html HTTP/1.1
    Host: www.lmgtfy.com

    View full-size slide

  11. GET /index.html HTTP/1.1
    Host: www.lmgtfy.com
    www.lmgtfy.com

    View full-size slide

  12. GET /index.html HTTP/1.1
    Host: www.lmgtfy.com
    www.lmgtfy.com
    HTTP/1.1 200 OK
    Date: Mon, 23 May 2005 22:38:34 GMT
    Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
    ETag: "3f80f-1b6-3e1cb03b"
    Content-Type: text/html; charset=UTF-8
    !
    An Example Page
    Hello World

    View full-size slide

  13. RFC2616
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4
    4. HTTP Message

    View full-size slide

  14. Program
    Message
    Protocol

    View full-size slide

  15. Program
    Message
    Protocol
    Interface

    View full-size slide

  16. Interface
    "[Prohibits] access to all resources by default,
    allowing access only through well-defined entry points"
    http://en.wikipedia.org/wiki/Interface_(computing)
    "[A] shared boundary across which two separate components
    of a computer system exchange information."

    View full-size slide

  17. https://www.flickr.com/photos/dominicotine/7187354723

    View full-size slide

  18. https://www.flickr.com/photos/toasty/330752049

    View full-size slide

  19. https://www.flickr.com/photos/brilliantmichael/4172218074

    View full-size slide

  20. http://www.flickr.com/photos/amcgore/5518551326/

    View full-size slide

  21. https://www.flickr.com/photos/charlesonflickr/362975740

    View full-size slide

  22. Program
    Processing
    Program
    Program
    Program
    Your Thing
    Message Boundary
    Their Thing
    You Don't Know

    View full-size slide

  23. Server
    Processes

    View full-size slide

  24. Server
    Processes

    View full-size slide

  25. Server
    Processes
    Packages

    View full-size slide

  26. Server
    Processes
    Packages
    Classes

    View full-size slide

  27. Server
    Processes
    Packages
    Classes
    Functions

    View full-size slide

  28. Server
    Processes
    Packages
    Classes
    Functions

    View full-size slide

  29. Server
    Processes
    Packages
    Classes
    Functions

    View full-size slide

  30. Server
    Processes
    Packages
    Classes
    Functions

    View full-size slide

  31. Server
    Processes
    Packages
    Classes
    Functions

    View full-size slide

  32. Server
    Processes
    Packages
    Classes
    Functions

    View full-size slide

  33. Server
    Processes
    Packages
    Classes
    Functions
    Network IO

    View full-size slide

  34. Your Package
    Not
    Your
    Package

    View full-size slide

  35. Your Package
    Not
    Your
    Package

    View full-size slide

  36. Program
    Message
    Protocol

    View full-size slide

  37. Program
    Message
    Protocol
    Interface

    View full-size slide

  38. Program
    Message
    Protocol
    Interface
    Adapter

    View full-size slide

  39. Message Passing
    Between Processes
    ls grep
    Keyboard
    STDIN
    Terminal
    STDOUT
    C C

    View full-size slide

  40. Message Passing
    Between Processes
    ls grep
    Keyboard
    STDIN
    Terminal
    STDOUT
    C C

    View full-size slide

  41. Message Passing
    Between Processes
    ls grep
    Keyboard
    STDIN
    Terminal
    STDOUT
    C C

    View full-size slide

  42. Further Study
    Basic of the Unix Philosophy!
    http://www.catb.org/esr/writings/taoup/html/ch01s06.html
    The Art of Unix Programming (2003)
    !
    The Art of Destroying Software!
    Talk by Greg Young (Unsure location/date)
    http://vimeo.com/108441214
    !
    Stop Writing Classes!
    Jack Diederich @ PyCon 2012
    https://www.youtube.com/watch?v=o9pEzgHorH0
    !
    Architecture the Lost Years
    Robert C Martin (Uncle Bob) @ Ruby Midwest 2011
    http://confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years
    !
    Seven Languages in Seven Weeks (Erlang chapter)!
    https://pragprog.com/book/btlang/seven-languages-in-seven-weeks

    View full-size slide

  43. Homework
    • Build small things
    • Build simple things and compose them together
    • Connect things by generic messages
    • Isolate complexity into more small things
    • Build things that can be thrown away

    View full-size slide

  44. fin
    http://johnkary.net/talks
    @johnkary

    View full-size slide