One week to go! 💉💉

For the last couple of weeks, I’ve been driving Confluence at work, doing investigations and writing them up. It’s nice getting these tasks occasionally but too much of it does become tedious. So when I saw a coding task in the backlog, I jumped on it.

This week’s earworm: Who Can It Be Now by Men At Work 🎵

On Choosing the Hard Way Forward

This is about work, so the usual disclaimers about opinions being my own, etc. apply here.

I have an interesting problem in front of me at the moment: I’ve need to come up with a way to be notified when a user connects to, or disconnects from, a PostgreSQL database. This is not something that’s supported by PostgreSQL out of the box1, so my options are limited to building something that sits outside the database. I can think of two ways that I can do this: have something that sits in front of the database which acts as a proxy, or have something that sits behind the database and generates the notifications by parsing the server log.

A database proxy is probably the better option in the long run. Not only will it allow us to know exactly when a user connects or disconnects — since they will be connecting to the proxy itself — it could potentially allow us to do a few other things that have been discussed, such as IP address whitelisting. It might be a fair bit of work to do, and would require us to know the PostgreSQL wire protocol, but given how widespread PostgreSQL is, I’m suspecting that this could be done once and not need many changes going forward.

Despite these advantages, I find myself considering the log parsing approach as the recommended solution. It’s probably a more fragile solution — unlike the wire protocol, there’s nothing stopping the PostgresSQL devs from changing a log message whenever they like — and it would not allow us to do all the other stuff that we’d like it to do. But it will be faster to build, and would involve less “hard programming” than the alternative. It can be knocked out quite quickly with a couple of regular expressions.

Weighing the two options, I find myself wondering why I’m preferring the latter. Why go for the quick and easy solution when the alternative, despite requiring more work, would give us the greatest level of flexibility? It’s not like we couldn’t do it: I’m pretty confident anyone on the team would be able to put this proxy service together. It’s not even like my employer is requiring one particular solution over another (they haven’t yet received any of the suggestions I’m planning to propose, so they haven’t given a preference one way or the other). So what’s giving me pause from recommending it?

No decision is completely made in a vacuum, and this is especially true in the mind of the decider. There are forces that sit outside the immediate problem that weigh on the decision itself: personal experience mixed with the prevailing zeitgeist of the industry expressed as opinions of “best practice”. Getting something that works out quickly vs. taking the time to build something more correct; a sense that taking on something this large would also result in a fair amount of support and maintenance (at the very least, we would need to be aware of changes in the wire protocol); and just a sense that going for the proxy option would mean we’re building something this is “not part of our core business”.

Ah, yes, the old “core business” argument. I get the sense that a lot of people treat this one as a binary decision: either it’s something that we as a business does, or it’s not. But I wonder if it’s more of a continuum. After all, if we need to block users based on their IP address, is it not in our interest that we have something that does this? At what point does the lost opportunity of not having this outweigh the cost of taking on the development work now to build it? If we build the easy thing now, and later on we find ourselves needing the thing we don’t have, would we regret it?

This is a bit of a rambling post, but I guess I’m a little conflicted about the prevailing approach within the tech industry of building less. It’s even said that part of the job is not only know what to build, but when NOT to build. I imagine no-one wants to go to the bad old days where everyone and their dog was building their own proprietary database from scratch. I definitely don’t want that either, but I sometimes wonder whether we’ve overcorrected in the other direction somewhat.


  1. I didn’t look at whether this is doable with hooks or extensions. ↩︎

Apparently my phone carrier is pretty good at promptly sending SMS messages with “offers” or “deals”, but as soon as I need to sign into a website with 2FA, they’re quite happy for the message to take 5 or 10 minutes to get to me. 😒

There’s no better aroma than a freshly opened bag of coffee beans.

Small request to developers of command line tools: please do not assume everyone is using a terminal with a dark background. Light grey text on white is not a good user experience.

Listening to podcasts with automatic ad insertion can be really jarring sometimes. You’re listening along to hosts with American accents, then all of a sudden some Aussie butts in with an offer for something. It always takes me off guard.

🔗 File Not Found

Gradually, Garland came to the same realization that many of her fellow educators have reached in the past four years: the concept of file folders and directories, […], is gibberish to many modern students.

Kids these days. 😄

I enjoy using Tot for temporary working notes. I also enjoy using Boop for manipulating text without having to go to the terminal. What would be awesome is a tool that will combine the two.

Well, not every day you had a 5.8 magnitude earthquake around here (was originally reported as 6.0).

I got a bit restless this morning and just eager to get my second vaccine shot, so I’ve put together a maxination countdown to show me how many days I’ve got to wait. I’ll probably be spending most of the next month looking at it.

I had the opportunity to play Wingspan yesterday. Still in the process of learning it — I don’t play a lot of these sorts of board games — but so far it’s been quite enjoyable. There’s also an extension which includes Australian and New Zealand birds which would be fun to try.

Some Notes About the Covid-19 Situation

Now that the vaccines are here and are (slowly) being rolled out, and that Covid zero is no longer achievable in any realistic sense, the pandemic seems to be taking on a bit of a different vibe at the moment. I am no longer religiously watching the daily press conferences as I did in the past. They’re still occurring as far as I know, and I do appreciate that the authorities are showing up every day once again to brief the public.

But I’m starting to get the sense that people are generally loosing interest in it now. Well, maybe “loosing interest” is the wrong way to say it. It’s not like it’s something that could be ignored: if you don’t get affected yourself, you’re still bound by the current restrictions in some way. Maybe it’s more like it’s starting to slip into the background somewhat.

Slowly the we’re-all-in-this-together collectivism is morphing into one of personal responsibility. Except for the need to keep the medical systems from being overwhelmed, it’s now up to the individual to take care of themselves, whether it’s by masking up and social distancing, or by getting vaccinated. Everyone that I love has done just this: they’re got their shots when they could and are generally being very careful. But there are people out there that are not. Even some of my friends parents are hesitant to get the vaccine, either waiting for Pfizer (they’ll be waiting a while) or just being suspect of the vaccine at all.

I also think that the success of the lockdowns before the delta variant has lulled people into a sense of security that is no longer present anymore. The latest lockdown has largely failed, and now it’s immunity from the vaccines that will have to protect us. I hope these people that are not taking this seriously realise that the protection that comes from collective actions will no longer be around when the virus comes for them.

You would have thought that by working from home for a year and a half, and predominantly communicating through text, that my writing skills would improve in some way. After re-reading a pull-request comment I wrote 5 minutes ago, I’m wondering if there’s been any change at all.

It’s a real shame that the powers that be insist on keeping the arcane stupidity of country-based copyright restrictions with the move to digital products. Why can’t I buy a Kindle version of a book because the country code in a database is AU instead of US? So frustrating!

AWS Lambda function names can only be 64 characters long.

  • 23 characters are used for the stack name
  • 25 characters are used for the Step Function name
  • 4 characters are used for the environment

Leaving me with only 12 characters for the actual name of the function.

Hmm, UV index expected to reach 4 (moderate) today, and 5 in a few days time. Might be time to dig the hat out once again.

For the last two months, I’ve been working on a Mac app to automatically import my blog posts into a Day One journal. I think it’s now in a state for others to start taking a look at. So if this is something that interests you, please feel free to give it a try.

If it wasn’t for the use of an all-caps style, this Daring Fireball post would be a perfect reference for which words to capitalise in a title (open it in a feed reader or view the page source to see what I mean). 😄