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

The Perils Of Software Engineering

The Perils Of Software Engineering

My keynote from PyCon SG 2015.

Andrew Godwin

June 19, 2015
Tweet

More Decks by Andrew Godwin

Other Decks in Programming

Transcript

  1. Andrew Godwin
    @andrewgodwin
    PERILS
    OF
    THE
    SOFTWARE
    ENGINEERING

    View Slide

  2. Andrew Godwin
    Hi, I'm
    Django Core Developer
    Senior Engineer at
    Far too many hobbies

    View Slide

  3. "Perils"

    View Slide

  4. Computer Science

    Software Engineering

    View Slide

  5. Engineering
    Mechanical
    Civil
    Software
    Chemical
    Materials

    View Slide

  6. Mechanical Engineering
    https://www.flickr.com/photos/mariaeklind/

    View Slide

  7. Nondeterministic

    View Slide

  8. Cost of Entry

    View Slide

  9. Civil Engineering

    View Slide

  10. Timescales

    View Slide

  11. Cost of Failure

    View Slide

  12. Aerospace
    Software Engineering

    View Slide

  13. Cost of Failure

    View Slide

  14. Failure: When, not if

    View Slide

  15. Margaret Hamilton, 1969

    View Slide

  16. Apollo 11 LM, "Eagle"

    View Slide

  17. Web/App
    Software Engineering

    View Slide

  18. Quick to build and test

    View Slide

  19. Minimal equipment costs

    View Slide

  20. Well-paid

    View Slide

  21. Well-paid

    View Slide

  22. Explicit is better than Implicit

    View Slide

  23. Code Indirection

    View Slide

  24. class MyView(View):
    def get(self, request):
    return self.render(request, "template.html")

    View Slide

  25. class MyView(FormView, AuditMixin, OtherMixin):
    def get(self, request):
    return self.render(request, "template.html")
    class AuditMixin(BaseAuditor, AdditionalStuff):
    ...
    class OtherMixin(MyObject, SomethingElse):
    ...

    View Slide

  26. Async Uncertainty

    View Slide

  27. def async_handler():
    with open("my_file.txt", "r") as fh:
    write_socket(1, fh.read())
    redis.incr("key1", 2)

    View Slide

  28. Schemas

    View Slide

  29. {
    "id": 342,
    "name": "David",
    "weight": 74,
    }
    {
    "id": 342,
    "name": "Ellie",
    "weight": "85kg",
    }
    {
    "id": 342,
    "nom": "Frankie",
    "weight": 77,
    }
    {
    "id": 342,
    "name": "Frankie",
    "weight": -67,
    }

    View Slide

  30. Clever code is bad
    Maintainable code is good

    View Slide

  31. xs = [number for inner in nested
    if len(inner) > 2 for number in inner]

    View Slide

  32. for inner in nested:
    if len(inner) > 2:
    for number in inner:
    xs.append(number)

    View Slide

  33. Explore and Discard

    View Slide

  34. There is no perfect solution

    View Slide

  35. Throwing everything away
    rarely works

    View Slide

  36. Backwards compatability
    is your friend

    View Slide

  37. Nobody is a genius;
    we're all mediocre

    View Slide

  38. Argue over code,
    not over ideas

    View Slide

  39. Well-paid

    View Slide

  40. 10 years?
    100 years?
    1000 years?

    View Slide

  41. Who will access it?

    View Slide

  42. What format will it be?

    View Slide

  43. Is it even important?

    View Slide

  44. Over thousands of years, the
    machine memories have been
    filled with programs that can help


    A Deepness In The Sky
    Vernor Vinge

    View Slide

  45. Engineering is collaborative

    View Slide

  46. Build well.

    View Slide

  47. Thanks.
    Andrew Godwin
    @andrewgodwin

    View Slide