@jamescooke@fosstodon.org
@jamescooke@fosstodon.org avatar

jamescooke

@jamescooke@fosstodon.org

Python developer working with data and royalties at Mixcloud.

Lover of testing and linting. User of Linux.

Author of https://github.com/jamescooke/flake8-aaa

This profile is from a federated server and may be incomplete. Browse more on the original instance.

jamescooke, to python
@jamescooke@fosstodon.org avatar

New blog post 🎉

"An Ode to pipx" - some ways in which using has improved my development experience.

https://jamescooke.info/an-ode-to-pipx.html

jamescooke, to python
@jamescooke@fosstodon.org avatar

Last week @hynek
said "it looks like nobody has seen the VC playbook play out" regarding Astral and .

This week with the uv tool, I’m seeing cheerleaders right next to me like I didn’t see before with Ruff.

Regarding tooling and Python itself, I can’t stop thinking about how Astral’s business model relies on keeping Python and tools slow, so that their tools stand out. And it’s really stuck in my head. 😬

jamescooke, to random
@jamescooke@fosstodon.org avatar

A question for people who know about old British telecom wiring… I live in an 1880s terraced house in Brighton. There’s an old cable that runs from this "thing" on our northern neighbour’s side of the chimney, over our roof, our neighbour to the south’s roof and to another similar shaped "thing" on the next chimney.

All neighbours are pretty sure it’s not connected to anything in any houses - but can we cut it and be safe?!

Thing B - on our neighbour’s chimney two doors up.

jamescooke, to random
@jamescooke@fosstodon.org avatar

Just spent 45 minutes watching the new robot lawn mower mowing 😊

jamescooke, (edited ) to python
@jamescooke@fosstodon.org avatar

🧠 A new tool where I:

1. pick my Python version 👈 Edit: Don't need this actually (thanks @orsinium)

  1. type in what I want

... And it tells me if I should be using an Enum, Dataclass or NamedTuple 😬 or even installing attrs and using that.

jamescooke, to python
@jamescooke@fosstodon.org avatar

Dear users and friends, could one of you lovely people have a read of this issue I've opened today in pipx https://github.com/pypa/pipx/issues/1091 - and please tell me "it's no big thing". 🙏

TL;DR if a file exists in your current directory that has the same name as a package that pipx, or the installed package you're trying to run depends on, that file will be:

  1. executed
  2. will probably crash.

Is this a vulnerability?

jamescooke, to random
@jamescooke@fosstodon.org avatar

If I never have to deal with a CSV again - that'd be GREAT!!! 🤕

jamescooke, to random
@jamescooke@fosstodon.org avatar

