It's been a mad couple of months in this house. It probably started on New Years Eve when we kicked off the new year with a screaming match between Christina's parents and the two of us. In one corner, the in-laws insisting that Israel isn't bent on killing everyone in Gaza and that the Palestinians had this coming, and in our corner absolute disbelief that these people who we love and respect are looking into the face of literal genocide and thinking: Meh, it's not that bad.
I'm afraid to talk to my parents about it for fear that they too are on the wrong side of this. My brother has already made it abundantly clear that he is, but that's not all that surprising.
It's a crazy position to be in, to see something so terrible in the world and to have people whose views you generally respect be so blasé about 10,000 dead children and a state that clearly has made this a key goal. Somehow, it was easier to be fine with this when Israel was only corralling millions of Palestinians in an open-air prison and restricting their access to food, water, medical supplies and even musical instruments, but now that they've dropped the mask entirely and are just erasing a people before our eyes... I find myself thinking of everyone in my life:
Are they one of the good ones?
It's not really about judgement, but rather solidarity. Most of the time it really does feel like we're out on a limb here, a handfull of people both enraged by this crime and terrified by the silence around it that emboldens it. Israel has managed to conflate criticism of Zionism with antisemitism, and this has had a chilling effect on criticism in the political arena all the way down. People are legitimately afraid of being fired for opposing genocide, and so -- I have to believe -- many of us recognise this for what it is, but stay silent for fear of retribution.
I know it's scary, but I need this right now. I think we all do. I need you to tell me you're one of the good ones, that you recognise this for what it is, and that you wish you could stop it. You may think that you can't do anything about it, and you're probably right, but I'm not asking you to fix this, I'm just asking you to help me feel like I'm not alone out here on this limb, that the people I love and respect in my life are on the right side of history, even if we're powerless to shape it.
Leave a comment, message me privately, tack on a 🍉 or ✊🏾 or 🇵🇸 emoji onto your social handle, or even tweak your avatar to show support for a Free people. Please, just show me that there are still some Good people in my life who are not ok with this. I can't begin to describe to you the degree to which the despair of feeling alone on this limb is taking on my psyche.
Long-running Django projects can start to create a lot of migrations. After just a few years, an actively developed project can create thousands of them! This can put a serious dent in your test running, because (a) Django runs the migrations at test time to setup your database, and (b) you can't test your migrations unless you're happy to have 30min CI runs!
Migrations can also often be a painful source of technical debt, since they sometimes import libraries that you don't use anymore, but can't remove because someone, some day will try to run manage.py migrate from scratch only to have it blow up looking for a dependency you don't actually use anymore.
So, looking down the barrel of a performance, tech debt, and stability headache, it's a good idea to pay some attention to your migrations from time to time.
Option 1: squashmigrations
This is the official advice. You run this command and Django will effectively squash all of your existing migrations into one Great Big Migration, so where you before you had:
This is pretty slick, because it doesn't actually need any database changes. You're just merging the administrative overhead of 132 files into one and clawing back some of the performance you lost with having so many files.
There's not much more happening here though. Any old migrations you might have that depended on old_module_you_dont_use_anymore are still in that Great Big File, including the import, and the compute overhead of processing that migration doesn't really go away (though there are optimisations that Django says can sometimes cause problems). There's also the risk of a CircularDependencyError which is no fun to fix.
Personally, I find this process high-risk, high-effort, low-reward, so I chose a more drastic, simpler path.
Option 2: Collapse migrations
There's nothing magic or automated about this process. It's very manual, but it's also not terribly complicated.
Make sure your production environment is up-to-date, and freeze any concurrent development that may involve migrations. Theoretically, you can still continue to deploy changes to production while this is happening, but I wouldn't recommend it.
If you have testing and/or staging environments, do the same there too.
On your local machine, switch your environment to master and pull any updates so you definitely have the very same code that's in production. Start up your environment, and if you've got a snapshot of production, you should use that now.
2. Local file changes
Delete all migrations, but not the __init__.py in each migrations folder:
Next, run manage.py makemigrations on your laptop. This will create a bunch of initial migrations, one for each app (though in some cases where there are foreign keys between apps, there may be two or three).
3. The scary part
The sticking point of all of this is that Django maintains a history of migrations in its django_migrations table, and step 2 above knocked our file structure out of sync with that table. You can't deploy anything until that sync is restored.
On your local environment, hop into your database and delete all migrations:
Then hop out of your database and run:
This should re-populate your django_migrations table with the "new history". The thing to remember is that you're not actually changing anything here. All of these migrations have already been applied, so you're just rewriting history to throw out the intermediate steps.
Now test that this all works. Shut down your environment, wipe your local database and spin it back up. Run your test suite and bask in the heroic speed improvement your efforts have won you. Try creating a new migration, running it, and rolling it back. When you're happy with the result, do the same on production.
And that's it! You can remove those old libraries you don't need anymore now, and add that migration testing you've been meaning to include in your CI. Future developers won't know to thank you for saving them the time it initially took to stand everything up, and everyone will get stuff done faster.
It's been a long time. I try to do a Great Big Post every year, but I basically just skipped over 2022. Here it is, the start of 2024 and I honestly can't remember much of that year so... maybe that's a good reason to persist in writing these sorts of posts?
Anna Started School
The biggest deal of 2023 wasn't even for me, but for Anna. She started school. Here in the UK you start school at 4 years old in what they call "reception". It's basically kindergarten, but with more structured learning. Like, she's learning to read already, bringing home little books with 3-letter words in them: tip, tap, pat, etc. I don't remember learning to read 'til grade one (six years old in Canada), but maybe my memory is just faulty?
Regardless, Anna seems to really like it. We wrestled for a Very Long Time about which school to send her to and I think we picked a good one in the end. The teachers all seem really supporting and nurturing, and the kids all seem generally happy.
Part of the school decision involved another one: we finally went out and bought an e-bike. A Bicicapace(bitchy-ka-patchy)Justlong. The cargo box in the front is big enough to haul ~£100 of groceries, and the back can carry Anna and a friend, or even a full-grown adult... or a Great Big Dollhouse as we discovered. It's big, beautiful, fast, and relaxing... but not cheap. It came to about £4500 in total, which is the price of some cars. Of course, it costs around £14/year to power, doesn't burn the world, make noise, or kill pedestrians so... there's that.
I'm pretty sure that this was also the year that I discovered the term "solarpunk": an art form / political movement to imagine & build a world where we use technology to harness nature while living symbiotically within its limits. A post-capitalist utopia to stand against the cyberpunk feudalistic dystopian hellscape we've been trading on for decades. Think less Blade Runner and more Star Trek, but with a lot more green:
It's not easy to explain how much of a relief it was for me to discover this new movement. Just the idea that there are still people who hope for, and envision a better world has done wonders for my morale.
I'll probably get into more of this in a much more depressing future post. For now though, I offer this excellent YouTube explainer from Our Changing Climate:
I also started doing Duolingo in earnest back in July. I re-started originally without paying, but after a few days I looked into the costs and compared that to what I spend on dinner or even a Steam game. £60/year seemed like a good investment.
It actually feels like it's paying off. 6 months in and while I'm not yet able to even form a (useful) sentence, I'm understanding a lot more of what Christina & Anna are talking about. The problem for me is one of throughput: I take a really long time to translate a sentence, so long that by the time I understand what was said, 3 more sentences have passed me by. I'm getting better though and Duolingo is largely responsible.
And finally, I said goodbye to Reddit. I cut Twitter out at the end of 2021, but it took a while longer to get out of Reddit. My reasons were different though.
For Twitter, it was the way they were rage-farming. They would pit strangers against each other to make them angry, to drive up engagement, and thus sell eyeballs. In Reddit's case, I found most of the discussions informative, the news collected more accurate than what passes for such on television, and the community generally sharing my (progressive, left-leaning) ideals. Reddit however fell prey to enshittification, the process by which something is built initially for people and then made worse because some rich assholes want to extract profit from it.
When the CEO over there decided to lock out third party clients to lock users into their (ad-riddled) app, and then tried to blame app developers for the mess this created, I figured it was time to go. I didn't want to provide content to such contemptible assholes.
So I've switched over to Lemmy, which is sort of like Reddit, but federated (like Mastodon). The community is much smaller, but everyone seems much nicer too. There's even a solarpunk community!
Late in the year, I started picking up Go, and ported my db program from the original Python to Go. The new version is much more portable, and once I've been using it for a few more months, I may just release it for the AUR.
My professional life was super chaotic this year. I switched jobs twice (and as of January 2nd, it's 3 times).
Limejump Becomes Shell
I joined Limejump back in 2020 and it was a fantastic job. I was using Shell's money (they were the parent company) to build green energy tech and was working with some brilliant, awesome people to do it. I did some of my best work of my career, working with my team to build something that few companies have managed to do (I can think of only one) in a language that I loved, with a team of fantastic people.
Then Shell decided that they wanted to roll Limejump into Shell proper and everything fell apart immediately. Worse though, is that being integrated into the company I started talking to actual Shell people, reading what they shared both publicly and on the internal network and realising how much of a mistake I'd made. Shell is intent on burning down the world, and they were using me to do it.
Goodbye Shell, Hello Utility Warehouse
I quit Shell quite publicly and found a new job at Utility Warehouse, this time my first role as a manager. The stack was different too, as they're using Go in a massively microservices-based system.
I worked there for four months, but was never really happy there for a lot of reasons I don't want to share here. So, after some spelunking through the job boards of some of my favourite companies in the UK, I found a new job at Octopus Energy.
Goodbye UW, Hello Octopus
I start at Octopus on January 2nd, so it's a good bet that by the time you're reading this, I will have already had my first day there. This job is going to be different as well. Where at Limejump I was a technical lead and at UW I was a manager, I'm dropping back into the technical saddle at Octopus as a staff engineer. Interestingly enough though, I won't be working in energy, but in water & broadband, which is fine by me. I've always been more interested in the technology than the domain.
One last thing on the professional front: I did a bunch more Linux training this year, teaching newbie Linux nerds how to Linux harder. I'm really enjoying this work, both in the curriculum creation as well as giving the actual workshops. It kind of feels like I got to go into education after all, but with more money and no children.
Alas, having children generally means that grand travel plans just don't happen. As expats, when we do leave the country, it's to go to places we've already been to see Anna's grandparents.
Anna Visits Canada
Anna got to see Canada for the first time this year, flying the full 9 hours across the Atlantic to Calgary and another hour to Kelowna with little to no screaming. Seriously, I was dreading this trip, but Anna was on point for so much of it. I'm super proud of her (and appreciative!)
The trip was basically just to see my family in the Okanagan, with a week staying at my brother's place, and another week with my parents. Both were very welcoming and thrilled to have Anna around, and Anna had a great time drawing with Grandma and bouncing on the trampoline with her cousins. We even had Violet over for a sleep over one night and the girls camped out on the pull out watching the fantastic Song of the Sea.
My takeaway from the trip though was a lot more depressing. I have never felt more isolated in my life than when I was trapped in my brother's house, on top a mountain with no car. Seriously, what the fuck is up with North American city planning? They carve a bunch of winding roads into a mountain, stack some monster trucks on it and call it "home". You can't even leave your home without climbing (and I do mean climbing) into a $50,000 beast vehicle just to drive 5minutes to a gas station. There are no sidewalks, just monster trucks! I don't get it. How is this "freedom"?
A month in Greece
The latter part of the Summer had us fly to Greece to see Anna's other grandparents. We went to sleep with the air full of smoke from fires across the valley, this at a time when Canada was also on fire. We piled into a car and drove from Athens literally through the smoke North through to Corinth (Κόρινθος) and then South all the way to Panagia (Παναγία) where we stayed at a lovely little hotel a short walk from the beach.
I relaxed on my own, writing some code in the hotel room while Christina and her parents took Anna down to the sea for a swim, I got to swim with a sea turtle, which was pretty amazing, and perhaps unsurprisingly at this point, the food was fantastic.
Extinction Rebellion's Self-neutering
Once a force to be reckoned with, XR opened 2023 with an abdication of its role as disruptor, instead opting for a more inclusive "numbers oriented" civilised protest. Not long after, everyone pretty much stopped caring about anything they had to say.
Just Stop Oil
Out of XR's rejection of civil disobedience however, Just Stop Oil was born. Currently they mainly favour "slow marches" (blocking traffic, but still moving so they can't be arrested, a loophole that no longer applies, read on) and throwing paint on everything from building doors to priceless works of art.
For the most part, they're treated like an annoyance in the media here, but they're being talked about all the time. They've had some trulyexceptional media coverage, and so it would seem that their tactics are working.
There's even been a documentary made about them by Chris Packham (famous nature docs guy here in the UK) called Is it time to break the law?.
Just Stop Oil feels like a beginning. Few people blocking traffic or throwing paint actually believe that this will fix things. They're doing this out of desperation because they know that no matter how much they recycle, those with the power to keep the world from burning will still choose fire. It represents a sort of collective awakening, where we can all start talking about how this isn't up to us, and about who actually needs to change. It's the next step on the path toward real violence, and I don't think the establishment really understands this yet.
We also saw the introduction of the 15 minute city idea, which of course was immediately jumped on by poorly educated conspiracy nuts as "government control", as if requiring that everyone own and be able to operate a $50,000 vehicle is even remotely freeing.
Across the Atlantic, the Strong Towns movement is taking root in cities across the US and Canada to take space away from cars and give it back to people.
Oh, and I forgot Paris! With their fantastic activist mayor has been exploding cycling adoption across one of the most (formerly) car-dominated capitols in Western Europe.
When I need a source of optimism, this is where I look.
2023 felt very much like a tsunami of terrible news on the international scale. Fascism, oppression, and just straight-up burning down the world are all on the rise, along with profits for the rich and poverty for everyone else.
Here in Cambridge, there was a push by the sitting council for a plan called the Sustainable Travel Zone: effectively a congestion charge within the city proper which would be used to pay for improved transit and active transport infrastructure.
They later killed it, thanks to a combination of extremely vocal opposition, and straight-up cowardice of those in power. Basically, there were enough swing votes that didn't want to blow their chances at another political race later, so they came down against something they initially favoured.
So now we have insurmountable traffic, absolutely no plan to address it, and a carbrained public that'll probably still vote Conservative because they're idiots.
This country has been ruled by Tories since 2010, and in 2023 they actually had three different Prime Ministers because the quality of their options was so miserable.
Boris Johnson got the boot, not because of his racism, ineptitude, or robbery of the public purse to enrich his friends. No was kicked out of power because he had a Christmas party during COVID lockdown. It was a shit thing to do, but compared to his long long list of reasons why he never should have been permitted to hold the office in the first place, I think this says a lot about the UK public.
He was followed by Liz Truss, whose term was literally outlasted by a head of lettuce. In just 49 days, she brought in financial policy so damaging that it nearly bankrupted the pensions of the entire country. Legislation that was so toxically neoliberal that even the IMF was critical.
Finally, she was replaced by Rishi Sunak who ran unopposed. He's a billionaire parasite who appears to be making it his goal to do as much damage to the country as possible before he leaves.
After nearly two years, Ukraine is still fighting for survival against Putin's end-of-life crisis. They've held out much, much longer than most expected, partially due to the demonstrated ineptitude of the Russian military, but most of the world seems to agree that the steely resolve of the Ukranians is the primary factor.
They've developed a new form of warfare in this theatre, leveraging consumer-grade drones to fly both surveillance and attacking missions, even managing to strike targets on Russian soil. There are thousands of videos shared on social media filmed by drones that're being used to guide artillery to cut down tanks and infantry.
Europe and Nato have been slow to work out just what they want to do on this front, but I think there's near consensus that either you fund Ukraine, or you fund Estonia, Latvia, Moldova, and Romania once Russia moves onto them. When you're dealing with a country that lies so easily and attacks civilians so readily, aiding your neighbour is a form of self-defence.
Which I suppose, brings me to Israel's campaign of genocide.
On October 7th, Hamas broke out of the open-air prison that is Gaza, murdered 766 Israeli civilians and 373 security forces, and took 247 civilian hostages. The attacks were brutal, with some even wearing bodycams to stream the footage.
Israel was caught largely unprepared, despite having advance knowledge up to a year earlier complete with blueprints. Their response however has been methodical.
At last count, an estimated 20,000 Palestinians are dead, mostly civilians, nearly half of which are children. They're telling the civilians to evacuate to areas onto which they later drop 2000-pound bombs. I've seen video of IDF soldiers attempting to throw grenades at ambulances and journalists -- stopping short only when they realise they're on camera, and I've seen harrowing video of children burned alive.
This is genocide. It's being conducted by our "friends" with our help, our weapons and with our blessing.
We are complicit, and this will haunt us all for generations.
And I swear that if you leave a comment about how "I just don't understand", "but Hamas bad", or "Israel is just defending itself", not only will I not publish it, but I may not speak to you again.
And then there was COP 28, a climate conference so important, we decided that it'd be a good idea to put the CEO of an oil company in charge of it. The result of this conference was the weakest language they could possibly get away with, including absolutely no commitment to phase out fossil fuels.
So that's awesome. It's not like we didn't have to evacuate fucking Yellowknife this year due to wildfires. I'm sure this whole climate thing is nothing to worry about. The economic fallout from choosing not burn every last drop of oil would surely be worse than acidified oceans and desertified crop lands. It's not like any of the people making these decisions will be alive when this becomes a problem.
So yeah. I have a lot of rather existential dread of late, and I want to write about that some more later 'cause there's a lot I wanna say on that topic. Needless to say 2022 was pretty bad and 2023 was worse. I fully expect 2024 to follow the same trajectory.
It's been a very long time since I started working on supporting video in my former image gallery, but it's finally finished. This site has had a substantial overhaul, dropping the old easy-thumbnails library in favour of rolling my own thumbnailer that stores the thumbnail locations on the Media object. I also employed some light-touch polymorphism to support rendering out a page of media to include both images and video. There were a bunch of backflips required (tinkering with ffmpeg) to extract metadata from videos as well as to thumbnail them, and the geometry I had to fiddle with to make it look just right wasn't fun either.
I also dropped the old js Packery library in favour of CSS grid and then spent literally weeks testing migrations since we're talking about around 77GB of images and video that I not only didn't want to lose, but I also wanted to interrogate further for higher quality metadata. Finally, my 16-core, 64GB desktop machine was getting taxed to its limits.
I don't know how well this is going to perform on the Raspberry Pi Kubernetes cluster though. Simple image thumbnailing works just fine, but video transcoding on arm64? It's going to be interesting.
Anyway, it was a shittone of work, so I thought it worth posting about. Chances are, you won't see any of the videos unless you login since it's all of my kid anyway :-) If none of the above makes sense to you, don't feel bad. This is a very nerdy subject.
It's Christmastime, and I'm absolutely stuffed from the parade of food last night (three pieces of pumpkin pie!) but in preparation for the event, I was surprised by my favourite recipe for these potatoes disappearing from the URL I'd bookmarked. Thankfully, Archive.org's Wayback Machine was on-point and had a copy, so Christmas brelinner (we only had the one meal yesterday) was saved.
Regardless, the recipe is fantastic and leaning on archive.org for recipes feels like abuse, so I'm going to reproduce the recipe here.
2-3 garlic cloves (I generally use at least half a head though)
2 tablespoons yellow mustard (yes, I'm talking about that French's stuff)
1 tablespoon dry oregano (I'm rather liberal here)
125ml of extra virgin olive oil
salt & pepper to taste
Preheat the oven to 200°C
Chop up your potatoes. The original recipe suggested that you should peel them and cut them into long wedges, but in my experience, the skins are tasty and more surface area makes for a nice crunchy texture, so I recommend roughly 2cm³ chunks is best.
Put them all into a Great Big Bowl and dump in all of the above ingredients, tossing until everything is nicely covered.
Pour the result into a big roasting pan, using a spatula to make sure you're not leaving any of the yummy goo behind. The pan should be sufficiently long & wide such as to ensure that the potatoes are all visible from above. Anything buried will just turn into mush.
Cover your pan with foil (be thorough) and chuck it in the oven for 1 hour.
Remove the foil and put it in for _another_ hour or until the tips of the potatoes look a little blackened.
That's it. Roughly 2½ hours of work and you've got yummy potatoes for about 4-6 people depending on how hungry you all are.
It's my favourite time of year: pumpkin pie season. Screw the turkey, forget the presents, between October and January it's Pumpkin Pie Time in this house.
Now, if you're reading this hoping to get the recipe of a traditional, "done the hard way" pie, I'm going to disappoint you. Below is a recipe for a delicious pie that starts with a can of puréed pumpkin. Despite its origins however, this recipe always draws compliments. When in doubt, make two.
350ml (ish) graham cracker crumbs
80ml (~⅓ cup) white sugar
90ml (~6 tablespoons) unsalted melted butter
3ml (~½ teaspoon) ground cinnamon
This part is really easy. Just combine it all in a bowl and when it's mixed well, press it into a pie dish. Just make sure that the result has everything evenly distributed with no holes, and that you've included a crust along the edge.
Bake for 7 minutes at 190°C, let it cool, and move onto the filling step...
2 large eggs, lightly beaten
425g (1 can) puréed pumpkin
170g granulated sugar
3ml (~½ teaspoon) salt
5ml (~1 teaspoon) cinnamon
3ml (~½ teaspoon) ground ginger
1.25ml (~¼ teaspoon) ground cloves
285g condensed milk
Preheat oven to 180°C
Combine ingredients (stir, don't blend) into a big bowl and pour the result into your cooked pie shell.
Bake for 40-50min, or until a knife inserted comes out clean.
Some people like ice cream, others Cool Whip, or even home made whipped cream with a splash of chocolate and Grand Mariner. Personally, I have a deep love of the cheap spray cream you buy from Tesco in a compressed air can. Whatever you like, you do you ;-)
In times like these, everyone seems to have an opinion, but most people lack the depth of understanding to ensure that that opinion is informed. I'm sure that at times I've been one of those people, so I do my best to seek out smart people with a depth of knowledge I lack and defer to their greater experience. Over the past couple weeks, I've come across some exceptionally well communicated pieces on this, and I want to share them here.
My favourite by far is Dave Meslin's take, shared via an Instagram video in a single take with no script. Dave is deeply thoughtful and passionate person with a great deal of personal insight around how the Jewish community (of which he is a member) has been divided on this issue, and the whole video is worth your time:
Next is Naomi Klein, another prominent Canadian activist of Jewish background reflecting on antisemitism and militant Zionism, culminating in the idea of "an international left rooted in values that side with the child over the gun every single time". The piece was originally posted in The Guardian, but should that link ever disappear, I've preserved it here.
Then there's the CNN interview with the nurse from Médecins Sans Frontières who recently returned from Gaza and is desperate to go back. It's a remarkable interview. Just watch it.
And finally, John Oliver delivered an exceptional story on Israel & Gaza on his show, Last Week Tonight where he talks about how extremists on both sides are effectively supporting each other at the cost of the civilian population:
I've been trying to write something about Israel's attacks on Gaza for a couple hours now and while I have a lot to say about it, my thoughts are too angry to be able to write anything worth reading. For what it's worth, here's what I have:
Israel has the right to exist, but it does not have the right to oppress Palestinians, steal their lands, or blockade the people of Gaza as they have been for more than a decade.
The Hamas attack was entirely predictable given Israel's actions in the region. That doesn't make it Right, but acting like it happened in a vacuum is intellectually dishonest.
I firmly believe that if there isn't enough international pressure to stop them, Israel will kill everyone in Gaza. It's a good bet that there are elements within Israel's military that have been planning for precisely this sort of situation for years and have drawn up their own "Final Solution" to their Palestinian "problem".
I am just so tired of all of this. The world is on fire and we're subsidising the companies with the matches in the trillions of dollars. Russia invaded Ukraine and is targetting the civilian population, and now Israel is doing their best to kill as many Palestinians as they can before someone steps in with a sense of mercy. My home country is stealing indigenous land to build a pipeline, and the country I'm living in is opening a new oil field. The only tools I have in my arsenal to fight any of this are waving a sign at a protest or donating some money to people who help the victims or just wave signs at other protests.
I feel powerless to stop any of the insanity in this world, but I think the most frustrating thing is that so much of this is objectively insane. How many civilians need to die in these wars? How many hectares of this planet have to be rendered uninhabitable before we just stop this madness? Why The Fuck are we even doing any of this, and what else can I do to stop it?
I don't have any answers here. I imagine that a year or so from now the list above will be longer with no new solutions.