Watch on YouTube
About the show
Sponsored by Microsoft for Startups Founders Hub.
Connect with the hosts
- Michael: @mkennedy@fosstodon.org
- Brian: @brianokken@fosstodon.org
- Show: @pythonbytes@fosstodon.org
Michael #1: StackOverflow 2022 Developer Survey
- Last year we saw Git as a fundamental tool to being a developer. This year it appears that Docker is becoming a similar fundamental tool for Professional Developers, increasing from 55% to 69%.
- Language: Rust is […] the most loved language with 87% of developers saying they want to continue using it.
- JS Frameworks: Angular.js is in its third year as the most dreaded.
- Let me Google that for you: 62% of all respondents spend more than 30 minutes a day searching for answers or solutions to problems. 25% spending more than an hour each day.
- The demise of the full-stack developer is overrated.
- I do wish there were more women in the field.
- Databases: Postgres is #1 and MongoDB is still going strong.
- The “which web framework do you use?” question is a full on train wreck. Why is this so hard for people to write the question? Node.js or Express (built on Node) vs. FastAPI or Flask (but no Python?)
- Most wanted / loved language is Rust (wanted) and Python/Rust tied for most wanted.
- Worked with vs. want to work with has some interesting graphics.
Brian #2: PePy.tech - PyPI download stats with package version breakdown
- Petru Rares Sincraian
- We’ve discussed pypistats.org before, which highlights
- daily downloads
- downloads per major/minor Python version
- downloads per OS
- PyPy is a bit more useful for me
- default shows last few versions and total for this major version
- “select versions” box is editable.
- clicking in it shows dropdown with downloads per version already there
- you can add * for graph of total
- or other major versions if you want to compare
- daily/weekly/monthly is nice, to round out some noise and see larger trends
- Oddity I noticed - daily graph isn’t the same dates as the table.
- off by a day on both sides
- not a big deal, but I notice these kinds of things.
Michael #3: Codon Python Compiler
- via Jeff Hutchins and Abdulaziz Alqasem
- A high-performance, zero-overhead, extensible Python compiler using LLVM
- You can scale performance and produce executables, even when using third party libraries such as matplotlib.
- It also supports writing and executing GPU kernels, which is an interesting feature.
- See how it works at exaloop.io
- BTW, really terrible licensing.
- Free for non-commercial (great)
- “Contact us” for commercial use (it’s fine to charge, but give us a price)
Brian #4: 8 Levels of Using Type Hints in Python
- Yang Zhou (yahng cho)
- A progression of using type hints that seems to track how I’ve picked them up
- Type Hints for Basic Data Types.
- Define a Constant Using Final Type
- DB: Final = '``PostgreSQL'
- (ok. I haven’t used this one at all yet)
- Adding multipe type hints to one variable.
- Using general type hints.
- def func(nums: Iterable)
- Also using Optional
- Type hints for functions
- def func(name: str) → str:
- (I probably would put this at #2)
Alias of type hints (not used this yet, but looks cool)
PostsType = dict[int, str]
new_posts: PostsType = {1: 'Python Type Hints', 2: 'Python Tricks'}
Type hints for a class itself, i.e. Self type
from typing import Self
class ListNode:
def __init__(self, prev_node: Self) -> None:
pass
- Provide literals for a variable. (not used this yet, but looks cool)
from typing import Literal
weekend_day: Literal['Saturday', 'Sunday']
weekend_day = 'Saturday'
weekend_day = 'Monday' # will by a type error
Extras
Brian:
- I hear a heartbeat for Test & Code, so it must not be dead yet.
Michael:
- New article: Welcome Back RSS
- From this I learned about Readwise, Kustosz, and Python’s reader.
- Year progress == 100%
- PyTorch discloses malicious dependency chain compromise over holidays (of course found over RSS and reeder — see article above)
Joke: vim switch