#425: If You Were a Klingon Programmer
About the show
Brought to you by Posit Connect: pythonbytes.fm/connect.
Connect with the hosts
- Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky)
- Brian: @brianokken@fosstodon.org / @brianokken.bsky.social
- Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky)
Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.
Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.
Michael #1: Why aren't you using uv?
- Fun conversation on X by Armin Ronacher.
- Interesting quotes from the thread
- I get it replaces pip/pyenv, but should I also use it instead of the built in 'python -m venv .venv'?
- But I need python installed to make python programs?
- Because it places the venv in the project folder and I can't run executables from there due to corporate policy. Many such cases. No idea why astral doesn't address this with more urgency.
- Sounds like a bad corporate policy :)
- i’m too lazy to switch from pyenv and pip
- trust issues, what if they do a bait and switch …
- Because everyone said that about poetry and I'm not sure I'm really ready to get hurt again.
- Masochism
- Many times I tried a lot of similar tools and always come back to pip and pip-tools. Them are just work, why should I spend my time for something "cool" that will bring more problems?
- I tried this week but I was expecting a "uv install requests" instead of "uv add". Switched back to pipenv.
- we partially use it. will transition when Dependabot support is available.
- I’ll leave it with → Jared Scheel: Seeing a whole lotta Stockholm Syndrome in the replies to this question.
Brian #2: Python Developer Tooling Handbook
- Tim Hopper
- “This is not a book about programming Python. Instead, the goal of this book is to help you understand the ecosystem of tools used to make Python development easier and more productive”
- Covers tools related to packaging, linting, formatting, and managing dependencies.
Michael #3: Calling all doc writers: blacken-docs
- Run
black
on python code blocks in documentation files - You can also install blacken-docs as a pre-commit hook.
- It supports Markdown, reStructuredText, and LaTex files.
- Additionally, you can run it on Python files to reformat Markdown and reStructuredText within docstrings.
Brian #4: Reinventing notebooks as reusable Python programs
- marimo allows you to store notebooks as plaintext Python files
- properties
- Git-friendly: small code change => small diff
- easy for both humans and computers to read
- importable as a Python module, without executing notebook cells
- executable as a Python script
- editable with a text editor
- Also, … testing with pytest
- “Because marimo notebooks are just Python files, they are interoperable with other tools for Python — including pytest. “
- “Testing cells. Any cell named as test_* is automatically discoverable and testable by pytest. The same goes for any cell that contains only test_ functions and Test classes.”
- “Importantly, because cells are wrapped in functions, running pytest test_notebook.py doesn’t execute the entire notebook — just its tests.”
Extras
Brian:
- PyConUS announces Refund Policy for International Attendees
- New format now live for The Complete pytest Course Bundle and component courses
- Each course now available separately also
- pytest Primary Power is 13 lessons, 3.9 hours
- Using pytest with Projects, 10 lessons, 3.4 hours
- pytest Booster Rockets, 6 lessons, 1.3 hours of content
- New format is easier to navigate
- Better for people who like different speeds. I’m usually a 1.25x-1.5x speed person.
- Now also with Congratulations! lessons (with fireworks) and printable certificates.
- Each course now available separately also
Michael:
- PyCon Taiwan is currently calling for proposals
- HN trends follow up via Shinjitsu
I'm sure some other Hacker News reader has already given you the feedback, but in the unlikely case that they haven't, You read those headlines in this segment exactly wrong.
“Ask HN: Who is hiring?" is a monthly post that asks employers to post about jobs they have available
“Ask HN: Who wants to be hired?” is a monthly topic where they ask people who are looking for jobs to post about themselves in the hope that their skillset it is a good match (and not an LLM generated resume)
So unfortunately your rosy analysis might need a less rosy interpretation.
Joke:
- Top 12 things likely to be overheard if you had a Klingon Programmer
- From Holgi on Mastodon