The Scientist & The Engineer

The Scientist & The Engineer

My keynote from PyCon Colombia 2020.

077e9a0cb34fa3eba2699240c9509717?s=128

Andrew Godwin

February 07, 2020
Tweet

Transcript

  1. 10.

    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. 13.

    >>> import __builtin__ >>> __builtin__.True = False >>> True False

    >>> True == False True (Thankfully, only works in Python 2!)
  3. 15.

    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. 17.

    “ Benjamin Brewster In theory there is no difference between

    theory and practice. In practice there is.
  5. 20.
  6. 23.

    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!
  7. 34.

    Abstract Define a contract - types, behaviour, exceptions Verify Write

    tests to keep the contract valid Forget Work with the contract, not the fine details
  8. 37.

    “ Grace Hopper A ship in port is safe, but

    that's not what ships are built for.
  9. 43.

    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.