Skip to content

Instantly share code, notes, and snippets.

@Cbeck527
Created May 29, 2018 01:47
Show Gist options
  • Save Cbeck527/1a47cff0441b3571c64461d8a4d1189f to your computer and use it in GitHub Desktop.
Save Cbeck527/1a47cff0441b3571c64461d8a4d1189f to your computer and use it in GitHub Desktop.

PyCon 2018

All of the videos can be found at: https://www.youtube.com/channel/UCsX05-2sVSH7Nx3zuk3NYuQ/videos

Sessions

Code Reviews Using Art Critique Principles

https://www.youtube.com/watch?v=lpWvYxEW09k

http://codecrit.com/methodology.html

  • Approaching Code Crit the same way that an art student approaches giving feedback to other students.
  • Rules
    • Respect
    • Be prepared
    • Neutral Language
    • Constructive Criticism
    • Stay Focused
    • Mandatory participation
  • Pre-Code Review - it's important to make sure you're being respectful to other people's time.
    • Identify your work.
    • Run ALL relevant testing.
    • Know your code!
    • Check that the code meets all requirements.
    • Do not waste the time of others with unprepared code.
  • Code Crit Stages
    • Description
    • Analysis
    • Interpretation
    • Judgement

Strategies to Edit Production Data

https://www.youtube.com/watch?v=43NiFtbNg_s

Julie Qiu runs through 5 strategies for teams using a Python stack to do SQL writes against a database, to achieve increasing safety and auditability:

  1. Develop a process for raw SQL edits
  2. Run scripts locally
  3. Deploy and run scripts on an existing server
  4. Use a task runner
  5. Build a Script Runner service

The AST and Me

https://www.youtube.com/watch?v=XhWvz4dK4ng

Get under the hood and learn about Python's beloved Abstract Syntax Tree. Ever
wonder how Python code is run? Overheard people arguing about whether Python is
interpreted or compiled? In this talk, we will delve into the lifecycle of a
piece of Python code in order to understand the role that Python's Abstract
Syntax Tree plays in shaping the runtime of your code.

Emily talks about some awesome examples of breaking down an interpreted language into the virtual machine bytecode. My favorite part about this talk is she brainstorms how something simple, like a code linter or prettyfier, can use the AST to ensure that formatted code is exactly (byte-for-byte) the same.

Trio: Async concurrency for mere mortals

https://www.youtube.com/watch?v=oLkfnc_UMcE

Asynchronous threads have always been a bear for the Python language. Nathaniel wrote trio, which makes async and await keywords easier to understand and implement correctly. It brings DWiM ("do what I mean") to Python async development.

All in the timing: How side channel attacks work

https://www.youtube.com/watch?v=dT2xjgUInhQ

I learned all about side channel attacks in this talk, which is especially relevant after Meltdown and Spectre. This doesn't really have too much (if any?) Python involved.

Solve Your Problem With Sloppy Python

https://www.youtube.com/watch?v=Jd8ulMb6_ls

Larry Hastings digs into why you should write crappy python scripts rather than crappy shell scripts.

His main argument boiled down to preferring real programming languages with powerful libraries over the shell "assume everything is a string" approach. He emphasized the "get stuff done" when you're working on scripts that won't leave your machine, and showed us his provisioning scripts that he uses to set up his laptops/servers.

Some of the powerful shortcuts include:

  • piping the output of ls -l to your clipboard and baking it into your one-off script
  • Using strip(), rstrip(), and lstrip() to clean up crappy output

Practical Sphinx

https://www.youtube.com/watch?v=0ROZRNZkPS8

Carol Willing taught me how to integrate documentation into your everyday development workflow, apply best practices, and use modern development tools and services, like Travis CI and ReadTheDocs, to create engaging and up-to-date documentation which users and contributors will love.

Sphinx is a Python-specific documentation package, but most (if not all) of the docs you write will be in .RST or .MD files.

Pipenv: The Future of Python Dependency Management

https://www.youtube.com/watch?v=GBQAKldqgZs

Presented by Kenneth Reitz, the developer behind Pipenv.

This talk is about the history of Python packaging, the tools that have been historically available for application deployment, the problems/constraints presented by them, and presents a holistic solution to many of these problems: Pipenv.

Catching up to Ruby package management :)

Dataclasses: The code generator to end all code generators

https://www.youtube.com/watch?v=T-TwcmT6Rcw

https://www.python.org/dev/peps/pep-0557/

Raymond Hettinger presented Eric Smith's implementation of dataclasses, and their advantage over namedtuples. They use slightly more bytecode under the hood, but the advantages with sorting and comparisons are unparalleled. They will land in Python 3.7, but they can be backported to 3.6 by =pip install=ing a package.

Yet another tool that Python developers will use to try and avoid object-oriented programming :)

How to Write Deployment-friendly Applications

https://www.youtube.com/watch?v=wuCpCkrfeMs

This was mostly a re-hash of the 12-Factor method of developing and deploying applications. The speaker went into detail about ensuring configuration was outside the app, storing global state with durable storage outside the app and how load balancers can prevent one overloaded upstream host from taking down the app.

Secrets of a WSGI master

https://www.youtube.com/watch?v=CPz0s1CQsTE

https://modwsgi.readthedocs.io/en/develop/

Graham Dumpleton, the creator of mod_wsgi did a deep dive on the creation of the module and how it can have a place in applications inside of containers/schedulers.

Lightning Talks

"Black" Code Formatter

https://github.com/ambv/black

  • Named "black" because "it's fine if it's any color, so long as it's black."
  • A modern and opinionated code formatter that follows the "good parts" of PEP while being modern about things that the community ha evolved on.

glom

https://github.com/mahmoud/glom

  • Great for digging into nested data without doing .get().get().get()
value = glom(target, 'a.b.c')
  • Could be useful for AWS API nested nonsense
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment