<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>chris' random ramblings (Posts about pycon)</title><link>https://atlee.ca/</link><description></description><atom:link href="https://atlee.ca/categories/pycon.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Sat, 22 Feb 2025 20:04:32 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>PyCon Canada 2018</title><link>https://atlee.ca/posts/pycon-canada-2018/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I've very happy to have had the opportunity to attend and speak at &lt;a href="https://2018.pycon.ca/"&gt;PyCon
Canada&lt;/a&gt; here in Toronto last week.&lt;/p&gt;
&lt;p&gt;PyCon has always been a very well organized conference. There are a wide
range of talks available, even on topics not directly related to Python.
I've attended previous PyCon events in the past, but never the Canadian
one!&lt;/p&gt;
&lt;p&gt;My talk was titled &lt;a href="https://2018.pycon.ca/talks/talk-PC-55508/"&gt;How Mozilla uses Python to Build and Ship
Firefox.&lt;/a&gt; The
slides are available &lt;a href="https://mzl.la/2yUhiqH"&gt;here&lt;/a&gt; if you're interested. I
believe the sessions were recorded, but they're not yet available online. I
was happy with the attendance at the session, and the questions during and
after the talk.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/alexsnurnikov/status/1061302031246376961"&gt;&lt;img src="https://atlee.ca/posts/biggraph.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As part of the talk, I mentioned how Release Engineering is
a very distributed team. Afterwards, many people had followup questions
about how to work effectively with remote teams, which gave me a great
opportunity to recommend John O'Duinn's new book, &lt;a href="https://www.amazon.com/Distributed-Teams-Practice-Together-Physically/dp/1732254907/"&gt;Distributed
Teams&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Some other highlights from the conference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-55249/"&gt;CircuitPython: Python on
  hardware&lt;/a&gt;
  I really enjoyed learning about
  &lt;a href="https://www.adafruit.com/circuitpython"&gt;CircuitPython&lt;/a&gt;, and the work
  that &lt;a href="https://www.adafruit.com/"&gt;Adafruit&lt;/a&gt; is doing to make programming
  and electronics more accessible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-53179/"&gt;Using Python to find Russian Twitter troll tweets aimed at
  Canada&lt;/a&gt;
  A really interesting dive into 3 million tweets that
  &lt;a href="https://fivethirtyeight.com/features/why-were-sharing-3-million-russian-troll-tweets/"&gt;FiveThirtyEight&lt;/a&gt;
  made available for analysis.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-55520/"&gt;PEP 572: The Walrus
  Operator&lt;/a&gt;
  My favourite quote from the talk: "Dictators are people too!"
  If you haven't followed Python governance, Guido stepped down as BDFL
  (Benevolent Dictator for Life) after the PEP was resolved. Dustin focused
  much of his talk about how we in the Python community, and more generally
  in tech, need to treat each other better.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-55520/"&gt;Who's There? Building a home security system with Pi &amp;amp;
  Slack&lt;/a&gt;
  A great example of how you can get started hacking on home automation
  with really simple tools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Froilán Irzarry's Keynote talk on the second day was really impressive.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-52228/"&gt;You Don't Need That!&lt;/a&gt;
  Design patterns in Python
  My main takeaway from this was that you shouldn't try and write Python
  code as if it were Java or C++ :) Python has plenty of language features
  built-in that make many classic design patterns unnecessary or trivial to
  implement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-53293/"&gt;Numpy to PyTorch&lt;/a&gt;
  Really neat to learn about PyTorch, and leveraging the GPU to accelerate
  computation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-53944/"&gt;Flying Python - A reverse engineering dive into Python
  performance&lt;/a&gt;
  Made me want to investigate &lt;a href="https://wiki.mozilla.org/Balrog"&gt;Balrog&lt;/a&gt;
  performance, and also look at ways we can improve Python startup time.
  Some neat tips about examining disassembled Python bytecode.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-53735/"&gt;Working with Useless
  Machines&lt;/a&gt;
  Hilarious talk about (ab)using IoT devices.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://2018.pycon.ca/talks/talk-PC-52797/"&gt;Gathering Related Functionality: Patterns for Clean API
  Design&lt;/a&gt;
  I really liked his approach for creating clean APIs for things like class
  constructors. He introduced a module called
  &lt;a href="https://variants.readthedocs.io/en/latest/"&gt;variants&lt;/a&gt; which lets you
  write variants of a function / class initializer to support varying types
  of parameters. For example, a common pattern is to have a function that
  takes either a string path to a file, or a file object. Instead of having
  one function that supports both types of arguments, variants allows you
  to make distinct functions for each type, but in a way that makes it
  easy to share underlying functionality and also not clutter your
  namespace.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description><category>mozilla</category><category>pycon</category><category>python</category><category>releng</category><guid>https://atlee.ca/posts/pycon-canada-2018/</guid><pubDate>Tue, 20 Nov 2018 19:20:02 GMT</pubDate></item><item><title>PyCon 2016 report</title><link>https://atlee.ca/posts/pycon-2016-report/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I had the opportunity to spend last week in Portland for &lt;a class="reference external" href="https://us.pycon.org/2016/"&gt;PyCon 2016&lt;/a&gt;. I'd like to share some of my thoughts and
