$30 off During Our Annual Pro Sale. View Details »

Nature Inspired Testing Thoughts

Nature Inspired Testing Thoughts

Ever thought about DNA? I mean, the fact that DNA is a way to store executable instructions? That sounds a lot like code.

This talk is an exploration of what Nature can teach us about testing software.

Notes by slide:
Slide 6)
Adenine [A] can only pair with Thymine [T]
Cytosine [C] can only pair with Guanine [G]

“It [DNA] generally repairs mistakes in the placement of bases as it replicates itself. This repair work is performed by DNA Polymerase, the enzyme that helps catalyze construction of new DNA from single strands.”

“If an adenine is mistakenly set in place to become linked with a guanine (not its correct partner), the polymerase recognizes that mistake, backtracks by one pair, fixes the mismatch, and then moves on. So the rate of mutation in most DNA viruses is relatively low.”
From Spillover pg. 237

Image Attribution: http://commons.wikimedia.org/wiki/DNA#mediaviewer/File:DNA_chemical_structure.svg
Madeleine Price Ball

Slide 8)
RNA can form a double helix, but is still not as stable (ribose vs deoxyribose).
RNA is a single stranded molecule, generally, with a single base.
Uracil represents the [U] in RNA. It usually takes the place of thymine.

Image Attribution: http://commons.wikimedia.org/wiki/File:RNA-Nucleobases.svg

Slide 10)
The enzyme employed by RNA viruses, on the other hand, is “error prone,” according to Eddie. “It’s just a really crappy polymerase,” which doesn’t proofread, doesn’t backtrack, doesn’t correct erroneous...

Paul Burt

July 01, 2015
Tweet

More Decks by Paul Burt

Other Decks in Technology

Transcript

  1. @rainforestqa
    rainforest
    Nature Inspired
    QA Thoughts
    By Paul Burt

    (a very handsome mans)

    View Slide

  2. View Slide

  3. View Slide

  4. View Slide

  5. @rainforestqa
    rainforest
    DNA vs RNA
    and their Transcription Polymerases

    View Slide

  6. View Slide

  7. @rainforestqa
    rainforest
    DNA …
    + is strongly typed.
    + has unit tests.
    + is slow (harder to change).

    View Slide

  8. View Slide

  9. @rainforestqa
    rainforest
    RNA …
    + is weakly typed.
    + does not test.
    + is fast (easy to change).

    View Slide

  10. @rainforestqa
    rainforest
    RNA’s Transcription Enzyme
    Is “error prone […] It’s just a really crappy polymerase,”

    From Spillover, pg. 273

    View Slide

  11. @rainforestqa
    rainforest
    Enter the Eigen Paradox!
    A Mathematical proof that says...

    View Slide

  12. @rainforestqa
    rainforest
    Aw, Shit!

    View Slide

  13. @rainforestqa
    rainforest
    You tell ‘em, Manfred Eigen!

    View Slide

  14. @rainforestqa
    rainforest
    The Take-Away
    ● Scripts and other tiny software? Ok to roll without tests.
    ● Multi-file projects? You MUST test.

    View Slide

  15. @rainforestqa
    rainforest
    So yeah, it’s hard.
    Fear not, JFK offers inspiring words:
    “We choose to go to the moon [write tests] in this
    decade and do the other things, not because they are
    easy, but because they are hard, because that goal will
    serve to organize and measure the best of our energies
    and skills…”

    View Slide

  16. @rainforestqa
    rainforest
    Tent Caterpillars and Gypsy Moths
    Boom and Bust Cycles

    View Slide

  17. View Slide

  18. @rainforestqa
    rainforest
    Q: What happens when a bug
    catches a bug?

    View Slide

  19. @rainforestqa
    rainforest
    Why the Boom and Bust?
    ● Predation?

    ● Food scarcity or abundance?

    ● Venus is in retrograde motion?

    View Slide

  20. View Slide

  21. When a caterpillar wanders through a prior infection, it
    too becomes infected, then melts.

    The resulting melt drips on leaves.

    It’s neighbors (likely) become infected.

    Big population = Big problems

    View Slide

  22. @rainforestqa
    rainforest
    The Take-Away
    ● Some bugs are only revealed in large sets. For
    example, lots of users.
    ● If you’re seeing erratic and seemingly random
    behavior in a bug report…
    ● It could be a melty bug!
    ● (bugs interacting with bugs)

    View Slide

  23. @rainforestqa
    rainforest
    Adapt or Atrophy
    Our History n Frogs, Fish, and Everything

    View Slide

  24. View Slide

  25. @rainforestqa
    rainforest
    Re-using code = Hello bugs

    View Slide

  26. View Slide

  27. Human
    Shark

    View Slide

  28. The Take-Away
    Generally: It’s easier to modify something that exists,
    than to build it from scratch. Adapt, don’t create.
    That said... adapting is a shortcut. Shortcuts lead to
    bugs of their own.
    When bugs appear knowing why helps. Fixing the
    problem is often significantly easier.

    View Slide

  29. @rainforestqa
    rainforest
    In Diversity,
    We Find Strength
    Stay away from your cousin

    View Slide

  30. View Slide

  31. @rainforestqa
    rainforest
    Emacs vs Vim
    Python vs Ruby
    iOS vs Android

    View Slide

  32. View Slide

  33. ● Really, Natural Selection?
    ● Yup.

    View Slide

  34. Competition = Strength
    ● (Even with competition, life is still relatively fragile)

    View Slide

  35. @rainforestqa
    rainforest
    Take something out of it’s intended
    environment and …
    OH HAY, THATS Y U DO 

    12FACTOR APP!

    View Slide

  36. The Take-Away
    Drift between teams / programming philosophies can be
    beneficial (breeds strength!)
    Don’t get carried away, though. Taking a creature (or
    piece of software) out of it’s native environment can have
    bad effects. Use common sense.

    Small drifts between highly similar products will drive
    fierce competition. Can be a great natural motivator.

    View Slide

  37. @rainforestqa
    rainforest
    GMO, Hell No!
    Intelligent Design -- No, really

    View Slide

  38. View Slide

  39. @rainforestqa
    rainforest
    Designing for any ONE attribute
    will lead you into a corner.

    View Slide

  40. View Slide

  41. Software Analogues
    Making changes to code means you increase your
    ‘Unknowns’.
    Old features will break after making a change.
    It’s ok! Don’t need to fix it all, just need to know about it.
    Together, we determine what’s acceptable and what is
    not.


    View Slide

  42. @rainforestqa
    rainforest
    Prions, Protists, and Viruses
    Oh My!

    View Slide

  43. View Slide

  44. View Slide

  45. View Slide

  46. @rainforestqa
    rainforest
    How did we discover viruses?
    We couldn’t see them.
    The answer is theory.

    View Slide

  47. Famous Viruses
    Influenza (Birds)
    Ebola (Bats, we’re pretty sure)
    HIV (Primates)
    SARS (Bats)
    Hendra (Bats)
    Nipah (Bats)
    Fuck Bats (!)

    View Slide

  48. @rainforestqa
    rainforest
    Sterile Environments
    (ie Simulators) are shit.
    To find the right bug,
    the host matters.

    View Slide

  49. View Slide

  50. The Take-Away
    Like viruses, prions, etc… some bugs are invisible.
    Bugs appear in every imaginable shape and size.
    As a result… “Bug Free” software is a unicorn.
    Simulators are sterile environments. To find bugs, you
    gotta get dirty (test on device / host).

    View Slide

  51. Fin

    View Slide