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

The Scientist & The Engineer

The Scientist & The Engineer

My keynote from PyCon Colombia 2020.

Andrew Godwin

February 07, 2020

More Decks by Andrew Godwin

Other Decks in Programming


  1. async def sleep_sort(numbers): async def sleep_add(number): await asyncio.sleep(number) result.append(number) result

    = [] await asyncio.wait([ sleep_add(number) for number in numbers ]) return result
  2. >>> import __builtin__ >>> __builtin__.True = False >>> True False

    >>> True == False True (Thankfully, only works in Python 2!)
  3. contains :: (Ord a) => (Tree a) -> a ->

    Bool contains Nil _ = False contains (Node t1 v t2) x | x == v = True | x < v = contains t1 x | x > v = contains t2 x
  4. “ Benjamin Brewster In theory there is no difference between

    theory and practice. In practice there is.
  5. How often does a cosmic ray affect RAM? 36 hours

    (for 16GB; "SEU at Ground Level", Eugene Normand) How long can an unpowered SSD keep data? 3 weeks - 1 year (Enterprise at 40ºC, Client at 30ºC; Intel/JEDEC) Does quantum tunneling affect CPUs? Continuously!
  6. Abstract Define a contract - types, behaviour, exceptions Verify Write

    tests to keep the contract valid Forget Work with the contract, not the fine details
  7. “ Grace Hopper A ship in port is safe, but

    that's not what ships are built for.
  8. Types Start without types, progressively add with mypy Async Make

    it work synchronously first. Add async later. Speed Write slow, understandable code. Test it. Then improve it.