PyCon Recap, Python Tips, and Useful Development Tools
PyCon 2018 Highlights
The episode begins with hosts Michael Kennedy and Brian Okken, joined by guest Kojo Idrissa, sharing their experiences from PyCon 2018. They emphasize the value of the conference for networking, meeting people in person, and participating in impromptu activities like leading the newcomer sessions.
Python Programming Tips
The Forgotten 'Else' in Loops
Brian highlights a lesser-known feature in Python: the else clause in both for and while loops. This clause executes only if the loop completes fully without being interrupted by a break statement.
"Instead of just having to comment saying, hey, this variable is such and such, like a type annotation makes that sort of readability super, super easy."
Type Annotations and Code Completion
The discussion shifts to the benefits of type annotations. While they do not provide performance improvements, they significantly enhance code completion and maintainability in editors like PyCharm, acting as a form of self-documentation.
Software Development & Maintenance
Libraries.io and Sustainability
The guest, Kojo, introduces libraries.io, a tool for exploring dependencies deep within a project's stack. It is connected to Tidelift, which addresses the financial sustainability of open-source projects, offering a platform where maintainers can build successful businesses around their code.
Open Source Kindness
The hosts reflect on Brett Cannon's keynote about kindness in open source. They emphasize that bug reports or feature requests are essentially requests for "free work," and users should maintain a respectful, appreciative tone to avoid contributor burnout.
Practical Development Tools
Exposing Local Services with Ngrok
Michael discusses ngrok, a powerful tool for exposing local ports via an SSH tunnel. It is particularly useful for:
• Testing web applications on mobile devices.
• Allowing collaborators to view local work without deploying to a staging server.
• Facilitating educational tutorials.