some pointers to good talks I was able to attend. The full schedule can be
found &lt;a class="reference external" href="https://us.pycon.org/2016/schedule/talks/"&gt;here&lt;/a&gt; and all the
videos are &lt;a class="reference external" href="https://www.youtube.com/channel/UCwTD5zJbsQGJN75MwbykYNw/videos"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;section id="monday"&gt;
&lt;h2&gt;Monday&lt;/h2&gt;
&lt;p&gt;Brandon Rhodes' &lt;cite&gt;Welcome to PyCon&lt;/cite&gt; was one of the best introductions to a
conference I've ever seen. Unfortunately I can't find a link to a
recording...
What I liked about it was that he made
everyone feel very welcome to PyCon and to Portland. He explained some of
the simple (but important!) practical details like where to find the
conference rooms, how to take transit, etc. He noted that for the first
time, they have live transcriptions of the talks being done and put up on
screens beside the speaker slides for the hearing impaired.&lt;/p&gt;
&lt;p&gt;He also emphasized the importance of keeping questions &lt;em&gt;short&lt;/em&gt; during Q&amp;amp;A
after the regular sessions. "Please form your question in the form of a
question." I've been to way too many Q&amp;amp;A sessions where the person asking
the question took the opportunity to go off on a long, unrelated tangent. For
the most part, this advice was followed at PyCon: I didn't see very many
long winded questions or statements during Q&amp;amp;A sessions.&lt;/p&gt;
&lt;section id="machete-mode-debugging"&gt;
&lt;h3&gt;Machete-mode Debugging&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/1658/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=5XvAVgcbmdY"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Ned Batchelder gave this great talk about using python's language features
to debug problematic code. He ran through several examples of tricky
problems that could come up, and how to use things like monkey patching
and the debug trace hook to find out where the problem is. One piece of
advice I liked was when he said that it doesn't matter how ugly the code
is, since it's only going to last 10 minutes. The point is the get the
information you need out of the system the easiest way possible, and then
you can undo your changes.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="refactoring-python"&gt;
&lt;h3&gt;Refactoring Python&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2073/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=d46PjvFki38"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I found this session pretty interesting. We certainly have lots of code
that needs refactoring!&lt;/p&gt;
&lt;/section&gt;
&lt;section id="security-with-object-capabilities"&gt;
&lt;h3&gt;Security with object-capabilities&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2248/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=OS94twkD74s"&gt;video&lt;/a&gt;;
&lt;a class="reference external" href="https://smpfle21zb7r5nnat5uq.oasis.sandstorm.io/index.html#/"&gt;slides&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I found this interesting, but a little too theoretical. Object
capabilities are a completely orthogonal way to access control lists as a
way model security and permissions. It was hard for me to see how we could
apply this to the systems we're building.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="awaken-your-home"&gt;
&lt;h3&gt;Awaken your home&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/1752/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=DJpNmDK_g6Y"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;A really cool intro to the &lt;a class="reference external" href="https://home-assistant.io/"&gt;Home Assistant&lt;/a&gt;
project, which integrates all kinds of IoT type things in your home. E.g.
Nest, Sonos, IFTTT, OpenWrt, light bulbs, switches, automatic sprinkler
systems. I'm definitely going to give this a try once I free up my
&lt;a class="reference external" href="http://raspberrypi.org/"&gt;raspberry pi&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="finding-closure-with-closures"&gt;
&lt;h3&gt;Finding closure with closures&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2231/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=E9wS6LdXM8Y"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;A very entertaining session about closures in Python. Does Python even
have closures? (yes!)&lt;/p&gt;
&lt;/section&gt;
&lt;section id="life-cycle-of-a-python-class"&gt;
&lt;h3&gt;Life cycle of a Python class&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2074/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=kZtC_4Ecq1Y"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Lots of good information about how classes work in Python, including some
details about meta-classes. I think I understand meta-classes better after
having attended this session. I still don't get descriptors though!&lt;/p&gt;
&lt;p&gt;(I hope Mike learns soon that &lt;code class="docutils literal"&gt;__new__&lt;/code&gt; is pronounced "dunder new" and not
"under under new"!)&lt;/p&gt;
&lt;/section&gt;
&lt;section id="deep-learning"&gt;
&lt;h3&gt;Deep learning&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2112/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=kVud83kqv30"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Very good presentation about getting started with deep learning. There are
lots of great libraries and pre-trained neural networks out there to get
started with!&lt;/p&gt;
&lt;/section&gt;
&lt;section id="building-protocol-libraries-the-right-way"&gt;
&lt;h3&gt;Building protocol libraries the right way&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/1743/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=7cC3_jGwl_U"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I really enjoyed this talk. Cory Benfield describes the importance of
keeping a clean separation between your protocol parsing code, and your IO.
It not only makes things more testable, but makes code more reusable.
Nearly every HTTP library in the Python ecosystem needs to re-implement its
own HTTP parsing code, since all the existing code is tightly coupled to
the network IO calls.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="tuesday"&gt;
&lt;h2&gt;Tuesday&lt;/h2&gt;
&lt;section id="guido-s-keynote"&gt;
&lt;h3&gt;Guido's Keynote&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://www.youtube.com/watch?v=YgtL4S7Hrwo"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Some interesting notes in here about the history of Python, and a look at
what's coming in 3.6.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="click"&gt;
&lt;h3&gt;Click&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2223/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=SDyHLG2ltSY"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;An intro to the &lt;a class="reference external" href="http://click.pocoo.org/5/"&gt;click&lt;/a&gt; module for creating
beautiful command line interfaces.&lt;/p&gt;
&lt;p&gt;I like that click helps you to build &lt;em&gt;testable&lt;/em&gt; CLIs.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="http-2-and-asynchronous-apis"&gt;
&lt;h3&gt;HTTP/2 and asynchronous APIs&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/1737/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=Mou17XxYRZk"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;A good introduction to what HTTP/2 can do, and why it's such an
improvement over HTTP/1.x.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="remote-calls-local-calls"&gt;
&lt;h3&gt;Remote calls != local calls&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2027/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=dY-SkuENZP8"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Really good talk about failing gracefully. He covered some familiar topics
like adding timeouts and retries to things that can fail, but also
introduced to me the concept of &lt;a class="reference external" href="http://martinfowler.com/bliki/CircuitBreaker.html"&gt;circuit breakers&lt;/a&gt;. The idea with a circuit
breaker is to prevent talking to services you know are down. For example,
if you have failed to get a response from service X the past 5 times due
to timeouts or errors, then open the circuit breaker for a set amount of
time. Future calls to service X from your application will be intercepted,
and will fail early. This can avoid hammering a service while it's in an
error state, and works well in combination with timeouts and retries of course.&lt;/p&gt;
&lt;p&gt;I was thinking quite a bit about &lt;a class="reference external" href="http://hearsum.ca/blog/index.html"&gt;Ben's&lt;/a&gt; &lt;a class="reference external" href="https://pypi.python.org/pypi/redo"&gt;redo&lt;/a&gt; module during this talk. It's a
great module for handling retries!&lt;/p&gt;
&lt;/section&gt;
&lt;section id="diving-into-the-wreck"&gt;
&lt;h3&gt;Diving into the wreck&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2032/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=yHpy4Khx0Ds"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;A look into diagnosing performance problems in applications. Some neat
tools and techniques introduced here, but I felt he blamed the DB a little
too much :)&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="wednesday"&gt;
&lt;h2&gt;Wednesday&lt;/h2&gt;
&lt;section id="magic-wormhole"&gt;
&lt;h3&gt;Magic Wormhole&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/1838/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=dgnikoiau68"&gt;video&lt;/a&gt;;
&lt;a class="reference external" href="http://www.lothar.com/%7Ewarner/MagicWormhole-PyCon2016.pdf"&gt;slides&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I didn't end up going to this talk, but I did have a chance to chat with
Brian before. &lt;a class="reference external" href="https://github.com/warner/magic-wormhole"&gt;magic-wormhole&lt;/a&gt; is a tool to safely transfer
files from one computer to another. Think scp, but without needing ssh
keys set up already, or direct network flows. Very neat tool!&lt;/p&gt;
&lt;/section&gt;
&lt;section id="computational-physics"&gt;
&lt;h3&gt;Computational Physics&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/1711/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=NGVBo6JJa6M"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;How to do planetary orbit simulations in Python. Pretty interesting talk,
he introduced me to Feynman, and some of the important characteristics of
the simulation methods introduced.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="small-batch-artisinal-bots"&gt;
&lt;h3&gt;Small batch artisinal bots&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2175/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=mizX7n2tx8k"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Hilarious talk about building bots with Python. Definitely worth watching,
although unfortunately it's only a partial recording.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="gilectomy"&gt;
&lt;h3&gt;Gilectomy&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://us.pycon.org/2016/schedule/presentation/2101/"&gt;abstract&lt;/a&gt;;
&lt;a class="reference external" href="https://www.youtube.com/watch?v=P3AyI_u66Bw"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The infamous GIL is gone! And your Python programs only run 25x slower!&lt;/p&gt;
&lt;p&gt;Larry describes why the GIL was introduced, what it does, and what's
involved with removing it. He's actually got a fork of Python with the GIL
removed, but performance suffers quite a bit when run without the GIL.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="lars-keynote"&gt;
&lt;h3&gt;Lars' Keynote&lt;/h3&gt;
&lt;p&gt;(&lt;a class="reference external" href="https://www.youtube.com/watch?v=bSfe5M_zG2s"&gt;video&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;If you watch only one video from PyCon, watch this. It's just incredible.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;</description><category>mozilla</category><category>pycon</category><category>python</category><category>releng</category><guid>https://atlee.ca/posts/pycon-2016-report/</guid><pubDate>Thu, 09 Jun 2016 19:39:40 GMT</pubDate></item></channel></rss>