A conference lasts only a few days. But when organizers are able to record the talks and keynotes, the event can impact hundreds more people who were not able to attend. Here are some of my own efforts to get up on stage and share what I have learned with the communities that have given me so much!
It was once quite painful to build your Python app as a single .exe file. Support forums filled with lamentations as users struggled with primitive tools. But today, two separate tools exist for compiling your Python to real machine language! Come learn about how one of the biggest problems in commercial and enterprise software has now been solved and how you can benefit from this achievement.
Why are Python programmers crazy about lists and dictionaries, when other languages tout bitmaps, linked lists, and B+ trees? Are we missing out? Come learn how data structures are implemented on bare metal, how to select the right data structure, and how the list and dictionary cover a wide swath of use cases, and when to dip into the Standard Library for an alternative.
2013 October 13
PyCon Ireland • Dublin
Python programmers already use many design patterns in their work. Each pattern distills the wisdom the community has learned over the years, often at great expense, and makes it available to younger programmers. But even design-conscious programmers often find their applications growing more difficult to test and expand. In this talk, we will learn about how the recently propounded “Clean Architecture” applies to Python applications, and how this high-level design pattern fits particularly well with the features of the Python language and addresses questions that experienced programmers have been asking at the last few PyCons.
I released the first version of PyEphem in 1998. Built with SWIG, it made astronomical calculations in Python only slightly more convenient than writing them directly in C. A rewrite five years later improved the interface, but a decade of fielding user questions has convinced me to re-think how an API should help programmers cope with an unfamiliar and complex domain like astronomy. This talk will explore how API design, NumPy integration, and modern high-performance Python computation combine in Skyfield, the new pure-Python astronomy library that I will release during the PyCon Canada sprints!
What are the key features of a modern dynamic language like Python that let a programmer make progress even against difficult problems, even on days when things are not going well? Starting simple and then ramping up to complex, Brandon takes us from how beginners can use a Python dictionary to pair up matching data, to how to use ctypes to work around limitations in the built-in Python SSL module, as he takes us through the tools and approaches that for a Python programmer are all part of a day's work — the features without which we would not be as productive.
Warsaw was the perfect venue for reflecting on how Mikołaj Kopernik — the Polish astronomer who published in Latin as “Copernicus” — faced the perennial problem of refactoring, when he saw redundant code repeated all through Ptolemy's model of the solar system.
Continuing where my PyCon Canada talk left off, I explore several common practices for choosing names wisely when writing Python code — and suggest that apt names are the lifeline that keep programmers afloat in dynamic languages.
To introduce the wonderful conveniences of scientific Python to the crowd at CodeMash, where the majority platforms are Ruby, .NET, and Java, I showed how the IPython Notebook can be combined with basic astronomy libraries to create tools with which to explore the Solar System.
This was my very first experience with being an invited speaker, where I could choose any topic I wanted instead of having to submit a competitive proposal. I wanted to use this opportunity by filling the talk with the kind of miscellaneous, practical coding advice that so rarely fits the agenda of a more serious proposal. Instead, one single topic wound up filling the whole time slot: how we format and indent Python code as a personal and intentional act of graphic design.
I had recently seen a talk that dismissed the idea that Python programming involves design patterns, and I realized that I disagreed: there are all kinds of patterns emerging in the Python community, as well as widespread use of many of the classic patterns. As a first step towards the topic (hence the “1” in the talk title — it is, hopefully, the first of several talks on the subject), I look at the continuing popularity of many of the classic Gang of Four patterns even in modern Python programming.
Too often, programmers use ORMs to hide from their database and avoid learning how it works. Instead, I encourage programmers to learn a bit of SQL and become familiar with the problems that database queries are designed to solve well. In this talk, I outline the basics of using SQLAlchemy to craft efficient queries and avoid several common database query anti-patterns.
Another whirlwind technical introduction in the style of my previous talk on Python dictionaries. This time, I tackle how modern operating systems allocate and manage memory by using a simple example memory image that intends to capture all of the essential moving parts while being as simple in its details as possible.
2011 September 24
PyCon Poland • Mąchocice, Poland
Fred Brooks said famously that our data structures are the most important thing about our computer programs, yet a generation of programmers is trying to use ORMs to avoid learning how SQL really structures their data. This talk is a basic plea for programmers to jump in and really understand their data store, whether it is a relational database, a key-value store, or something else.
Object-orientation is a troubled programming approach that, because of its popularity in the 1990s, wound up afflicting great swaths of the Python Standard Library. By looking at specific examples in several popular web-related modules, we will see the problems that are created when an API author tries to invite you inside of their classes to become a co-developer with them.
For the educators among us, I suggest a visceral metaphor by which newer programmers might be able to understand and predict the moment at which an object or data structure will be freed from Python's memory.
Objects in a dynamic language can be slippery: merely accessing an attribute can make it appear, disappear, or even change value, at the whim of whatever overly clever programmer designed the object you are accessing. This talk looks at strategies and technologies for getting behind shifting dynamic behaviors to see the properties of an object without the risk of affecting its state.
An account on a shared Unix machine is usually a dicey platform on which to deploy a Python web app, but Webfaction uses interesting approaches to keep users fairly well sandboxed. So I gave a PyCon talk on their techniques, which could be applied on one's own systems to help keep apps separate. Of course, boxes have become cheap enough in the intervening few years that most people now spin up a separate machine per web application without even having to think about it!
For most Python programmers, the behaviors of the dictionary data type are simply memorized: instant access by key, keys must be immutable, and order is arbitrary and shifting. But what technology is behind these bizarre features? This talk goes behind the scenes with bright, colorful, simple diagrams to show exactly how Python's most popular data structure works.
Web development often involves bringing together many different components to build a single site. Authentication, social networking, media management, and content management are examples of the kind of features that are often powered by third-party modules or extensions. This talk introduces Zope's adapter registry and how a declarative web framework like Grok lets you use the “Adapter” gang-of-four design pattern to link components together into a cleanly functioning site. To extract and run the example in messagetree.tar.gz, type:
tar xzf messagetree.tar.gz cd messagetree python bootstrap.py bin/buildout bin/run