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 Slide

  2. Hardware

    View Slide

  3. Software

    View Slide

  4. Program

    View Slide

  5. Program
    Data In

    View Slide

  6. Program
    Data In Data Out

    View Slide

  7. Program
    Program Program

    View Slide

  8. $ 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 Slide

  9. $ 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 Slide

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

    View Slide

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

    View Slide

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

    View Slide

  13. View Slide

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

    View Slide

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

    View Slide

  16. 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 Slide

  17. RFC2616

    View Slide

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

    View Slide

  19. Program
    Message
    Protocol

    View Slide

  20. Program
    Message
    Protocol
    Interface

    View Slide

  21. 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 Slide

  22. View Slide

  23. View Slide

  24. View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  31. Server

    View Slide

  32. Server
    Processes

    View Slide

  33. Server
    Processes

    View Slide

  34. Server
    Processes
    Packages

    View Slide

  35. Server
    Processes
    Packages
    Classes

    View Slide

  36. Server
    Processes
    Packages
    Classes
    Functions

    View Slide

  37. Server
    Processes
    Packages
    Classes
    Functions

    View Slide

  38. Server
    Processes
    Packages
    Classes
    Functions

    View Slide

  39. Server
    Processes
    Packages
    Classes
    Functions

    View Slide

  40. Server
    Processes
    Packages
    Classes
    Functions

    View Slide

  41. Server
    Processes
    Packages
    Classes
    Functions

    View Slide

  42. Server
    Processes
    Packages
    Classes
    Functions
    Network IO

    View Slide

  43. View Slide

  44. View Slide

  45. Your Package
    Not
    Your
    Package

    View Slide

  46. Your Package
    Not
    Your
    Package

    View Slide

  47. Program
    Message
    Protocol

    View Slide

  48. Program
    Message
    Protocol
    Interface

    View Slide

  49. Program
    Message
    Protocol
    Interface
    Adapter

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  53. 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 Slide

  54. 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 Slide

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

    View Slide