AI that codes

I had been playing around with using Google’s Gemino 2.5 Pro LLM to make Python scripts for working with GPS files: for instance, adding data on the speed I was traveling at every point along recorded tracks.

The process is a bit awkward. The LLM doesn’t know exactly what system you are implementing the code in, which can lead to a lot of back and forth when commands and the code content aren’t completely right.

The other day, however, I noticed the ‘Build’ tab on the left side menu of Google’s AI Studio web interface. It provides a pretty amazing way to make an app from nothing, without writing any code. As a basic starting point, I asked for an app that can go through a GPX file with hundreds of hikes or bike rides, pull out the titles of all the tracks, and list them along with the dates they were recorded. This could all be done with command-line tools or self-written Python, but it was pretty amazing to watch for a couple of minutes while the LLM coded up a complete web app which produced the output that I wanted.

Much of this has been in service of a longstanding goal of adding new kinds of detail to my hike and biking maps, such as slowing the slope or speed at each point using different colours. I stepped up my experiment and asked directly for a web app that would ingest a large GPX and output a map colour coded by speed.

Here are the results for my Dutch bike rides:

And the mechanical Bike Share Toronto bikes:

I would prefer something that looks more like the output from QGIS, but it’s pretty amazing that it’s possible. It also had a remarkable amount of difficulty with the seemingly simple task of adding a button to zoom the extent of the map to show all the tracks, without too much blank space outside.

Perhaps the most surprising part was when at one point I submitted a prompt that the map interface was jittery and awkward. Without any further instructions it made a bunch of automatic code tweaks and suddenly the map worked much better.

It is really far, far from perfect or reliable. It is still very much in the dog-playing-a-violin stage, where it is impressive that it can be done at all, even if not skillfully.

Processing mortality

Even though it wasn’t my life at risk, the experience of my brother Sasha’s stoke and brain surgery has had a profound and lasting effect on me.

I feel like the last few years have been a waterfall of grief. I learned about Peter Russell and John Godfrey’s grave illnesses shortly before their deaths and funerals. I have gone through the loss of my relationship with Katrina, as well as an initiative which I hoped would finally give me a functional platform to fight climate change from.

In the lead-up to Peter and John’s funerals, I spent large amounts of time pre-grieving: deliberately working through, naming, and experiencing the feelings, so I might be able to avoid being overwhelmed when the time for dignity and gratitude came at the celebrations of their lives. I was doing much the same in Victoria (along with fervently, atheistically praying for his welfare): emotionally working through every possible outcome, steeling and reinforcing myself for whatever might come.

In the time since I returned to Toronto, I have still felt seized with these feelings and questions. In part, the experience underscored how I am now definitively past any sort of preparation or training stage in my life. There is no escape from dealing with life at its most serious, and from deciding how to use it in furtherance of one’s values and goals. Figuring out how to cope with a world where some beloved things are gone forever and where all others are threatened is a substantial challenge if you refuse to fall back on feel-good rationalizations or unjustified optimism.

Life is fragile and subject to arbitrary and abrupt revocation. It is also a realm where a person can be easily dominated by those who feel entitled to control them. Coping with and making sense of life, with all of its limitations and confusions and conflicts, remains an ongoing effort.

The day after the surgery — and following a practice that Sasha taught me — I walked from the hospital to Thetis Lake and walked around the water under the cover of ancient trees. The feeling of relief and gratitude was overwhelming, but I was surprised by the realization that this would also have been the right thing to do if the worst had happened: to thank the land from a position of agony and gratitude for the gift that had been my remarkable brother.

Linking routes in western Toronto

Yesterday’s route in green

After work yesterday, I took advantage of the Bloor bike lanes prior to their removal and connected some disconnected tracks in the west of the city. I rode all the way to where the bike lanes end at Kipling, then took Dundas West northeast to where it splits: with St. Clair Avenue north of the rail lines and Dundas south. I took St. Clair to Prospect Cemetery, and then the familiar route north up the cemetery and then east along the York Beltline and Kay Gardiner Beltline trails.

Bad weather projected for Thursday has the Neon Ride delayed until Friday, and I am also talking with friends about a daylong ride north up the Humber ravine to the arboretum.