Although I like the idea of the "not by AI" badge (https://notbyai.fyi/), if I was building a LLM crawler, then I’d definitely ingest pages with this badge first.

H/t @pythonbytes

jamescooke, to random
@jamescooke@fosstodon.org avatar

After a year of using Linear for our work project management, I'm pretty certain in my conclusion that it's not as good as Shortcut.

I'm placing particular weight on needing to know "what happened and why", rather than the "what's happening now" aspect.

Linear is good at "now", but piecing together the whys and wherefores of a completed project is VERY HARD.

Shortcut's epics, on the other hand, made this much easier - and I'm badly missing them. 😞

jamescooke, to random
@jamescooke@fosstodon.org avatar

Any or people have any tips on how you handle privacy when demonstrating features?

I’d like to demo the current state of the bank CSV importer I’ve been working on, however I’ve only got my real credit card statements and my real ledger.dat file which means lots of private data leaks into the UI.

In a perfect world, I’d be able to generate a reasonable fake credit card export file and run it against a suitable fake ledger.dat.

jamescooke, to random
@jamescooke@fosstodon.org avatar

An email arrives in a lesser known but widely used Python package:

"""
Dear Maintainer name,

Our mutual friend and contributor to your package, jon420, has noted that your package's codebase would benefit from the addition of some updated code formatting.

You will receive a PR from our mutual friend at 07:46 UTC on 2024-05-01 which will add a new formatter and fix the linting errors that have cropped up.

...
"""

1/2 An inspired story

jamescooke, to python
@jamescooke@fosstodon.org avatar

If I just want fuzzy search of 7,000 JSON documents that span 1.6M of disk... then am I really meant to spin up an Elastic Search instance?

There must be a better way, right?! Isn't there some lib I can use for this?

jamescooke, to random
@jamescooke@fosstodon.org avatar

So this week I was feeling a bit down reading my timeline - so I made the following tweaks:

  1. Muted some accounts that “bomb” hashtags I follow.
  2. Turned off retoots from some accounts I follow.
  3. Went to bed an hour early three nights in a row.
    Everything was much better afterwards 😊
jamescooke, to random
@jamescooke@fosstodon.org avatar

Found a bug in yesterday regarding how it processes blank lines when checking if there are blank lines in blocks.

https://flake8-aaa.readthedocs.io/en/stable/error_codes/AAA05-blank-line-in-block.html

If the blank line is followed by a # comment line, then Flake8-AAA doesn’t see it 🙈

While trying to check if the bug is valid, I’ve ended up yak shaving…

jamescooke, to random
@jamescooke@fosstodon.org avatar

When I was a kid I read the entire MSDOS manual that came with my dad's Amstrad PC1512.

These days I don't even get to the bottom of a single man page 😬

jamescooke, to python
@jamescooke@fosstodon.org avatar

So Mypy didn’t save us from this test error 😔. But it seems that calling quantize() with a bool exp isn’t "wrong" in stdlib - I wish it was though.

jamescooke, to random
@jamescooke@fosstodon.org avatar

Am thinking I’m going to try out @glyph ‘s new Fritter project… My NHL radio recorder needs a rewrite to make it more robust and automated and I think this library will help with lots of that time / scheduling related logic.

https://github.com/glyph/Fritter

Maybe once the Penguins don’t make the playoffs, then I’ll try 😬🤔😭.

jamescooke, to random
@jamescooke@fosstodon.org avatar

Thanks to @hugovk 's post here https://dev.to/hugovk/help-test-python-312-beta-1508 I learned two things:

  1. it's easy to do a pre-release Python build on GitHub Actions

and 2. fail-fast: false strategy config flag is what I've been wanting for literally years!

I just assumed that GHA didn't have this feature 😬 .

jamescooke, to random
@jamescooke@fosstodon.org avatar

Here's a smell that your Big Query query ain't that big - lots of 1 row tables getting used to load config-like values, which are then used for JOINs later.

So much cruft to clean up 😥 .

My brain says: - maybe couldda just done it in a PAndAs?! Let's definitely not learn about CTEs right?! 😬

jamescooke, to random
@jamescooke@fosstodon.org avatar

@adamchainz Have you got a nice trick for finding all files in a repo that don't match the repo's .gitignore?

The tricky condition is I'd want to find all '.md' files, but not those in ignored directories 🙏 and it needs to work in CI so those files can be pumped into lint.

jamescooke, to random
@jamescooke@fosstodon.org avatar

It’s Saturday night - it’s been a day. I’m having a bonus cup of tea. 😊

jamescooke, to discworld
@jamescooke@fosstodon.org avatar

Last night’s game was Clacks of - we got completely destroyed by Moist von Lipwig on our first cooperative play through, but had our revenge on our second try 😎

image/jpeg

jamescooke, to random
@jamescooke@fosstodon.org avatar

"Just write a big Big Query query"

😬

ps. with some JavaScript thrown in 👌

jamescooke, to random
@jamescooke@fosstodon.org avatar

Seems a shame to turn off fzf-tmux in bash, but I can't get into building a new tmux to get to some version >= 3.2 (I'm "stuck" on version 3.0a which ships with Ubuntu).

In exchange, I can fully upgrade past version 0.46.0 and get new, faster shiny stuff 🤩

Here's the related issue: https://github.com/junegunn/fzf/issues/3635

jamescooke, to foss
@jamescooke@fosstodon.org avatar

This bug I found in got closed yesterday 🙌🏻

https://github.com/pypa/pipx/issues/1091

Would love to do a full contribution experience report in the style of @pintoch , but instead I’ll just say…

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • rosin
  • mdbf
  • osvaldo12
  • ethstaker
  • tacticalgear
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • modclub
  • Youngstown
  • everett
  • slotface
  • kavyap
  • megavids
  • GTA5RPClips
  • khanakhh
  • cisconetworking
  • tester
  • ngwrru68w68
  • normalnudes
  • Durango
  • InstantRegret
  • cubers
  • provamag3
  • anitta
  • Leos
  • lostlight
  • All magazines