Joseph Hale

@thehale.dev

Software Engineer, Musician, Speedcuber | @37signals | ¡Hablo Español!

Hash.extract! is my latest fun discovery in Rails' collection of Ruby extensions. It returns a new hash of the keys you name, while simultaneously removing those keys from the original hash. It's also safe to use when the named key doesn't appear in the original hash.

Bild

Do not use pull_request_target. Do not use caches in publish workflows. Use dependency cooldowns. Use Zizmor. Tell GitHub to make Actions secure by default. #GitHub #GitHubActions

Corbin Crutchley@crutchcorn.dev · 3mo ago

We at TanStack just had a major attack against our Router packages. We have a postmortem out now explaining what happened and how we mitigated the response: tanstack.com/blog/npm-sup... No other TanStack packages outside of the Router monorepo were impacted

`frozendict` has officially been accepted as part of #Python 3.15! discuss.python.org/t/pep-814-ad...

PEP 814: Add frozendict built-in type

After careful deliberation, the Python Steering Council is pleased to accept PEP 814 – Add frozendict built-in type. The absence of an immutable dict counterpart has been a long-standing gap in Pytho...

discuss.python.org

Joseph Hale@thehale.dev · 8mo ago

Looks like #Python 3.15 will include a built-in, immutable `frozendict` type. "Using an immutable mapping as a function parameter’s default value avoids the problem of mutable default values." There are other benefits too (e.g. `frozendict`s are hashable).

Two Python code snippets demonstrating the value of the new `frozendict` immutable type coming in version 3.15

Typically, you should avoid using a `dict` as a default argument in a function because it's mutable. When 3.15 is released, you can safely use a `frozendict` instead.

Looks like #Python 3.15 will include a built-in, immutable `frozendict` type. "Using an immutable mapping as a function parameter’s default value avoids the problem of mutable default values." There are other benefits too (e.g. `frozendict`s are hashable).

Two Python code snippets demonstrating the value of the new `frozendict` immutable type coming in version 3.15

Typically, you should avoid using a `dict` as a default argument in a function because it's mutable. When 3.15 is released, you can safely use a `frozendict` instead.

Explore an interactive report of who wrote each line of code in a #git repository! Git Authorship now supports .𝚖𝚊𝚒𝚕𝚖𝚊𝚙 and .𝚐𝚒𝚝-𝚋𝚕𝚊𝚖𝚎-𝚒𝚐𝚗𝚘𝚛𝚎-𝚛𝚎𝚟𝚜 files to provide even cleaner and more organized reports.

If the test suite crashes locally, it's hard to convince someone to write tests... Ran into exactly this recently. We have a major test suite which executes inside a Docker container to match our production environment, but those tests stopped booting on a coworker's laptop.

Solved a really involved bug today... Some of our B2B customers were unable to email invoices to their clients, delaying incoming payments.