Pandemic walks extentification project

My pandemic walks project has involved a lot of densification: trying to exhaustively make use of all possible routes within a geographic area, acting as a kind of human radioactive tracer running through the city’s circulatory system.

This has been interesting and has led to some nice still and animated art.

At the same time, the whole project was motivated in part by the desire to avoid visiting and re-visiting the same areas during the pandemic. That, combined with pleasant spring weather, has me thinking about reorienting from densification toward extentification, both undertaking new rides to expand the total area explored and working to add days with over 100 km of riding.

I made some maps to get a sense of how long it would take to get beyond the explored region. I added lines to show the distances to places on the outermost edges of the explored area and, in parentheses, added the Google Maps bicycle travel times there from Brentwood Towers:

(Sorry the travel times are glitched in the final map; I wanted to make all the lines the same colour and accidentally overwrote the manual Google Maps travel times labels.)

These maps show only analog / mechanical / acoustic bicycle trips, including my year on Bike Share Toronto, my Dutch bike, and the loaner I used while it was being serviced.

I need to go a long way in most directions to get beyond the network: 10–15 km in most directions. The most direct route to new kilometres is northeast, through the Bridle Path and into the areas east of the northwestern branches of the Don.

The 10,000 milli-amp-hour portable phone battery which I bought for the 2015 CUPE 3902 TA strike at U of T had started bulging, so I replaced it. I should be set for day-long extentification weekend excursions now.

P.S. I figured out how to do this in a more automated way using QGIS. First, here is the area of all the rides converted into convex hulls:

And here is a set of automatically-generated spokes radiating in all directions from the centre point of all my rides (which is predictably enough right between home and work):

The only buggy element is how it projects spokes out into the lake. Nonetheless, this provides a useful visual guide to how far I need to go to get beyond my total area explored so far by bike.

Not doing well

I don’t like the practice of answering people’s questions with the response I guess they most want to hear. Lately, with people who I know to a certain degree, if they ask, I have just been saying that I am not doing well, and if they follow up provide a brief explanation of how multilateralism and evidence-based policy are collapsing while the world commits itself to climate chaos.

I tend to get two fallacious responses.

The first is the inductive fallacy: bad things have happened before (Black Death, WWI, etc) and people and civilization have endured, therefore we will endure whatever climate change brings as well. In terms of logic, this is an obviously weak argument. If a man is playing Russian Roulette and manages to pull the trigger once without getting shot, that doesn’t prove that trigger-pulling is nothing to worry about. Furthermore, there are excellent reasons to think the world is more dangerous now than at the times of the Black Death or WWI. It wouldn’t take too many nuclear strikes against cities to produce a nuclear winter which would essentially kill us all.

The other is motivated reasoning: you need to have hope. This approach basically rejects the value of knowledge and thinking, or at least the idea that hypotheses should be tested against logic and evidence. Deciding how you want to feel in advance, and then seeking out beliefs that reinforce the feeling, is a recipe for ending up totally deluded about the world. Someone who decides what they think based on how they want to feel loses the connection which a skeptical mind maintains with the empirical world. Instead, they become like transcendentalist gurus who only care about how the world seems inside their own mind. They are no longer able to help anybody, except perhaps to become as disconnected and useless as they are.

I know people who ask how you are doing seldom want an honest answer. It’s a social cue to come back with a light and social answer. At the same time, I am utterly terrified about how the population normalizes and ignores the dismal signs of just how much trouble humanity is in. The mechanisms that let people cope and maintain a tolerable emotional bubble around themselves seem thoroughly interconnected with the mechanisms which are letting us destroy the future because we don’t want to think about scary things, or give any consideration to the interests of others when we choose what to do for ourselves.

I have been trying to make sense of why I feel so intensely unhappy now, especially when in numerous ways life was a lot worse while I was in the PhD program. The closest thing to answer is that before I felt like there were worthwhile things to try to achieve in the world, but I was just being blocked from taking part effectively in them by nearby obstacles and barriers. Now I feel like I have no idea whatsoever of what to do to try to dodge the planetary calamity ahead. With the climate change activist movement distracted and disempowered, I also feel uniquely alone.