Canberra Railway Museum

Went to the Canberra Railway Museum this morning. Quite a wide variety of locomotives and carriages being restored, with many of them quite accessible to guests, including the cabin. Here’s a selection of the more interesting sites.

🔗 Insanity in the Air: The crash of Pakistan International Airlines flight 8303

A facinating post. One of those posts where you know the writer knows what they’re talking about, and has clearly done a lot of research for the piece. Will definitely take a look at their other posts.

Picnic train, now boarding. 🚂

A few shots around South-East Canberra with the deciduous trees starting to turn.

Popula trees starting to turn yellow Path shaded by oak trees

Caught up with these two today.

Two cockatiels perched on a shoulder.

Currently in Ron Finemore territory (namely the Hume Fwy near Gundagai). 🚛

On Post Headers

My answer to @mandaris question:

How many of you are using headers in your blogging? Are you using anything that denotes different sections?

I generally don’t use headers, unless the post is so long it needs them to break it up a little. When I do, I tend to start with H2, then step down to H3, H4, etc.

I’d love to start with H1, but most themes I encounter, including those from software like Confluence, style H1 to be almost the same size as the page title. This kills me as the page title should be separate from any H1s in the body, and styled differently enough that there’s no mistaking what level the header’s on.

But, c’est la vie.

Was running into issues trying to buy a hamper from an online store in the UK. Turns out it was because one of the hamper items was alcoholic. I guess they’re not interested in dealing with the customs, and the associated headaches, in getting that over here.

Sorting And Go Slices

Word of caution for anyone passing Go slices to a function which will sort them. Doing so as is will modify the original slice. If you were to write this, for example:

package main

import (
	"fmt"
	"sort"
)

func printSorted(ys []int) {
	sort.Slice(ys, func(i, j int) bool { return ys[i] < ys[j] })
	fmt.Println(ys)
}

func main() {
	xs := []int{3, 1, 2}
	printSorted(xs)
	fmt.Println(xs)
}

You will find, when you run it, that both xs and ys will be sorted:

[1,2,3]
[1,2,3]

If this is not desired, the remedy would be make a copy of the slice prior to sorting it:

func printSorted(ys []int) {
	ysDup := make([]int, len(ys))
	copy(ysDup, ys)
	sort.Slice(ysDup, func(i, j int) bool { return ys[i] < ys[j] })
	fmt.Println(ysDup)
}

This make sense when you consider that the elements of a slice are more or less stored in a normal array. Slices add things like start and end items, which are stored as values within the slice struct, but the array itself is just a normal reference and it is this that sort.Slice will modify.

On the face of it, this is a pretty trivial thing to find out. But it’s worth noting here just so that I don’t have to remember it again.

Ok, I may have gone slightly overboard tonight, but so annoyed was I with Google TV’s recommendation that I decided to install a 3rd-party launcher. And wow! I should’ve done this way sooner. It’s like a breath of fresh air. 😌

Television showing the home screen of Projectivity Launcher

This Reddit thread has all the details. I’m using Projectivity Launcher.

Wish there was a way on Google TV to mark a recommendation as “I never want to see something like this recommended to me again.” Yes, I felt that strongly about it (strong enough to type out a recommendation using the remote). And no, it wasn’t about news or politics.

I discovered Andor last night. The hype is justified: it’s a really well done TV series.

If there’s any evidence needed to prove that what we’re building doesn’t actually need to be implemented as micro-services, it’s the fact that we’re essentially building a monolith backend-for-frontend (BFF) layer to serve the web-app and orchestrate the calls to the various backend services.

Not only does this prove that the whole idea of micro-services is essentially just a waste of time (if you’re building one large monolith for serving the web-app, why not just bundle all the application logic there?) but it also results in wasted effort. Want to limit how much a user can use a particular resource? It should go either in the BFF or the backend. Ideally, it should only go in one of the services. Well, if you have two devs working on two separate systems, and you’re in a bit of a rush, you’ll find that it’s implemented in both systems. Worse, you’ll find that the backend service has it set to 20, but the BFF service has it set to 30.

Luckily this one was caught during code review. But now you need to choose which one to keep. Maybe you decide to keep both since you don’t have time to change it now (again, you’re in a rush) but that now locks you into something that’s just harder to change. I want to make this configurable per environment to make it easier to test in Dev, but that’ll mean making the change in the BFF as well. Or I’ll need to remove one of the implementations. Again, duplicated effort that was unnecessary on the whole.

Argh, so frustrating!

If there are any Victorian gunzels out there eager for cab ride videos, I can recommend driver667. They produce some quality cab ride videos of greater Melbourne and regional Victoria, plus some in Tasmania that I’ve yet to see. 📺

Release version 1.0.2 of Sidebar for Tiny Theme. Biggest change is that the sidebar is no longer using after-post-list micro-hook. This should fix any styling issues for sites that are using the before-post-list micro-hook. It also frees up this micro-hook for site authors.

The downside of this approach is that this plugin now overrides the _default/baseof.html template of Tiny theme, by installing the sidebar just after the main content. This is arguably not good, and will probably need to be changed in some way (might be that we’ll need to add another micro-hook to Tiny theme). But it should work for sites currently using version 2.7.1 of Tiny theme.

Quick review of Dune, 2021, directed by Denis Villeneuve. Enjoyed this film. I’ve never read the books but I understand they treated the source material well. I kinda wish they cut back on all the slow motion shots, and the soundtrack annoyed me. But on the whole, it’s a very good movie. Beautifully shot.

Is it okay to post about things you’re doing that might be a complete waste of time and go nowhere? It is? Ok, good. So roped myself into starting yet another level editor for something. It’s either start from scratch, or try and get QT working on my machine. I know where I’d rather spend my time.

Screenshot of the start of a level editor

We’re going through a bit of a dry spell at the moment, where we haven’t seen decent rain in weeks. So naturally I thought it would be safe for me to wash my sheets. Nope! 🌧️😒

I’ll be honest, I don’t like berry compote. I’ll eat it as it’s the “healthest” component of my dessert. But I’d be happier if it was just the cream and créme brulée.

Oof, so glad it’s a Friday. Work’s been quite busy this week. It’ll be busy for the next few weeks as well, unfortuately. But at least I’ll have these two days to recover. 🍻