• Django

    ,

    Python

    ๐Ÿ—“๏ธ December 21, 2024, is Volunteer Responsibility Amnesty Day

    December 21 is Volunteer Responsibility Amnesty Day, one of two days every year that allows you to build out your responsibility inventory and decide what you have time for.

    Volunteer Responsibility Amnesty Day is about checking with yourself, and ending the commitments you need to end โ€“ maybe by taking a break, or by rotating it on to someone else, or by sunsetting a project.

    It’s one of the best ideas in tech because it creates space to de-commit from projects we might not otherwise have time for, but we feel like we’d be letting people down by stepping back from. It’s a wonderful excuse to step back from projects that have been weighing on your mind.

    What I’m stepping down from

    This year, I decided it was time to step down from the Paramiko, Fabric, and Invoke Triage Teams because I had not been active there in years. I volunteered to help triage issues that were always a bit over my head.

    I joined when Jeff Forcier needed some extra hands, and it might have helped get another maintainer signed up who could help out more. At PyCon US this year, I got to hang out with Jeff. I gave him a heads-up that I felt like I was excess baggage to the project because my good intentions were no longer turning into helping out the project. I have much respect for Jeff (#teamjeff) and all three of these projects.

    If you have free cycles and can help with these projects, please check out the open issues and see if you can help. I use all three beneficial projects in one way or another every week.

    What you can do

    Suppose you are signing up for projects but are not fulfilling your commitment. In that case, I encourage you to use Volunteer Responsibility Amnesty Day as motivation to step down from whatever project or responsibility you may have.

    I also want to call out some members of the Python and Django communities. If you are signing up to help with projects you know you won’t have time for, please step back and encourage someone else to help with those projects and roles. If you know that famous face you see plastered on every website and they are friends, please ask them if they know about Volunteer Responsibility Amnesty Day and share your list. That nudge may help them decide if they are taking on too much.

    Friday December 20, 2024
  • Today I Learned

    Default Apps 2024

    Here are my Default Apps 2024, which builds from my Default Apps 2023 post.

    ๐ŸŒ Browser: Vivaldi + Polypane
    ๐Ÿ” Search: Kagi
    ๐Ÿ“ Writing: Obsidian + Grammarly
    ๐Ÿ“ Cloud File Storage: iCloud Drive + Syncthing
    ๐Ÿ’ฌ Chat: Apple Messages (family & friends), Discord (friends), Slack (work and community work), Telegram (weird bots) ๐Ÿ“† Calendar: Apple Calendar
    ๐Ÿ“† Scheduling + Booking: Cal.com
    ๐Ÿ“น Video Calls: Zoom + Cal.com + Meeter
    ๐ŸŽต Music. : Apple Music + Spotify
    ๐ŸŽค Podcasts: Overcast (boo, hiss) ๐Ÿ” Password Management: 1Password
    ๐Ÿง‘โ€๐Ÿ’ป Code Editor: Sublime Text + Zed ๐Ÿ—ƒ๏ธ Version Control: Tower
    ๐Ÿš Terminal: iTerm2
    โœˆ๏ธ VPN: Tailscale + Mullvad ๐Ÿ”– Bookmarks: Raindrop.io
    ๐Ÿ“‘ Read It Later: Raindrop.io
    ๐Ÿ“จ Mail Client: Mimestream (Gmail only and not very often)
    ๐Ÿ“ฎ Mail Server: Fastmail (I pay for it but still don’t use it enough) + Gmail
    ๐Ÿš€ Launcher: Alfred 5
    ๐Ÿ–ผ๏ธ Screenshots: Xnapper
    ๐Ÿ‘” Menu Bar: Ice
    ๐Ÿค– Containers: OrbStack + Docker Compose ๐ŸŽ’ Backups: Backblaze โš™๏ธ Automation: Hammerspoon

    Commentary

    I spent most of 2024 Chrome-free, the new cage-free because I was so frustrated at Mozilla that I deleted Firefox from all my machines. I have doubled my Gmail Accounts and usage between non-profits and community projects.

    I’m a happy Vivaldi user and advocate. I only had a handful of issues, quickly solved by turning all or some level of trackers back on. The worst offenders were both my bank and my credit card company.

    I dropped Bartender and switched to Ice after the company started acting shady due to poor communication. I have no regrets.

    My beloved Overcast podcasting app has been complete garbage for more of 2024 than it was working. The author rewrote it, and it became an unusable disaster for months, one part of Marco’s fault and one part of Apple’s fault for making the iOS App Store such a pain to release products into. It still has Airplay issues and crashes on me, but I can once again play more than one podcast in a row without it crashing. I tried many other podcast apps, and I’m sad that this is the state of things.

    I have mostly switched from Docker to OrbStack, which I highly recommend for my development life. I keep Docker around for Compose, but I have several legacy projects I haven’t ported yet.

    Previously inspired by: “Apps I’ve been using regularly this year.” Heavily inspired by Matt Stein and cataloged by Robb Knight’s App Defaults

    Thursday December 19, 2024
  • Django

    ,

    Python

    ๐Ÿคท Why do the Django and Python communities use so many Google Forms?

    Last week, I wrote but didn’t publish some notes about why the Django and Python communities use so many Google Forms.

    The simple answer is that Google Forms are quick and easy to set up, and data can be easily exported via Google Sheets or a CSV file.

    Getting data in and out of Django isn’t hard, but why isn’t it as easy as using Google Forms?

    I’d love to see a Django version of Google Forms that we can all use.

    Has anyone solved this problem?

    From a technical perspective, Django ships with a JSONField, which can store any form data we want without having to migrate databases. Turning a flat JSONField into CSV is already a solved problem.

    Please note: I am not looking for a Django forms wrapper or your opinions about why Django should use your fancy Django forms tool.

    Tuesday December 17, 2024
  • Django

    ,

    Python

    New project to shorten django-admin to django because we are not monsters

    One of the biggest mysteries in Django is why I have to run django-admin from my terminal instead of just running django. Confusingly, django-admin has nothing to do with Django’s admin app.

    If you have ever wondered why and wanted to type django from your terminal, my new project, django-cli-no-admin solves this problem for you.

    I looked at several package names on PyPI, including django-cli, which I liked the best (someone is name squatting this package.)

    I gave up and went with django-cli-no-admin for lack of a better name.

    # new school
    uv pip install django-cli-no-admin
    
    # old school
    pip install django-cli-no-admin
    
    # to use it...
    django --version 
    

    This tool aliases Django’s django-admin script does but we shorted the name by 50%:

    [project.scripts]
    django = "django.core.management:execute_from_command_line"
    

    Should Django adopt this?

    Yes. But we can leave django-admin alone since we have ~20 years of history referencing it.

    How long has this lived in your head?

    Almost two decades.

    Where is the code?

    https://github.com/jefftriplett/django-cli-no-admin

    Saturday December 14, 2024
  • Weeknotes

    ,

    Django

    ,

    Python

    ,

    Today I Learned

    ๐Ÿ““ Weeknotes for Week 48: November 25 to December 1

    Family

    We drove up to Chicago to see family for five days. It’s a 7.25-hour drive if not stopping were an option, but we usually have to stop at least two or three times to re-fuel, eat, and have a few bathroom breaks. Both of my kids are pro-travelers. Give them an iPad with an offline cache of their favorite Disney and Netflix movies and series, plus some snacks, and they are good to go for 8 to 16 hours. On our last trip back from Omaha, they complained that it was too short because we didn’t stop on our 2.5-hour drive back.

    We take turns driving, and through the magic of tethering, I’m surprised that I can comfortably use my laptop from the car for half the trip.

    Seeing family was good. There are five kids, ranging from two to nine, but this year everyone is out of diapers, everyone can communicate their needs, and everyone plays together nicely.

    We decided to avoid dinner prep drama for Thanksgiving and go out for Mexican food and margaritas. This was an excellent idea. The staff was super friendly, the food was excellent, the margaritas were the right amount of salty and sweet, and everyone got to pick something they enjoyed. There was no food prep or cleanup stress. Overall, our bill for 10 people plus a very generous tip, even after a service fee, was much less than it costs to try to feed 10 people a traditional spread.

    Work

    It was a short, two-day workweek for me. I helped a client with an inventory project running a week or two behind on their side. The timing wasn’t great because it all landed on my lap the day before I was heading out of town, and it took a few days to run. I hate k8s even more than before.

    My main client is missing a tool or two to nail the pulse. I have thought about this because everything takes less time to complete but more time to work on the problem, so things are stretched out. The holiday break was the mental reset I needed to know how to manage this for the next month until our winter break.

    Community Work

    I skipped all Office Hours this week, but it was a busier few days for my DSF CoC WG card. We reset/rebooted the WG a month ago and have more members and communication. It’s taking more time to reset and settle into a healthy normal.

    Side projects

    Side Quests

    Calendar Agent

    I spent some free time over the break working on an app that lets ChatGPT control my work calendar. I got the basics up quickly, and my Calendar Agent (Bot?) can look at what’s scheduled on my calendar and create new events for me. The hardest part was navigating Google permissions (I hate them) so that I could access my calendar through Python. Once I got that setup, I used Claude Projects to help me write most of the code.

    I ran into an issue with tool calling because I wanted to let the Agent query the time for a day before creating the event. I shifted this logic into my create event function as a fix and realized I was way overthinking it. Now, I have an interesting agent. Still, I have yet to figure out how to run it outside my terminal, which isn’t helpful.

    Entertainment

    I mostly watched football and basketball this week, but I started a few shows from jefftriplett.com/now/

    New gear

    Since it was Black Friday, I did some shopping, but not as much as in previous years. I noticed Mastodon vibes are anti-Black Friday, whereas Blue Sky and X are more about saving money and getting a deal. More of my friends shared deals over Slack and Discord than in previous years.

    I picked up a five-pack of 32 GB microSD drives for my NanoKVMs, which I hope will be delivered next week. I also bought the family an Air Fryer convection oven combo unit, which may replace our old toaster and be helpful.

    Next week

    We get to start our LEGO Advent Calendars. I started this tradition with my son when he was two or three. My daughter will be three in a few weeks, so she is now old enough to join in the tradition, too. She requested the Disney Princess calendar, and my son has the Star Wars set. We skipped the traditional set because one can only have so many Santa Clauses.

    Sunday December 1, 2024
  • Weeknotes

    ,

    Django

    ๐Ÿ““ Weeknotes for Week 47: November 18 to 24

    It’s been months since I published my weeknotes even though I have been drafting them. This week is more about getting back into the habit.

    Family

    We have hosted family quite a bit over the last month. Our parents have also had two hip replacements (one last week and one three months ago) and a minor (it could have been much, much worse) wreck on their way to see us last weekend. Thankfully, everyone is safe and doing well.

    My son is four games into recreation league basketball and had a breakout game this weekend. He was due for one and has been practicing a lot. He’s fun to watch, and sometimes it just clicks that he can take the ball away from someone or dribble in and score. He is also the best passer on his team and can dribble well.

    The rest of our family is doing well, but we have been unexpectedly car shopping.

    Community Work

    2025 DSF Board Election Resultsโ€”I was elected to the Django Software Foundation.

    Side projects

    Side Quests

    My friend Adam let me borrow one of his spare NanoKVM units, which has been a lot of fun. I tested it on my older Intel NUC and an iPad Mini, and both just worked, which surprised me. The device can run Tailscale, too, and serves as a remote hardware KVM that can boot or install a remote machine. I ordered a five-pack of NanoKVMs a few weeks ago because I had a few machines that needed to access that were stuck on boot or other “press any key” prompts before the machines would finish booting.

    Entertainment

    I will defer to my Now page, which tracks the series, movies, and games I’m watching or playing with my kids. It’s primarily data-driven and automated, and I’m happy with it. I plan to add gear and other data types as I go.

    New gear

    I got a desk treadmill to relieve stressโ€”instead, it stressed me out. I picked up one of these desk treadmills for work, but I haven’t gotten a chance to try it out yet. I found an extra-long power cord for it, which will work with my standing desk. I was surprised by how short the cord came.

    Next week

    It’s Thanksgiving week, and we are out of town to see family.

    Monday November 25, 2024
  • Shows

    ๐Ÿ“บ A Man on the Inside

    I’m about 30 or 40 years too young for A Man on the Inside, but I enjoyed it.

    Ted Danson plays “a retired professor gets a new lease on life when a private investigator hires him to go undercover inside a San Francisco retirement home.”

    It’s hard to watch a few of the episodes with a dry eye, but it’s worth the journey, and it’s a series I finished in just a few nights.

    Friday November 22, 2024
  • Office Hours

    ๐Ÿ“… Office Hours for November and December 2024

    This Friday, I am hosting office hours, and here is our schedule to finish out 2024.

    Please note that on December 13th, I plan to host an earlier morning edition that is friendly for non-US time zones. (Hi, Carlton)

    • Friday, November 22nd, 2024,ย 2:00 pm to 4:15 pm - Hard stop for me
    • Friday, November 29th, 2024 - No office hours (US Holiday)
    • Friday, December 6th, 2024,ย 2:30 pm to 4:30 pm
    • Friday, December 13th, 2024,ย 8:00 am to 11:00 am - ๐ŸŒ… Early edition ๐Ÿ“ (updated 12/12 to start an hour earlier)
    • Friday, December 20th, 2024,ย 2:30 pm to 4:30 pm
    • Friday, December 27th, 2024ย - No office hours (US Holiday)
    • Friday, January 3rd, 2025,ย 2:30 pm to 4:30 pm

    High-level details

    โ„น๏ธ Anyone can join office hours. Many join because they work remotely, miss seeing faces, and miss the random conversations when a small group hangs out.

    โ„น๏ธ Our office hours are a collaborative space where we can discuss our ongoing projects, catch up, and work together to wrap up our week on a productive note.

    ๐Ÿ™ As always, everyone is welcome to join, whether you’re a regular attendee or joining for the first time. If you are curious, reach out.

    โœ… If you need any additional details, feel free to send me a message or check out the gist from our previous sessions, where you’ll always find the most recent Zoom link โš ๏ธ

    Tuesday November 19, 2024
  • UV

    ๐Ÿ”ฅ The best "Animated This is Fine ZOOM Background" using UV and YT-DLP

    We could all use an “Animated This is Fine ZOOM Background” video in times like these.

    It’s not obvious how to download a video from YouTube.

    I tend to shy away from this outside of this background video explicitly created to be downloaded, so I came up with this one-liner using UV and yt-dlp, which will pull the video.

    $ uv run yt-dlp --format=mp4 https://www.youtube.com/watch?v=oEg-9RvcnlY

    Hat tip to Maryanne Wachter for finding and recommending this background.

    Friday November 8, 2024
  • Office Hours

    ๐Ÿ“… Office Hours this Friday and probably next Friday, but lets just take it one day at a time

    I wasn’t planning on hosting office hours this week, but given the events of the week, it feels like a damn good way to end the week.

    This Friday, November 8th, 2024 from 2:30 pm to 4:30(ish) pm, I am hosting office hours.

    The rest of November’s schedule is uncertain, but we’ll figure it out sooner rather than later.

    High-level details

    โ„น๏ธ Anyone can join office hours. Many join because they work remotely, miss seeing faces, and miss the random conversations when a small group hangs out.

    โ„น๏ธ Our office hours are a collaborative space where we can discuss our ongoing projects, catch up, and work together to wrap up our week on a productive note.

    ๐Ÿ™ As always, everyone is welcome to join, whether you’re a regular attendee or joining for the first time. If you are curious, reach out.

    โœ… If you need any additional details, feel free to send me a message or check out the gist from our previous sessions, where you’ll always find the most recent Zoom link โš ๏ธ

    Thursday November 7, 2024
  • Python

    ,

    UV

    ,

    Today I Learned

    ๐Ÿคท UV does everything or enough that I'm not sure what else it needs to do

    UV feels like one of those old infomercials where it solves everything, which is where we have landed in the Python world.

    I have had several discussions with friends about UV, and even when we talk about it during my weekly(ish) office hours, the list has grown to an ever-growing number of options.

    UV started as a quicker way of installing Python packages, and now it’s easier to tell people that UV does everything and to focus on what it doesn’t do.

    My favorite feature is that UV can now bootstrap a project to run on a machine that does not previously have Python installed, along with installing any packages your application might require.

    Here is my incomplete list of what UV does today:

    • uv pip install replaces pip install
    • uv venv replaces python -m venv
    • uv pip compile replaces pip-tools compile
    • uv pip sync replaces pip-tools sync
    • uv run replaces pipx
    • uv tool run replaces pipx
    • uv python replaces pyenv, asdf, mise, and several other like-minded tools
    • uv build - Build your Python package for pypi
    • uv publish - Upload your Python package to pypi
    • astral-sh/setup-uv brings UV to GitHub Actions
    • ghcr.io/astral-sh/uv:latest brings UV and Python to Docker

    I copied these four from uv --help, which feels like poetry features.

    • uv add - Add dependencies to the project
    • uv remove - Remove dependencies from the project
    • uv sync - Update the project’s environment
    • uv lock - Update the project’s lockfile

    So what doesn’t UV do?

    UV does a lot, but it still needs to do everything.

    • UV doesn’t run custom scripts defined in our pyproject.toml like npm-run-script allows. Thank you to @command_tab for jogging my memory.
    • UV doesn’t convert my non-UV-based projects to UV. Converting is more about prefixing and replacing my commands to switch over.
    • UV doesn’t manage, and bump version numbers like the BumpVer, and others do.
    • UV doesn’t manage pre-commit like hooks. This is a long shot, but I’d love to see support via pyproject.toml.
    • UV doesn’t replace Python, nor should it.
    Sunday November 3, 2024
  • Today I Learned

    Please publish and share more

    Friends, I encourage you to publish more, indirectly meaning you should write more and then share it.

    It’d be best to publish your work in some evergreen space where you control the domain and URL. Then publish on masto-sky-formerly-known-as-linked-don and any place you share and comment on.

    You don’t have to change the world with every post. You might publish a quick thought or two that helps encourage someone else to try something new, listen to a new song, or binge-watch a new series.

    This week, I have encouraged at least half a dozen people to blog something, and at least three of them were happily surprised to see their work re-posted by another friend or published in a newsletter.

    I have nothing against masto-whatever-you-use-this-week or blue-sky-levels-of-vc-money or formerly-called-no-one-cares, but those platforms are hard to share an article on.

    So, even if you re-publish to thread your post infinitely, please find a cheap or free publishing platform and own your work. GitHub Pages is a free way to publish your work via GitHub, and they will let you use your own domain name for free.

    You don’t need an editor

    I used to ask my friends to review my work, and I still sometimes do. Then I realized that 99% of the time, it doesn’t matter.

    I pay for Grammarly because I have Dyslexia, and it helps me communicate better. But you don’t have to.

    You can use a free tool like LanguageTool, which has an online version that will let you copy and paste your writing into a free, no-login-required Grammar checker. This is more than the average person will do, and it’s a quick and free gut check.

    Not every gift needs a bow

    Our posts are done when you say they are. You do not have to fret about sticking to landing and having a perfect conclusion. Your posts, like this post, are done after we stop writing.


    PS: Write and publish before you write your own static site generator or perfect blogging platform. We have lost billions of good writers to this side quest because they spend all their time working on the platform instead of writing.

    Saturday November 2, 2024
  • ๐Ÿ“ Even "bad" code is admirable

    Some of my favorite projects are what we would consider really “bad” code, but their apps either work or sort of work.

    There are no feature branchesโ€”only a main branch.

    They don’t open pull requests or spend time on the dozens or hundreds of open pull requests.

    The commit message stream is nothing but “updates” or “fixed” commit subjects.

    They leave you feeling that each commitment will be the last before they never touch the project again.

    They aren’t playing by any rules because they are only focused on the problem they are working on.

    They owe us nothing, and yet they are sharing their work.

    The project is only complete after they have scratched the itch and moved on to another project.

    Friday October 25, 2024
  • Justfiles

    ,

    Today I Learned

    TIL Justfiles can also be Just Scripts

    Please note: passing an argument like --justfile It only works on MacOS and on Linux.

    TIL that Justfiles can turn into Just Scripts by adding #!/usr/bin/env just --justfile to the top of the file and running chmod +x on the file.

    From the docs:

    By adding a shebang line to the top of aย justfileย and making it executable,ย justย can be used as an interpreter for scripts: https://github.com/casey/just?tab=readme-ov-file#just-scripts

    just.sh

    #!/usr/bin/env just --justfile
    
    @_default:
    	just --justfile just.sh --list
    
    @lint *ARGS:
        uv --quiet run --with pre-commit-uv pre-commit run {{ ARGS }} --all-files
    

    After you run chmod +x just.sh, this file may be run using ./just.sh, and sub-commands everything just <subcommand> will just work.

    Please note that --justfile just.sh is needed if you want your Just Script to be able to introspect or call itself.

    Why?

    More and more of my clients are using Justfiles, and occasionally, I want some other recipes that may belong outside the default workflows. These can also be reusable between projects for some of my other internal tooling, so it’s an excellent resource to learn about.

    Wednesday October 23, 2024
  • Python

    ,

    Docker

    ,

    UV

    ,

    Today I Learned

    ๐Ÿ““ My notes on publishing a Python package with UV and building a custom GitHub Action for files-to-claude-xml

    My new Python application files-to-claude-xml is now on PyPI, which means they are packaged and pip installable. My preferred way of running files-to-claude-xml is via UV’s tool run, which will install it if it still needs to be installed and then execute it.

    $ uv tool run files-to-claude-xml --version
    

    Publishing on PyPi with UV

    UV has both build and publish commands, so I took them for a spin today.

    uv build just worked, and a Python package was built.

    When I tried uv publish, it prompted me for some auth settings for which I had to log in to PyPI to create a token.

    I added those to my local ENV variables I manage with direnv.

    export UV_PUBLISH_PASSWORD=<your-PyPI-token-here>
    export UV_PUBLISH_USERNAME=__token__
    

    Once both were set and registered, uv publish published my files on PyPI.

    GitHub Action

    To make files-to-claude-xml easier to run on GitHub, I created a custom action to build a _claude.xml from the GitHub repository.

    To use this action, I wrote this example workflow, which runs from files-to-claude-xml-example

    name: Convert Files to Claude XML
    
    
    on:
      push
    
    
    jobs:
      convert-to-xml:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@v4
        - name: Convert files to Claude XML
          uses: jefftriplett/files-to-claude-xml-action@main
          with:
            files: |
              README.md
              main.py          
            output: '_claude.xml'
            verbose: 'true'
        - name: Upload XML artifact
          uses: actions/upload-artifact@v4
          with:
            name: claude-xml
            path: _claude.xml
    

    My GitHub action is built with a Dockerfile, which installs files-to-claude-xml.

    # Dockerfile
    FROM ghcr.io/astral-sh/uv:bookworm-slim
    
    
    ENV UV_LINK_MODE=copy
    
    
    RUN --mount=type=cache,target=/root/.cache/uv \
        --mount=type=bind,source=uv.lock,target=uv.lock \
        --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
        uv sync --frozen --no-install-project
    
    
    WORKDIR /app
    
    
    ENTRYPOINT ["uvx", "files-to-claude-xml"]
    

    To turn a GitHub repository into a runnable GitHub Action, an action.yml file needs to exist in the repository. This file describes the input arguments and which Dockerfile or command to run.

    # action.yml
    name: 'Files to Claude XML'
    description: 'Convert files to XML format for Claude'
    inputs:
      files:
        description: 'Input files to process'
        required: true
        type: list
      output:
        description: 'Output XML file path'
        required: false
        default: '_claude.xml'
      verbose:
        description: 'Enable verbose output'
        required: false
        default: 'false'
      version:
        description: 'Display the version number'
        required: false
        default: 'false'
    runs:
      using: 'docker'
      image: 'Dockerfile'
      args:
        - ${{ join(inputs.files, ' ') }}
        - --output
        - ${{ inputs.output }}
        - ${{ inputs.verbose == 'true' && '--verbose' || '' }}
        - ${{ inputs.version == 'true' && '--version' || '' }}
    

    Overall, this works. Claude’s prompting helped me figure it out, which felt fairly satisfying given the goal of files-to-claude-xml.

    Wednesday October 16, 2024
  • Gaming

    ๐ŸŽฎ The Legend of Zelda: Echoes of Wisdom review ๐Ÿ‘

    My oldest kiddo and I finished The Legend of Zelda: Echoes of Wisdom tonight. The 2D Zelda games are some of my favorite games of all time.

    I was worried about the game’s overall look. It looked too much like Link’s Awakening, which I wasn’t a fan of compared to the GameBoy version.

    I’m happy to say the screenshots don’t do the game justice. They perfected their 2D engine and included some camera control, which helps prevent disappearing into the shadows and behind objects.

    The game feels like a sequel to 90s SNES A Link to the Past game with some features from the more recent Switch 3D Zeldas and lore. They even built off of the original Zelda’s 2D dungeon side-scrolling mode in a way that I thought was a lot of fun without dreading it.

    While I’m happy to see Zelda finally get her own game, I thought the character had a lot of depth and one of the most interesting sets of powers and echoes, which allows for a dizzyingly large number of monsters and objects that Zelda can conjure on demand.

    My only complaint was that I snagged a Lynel within the first few hours of play, but I only had enough power right before the last battle of the game to conjure it.

    I’m happy that they thought out post-ending gameplay to make finding everything you missed easier, which was refreshing, instead of being stuck in a weird state.

    Echoes of Wisdom might be my favorite 2D(ish) Zelda game and one of my favorite Zelda games.

    I hope Nintendo lets Grezzo, the game studio behind it, continue to make weird, 2D Zelda games. This game makes me want to explore the studio’s other Nintendo 3DS Zelda games that I missed out on.

    www.backloggd.com/games/the…

    Monday October 14, 2024
  • Django

    ,

    Python

    ,

    LLM

    ๐Ÿค– I released files-to-claude-xml and new development workflows

    After months of using and sharing this tool via a private gist, I finally carved out some time to release files-to-claude-xml.

    Despite my social media timeline declaring LLMs dead earlier today, I have used Claude Projects and Artifacts.

    My workflow is to copy a few files into a Claude Project and then create a new chat thread where Claude will help me write tests or build out a few features.

    My files-to-claude-xml script grew out of some research I did where I stumbled on their Essential tips for long context prompts which documents how to get around some file upload limits which encourages uploading one big file using Claude’s XML-like format.

    With files-to-claude-xml, I build a list of files that I want to import into a Claude Project. Then, I run it to generate a _claude.xml file, which I drag into Claude. I create a new conversation thread per feature, then copy the finished artifacts out of Claude once my feature or thread is complete.

    After the feature is complete, I delete the _claude.xml file from my project and replace it with an updated copy after I re-run files-to-claude-xml.

    Features on the go

    One bonus of using Claude Projects is that once everything is uploaded, I can use the Claude iOS app as a sort-of notes app and development tool. I can start parallel conversation threads and have it work on new ideas and features. Once I get back to my desktop, I can pull these chat conversations up, and if I like the direction of the feature, I might use them. If not, I have wasted no time or effort on them. This also serves as a nice ToDo list.

    New workflows

    I am working on side projects further using this methodology. Sometimes, I would like to work on something casually while watching Netflix, but my brain shuts off from coding during the day. Instead of feeling bad that I haven’t added share links to a website or some feature I meant to add last week, I can pair Claude to work on it with me.

    I can also get more done with my lunch hours on projects like DjangoTV than I could have otherwise. Overall, I’m happy to have an on-demand assistant to pair with and work on new features and ideas.

    It’s also quicker to try out new ideas and projects that I would have needed to make time for.

    Alternatives

    Simon Willison wrote files-to-prompt, which I think is also worth trying. I contributed to the discussion, feedback, and document structure for the --cxml feature.

    I wrote files-to-claude-xml before Simon had cxml support and hoped to not release my version.

    However, after trying it out on several projects, my ignore/exclude list grew more significant than the files that I wanted to include in my project to send to Claude. I found it easier to generate a list of files to pass to mine instead of maintaining a long list to exclude.

    Saturday October 12, 2024
  • Shows

    ๐Ÿ“บ Bad Monkey

    I went in with zero expectations and enjoyed Bad Monkey. The show was fun in one of those narrated 80s detective shows. I am not sure that I am or am not a Vince Vaughn fan, but it is the best role I have seen him.

    Friday October 11, 2024
  • Office Hours

    ๐Ÿ“… Office Hours for October

    This Friday, I am hosting office hours, and here is our schedule for October.

    High-level details

    โ„น๏ธ Anyone can join office hours. Many join because they work remotely, miss seeing faces, and miss the random conversations when a small group hangs out.

    โ„น๏ธ Our office hours are a collaborative space where we can discuss our ongoing projects, catch up, and work together to wrap up our week on a productive note.

    ๐Ÿ™ As always, everyone is welcome to join, whether youโ€™re a regular attendee or joining for the first time. If you are curious, reach out.

    โœ… If you need any additional details, feel free to send me a message or check out the gist from our previous sessions, where youโ€™ll always find the most recent Zoom link โš ๏ธ

    Thursday October 10, 2024
  • Django

    ,

    Python

    ,

    UV

    โš™๏ธ UV with GitHub Actions to run an RSS to README project

    For my personal GitHub profile, I list my activities, affiliations, and the latest updates from some of my projects.

    Historically, I have used JasonEtco/rss-to-readme GitHub Action to fetch a few RSS feeds or two and to update my README a few times a day.

    Overall, I’m happy with this setup. I used it on the Django News GitHub Organization to pull in newsletter issues, jobs, and the latest videos from our various projects. When I tried to install rss-to-readme in our repo, I was getting node12 errors. (Have I mentioned how much I loathe node/npm?).

    Instead of forking rss-to-readme and trying to figure out how to upgrade it, I used this as an excuse to “pair program” with Claude. We quickly built out a prototype using Python and the feedparser library.

    I would share the chat log, but it’s mostly me trying out a few different ways to invoke it before I settle on the finished approach. See the source code over on GitHub if you are curious: https://github.com/django-news/.github/blob/main/fetch-rss.py

    Once I had a working Python script that could fetch an RSS file and modify the README, I decided to run/deploy it using UV to see how minimal I could build out the GitHub Action.

    GitHub Action

    To run our fetch-rss.py script, we have four steps:

    1. actions/checkout Get a git checkout of our project.
    2. astral-sh/setup-uv Setup UV also installs Pythons for us. As a bonus, we enabled UV’s cache support, which will run much faster in the future unless we change something in our fetch-rss.py file.
    3. Run uv run fetch-rss.py ... to fetch our RSS feeds and write them to disk. uv run installs any dependencies and caches them before our fetch-rss.py runs.
    4. stefanzweifel/git-auto-commit-action If our README.md file has changed, save our changes and commit them back to git and into our README.

    Our schedule.yml GitHub Action workflow runs twice daily or whenever we push a new change to our repo. We also set workflow_dispatch, which gives us a button to run the script manually.

    # .github/workflows/schedule.yml
    name: Update README
    
    on:
      push:
        branches:
          - main
      schedule:
        # Once a day at 12 AM
        - cron: 0 12 * * *
      workflow_dispatch:
    
    jobs:
      update:
        runs-on: ubuntu-latest
    
        permissions:
          contents: write
    
        steps:
          - uses: actions/checkout@v4
    
          - name: Install uv
            uses: astral-sh/setup-uv@v3
            with:
              enable-cache: true
              cache-dependency-glob: |
                            *.py
    
          - name: Fetch our Feeds
            run: |
              # Fetch latest Django News Newsletter entries
              uv run fetch-rss.py \
                  --section=news \
                  --readme-path=profile/README.md \
                  https://django-news.com/issues.rss          
    
          - uses: stefanzweifel/git-auto-commit-action@v5
            with:
              commit_message: ":pencil: Updates README"
    

    Results

    Overall, I’m pleased with this solution. If I wanted to spend more time on it or re-use this workflow, I might turn it into a GitHub Action workflow so that we can call: django-news/rss-to-readme to use in other projects. For now, this is fine.

    I’m happy with the astral-sh/setup-uv and uv run steps because they save me from having to set up Python and then install our project dependencies as separate steps.

    I normally shy away from running Python workflows like this in GitHub Actions because they involve a lot of slow steps. This entire workflow takes 16 to 20 seconds to run, which feels fast to me.

    Saturday October 5, 2024
  • Django

    ,

    Python

    ๐ŸŽ‰ Announcing DjangoTV

    Friends, I’m launching a half-finished website idea that I have been playing around with for a while. djangotv.com is focused on promoting and searching Django videos to make discovery easier.

    I wanted to launch DjangoTV before I left DjangoCon US 2024, so I’m technically announcing it from the airport. Last year, I launched Django News Jobs during the Django sprints because I was annoyed by the state of the various Django job boards.

    After a year of hearing people complain about Django and Python YouTube videos not getting enough views, I decided to address the problem by building out a website to help organize and promote them.

    DjangoTV is not competing with pyvideo.org. PyVideo is a fantastic resource for the Python community, and one of my goals is to make it easier to get Django content on PyVideo, too.

    DjangoTV is incomplete, and I have many ideas to improve it, including backfilling some of our older conferences, adding presenters, and adding some other metadata to make it a useful community resource.

    I focused on DjangoCon videos to bootstrap the project, and we’ll slowly expand our archives. I have been extracting good quotes, adding transcriptions, and adding better summaries. Please expect this to change a lot. I even launched the website with DEBUG turned on for a few days before I turned it off.

    Your feedback is crucial to us. If you have any ideas or suggestions, please don’t hesitate to share them.

    Most importantly, names change, people change, and bodies change. It’s essential to me that we respect each other and handle this with care. If you have a concern or need us to pull a video, please don’t hesitate to reach out; we will take care of it.

    Friday September 27, 2024
  • Django

    ,

    Python

    ,

    Today I Learned

    ๐Ÿงณ DjangoCon US, Black Python Devs Leadership Summit, and Django Girls Durham

    I’m heading to Durham, NC, for seven days of DjangoCon US this Friday. This is my 10th year volunteering and the 9th year that DEFNA, the non-profit I co-founded, has run a DjangoCon US event. Here is an overview of the week.

    Black Python Devs Leadership Summit (Saturday)

    I’m attending and speaking on a discussion panel on Saturday at the Black Python Devs Leadership Summit. Tickets are free, and they will be streaming online in the afternoon. Donations are accepted and appreciated.

    Django Girls Durham (Saturday)

    Django Girls are hosting a Django workshop and teaching beginners a crash course on building their first website using Django.

    DjangoCon US Tutorials (Sunday)

    On Sunday morning, I’ll be volunteering and helping out at the tutorials. In the afternoon, we have a tradition of stuffing swag bags, which takes a big group and is a fun way to kick off the conference. You do not need a tutorial ticket or an organizer to help out. Ask at the registration desk, and they can direct you to when and where we are doing this.

    Django Social meetup (Sunday)

    My company REVSYS is sponsoring a DjangoSocial Raleigh/Durham Pre-DjangoCon Special meetup on Sunday evening before the conference kicks off. The meetup will be great for meeting other attendees the night before the conference.

    DjangoCon US Talks (Monday through Wednesday)

    The talks are great, but the busiest three days of the conference are also the busiest. There is always a lot going on, from sun up to sun down.

    DjangoCon US Sprints (Thursday and Friday)

    The sprints are one of my favorite parts of the conference. In past years, I have been so exhausted by the sprints that it’s hard to sit down and focus. It’s one of the best times to discuss Django and the Django ecosystem. If you have a project or want to find a project to help with, the sprints are great for getting your feet wet.

    Outro

    Tickets are still available if you live near Durham and want to attend. Both events have online and in-person options, so there is no pressure to make last-minute travel plans.

    If you live around Durham and want to meet up, please reach out. Let’s see if we can meet for coffee.

    Friday September 20, 2024
  • Django

    ,

    Python

    ,

    UV

    ,

    Today I Learned

    ๐Ÿค  UV Roundup: Five good articles and a pre-commit tip

    I have written quite a bit about UV on my micro blog, and I am happy to see more and more people adopt it. I have stumbled on so many good articles recently that I wanted to share them because every article points out something new or different about why UV works well for them.

    If you are new to UV, it’s a new tool written by Astral, the creators of Ruff.

    I like UV because it replaces, combines, or complements a bunch of Python tools into one tool and user developer experience without forcing a UV way of doing it. UV effectively solves the question, “Why do I need another Python tool?” to do everyday Python tasks.

    Some reason I like UV after using it for months:

    • It’s a faster pip and is really, really fast
    • It can install and manage Python versions
    • It can run and install Python scripts
    • It can run single-file Python scripts along with their dependencies
    • It can handle project lock files

    While some people don’t care about UV being fast, it’s shaved minutes off my CI builds and container rebuilds, which means it has also saved me money and energy resources.

    Overall thoughts on UV

    Oliver Andrich’s UV โ€” I am (somewhat) sold takes the approach of only using UV to set up a new Python environment. Oliver uses UV to install Python, aliases to call Python, and UV tool install to set up a few global utilities.

    Using UV with Django

    Anลพe Peฤar’s UV with Django shows how to use UV to set up a new project with Django.

    Switching from pyenv to UV

    Will Guaraldi Kahn-Greene’s Switching from pyenv to uv was relatable for me because I also use pyenv, but I plan to slowly migrate to using only UV. I’m already halfway there, but I will have pyenv for my legacy projects for years because many aren’t worth porting yet.

    Using UV and managing with Ansible

    Adam Johnson’s Python: my new uv setup for development taught me to use uv cache prune to clean up unused cache entries and shows how he manages his UV setup using Ansible.

    Some notes on UV

    Simon Willison’s Notes on UV is an excellent summary of Oliver’s notes.

    A parting UV tip

    If you are a pre-commit fan hoping for a version that supports UV, the pre-commit-uv project does just that. I started updating my justfile recipes to bake just lint to the following uv run command, which speeds up running and installing pre-commit significantly.

    $ uv run --with pre-commit-uv pre-commit run --all-files
    pre-commit-uv
    

    If you are attending DjangoCon US…

    If you are attending DjangoCon US and want to talk UV, Django, Django News, Django Packages, hit me up while you are there.

    I’ll be attending, volunteering, organizing, sponsoring, and sprinting around the venue in Durham, NC, for the next week starting this Friday.

    We still have online and in-person tickets, but not much longer!

    Thursday September 19, 2024
  • Django

    ,

    Python

    ,

    Office Hours

    ๐Ÿ“… Office Hours Fall Update

    This Friday, I am hosting Office Hours before I travel to DjangoCon US (organizer) and the Black Python Devs Leadership Summit (speaker) in Durham, NC.

    This Friday will be my last session before a two-week break, but I will resume Office Hours again on October 4th.

    • Friday, September 13th, 2024, 2:30 pm to 4:30 pm
    • Friday, September 20th, 2024 - No office hours
    • Friday, September 27th, 2024 - No office hours
    • Friday, October 4th, 2024, 2:30 pm to 4:30 pm

    High-level details

    โ„น๏ธ Anyone can join office hours. Many join because they work remotely, miss seeing faces, and miss the random conversations when a small group hangs out.

    โ„น๏ธ Our office hours are a collaborative space where we can discuss our ongoing projects, catch up, and work together to wrap up our week on a productive note.

    ๐Ÿ™ As always, everyone is welcome to join, whether youโ€™re a regular attendee or joining for the first time. If you are curious, reach out.

    โœ… If you need any additional details, feel free to send me a message or check out the gist from our previous sessions, where youโ€™ll always find the most recent Zoom link โš ๏ธ

    Thursday September 12, 2024
  • ๐Ÿ›Œ On travel tips BYOP aka bring your own pillow

    ๐ŸŽ’ While some of my friends and colleagues can pack everything they need in a small backpack for a week’s travel, I am not that person.

    I turned into the person who brings their pillow when they travel, and it changed my stay and quality of sleep by 1000%.

    There are many variables you can’t control when you travel, but the pillow is the one variable I can control, and it has the biggest impact on my overall sleep quality. It’s frustrating to pay $200 or more a night for a nice hotel room and then to have a lousy night of sleep because of a flat pillow.

    You can’t control the mattress quality you sleep on, but having a decent pillow takes the edge off for me.

    It’s also an excellent excuse to buy a new pillow for your home in case your bag gets damaged, something happens to your pillow, and you need to throw your old pillow away. That also eases the burden so you can throw your travel pillow in the wash as soon as you get back without disrupting your first night back home.

    In conclusion, you can bring your own pillow if you struggle with sleep while traveling. It’s a relatively cheap life hack that might require a slightly bigger bag, but it might be worth it for improved sleep quality.

    Wednesday September 11, 2024