• skip to sidebar
  • skip to search box

trainedmonkey

by Jim Winstead Jr.

Go Dodgers!

A view over the the field at Dodger Stadium from the right-side Reserve section, with the sun setting over the other side of the stadium.

I will admit that I have come very late to being a Dodgers fan. We bought tickets for Filipino Night in 2024, got some snazzy jerseys, ate some great food, enjoyed the beautiful stadium and views, and had fun. We went to the parade in downtown when they won the World Series. We bought hats. This season, I found that a subscription to Spectrum SportsNet LA was included with our internet and mobile service, so we started watching every game. We attended three games in person this year: Filipino Night, Hawaiian Shirt Night, and Hello Kitty Night. (Yes, fun swag is part of the appeal.)

I wasn’t a baseball fan before this. I think I attended a Twins game or two back when they played in the Hubert H. Humphrey Metrodome. I played T-ball and Little League when I was that age.

I am not obsessive (yet?) but I am on the edge of my seat most nights now, yelling at Blake Treinen trying his hardest to blow every hard-fought the impressive starting lineup has handed off to the bullpen. Ecstatic that Roki Sasaki looks great coming off the IL. I can’t wait to watch the playoffs (although I’ll have to figure out what we need to subscribe to in order to watch them), and even more I can’t wait to follow the full season next year and figure out how often we can get to see them in person.

A big appeal to me is that the love for the Dodgers in Los Angeles is real and widespread, even if the team has a complicated history and present. Dodgers gear is ubiquitous. Little Tokyo could be renamed Ohtani Town and I don’t think anyone there would object.

» Saturday, September 27 @ 8:03pm » los angeles, Dodger Stadium, Los Angeles Dodgers » Bluesky butterfly logo » Comment

Chinatown, at night

Chinese lanterns and sculptural elements outside the Two-Chew Association of Southern California, photographed at night.

It is a little strange to think back on when I used to post here pretty much every day.

Since closing our store, spending a year finding a new job, and now being thoroughly immersed in that job for nine months, I have felt very uprooted from having a particularly healthy routine. Did I ever have a healthy routine? Maybe not, but in any case it has felt particularly unhealthy the last few years. Living in an ongoing, barely-acknowledge pandemic and the collapse of the United States probably isn’t going to feel particularly healthy any time soon, either.

But I am trying, and part of that has been getting out and enjoying the city of Los Angeles.

Every weekend there is a Thai night market in Chinatown (called “DS Night Market” which doesn’t have a website but you can search for their Instagram). They have different entertainment each night, but Sunday is always Karaoke Night. There are some great vendors, the people watching is fantastic, and it is a great excuse for us to walk to and/or from Chinatown.

It is disappointing that Chinatown isn’t getting the investment it could use to become a thriving community again, but the sort of sustained small/mid-scale investment that would be needed just isn’t something that exists any longer. I fear this story from the Los Angeles Times about Yue Wa Market closing is just another heartbreaking example of what is going to keep happening.

(The photo was one I took on the way back from the night market one weekend. The night market itself is a few blocks away from this.)

» Monday, September 1 @ 10:39pm » photography, Chinatown, Downtown Los Angeles, DS Night Market » Bluesky butterfly logo » Comment

The Martian Contingency

The Martian Contingency by Mary Robinette Kowal is the latest in the Lady Astronaut series. I guess I started reading this series while I wasn’t blogging my little notes like this. It is an alternate-history/science-fiction series where a meteor strikes the East Coast of the United States, which spurs space exploration. It shares a tiny bit of DNA with For All Mankind, re-casting the end of the space race as if had continued with the same sense of urgency that it had started with instead of fizzling off into what it has become.

They are enjoyable novels, but I find myself simultaneously appreciating how it is exploring gender and race relations in this context, and people tackling with mental health issues, and annoyed at how clunky it can be.

I find myself also annoyed at the whole premise of colonizing Mars when the leading proponent of that right now is a vainglorious white supremacist fascist. It is an implausible scenario to begin with, and it is harder to suspend my disbelief to enjoy the fiction of science fiction when it is tied up in that.

» Monday, September 1 @ 6:46pm » books, science fiction, Lady Astronaut, Mary Robinette Kowal » Bluesky butterfly logo » Comment

Using AutocompleteSelect in a Django Admin form

I was building an action for a Django Admin changelist view to allow associating models to a related model. But to select the related model on the form, a regular ModelChoiceField would load all of the possibilities to populate the <select> form field, which was pretty terrible when there are thousands to tens of thousands of options.

Within the change view of the model, you can just add that field to autocomplete_fields and Django has a nice built-in widget that uses a Select2-style form input. It is called AutocompleteSelect. I couldn't find any examples of someone using this widget outside of it being pulled in by autocomplete_fields but it ended up being surprisingly easy.

Here is a rough example of the form definition at the heart of the solution:

from django import forms
from django.contrib.admin.widgets import AutoCompleteSelect

from .models import Model, RelatedModel

class BatchAssociationForm(forms.Form):
    related_field = forms.ModelChoiceField(
        queryset=RelatedModel.objects.all(),
        label="Related",
        help_text="Select the object to relate to",
        widget=AutocompleteSelect(Model.related_field.field, admin.site)
    )

No extra package necessary. I am using Django 5.2, and I have no idea if this will work with earlier versions.

A while back, I wanted to build a filter for a changelist admin that used the autocomplete widget for selecting the value(s) to filter on. Now that I cracked it for a form, maybe I should revisit that idea.

» Saturday, July 26 @ 5:58pm » code, Python, Django, autocomplete » Bluesky butterfly logo » Comment

An earlier rhyme

1177 B. C. : The Year Civilization Collapsed by Eric H. Cline is about the collapse of the empires in the eastern Mediterranean in the early 12th century B.C. There seem to have been several factors, but the evidence that a mega-drought that impacted the area in that time may have been the most significant seems to me to be growing. What is fascinating is how unknown this history is, and the ways it has to be pieced together from various archeological digs, studies of climate change, and trying to fit it together with the stories that are attributed to these times (like the exodus of the Old Testament). What are future historians and archeologists going to have to do to piece together how our current empires fall?

» Monday, April 14 @ 2:36am » books, history, archeology, climate change » Bluesky butterfly logo » Comment

The Mercy of Gods

Picking up The Mercy of Gods by James S.A. Corey was my way of getting my reading habit un-stuck. This is the first novel in what will presumably become a sprawling series of works like the novels and short stories of The Expanse.

This is (so far) totally removed from our reality, set initially on a world that humans appear to have colonized, but that is in the distant, not-quite-known past. The world is invaded by an alien empire which enslaves or exterminates all of the worlds it encounters, and the core group of protagonists (scientific researchers who had just discovered how to bridge the two “trees of life” on their world) are taken to a prison/research facility where they need to prove their (and humanity’s) worth.

It reminded me a bit of both Octavia Butler's Xenogenesis series and, honestly, a bunch of other science fiction that I couldn’t name specifically. They are not breaking any particularly new ground here, but it is a pretty solid story and I look forward to seeing where they go with the series.

» Sunday, April 6 @ 8:07pm » books, scifi, James S.A. Corey » Bluesky butterfly logo » Comment

Exordia

Exordia by Seth Dickinson is a door stopper of a book, but still manages to only feel like the prologue to a bigger story. I'm not sure I would recommend it, sort of how I felt about his other book series.

» Sunday, March 30 @ 10:02pm » scifi, Books » Bluesky butterfly logo » Comment

Fly, little blog, fly!

In the early days of my job search, I applied for a position at Fly.io. Their hiring process is structured around “work-sample challenges” that are meant to show the kind of work you’d be doing. The challenges are done on Fly.io infrastructure, of course, so they gave me an account loaded up with credits. I never actually got around to doing the first challenge before they paused hiring.

The most recent setup of this blog running on a $2/month VPS from IONOS was mostly okay, but the particular configuration of Caddy with PHP-FPM was prone to getting stuck, and I was also interested in trying to move to using SQLite instead of MySQL.

So now this is running on Fly machines using LiteFS, which is a distributed file system that replicates SQLite databases. So really this is running on two Fly machines, and I could scale that up and across regions. It seems pretty snappy to me on just two machines in one region.

» Monday, March 17 @ 12:50am » blogging, fads, fly.io, SQLite » Bluesky butterfly logo » Comment

James

I finished reading James by Percival Everett recently. It is a reimagining of Mark Twain’s Adventures of Huckleberry Finn from the point of view of Jim, the escaping slave that Huck befriends along his journey. The spin this puts on it is fantastic, although I wish I had re-read the original first so all of the crossovers and callbacks would have hit more fully.

» Sunday, February 9 @ 6:50pm » books, slavery, Huckleberry Finn, Percival Everett » Comment

End of the year reading catch-up

I have finally been able to get back into reading some books for pleasure, and so I need to catch up with some mini-reviews.

Dissolution by C. J. Sansom is the first in a series of books set in Tudor England featuring Matthew Shardlake, a hunchbacked lawyer working for Thomas Cromwell, in this one investigating a murder at a monastery as those institutions are being dismantled. In the time between when I first put a hold on this book and finally started reading it, the cover changed to highlight that there is now a television series on Hulu called Shardlake that is based on the books. It is a good mystery that seems to be absolutely loaded with historical details and atmosphere, and eventually I will probably get around to reading more of the series and perhaps checking out the show.

The Ministry of Time by Kaliane Bradley is a wonderful time-travel story. A mysterious door has allowed the government (British) to pluck several individuals out of time and bring them to the present day, and the protagonist works as a “bridge” to one of the “expats,” a naval officer from 1847 who would have otherwise died as part of the Franklin expedition to the Arctic. Like any good time travel story, it gets weird. It’s being adapted as a series by the BBC and A24, so that is promising.

Those Beyond the Wall by Micaiah Johnson is a sequel to Space Between Worlds which I read back in 2022 when I wasn’t writing here. The first book was very much a “multiverse” sort of story, and while the second shares the setting and some characters, the story stays in one world. The characters and world are really well-developed. It has more than a little of a Mad Max vibe but commenting more directly on American racial and queer politics. My memory is a little fuzzy on the first book, but it had made enough of an impression that I picked up the sequel without hesitation.

» Sunday, December 29, 2024 @ 5:36pm » books, science fiction, mystery, Tudor England, multiverse, time travel » » Comment

Just make it better

An access hatch embedded on the sidewalk on Main St that has been newly repaired. The ground is wet.

This access hatch on a sidewalk on Main St. in downtown Los Angeles used to have chipped concrete around the edges and the doors had a lot of flex to them when you walked over them. A few weeks ago, it was finally fixed up and now it looks clean, the doors don’t have any flex to them, and my near-daily experience of walking on that stretch of sidewalk feels a little bit better and safer.

Today, the website for the PHP Documentation Team was finally moved to a new host. Everything (or nearly so) related to the installation is on the appropriate repositories, it’s being served up over TLS, some of the code has been cleaned up, and the contribution guide has gotten more focused attention than it has had in several years.

None of this is perfect. None of it is done. But making things incrementally better is the kind of good trouble that I want to continue.

» Thursday, October 24, 2024 @ 5:20pm » code, php, infrastructure » Bluesky butterfly logo » Comment

Another side of the fence

I keep running into things about the Zig community that intrigue me. The latest was this post by Loris Cro about “Critical Social Infrastructure for Zig Communities,” where these paragraphs really grabbed me:

We definitely also need bolder moves, but for now let's try to take it one step at a time, starting from structuring our communities around the idea that other interesting Zig communities exist out there, and that we should try harder to at least stay informed of what we all are collectively working on.

Conversely, we should also strive to make it easier for others to keep track of what we are doing. The time for bolder moves will come, but this a strong prerequisite before can we get to those.

Maybe it is because it is a new and small community compared to PHP’s, but the Zig community seems pretty great. Mitchell Hashimoto’s investment in the community is a good sign.

A lot of what Loris wrote about also brought to mind the IndieWeb principles and my own interest in promoting the ideal of doing open source development in the open using open tools. I chafe every time a community is centered on Discord or Slack, or finding that the real discussions and decision-making is happening in inaccessible places. One person’s tight-knit community can be another’s exclusive club.

» Wednesday, October 9, 2024 @ 6:52pm » php, community, IndieWeb, zig » Bluesky butterfly logo » Comment
  • Home
  • About
  • Archive
  • Bookmarks
  • Photos
  • Projects
  • GitHub
  • @jimw@mefi.social

Dedicated to the public domain by Jim Winstead Jr.